/* Template v2 — layout presets, hero styles, card styles. Colours/fonts come from design_css_vars(). */
:root { --surface-2: color-mix(in srgb, var(--primary) 5%, #fff); --line: color-mix(in srgb, var(--primary) 12%, #fff); }
body { font-family: var(--font); background: var(--bg); }
h1, h2, h3, .page-title { font-family: var(--display); letter-spacing: -.01em; }
.btn { border-radius: var(--radius); }
.btn-lg { padding: .85rem 1.5rem; font-size: 1rem; font-weight: 700; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-accent:hover { filter: brightness(.95); text-decoration: none; }
.btn-paypal { background: #ffc439; color: #111; border-color: #ffc439; margin-top: .6rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* announcement */
.announce-bar { background: var(--accent); color: var(--accent-ink); text-align: center; font-size: .85rem; font-weight: 600; padding: .4rem 0; }

/* header variants */
.header-top { background: var(--header-bg); }
.cat-bar { background: var(--nav-bg); }
.header-centered { grid-template-columns: 1fr auto 1fr; }
.header-centered .brand { justify-self: center; }
.header-centered .header-right { justify-self: end; }
.header-centered .header-search { max-width: 320px; }
.cat-bar-center { justify-content: center; }
.header-split { grid-template-columns: auto 1fr minmax(200px, 300px) auto; }
.split-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.split-nav a { color: #fff; font-weight: 600; font-size: .95rem; opacity: .92; }
.split-nav a:hover { opacity: 1; color: var(--accent); text-decoration: none; }
.header-split .header-search select, .header-centered .header-search select { display: none; }

/* premium + editorial: light header */
.preset-premium-boutique .header-top, .preset-editorial .header-top { background: #fff; color: var(--text); border-bottom: 1px solid var(--line); }
.preset-premium-boutique .brand, .preset-editorial .brand, .preset-premium-boutique .header-actions a, .preset-editorial .header-actions a { color: var(--text) !important; }
.preset-premium-boutique .cat-bar, .preset-editorial .cat-bar { background: #fff; border-bottom: 1px solid var(--line); }
.preset-premium-boutique .cat-bar a, .preset-editorial .cat-bar a { color: var(--text) !important; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.preset-premium-boutique .brand-tail, .preset-editorial .brand-tail { color: var(--primary); }
.preset-modern-minimal .header-top { background: #fff; border-bottom: 1px solid var(--line); }
.preset-modern-minimal .brand, .preset-modern-minimal .header-actions a, .preset-modern-minimal .split-nav a { color: var(--text) !important; }
.preset-modern-minimal .header-search { background: var(--surface-2); border-radius: 999px; overflow: hidden; }

/* hero */
.hero { width: min(var(--max), 100%); margin: 1.25rem auto; padding: clamp(1.5rem, 4vw, 3.5rem); display: grid; gap: 2rem; align-items: center; border-radius: var(--radius); background: var(--primary); color: var(--primary-ink); overflow: hidden; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.4rem); line-height: 1.08; margin: 0 0 .75rem; color: inherit; }
.hero-sub { font-size: clamp(1rem, 1.4vw, 1.2rem); opacity: .9; max-width: 38ch; margin: 0 0 1.5rem; }
.hero-kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 0 0 .6rem; }
.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.hero .btn-ghost { color: inherit; border-color: currentColor; background: transparent; }
.hero-media img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: var(--radius); padding: 1rem; }
.hero-split { grid-template-columns: 1.1fr .9fr; }
.hero-banner { grid-template-columns: 1fr; text-align: center; justify-items: center; padding-block: clamp(3rem, 8vw, 6rem); background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, var(--accent))); }
.hero-banner .hero-sub { margin-inline: auto; }
.hero-banner .hero-actions { justify-content: center; }
.hero-banner .hero-media { display: none; }
.hero-grid { grid-template-columns: .9fr 1.1fr; }
.hero-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.hero-tile { position: relative; background: #fff; border-radius: var(--radius); overflow: hidden; color: var(--text); }
.hero-tile img { aspect-ratio: 1; object-fit: contain; width: 100%; padding: .75rem; }
.hero-tile span { position: absolute; left: .6rem; bottom: .6rem; background: rgba(255,255,255,.94); padding: .3rem .6rem; border-radius: var(--radius); font-weight: 700; font-size: .9rem; }
.hero-timer { margin-top: 1rem; font-size: 1rem; }
.hero-timer strong { font-variant-numeric: tabular-nums; background: var(--accent); color: var(--accent-ink); padding: .15rem .5rem; border-radius: 4px; }
.hero.hero-countdown { grid-template-columns: 1.1fr .9fr; background: var(--header-bg); }
.preset-premium-boutique .hero { border-radius: 0; background: var(--surface-2); color: var(--text); }
.preset-premium-boutique .hero .hero-sub { color: var(--muted); }
.preset-editorial .hero { background: #fff; color: var(--text); border: 1px solid var(--line); }

/* sections */
.home-section { width: min(var(--max), 100%); margin: 0 auto 2rem; padding-inline: clamp(12px, 1.6vw, 24px); }
.home-section .section-head { padding-inline: 0; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
.cat-tile { background: var(--surface); border-radius: var(--radius); padding: .8rem; text-align: center; color: var(--text); border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.cat-tile-img img { aspect-ratio: 1; object-fit: contain; width: 100%; }
.cat-tile-name { display: block; font-weight: 700; margin-top: .5rem; }
.cat-tile small { color: var(--muted); }
.preset-editorial .cat-tiles, .preset-premium-boutique .cat-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.preset-bold-deals .cat-tile { background: var(--primary); color: var(--primary-ink); border: 0; }
.preset-bold-deals .cat-tile small { color: inherit; opacity: .8; }
.preset-bold-deals .cat-tile-img { display: block; background: #fff; border-radius: var(--radius); }
.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.trust-item { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.1rem; border-left: 4px solid var(--accent); }
.trust-item strong { display: block; font-size: 1rem; margin-bottom: .2rem; }
.trust-item span { color: var(--muted); font-size: .9rem; }
.story-block > div { background: var(--surface-2); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 3rem); max-width: 820px; margin: 0 auto; text-align: center; }
.story-block p { font-size: 1.08rem; color: var(--muted); }
.quick-strip { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.quick-strip h2 { margin: 0 0 .25rem; }
.quick-strip p { margin: 0; color: var(--muted); }
.newsletter { text-align: center; background: var(--primary); color: var(--primary-ink); border-radius: var(--radius); padding: 2rem 1rem; }
.newsletter p { opacity: .85; }
.newsletter-form { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; max-width: 480px; margin: 0 auto; }
.newsletter-form input { flex: 1 1 220px; padding: .7rem .9rem; border-radius: var(--radius); border: 0; font: inherit; }

/* product cards */
.product-card { border-radius: var(--radius); }
.card-flat .product-card { box-shadow: none; border: 0; }
.card-flat .product-card .thumb { background: var(--surface-2); }
.card-minimal .product-card { box-shadow: none; border: 0; background: transparent; }
.card-minimal .product-card .thumb { background: #fff; border-radius: var(--radius); }
.card-minimal .product-card .sku { display: none; }
.card-minimal .card-actions .btn { background: transparent; color: var(--text); border: 1px solid var(--line); }
.card-tall .product-card .thumb img { aspect-ratio: 4 / 5; object-fit: contain; }
.card-tall .product-card .title { font-family: var(--display); font-size: 1rem; }
.card-tall .product-card .sku { display: none; }
.preset-bold-deals .deal-badge { background: var(--accent); color: var(--accent-ink); font-size: .85rem; }
.grid-products { width: auto; padding: 0; margin: 0; }

/* product page */
.breadcrumb { margin: 1rem 0; font-size: .88rem; color: var(--muted); }
.gallery { position: relative; }
.gallery .deal-badge { position: absolute; left: 1rem; top: 1rem; z-index: 2; }
.gallery-main { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: var(--radius); }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 6px; background: #fff; cursor: pointer; }
.gallery-thumbs button.is-active { border-color: var(--accent); }
.gallery-thumbs img { width: 64px; height: 64px; object-fit: contain; }
.save-pill { display: inline-block; margin-left: .5rem; font-size: .85rem; background: color-mix(in srgb, var(--ok) 14%, #fff); color: var(--ok); padding: .15rem .5rem; border-radius: 999px; font-weight: 700; vertical-align: middle; }
.lead { font-size: 1.02rem; }
.buy-form { display: flex; gap: .6rem; margin: 1.1rem 0; }
.buy-form select { padding: .6rem; border-radius: var(--radius); border: 1px solid var(--border); }
.buy-form .btn { flex: 1; }
.buy-points { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .35rem; }
.buy-points li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.sku-line { color: var(--muted); font-size: .85rem; }
.product-details, .reviews-panel { margin-top: 1.5rem; }
.verified { color: var(--ok); font-size: .82rem; font-weight: 700; }
.notice { padding: .6rem .9rem; border-radius: var(--radius); font-weight: 600; }
.notice-ok { background: #eaf7ef; color: #146c3a; }
.notice-warn { background: #fff6e5; color: #8a5300; }
.review-form { margin-top: 1.25rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); max-width: 620px; }
.star-input { border: 0; padding: 0; margin: 0 0 .8rem; display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.star-input legend { width: 100%; font-weight: 600; margin-bottom: .2rem; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { font-size: 1.9rem; color: #d3d6dc; cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #f5a623; }

/* checkout */
.checkout-page { padding-top: 1rem; }
.checkout-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1.5rem; align-items: start; }
.checkout-form h2, .checkout-summary h2 { font-size: 1.1rem; margin: 1.2rem 0 .6rem; }
.checkout-form h2:first-of-type, .checkout-summary h2 { margin-top: 0; }
.checkout-summary { position: sticky; top: 90px; }
.summary-lines { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; }
.summary-lines li { display: grid; grid-template-columns: 56px 1fr auto; gap: .6rem; align-items: center; font-size: .9rem; }
.summary-lines img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
.coupon-form { display: flex; gap: .5rem; margin-bottom: 1rem; align-items: center; }
.coupon-form input { flex: 1; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; }
.summary-totals { display: grid; grid-template-columns: 1fr auto; gap: .35rem; margin: 0; }
.summary-totals dd { margin: 0; text-align: right; }
.summary-totals .total { font-weight: 800; font-size: 1.15rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.secure-note { font-size: .82rem; color: var(--muted); text-align: center; }

/* cookie banner */
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90; max-width: 720px; margin: 0 auto; background: #fff; color: var(--text); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: 1rem 1.1rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.cookie-banner p { margin: 0; flex: 1 1 320px; font-size: .9rem; }
.cookie-banner[hidden] { display: none; }
.empty-state { text-align: center; padding: 3rem 1rem; margin-top: 2rem; }
.pay-icons { color: inherit; opacity: .8; }

@media (max-width: 900px) {
  .hero-split, .hero-grid, .hero.hero-countdown, .checkout-grid { grid-template-columns: 1fr; }
  .header-split { grid-template-columns: auto 1fr auto; }
  .split-nav { grid-column: 1 / -1; order: 5; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .3rem; }
  .header-split .header-search { grid-column: 1 / -1; order: 4; }
  .header-centered { grid-template-columns: auto 1fr; }
  .header-centered .header-left { grid-column: 1 / -1; order: 3; }
  .header-centered .header-search { max-width: none; }
  .header-centered .brand { justify-self: start; }
  .checkout-summary { position: static; }
  .cat-bar-center { justify-content: flex-start; }
}

.prose { max-width: 860px; margin: 1.5rem auto; line-height: 1.65; }
.prose h2 { font-size: 1.15rem; margin-top: 1.6rem; }
.faq-item { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.faq-item summary { font-weight: 700; cursor: pointer; font-size: 1.02rem; }
.faq-item p { margin: .6rem 0 0; color: var(--muted); }
.sort-form { display: flex; align-items: center; gap: .4rem; font-size: .9rem; }
.sort-form select { padding: .4rem .5rem; border-radius: var(--radius); border: 1px solid var(--border); }
.shop-results-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 900px) {
  .cat-bar a, .split-nav a { white-space: nowrap; }
  .cat-bar-inner, .split-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-inline: 12px; gap: 1.1rem; }
  .cat-bar-inner::-webkit-scrollbar, .split-nav::-webkit-scrollbar { display: none; }
  .header-inner.header-split, .header-inner.header-centered { padding-inline: 12px; }
  .hero { width: auto; margin: 12px; padding: 1.5rem 1.25rem; }
  .home-section, .wrap { padding-inline: 12px; }
}
