/* ==========================================================================
   CORE STYLES – shared by all three design samples.
   Each theme (/sample-N/assets/theme.css) overrides the CSS variables below
   and adds its own layout styles for header, footer, home, shop and product.
   Mobile-first; breakpoints at 640px, 900px and 1200px.
   ========================================================================== */

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f6f4f1;
    --text: #1d1d1f;
    --muted: #6b6b70;
    --border: #e6e2dc;
    --accent: #b08d57;
    --accent-hover: #977443;
    --accent-contrast: #ffffff;
    --sale: #b3261e;
    --success: #1e7a46;
    --danger: #b3261e;
    --info: #1f5fa8;
    --font-head: Georgia, "Times New Roman", serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --heading-weight: 500;
    --heading-tracking: 0;
    --radius: 6px;
    --radius-sm: 4px;
    --btn-radius: 0;
    --btn-transform: uppercase;
    --btn-tracking: .12em;
    --container: 1280px;
    --gutter: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .08);
    --focus: 0 0 0 3px rgba(176, 141, 87, .45);
    --header-h: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
address { font-style: normal; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 2px; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 900px) { :root { --gutter: 32px; } }
.section { padding-top: 48px; padding-bottom: 48px; }
@media (min-width: 900px) { .section { padding-top: 80px; padding-bottom: 80px; } }
.page-narrow { max-width: 880px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.stack > * + * { margin-top: 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-field { position: absolute !important; left: -9999px; opacity: 0; height: 0; width: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--text); color: var(--bg); padding: 10px 16px; }
.skip-link:focus { top: 8px; color: var(--bg); }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .75rem; color: var(--accent); margin-bottom: .75em; }
.eyebrow a { text-decoration: none; }
.page-header { margin-bottom: 32px; }
.page-title { font-size: clamp(2rem, 4vw, 3rem); }
.section-title { font-size: clamp(1.5rem, 3vw, 2.25rem); }
.small-title { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; }
.lead { font-size: 1.2rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; min-height: 44px;
    border: 1px solid transparent; border-radius: var(--btn-radius);
    background: var(--surface-2); color: var(--text);
    font-size: .8rem; font-weight: 600; letter-spacing: var(--btn-tracking); text-transform: var(--btn-transform);
    text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { color: inherit; }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn-outline { background: transparent; border-color: currentColor; }
.btn-outline:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-link { background: none; text-decoration: underline; padding-left: 0; padding-right: 0; }
.btn-sm { padding: 6px 14px; min-height: 34px; font-size: .72rem; }
.btn-lg { padding: 16px 32px; min-height: 52px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; }
.icon-btn { background: none; border: 0; font-size: 1.5rem; line-height: 1; padding: 8px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--danger); }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 16px; }
.form-row label, .option-label, .filter-title { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"],
input[type="search"], input[type="url"], input[type="date"], input[type="datetime-local"], input:not([type]), select, textarea {
    width: 100%; min-height: 44px; padding: 10px 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[readonly] { background: var(--surface-2); }
textarea { resize: vertical; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; margin: 6px 0 0; }
.form-grid { display: grid; gap: 0 16px; }
@media (min-width: 640px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .form-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
}
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 16px; cursor: pointer; }
.check input { margin-top: 5px; accent-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* ---------- Alerts / flash ---------- */
.flash-stack { margin-top: 16px; }
.alert { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 14px 18px; margin-bottom: 16px; border-radius: var(--radius-sm); border-left: 4px solid; background: var(--surface-2); font-size: .95rem; word-break: break-word; }
.alert-success { border-color: var(--success); }
.alert-error { border-color: var(--danger); }
.alert-info { border-color: var(--info); }
.alert-close { background: none; border: 0; font-size: 1.25rem; line-height: 1; cursor: pointer; color: var(--muted); }

.toast {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 2000;
    background: var(--text); color: var(--bg); padding: 14px 22px; border-radius: var(--radius); box-shadow: var(--shadow);
    transition: opacity .25s, transform .25s; max-width: calc(100% - 32px); font-size: .95rem;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast a { color: inherit; font-weight: 600; }

/* ---------- Cards, badges, status ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 24px; }
.card-title { font-size: 1.25rem; margin-bottom: 16px; }
.card-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.badge { display: inline-block; padding: 3px 10px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--surface-2); color: var(--text); border-radius: 999px; }
.badge-sale { background: var(--sale); color: #fff; }
.badge-new { background: var(--text); color: var(--bg); }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); text-transform: capitalize; }
.status--processing, .status--pending { background: #fff4d6; color: #7a5600; }
.status--shipped { background: #dcebff; color: #1f4f8a; }
.status--delivered, .status--paid { background: #dcf3e5; color: #1e6b3f; }
.status--cancelled, .status--failed, .status--refunded { background: #fde2e0; color: #8a1f17; }
.status--unpaid { background: #eee; color: #555; }

/* ---------- Tables ---------- */
.table th, .table td { padding: 14px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.table .text-right { text-align: right; }
@media (max-width: 639px) {
    .cart-table thead, .table-responsive thead { display: none; }
    .cart-table tr, .table-responsive tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
    .cart-table td, .table-responsive td { border: 0; padding: 2px 0; }
    .cart-table td:first-child { grid-column: 1 / -1; }
    .table-responsive td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
    .cart-table td.text-right, .table-responsive td.text-right { text-align: left; }
}

/* ---------- Stars ---------- */
.stars { display: inline-flex; gap: 1px; color: var(--border); font-size: .95em; letter-spacing: 0; }
.star.is-on { color: var(--accent); }

/* ---------- Product grid + base product card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
@media (min-width: 900px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 24px; }
    .product-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.pcard { position: relative; display: flex; flex-direction: column; }
.pcard-media { position: relative; display: block; overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 5; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .4s ease; }
.pcard-media .pcard-hover { position: absolute; inset: 0; opacity: 0; }
.pcard:hover .pcard-media .pcard-hover { opacity: 1; }
.pcard:hover .pcard-media img:first-child { transform: scale(1.04); }
.pcard-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.pcard .wish-form { position: absolute; top: 8px; right: 8px; z-index: 3; }
.pcard-body { padding-top: 14px; }
.pcard-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 4px; }
.pcard-title { font-size: 1rem; margin: 0 0 6px; font-family: var(--font-body); font-weight: 500; }
.pcard-title a { text-decoration: none; }
.pcard-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.pcard-rating { font-size: .8rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.price { font-weight: 600; }
.price ins { text-decoration: none; color: var(--sale); }
.price del { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: .9em; }

.wish-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #9a9a9a; cursor: pointer; transition: color .2s, transform .2s; }
.wish-btn:hover { transform: scale(1.08); color: var(--sale); }
.wish-btn.is-active { color: var(--sale); }
.wish-btn--inline { background: var(--surface-2); }
.wish-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: .9rem; }

/* ---------- Product page ---------- */
.gallery { display: grid; gap: 12px; }
.gallery-main { position: relative; overflow: hidden; background: var(--surface-2); aspect-ratio: 1 / 1; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease-out; }
.gallery-main.is-zooming img { transform: scale(2); }
.gallery-main .badge-sale { position: absolute; top: 16px; left: 16px; }
.gallery-thumbs { display: flex; gap: 10px; overflow-x: auto; }
.gallery-thumb { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; width: 80px; flex: 0 0 80px; opacity: .65; transition: opacity .2s, border-color .2s; }
.gallery-thumb.is-active, .gallery-thumb:hover { opacity: 1; border-color: var(--accent); }
.gallery-thumb img { aspect-ratio: 1; object-fit: cover; width: 100%; }

.stock { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin: 16px 0; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.stock--low .stock-dot { background: #d38b00; }
.stock--out .stock-dot { background: var(--danger); }
.option-group { margin-bottom: 18px; }
.option-values { display: flex; flex-wrap: wrap; gap: 8px; }
.option-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-chip span { display: inline-block; min-width: 48px; padding: 9px 14px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-size: .9rem; transition: border-color .2s, background .2s; }
.option-chip input:checked + span { border-color: var(--text); background: var(--text); color: var(--bg); }
.option-chip input:focus-visible + span { box-shadow: var(--focus); }
.buy-row { display: flex; gap: 12px; flex-wrap: wrap; }
.buy-row .add-btn { flex: 1 1 200px; }
.qty { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); height: 52px; }
.qty-btn { width: 44px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.qty input { width: 52px; border: 0; text-align: center; min-height: 0; padding: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.product-specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; font-size: .9rem; margin: 24px 0; }
.product-specs dt { color: var(--muted); }
.product-specs dd { margin: 0; }
.breadcrumbs { font-size: .8rem; color: var(--muted); margin-bottom: 20px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.breadcrumbs a { text-decoration: none; }
.perks { display: grid; gap: 10px; font-size: .88rem; margin-top: 24px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Reviews ---------- */
.reviews { display: grid; gap: 40px; padding-top: 48px; }
@media (min-width: 900px) { .reviews { grid-template-columns: 320px 1fr; } }
.reviews-avg { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reviews-avg strong { font-size: 2.2rem; font-family: var(--font-head); }
.reviews-bars li { display: grid; grid-template-columns: 32px 1fr 28px; align-items: center; gap: 8px; font-size: .85rem; }
.reviews-bars .bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.reviews-bars .bar span { display: block; height: 100%; background: var(--accent); }
.review { padding: 20px 0; border-bottom: 1px solid var(--border); }
.review-title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 6px 0; }
.review-form { margin-top: 24px; }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 16px; }
.rating-input legend { width: 100%; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.rating-input input { position: absolute; opacity: 0; }
.rating-input label { font-size: 1.8rem; color: var(--border); cursor: pointer; line-height: 1; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--accent); }
.rating-input input:focus-visible + label { box-shadow: var(--focus); }

/* ---------- Shop: filters, sort, pagination ---------- */
.shop-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.sort-form { display: flex; align-items: center; gap: 8px; }
.sort-form select { width: auto; min-width: 190px; }
.sort-label { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.filter-group { padding: 18px 0; border-bottom: 1px solid var(--border); }
.filter-title { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; margin-bottom: 10px; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .92rem; cursor: pointer; }
.filter-option input { accent-color: var(--accent); }
.filter-option--parent { font-weight: 600; margin-top: 4px; }
.filter-option--child { padding-left: 18px; }
.filter-count { color: var(--muted); font-size: .8rem; }
.price-inputs { display: flex; align-items: center; gap: 8px; }
.filter-actions { padding-top: 18px; display: grid; gap: 4px; }
.filter-toggle { display: inline-flex; }
@media (min-width: 900px) { .filter-toggle { display: none; } }
.filters-panel { display: none; }
.filters-panel.is-open { display: block; position: fixed; inset: 0; z-index: 900; background: var(--bg); overflow-y: auto; padding: 24px var(--gutter) 48px; }
.filters-panel-head { display: flex; justify-content: space-between; align-items: center; }
@media (min-width: 900px) {
    .filters-panel, .filters-panel.is-open { display: block; position: static; padding: 0; background: none; overflow: visible; }
    .filters-panel-head { display: none; }
}
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 56px; }
.page-link { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border: 1px solid var(--border); text-decoration: none; border-radius: var(--radius-sm); }
.page-link.is-current { background: var(--text); color: var(--bg); border-color: var(--text); }
.page-gap { display: grid; place-items: center; min-width: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { display: inline-block; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; text-decoration: none; }
.chip.is-active, .chip:hover { border-color: var(--text); background: var(--text); color: var(--bg); }
.empty-state { text-align: center; padding: 64px 16px; background: var(--surface-2); border-radius: var(--radius); }

/* ---------- Cart & checkout ---------- */
.cart-layout, .checkout-layout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) {
    .cart-layout { grid-template-columns: 1fr 380px; }
    .checkout-layout { grid-template-columns: 1fr 420px; }
    .cart-summary, .checkout-summary { position: sticky; top: calc(var(--header-h) + 24px); }
}
.cart-product { display: flex; gap: 14px; align-items: center; }
.cart-thumb { flex: 0 0 auto; display: block; width: 72px; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-name { font-weight: 600; text-decoration: none; }
.qty-input { width: 80px; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; flex-wrap: wrap; gap: 12px; }
.summary-title { font-size: 1.35rem; }
.totals { margin: 16px 0; }
.totals > div { display: flex; justify-content: space-between; padding: 8px 0; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; }
.totals-discount dd { color: var(--success); }
.totals-grand { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px !important; font-size: 1.15rem; font-weight: 700; }
.totals-grand dt { color: var(--text); }
.coupon-form { display: flex; gap: 8px; margin-bottom: 16px; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--surface-2); margin-bottom: 16px; font-size: .9rem; }
.secure-note { text-align: center; margin-top: 12px; }
.mini-lines li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.mini-thumb { position: relative; width: 56px; aspect-ratio: 1; background: var(--surface-2); }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-qty { position: absolute; top: -8px; right: -8px; background: var(--text); color: var(--bg); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; }
.payment-methods { display: grid; gap: 10px; }
.payment-option { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.payment-option:has(input:checked) { border-color: var(--accent); background: var(--surface-2); }
.payment-option input { margin-top: 5px; accent-color: var(--accent); }
.payment-option span { display: grid; }

/* ---------- Orders ---------- */
.order-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 20px; background: var(--surface-2); margin: 0 0 24px; }
@media (min-width: 640px) { .order-meta { grid-template-columns: repeat(4, 1fr); } }
.order-meta dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.order-meta dd { margin: 0; font-weight: 600; }
.order-bottom { display: grid; gap: 24px; margin-top: 24px; }
@media (min-width: 640px) { .order-bottom { grid-template-columns: 1fr 1fr; } }
.retry-pay { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.retry-pay p { flex: 1 1 100%; margin: 0; }
.retry-pay select { width: auto; }

/* ---------- Account ---------- */
.account-layout { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .account-layout { grid-template-columns: 240px 1fr; } }
.account-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
@media (min-width: 900px) { .account-nav ul { flex-direction: column; } }
.account-nav a, .account-nav .link-btn { display: block; padding: 10px 14px; text-decoration: none; border-radius: var(--radius-sm); font-size: .95rem; }
.account-nav a.is-active, .account-nav a:hover { background: var(--surface-2); color: var(--text); }
.address-grid { display: grid; gap: 16px; margin-bottom: 24px; }
@media (min-width: 640px) { .address-grid { grid-template-columns: 1fr 1fr; } }
.address-card { margin: 0 !important; }
.product-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Auth ---------- */
.page-auth { display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 480px; padding: 32px; }
@media (min-width: 640px) { .auth-card { padding: 48px; } }

/* ---------- Contact / prose / FAQ ---------- */
.contact-layout { display: grid; gap: 40px; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: 1fr 340px; } }
.prose { font-size: 1.05rem; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose figure { margin: 2em 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.faq-item { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq-item summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary::-webkit-details-marker { display: none; }

/* ---------- Newsletter form ---------- */
.newsletter-form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.newsletter-form input[type="email"] { flex: 1 1 220px; }
.form-message { flex: 1 1 100%; margin: 4px 0 0; font-size: .9rem; min-height: 1.2em; }

/* ---------- Mobile nav (generic, themes style the look) ---------- */
.nav-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; color: inherit; }
@media (min-width: 1024px) { .nav-toggle { display: none; } }
body.nav-open { overflow: hidden; }
.cart-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-contrast); font-size: .65rem; font-weight: 700; line-height: 1; }
.cart-count[data-count="0"] { display: none; }

/* ---------- Design preview bar ---------- */
.preview-bar {
    position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1500;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; align-items: center;
    max-width: calc(100% - 24px); padding: 8px 10px; border-radius: 999px;
    background: rgba(20, 20, 20, .92); color: #fff; font: 600 12px/1.2 system-ui, sans-serif; box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.preview-bar a { color: #fff; text-decoration: none; padding: 7px 12px; border-radius: 999px; }
.preview-bar a:hover { background: rgba(255,255,255,.12); color: #fff; }
.preview-bar a.is-active { background: #fff; color: #111; }
.preview-bar__label { padding: 0 6px; opacity: .7; }
.preview-bar__exit { opacity: .75; }
@media (max-width: 639px) { .preview-bar { border-radius: 14px; bottom: 8px; } .preview-bar__label { display: none; } }
.preview-bar { backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); background: rgba(20, 20, 20, .72); border: 1px solid rgba(255,255,255,.14); flex-wrap: nowrap; }
.preview-bar a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pb-num { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid currentColor; font-size: 10px; }
@media (max-width: 639px) { .preview-bar { border-radius: 999px; gap: 2px; padding: 5px; } .pb-name { display: none; } .preview-bar a { padding: 6px 8px; } }


/* ==========================================================================
   PREMIUM LAYER — glass surfaces, overlays, motion (shared by all themes)
   Themes tune the look through these tokens.
   ========================================================================== */
:root {
    --glass-bg: rgba(255, 255, 255, .55);
    --glass-bg-strong: rgba(255, 255, 255, .78);
    --glass-border: rgba(255, 255, 255, .6);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, .75);
    --glass-blur: 20px;
    --glass-shadow: 0 20px 60px -20px rgba(20, 16, 10, .25);
    --glass-text: var(--text);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-io: cubic-bezier(.65, 0, .35, 1);
    --radius-lg: 24px;
}

/* Glass surface: solid fallback first, translucency where supported */
.glass {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-highlight), var(--glass-shadow);
    color: var(--glass-text);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass {
        background: var(--glass-bg);
        backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
        -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
    }
}
@media (prefers-reduced-transparency: reduce) {
    .glass { background: var(--glass-bg-strong) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

/* Grain overlay (adds a tactile, printed feel) – themes opt in with body.has-grain */
.has-grain::after {
    content: ""; position: fixed; inset: -50%; z-index: 3000; pointer-events: none; opacity: .045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Page entrance */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageIn .6s ease both; }

/* Scroll progress bar */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 1200; pointer-events: none; }

/* Header hide-on-scroll (themes add data-header) */
[data-header] { transition: transform .5s var(--ease-out), background .4s, box-shadow .4s, border-color .4s; }
[data-header].is-hidden { transform: translateY(-110%); }

/* ---------- Buttons: extra variants & states ---------- */
.btn { position: relative; overflow: hidden; transition: background .3s, color .3s, border-color .3s, transform .35s var(--ease-out), box-shadow .3s; }
.btn-primary::before { /* light sweep on hover */
    content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .9s var(--ease-out); pointer-events: none;
}
.btn-primary:hover::before { transform: translateX(120%); }
.btn-ghost-line { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost-line:hover { border-color: var(--text); }
.btn.is-loading { color: transparent !important; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--accent-contrast) transparent var(--accent-contrast) transparent; animation: spin .8s linear infinite; }
.btn.is-done { background: var(--success) !important; }
@keyframes spin { to { transform: rotate(360deg); } }
.add-btn { justify-content: space-between; gap: 16px; }
.add-btn-price { opacity: .8; font-weight: 500; letter-spacing: .02em; }
.wish-btn.is-pop { animation: pop .5s var(--ease-out); }
@keyframes pop { 40% { transform: scale(1.35); } }

/* ---------- Dialogs: shared ---------- */
dialog { padding: 0; border: 0; max-width: none; max-height: none; color: var(--text); }
dialog::backdrop { background: rgba(10, 8, 6, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog[open] { animation: dlgIn .45s var(--ease-out) both; }
dialog[open]::backdrop { animation: fadeIn .35s ease both; }
dialog.is-closing { animation: dlgOut .26s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes dlgOut { to { opacity: 0; transform: translateY(16px) scale(.98); } }
body.has-dialog { overflow: hidden; }

/* Cart drawer */
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(440px, 100vw); height: 100dvh; border-radius: var(--radius-lg) 0 0 var(--radius-lg); border-right: 0; }
.drawer[open] { animation: drawerIn .55s var(--ease-out) both; }
.drawer.is-closing { animation: drawerOut .26s ease both; }
@keyframes drawerIn { from { transform: translateX(100%); } }
@keyframes drawerOut { to { transform: translateX(100%); } }
.drawer-inner { display: flex; flex-direction: column; height: 100%; transition: opacity .2s; }
.drawer-inner.is-busy { opacity: .55; pointer-events: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.drawer-title { margin: 0; font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.drawer-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--accent); color: var(--accent-contrast); font: 700 .75rem var(--font-body); }
.drawer-close, .modal-close { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: inherit; cursor: pointer; transition: transform .4s var(--ease-out), background .3s; }
.drawer-close:hover, .modal-close:hover { transform: rotate(90deg); background: var(--surface-2); }
.drawer-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 32px; text-align: center; }
.drawer-empty-icon { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--surface-2); color: var(--accent); }
.ship-meter { padding: 16px 24px; font-size: .85rem; border-bottom: 1px solid var(--border); }
.ship-meter p { margin: 0 0 8px; }
.ship-bar { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.ship-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); border-radius: 2px; transition: width .8s var(--ease-out); }
.drawer-lines { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-line { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); animation: lineIn .5s var(--ease-out) both; }
@keyframes lineIn { from { opacity: 0; transform: translateX(16px); } }
.drawer-thumb { display: block; border-radius: 12px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.drawer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drawer-info { display: grid; gap: 4px; align-content: start; min-width: 0; }
.drawer-name { font-weight: 600; text-decoration: none; line-height: 1.3; }
.drawer-opts { font-size: .8rem; color: var(--muted); }
.drawer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.drawer-qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; }
.drawer-qty button { width: 32px; height: 32px; border: 0; background: none; cursor: pointer; color: inherit; font-size: 1rem; }
.drawer-qty button[disabled] { opacity: .3; }
.drawer-qty span { min-width: 22px; text-align: center; font-size: .9rem; }
.drawer-price { font-weight: 600; }
.drawer-remove button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; }
.drawer-remove button:hover { color: var(--danger); }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.drawer-sum { display: flex; justify-content: space-between; font-size: .95rem; }
.drawer-sum--total { font-size: 1.15rem; font-weight: 700; }
.drawer-note { font-size: .78rem; color: var(--muted); margin: 0 0 6px; }

/* Modals (quick view, size guide) */
.modal { position: fixed; inset: 0; margin: auto; width: min(1040px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border-radius: var(--radius-lg); overflow: auto; }
.modal--narrow { width: min(560px, calc(100vw - 32px)); }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.modal-body { padding: 28px; }
@media (min-width: 900px) { .modal-body { padding: 40px; } }
.qv { display: grid; gap: 28px; }
@media (min-width: 800px) { .qv { grid-template-columns: 1.05fr 1fr; gap: 40px; } }
.qv-main { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: calc(var(--radius-lg) - 8px); background: var(--surface-2); cursor: zoom-in; }
.qv-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease-out, opacity .15s; }
.qv-main.is-zooming img { transform: scale(2); }
.qv-media .gallery-thumbs { margin-top: 10px; }
.qv-media .gallery-thumb { width: 64px; flex-basis: 64px; border-radius: 10px; overflow: hidden; }
.qv-cat { text-transform: uppercase; letter-spacing: .2em; font-size: .7rem; color: var(--accent); margin: 8px 0; }
.qv-title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 12px; padding-right: 40px; }
.qv-price-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 1.2rem; }
.qv-rating { font-size: .9rem; color: var(--muted); }
.qv-desc { color: var(--muted); margin-top: 12px; }
.qv-more { display: inline-flex; gap: 8px; align-items: center; margin-top: 18px; font-weight: 600; font-size: .9rem; }
.qv-loading { display: flex; gap: 12px; align-items: center; justify-content: center; min-height: 320px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.size-guide h2 { font-size: 1.8rem; }
.size-guide h3 { font-size: 1.2rem; margin-top: 24px; }
.sg-list { padding-left: 1.1em; }
.size-guide-link { background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--muted); }
.option-label { display: flex !important; justify-content: space-between; align-items: baseline; width: 100%; }

/* Gallery image swap */
[data-gallery-main] { transition: opacity .15s, transform .25s ease-out; }
[data-gallery-main].is-swapping { opacity: 0; }

/* ---------- Product card premium bits (themes style the frame) ---------- */
.quick-add-form { margin: 0; }
.quick-add {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 16px;
    border: 0; border-radius: 999px; cursor: pointer; font: 600 .8rem var(--font-body); letter-spacing: .04em;
    background: var(--glass-bg-strong); color: var(--text);
    backdrop-filter: blur(14px) saturate(1.6); -webkit-backdrop-filter: blur(14px) saturate(1.6);
    box-shadow: var(--glass-highlight), 0 8px 24px -8px rgba(0,0,0,.25);
    transition: background .3s, color .3s, transform .4s var(--ease-out);
}
.quick-add:hover { background: var(--accent); color: var(--accent-contrast); }
.quick-add.is-disabled { opacity: .6; cursor: default; }
.quick-add.is-loading { color: transparent; }
[data-spotlight] { --mx: 50%; --my: 50%; }
[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease-out); transform-style: preserve-3d; will-change: transform; }

/* ---------- Sticky add-to-cart ---------- */
.sticky-atc {
    position: fixed; left: 50%; bottom: 16px; z-index: 900; width: min(760px, calc(100vw - 24px));
    display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 12px; border-radius: 999px;
    transform: translate(-50%, 140%); transition: transform .6s var(--ease-out);
}
.sticky-atc.is-visible { transform: translate(-50%, 0); }
.sticky-atc img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.sticky-atc-name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-atc .price { white-space: nowrap; }
.sticky-atc .btn { border-radius: 999px; }
@media (max-width: 639px) { .sticky-atc .price, .sticky-atc img { display: none; } }
body:has(.sticky-atc.is-visible) .preview-bar { bottom: 96px; }

/* ---------- Cursor bubble ---------- */
.cursor-bubble { position: fixed; left: 0; top: 0; z-index: 2500; pointer-events: none; }
.cursor-bubble span {
    display: grid; place-items: center; width: 88px; height: 88px; margin: -44px 0 0 -44px; border-radius: 50%;
    font: 600 .72rem var(--font-body); letter-spacing: .16em; text-transform: uppercase;
    background: var(--glass-bg); color: var(--glass-text); border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px) saturate(1.6); -webkit-backdrop-filter: blur(12px) saturate(1.6);
    transform: scale(0); transition: transform .45s var(--ease-out);
}
.cursor-bubble.is-active span { transform: scale(1); }
[data-cursor] { cursor: none; }
@media (hover: none) { .cursor-bubble { display: none; } [data-cursor] { cursor: auto; } }

/* ---------- Hotspots (shop the look) ---------- */
.look { position: relative; }
.hotspot { position: absolute; transform: translate(-50%, -50%); z-index: 2; }
.hotspot-dot {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.8);
    background: rgba(255,255,255,.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; color: #111;
}
.hotspot-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 14px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.hotspot-card {
    position: absolute; left: 50%; bottom: calc(100% + 12px); width: 240px; padding: 10px; border-radius: 18px; display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center;
    opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: all .35s var(--ease-out); text-decoration: none;
}
.hotspot-card img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.hotspot-card strong { display: block; font-size: .88rem; line-height: 1.25; }
.hotspot-card .price { font-size: .82rem; }
[data-hotspot][aria-expanded="true"] + .hotspot-card, .hotspot:hover .hotspot-card, .hotspot:focus-within .hotspot-card { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- Slideshow ---------- */
[data-slideshow] { position: relative; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.slide.is-active img { animation: kenburns 9s ease-out both; }
@keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }

/* ---------- Reveal + split text ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js [data-split].reveal { opacity: 1; transform: none; }
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .02em .06em .2em; margin: -.02em -.06em -.2em; }
[data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--i) * 60ms + 100ms); }
.no-js [data-split] .w > span, [data-split].is-visible .w > span { transform: none; }
.img-reveal { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease-io); }
.img-reveal.is-visible { clip-path: inset(0 0 0 0); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Pinned horizontal scroll ---------- */
[data-hscroll] { position: relative; }
.hscroll-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
[data-hscroll-track] { display: flex; gap: 32px; will-change: transform; }
.hscroll-progress { height: 2px; background: var(--border); margin-top: 40px; }
.hscroll-progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
@media (max-width: 899px), (prefers-reduced-motion: reduce) {
    .hscroll-sticky { position: static; height: auto; overflow: visible; }
    [data-hscroll-track] { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
    [data-hscroll-track] > * { scroll-snap-align: start; }
}

/* ---------- Carousel ---------- */
[data-carousel-track] { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
[data-carousel-track]::-webkit-scrollbar { display: none; }
[data-carousel-track] > * { scroll-snap-align: start; }
@media (min-width: 640px) { [data-carousel-track] { grid-auto-columns: calc(50% - 8px); } }
@media (min-width: 1024px) { [data-carousel-track] { grid-auto-columns: calc(25% - 18px); gap: 24px; } }
.carousel-nav { display: flex; gap: 8px; }
.carousel-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: inherit; cursor: pointer; transition: background .3s, color .3s, transform .4s var(--ease-out); }
.carousel-btn:hover { background: var(--text); color: var(--bg); }
.carousel-btn--prev .icon { transform: rotate(180deg); }

/* Toast on glass */
.toast.glass { color: var(--glass-text); border-radius: 999px; }

/* Buy now (direct checkout) */
.buy-now-btn { display: flex; width: 100%; margin-top: 10px; }
.secure-note { margin-top: 10px; }
/* Single-image products: no thumbnail column */
.gallery:not(:has(.gallery-thumbs)) { grid-template-columns: 1fr !important; }

/* Lenis smooth scrolling (assets/vendor/lenis.min.js) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.drawer-lines[role] { padding: 8px 24px; }
