/* =============================================================
   PATTERN SHOP PAGE — card-based hero, USP grid & sticky buy bar
   Visual language matches the books/presale & Ami-Along pages
   ============================================================= */
#ps-root, #ps-root * { box-sizing: border-box; }
#ps-root {
	font-family: Arial, Helvetica, sans-serif;
	max-width: 780px;
	margin: 0 auto 30px;
	color: #2d2d2d;
}

/* ---- Single card wrapping hero + about-pattern content ---- */
.ps-card {
	background: #fff;
	border-radius: 3px;
	border: 1px solid #ececec;
	border-top: 3px solid #fcb040;
	padding: 16px;
	margin-top: 6px;
	margin-bottom: 16px;
}
.ps-flex { display: flex; gap: 22px; align-items: flex-start; }

.ps-cover-col { flex: 0 0 45%; max-width: 45%; position: sticky; top: 16px; }
.ps-image-wrap { position: relative; }
.ps-cover-col .ps-main-img {
	width: 100%; height: auto; display: block;
	border-radius: 3px;
}
.ps-img-nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 32px; height: 32px; border-radius: 50%; padding: 0;
	background: rgba(255,255,255,0.85); border: 1px solid #ececec;
	color: #2d2d2d; font-size: 13px; display: flex; align-items: center; justify-content: center;
	cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.ps-img-nav:hover { background: #fff; border-color: #fcb040; color: #e07800; }
.ps-img-nav.prev { left: 8px; }
.ps-img-nav.next { right: 8px; }
.ps-pin-btn {
	position: absolute; top: 8px; right: 8px;
	width: 30px; height: 30px; border-radius: 50%;
	background: rgba(255,255,255,0.9); border: 1px solid #ececec;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer; transition: background .15s, border-color .15s;
}
.ps-pin-btn:hover { background: #fff; border-color: #e60023; }
.ps-pin-btn img { width: 15px; height: 15px; display: block; }

.ps-thumbs { display: flex; gap: 4px; margin-top: 6px; }
.ps-thumb-item {
	flex: 1; aspect-ratio: 1 / 1; border-radius: 2px; overflow: hidden;
	border: 2px solid #ececec; cursor: pointer;
	transition: border-color .15s;
}
.ps-thumb-item:hover, .ps-thumb-item.active { border-color: #fcb040; }
.ps-thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ps-content-col { flex: 1; min-width: 0; }
.ps-eyebrow {
	font-size: 11px; font-weight: 700; letter-spacing: .08em;
	text-transform: uppercase; color: #fcb040; margin-bottom: 4px;
}
.ps-eyebrow a { color: #fcb040; }
.ps-title {
	font-family: BebasNeueRegular, Arial, sans-serif;
	font-size: 34px; font-weight: 400; line-height: 1.05;
	margin-bottom: 2px; color: #2d2d2d;
}
.ps-subtitle { font-size: 15px; color: #555; font-weight: 700; margin-bottom: 14px; }
.ps-subtitle a { color: #555; }

/* ---- Buy card ---- */
.buy-card {
	border: 1.5px solid #fcb040;
	border-radius: 3px;
	padding: 12px 14px;
	background: #fffaf2;
	margin-bottom: 18px;
	overflow: hidden;
}
.buy-card-header {
	display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
	padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid #f5ddb0;
}
.buy-card-title { font-size: 14px; font-weight: 700; color: #2d2d2d; }
.badge-popular {
	font-size: 10px; font-weight: 700; background: #fcb040; color: #fff;
	padding: 2px 7px; border-radius: 3px; letter-spacing: .03em; white-space: nowrap;
}
.buy-card-usps {
	display: flex; flex-wrap: wrap; align-items: center;
	row-gap: 6px; column-gap: 14px; list-style: none;
	margin: 0 0 10px; padding: 0; font-size: 11.5px; color: #555; line-height: 1.4;
}
.buy-card-usps li { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.buy-card-usps li::before { content: '✓'; color: #fcb040; font-weight: 700; }
.buy-card-action {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; flex-wrap: wrap;
}
.buy-price { font-size: 20px; font-weight: 700; color: #e07800; white-space: nowrap; line-height: 1; }
.buy-price small { display: block; font-size: 11px; font-weight: 400; color: #bbb; }
.buy-price .strike { font-size: 13px; font-weight: 400; color: #bbb; text-decoration: line-through; margin-right: 4px; }
#buybutton {
	display: flex; align-items: center; flex-shrink: 0;
	width: auto !important; float: none !important; margin-right: 0 !important; clear: none;
}
#buybutton form { display: flex; align-items: center; float: none; margin: 0; }
#buybutton select#os0 { display: block; margin-bottom: 8px !important; }

.buy-card-secondary { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f5ddb0; }
.ps-save-btn { width: 100%; text-align: center; }
.ps-save-btn .ps-save-icon { margin-right: 4px; }

/* ---- Orange CTA button — shared class/values with the books & Ami-Along pages ---- */
.checkout-button-new {
	appearance: none; -webkit-appearance: none; -moz-appearance: none;
	background: #fcb040;
	color: #fff;
	border: none; border-radius: 3px;
	width: auto; max-width: 100%; padding: 9px 16px;
	padding-block: 9px; padding-inline: 16px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px; font-weight: 700;
	cursor: pointer; white-space: nowrap; text-align: center;
	text-transform: uppercase; letter-spacing: 0.04em;
	transition: background-color 0.25s ease;
	flex: 0 0 auto; float: none; display: inline-block;
	position: static; z-index: auto;
	box-sizing: border-box; line-height: normal; margin: 0;
}
.checkout-button-new:hover { background: #de9200; }
.checkout-button-new.secondary { background: #fff; color: #fcb040; border: 1.5px solid #fcb040; }
.checkout-button-new.secondary:hover { background: #fff9ef; }
.checkout-button-new.secondary.active { background: #fff4df; }

.no-paperback-note { font-size: 12px; color: #999; }

#duplicate-warning { font-family: Arial, Helvetica, sans-serif; }

/* ---- About this pattern (folded into the same card, no separate box) ---- */
.ps-about { margin-top: 6px; }
.ps-details-heading {
	font-family: BebasNeueRegular, Arial, sans-serif;
	font-size: 16px; color: #2d2d2d; margin: 0 0 10px;
	padding-bottom: 4px; border-bottom: 2px solid #fcb040; display: inline-block;
}
.ps-about p.more { font-size: 14px; color: #6d6d6d; line-height: 1.7; margin: 0; }
.ps-about p.more b { color: #2d2d2d; }
.ps-about p.more a { color: #e07800; text-decoration: underline; }
.ps-about p.more a.stitch-link { color: inherit; text-decoration: underline; }
.ps-measure { display: inline-flex; gap: 2px; vertical-align: middle; }
.ps-measure-unit {
	font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: 700;
	color: #bbb; background: none; border: none; cursor: pointer;
	padding: 0 3px; border-bottom: 2px solid transparent;
}
.ps-measure-unit.active { color: #e07800; border-bottom-color: #fcb040; }

.ps-book-crosssell {
	background: #fff4df; border: 1.5px solid #fcb040; border-radius: 3px;
	padding: 10px 14px; margin-bottom: 12px; font-size: 12px; color: #7a4800; line-height: 1.5;
}
.ps-book-crosssell a { color: #7a4800; text-decoration: underline; }

.ps-disclaimer-toggle {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 12px; color: #fcb040; cursor: pointer;
	border: none; background: none; padding: 0;
	font-family: Arial, Helvetica, sans-serif; margin-bottom: 10px;
}
.ps-disclaimer-toggle:hover { color: #e07800; }
.ps-disclaimer-arrow { display: inline-block; font-size: 10px; transition: transform .2s; line-height: 1; }
.ps-disclaimer-toggle.open .ps-disclaimer-arrow { transform: rotate(180deg); }
.ps-disclaimer-box {
	display: none; background: #f7f7f5; border: 1px solid #e8e8e8; border-radius: 3px;
	padding: 10px 12px; font-size: 11px; color: #898989; line-height: 1.6; margin-bottom: 10px;
}
.ps-disclaimer-box.open { display: block; }
.ps-disclaimer-box a { color: #e07800; }

.warningbox.lessmargin { border-radius: 3px; margin-bottom: 12px; }

/* ---- Cross-sell sliders ---- */
.ps-slider-section { margin-bottom: 20px; }
.ps-slider-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ps-slider-controls { display: flex; gap: 6px; flex-shrink: 0; }
.ps-slider-arrow {
	width: 28px; height: 28px; border-radius: 50%; border: 1px solid #e0e0e0; background: #fff;
	cursor: pointer; display: flex; align-items: center; justify-content: center; color: #2d2d2d;
	transition: border-color .15s, color .15s; padding: 0; font-size: 12px;
}
.ps-slider-arrow:hover { border-color: #fcb040; color: #e07800; }
.ps-slider-track {
	display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
	scroll-behavior: smooth; padding-bottom: 6px; margin: 0;
	scrollbar-width: none; -ms-overflow-style: none;
}
.ps-slider-track::-webkit-scrollbar { display: none; height: 0; width: 0; }
.ps-slider-track .item_xs { flex: 0 0 140px; scroll-snap-align: start; margin: 0 !important; }

/* ============================================================
   STICKY BUY BAR — CSS copied as-is from the books_presale page
   (#sticky-buy-bar, .sticky-bar-*) so a single shared stylesheet
   can serve all three pages. The orange box wraps the whole row
   (name + price + button), so the pattern name is used as the
   "label" cell instead of a separate title outside the box.
   ============================================================ */
#sticky-buy-bar {
	position: fixed; bottom:0; left:0; right:0;
	z-index: 600; background: #fff;
	border-top: 3px solid transparent;
	box-shadow: 0 -4px 20px rgba(0,0,0,0.13);
	padding: 10px 16px 12px; display: none;
}
#sticky-buy-bar::before {
	content: ''; position: absolute;
	top: -3px; left: 0; right: 0; height: 3px;
	background: #fcb040;
}
.sticky-bar-inner {
	max-width: 780px; margin: 0 auto;
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.sticky-bar-options { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.sticky-bar-option {
	display: grid;
	grid-template-columns: 1fr auto 110px;
	align-items: center; gap: 12px;
	background: #fafafa; border: 1.5px solid #e8e8e8;
	border-radius: 3px; padding: 7px 12px;
}
.sticky-bar-option .checkout-button-new { width: 100%; text-align: center; }
.sticky-bar-option.featured { border-color: #fcb040; background: #fffaf2; }
.sticky-bar-label {
	font-size: 12px; font-weight: 700; color: #2d2d2d; white-space: nowrap;
	overflow: hidden; text-overflow: ellipsis;
}
.sticky-bar-price { font-size: 17px; font-weight: 700; color: #e07800; white-space: nowrap; text-align: right; }

/* The PayPal form needs to disappear from the box model so the button
   becomes the actual 110px grid cell (the books page's plain <button>
   is already a direct grid child; our form wraps a real submit button) */
.sticky-bar-option form { display: contents; }
.sticky-bar-option form .checkout-button-new { display: block; width: 100%; }

@media screen and (min-width:450px) { #ps-firstsingle-hide { display:none } }

/* ---- Mobile ---- */
@media screen and (max-width: 600px) {
	.ps-flex { flex-direction: column; gap: 0; }
	.ps-cover-col { flex: none; max-width: 100%; width: 100%; position: static; top: auto; }
	.ps-content-col { width: 100%; padding-top: 14px; }
	.ps-title { font-size: 26px; }
	.buy-card-action { justify-content: flex-start; }
	.sticky-bar-label { font-size: 11px; }
	.sticky-bar-option { grid-template-columns: 1fr auto 96px; gap: 8px; }
	.ps-slider-track .item_xs { flex-basis: 120px; }
}
@media screen and (max-width:450px) { .ps-thumbs { display:none } }

/* =============================================================
   Additions for pattern.php 
   ============================================================= */

/* Free pattern download card has no price, just one CTA —
   center it instead of the space-between price/button layout
   used on the paid shop page. */
.buy-card-action.single-action { justify-content: center; }

/* Slightly larger, more prominent CTA for the single free-download button */
.checkout-button-new.btn-large { padding: 11px 28px; font-size: 14px; }