/* =====================================================================
   Storefront styles. Every color, radius and font comes from the theme
   custom properties injected by the server (--primary, --bg, --radius...).
   ===================================================================== */

:root {
    --border: rgba(var(--text-rgb), 0.1);
    --border-strong: rgba(var(--text-rgb), 0.2);
    --primary-soft: rgba(var(--primary-rgb), 0.1);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 25px -10px rgba(15, 23, 42, 0.18);
    --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    --radius-sm: calc(var(--radius) * 0.6);
    --radius-lg: calc(var(--radius) * 1.4);
    --container: 1280px;
    --header-height: 72px;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body);
    font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 2vw, 1.75rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.icon { flex-shrink: 0; vertical-align: middle; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 600; color: var(--primary); margin: 0 0 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
    border-radius: var(--radius); padding: 11px 20px; font-weight: 600; font-size: 0.95rem; cursor: pointer;
    transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
    white-space: nowrap; text-align: center;
}
.button:active { transform: scale(0.98); }
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.button-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 20px -8px rgba(var(--primary-rgb), 0.6); }
.button-primary:hover { color: var(--on-primary); filter: brightness(1.07); box-shadow: 0 10px 24px -8px rgba(var(--primary-rgb), 0.7); }
.button-outline { background: transparent; border-color: var(--border-strong); }
.button-outline:hover { border-color: var(--primary); color: var(--primary); }
.button-ghost { background: transparent; color: var(--muted); }
.button-ghost:hover { background: var(--primary-soft); color: var(--primary); }
.button-light { background: #ffffff; color: #111827; }
.button-light:hover { color: #111827; box-shadow: var(--shadow-md); }
.button-lg { padding: 14px 26px; font-size: 1rem; }
.button-sm { padding: 7px 12px; font-size: 0.85rem; }
.button-block { width: 100%; }
.button.is-loading { position: relative; color: transparent !important; }
.button.is-loading::after {
    content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--on-primary); border-right-color: transparent; animation: spin 0.7s linear infinite;
}
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.button-row.center { justify-content: center; }
.icon-button {
    display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0;
    background: transparent; cursor: pointer; position: relative; transition: background 0.2s;
}
.icon-button:hover { background: var(--primary-soft); color: var(--primary); }
.link-button { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font-weight: 600; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.input {
    width: 100%; padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--bg); transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input.has-error { border-color: var(--danger); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; }
.field > span { font-weight: 600; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field-error, .form-error { color: var(--danger); font-size: 0.82rem; }
.field-error:empty { display: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.checkbox, .radio { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 0; }
.checkbox input, .radio input { accent-color: var(--primary); width: 18px; height: 18px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 8px 0 16px; }
.switch input { position: absolute; opacity: 0; }
.switch-track { width: 42px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background 0.2s; flex-shrink: 0; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s var(--ease); box-shadow: var(--shadow-sm); }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.92rem; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-danger { background: rgba(220, 38, 38, 0.08); color: var(--danger); }
.alert-success { background: rgba(22, 163, 74, 0.1); color: var(--success); }

/* ---------- Cards, badges, chips ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
.badge-accent { background: var(--accent); color: var(--on-accent); }
.badge-dark { background: #111827; color: #fff; }
.badge-light { background: rgba(255, 255, 255, 0.92); color: #111827; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 0.88rem; font-weight: 500; transition: all 0.2s; }
.chip:hover { border-color: var(--primary); background: var(--primary-soft); }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--primary-soft); color: var(--primary); }
.status-delivered { background: rgba(22, 163, 74, 0.12); color: var(--success); }
.status-unfulfilled { background: rgba(217, 119, 6, 0.12); color: var(--warning); }

/* ---------- Header ---------- */
.announcement { background: var(--accent); color: var(--on-accent); text-align: center; font-size: 0.85rem; font-weight: 600; padding: 8px 16px; }
.site-header {
    position: sticky; top: 0; z-index: 40; background: rgba(var(--text-rgb), 0); backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: box-shadow 0.25s, border-color 0.25s;
}
.site-header::before { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: 0.88; z-index: -1; }
.site-header.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.header-row { display: flex; align-items: center; gap: 18px; height: var(--header-height); }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand-logo { height: 40px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; flex: 1; }
.nav-item { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.95rem; }
.nav-link:hover { background: var(--primary-soft); }
.nav-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: all 0.2s var(--ease); display: flex; flex-direction: column;
}
.nav-dropdown a { padding: 9px 12px; border-radius: var(--radius-sm); font-size: 0.93rem; }
.nav-dropdown a:hover { background: var(--primary-soft); }
.nav-dropdown-all { display: flex; align-items: center; justify-content: space-between; color: var(--primary); font-weight: 600; border-top: 1px solid var(--border); margin-top: 4px; }
.nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.header-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.badge-count {
    position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
    background: var(--primary); color: var(--on-primary); font-size: 0.7rem; font-weight: 700; display: grid; place-items: center;
}
.badge-count.bump { animation: bump 0.4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.35); } }
.search-panel { border-top: 1px solid var(--border); background: var(--bg); padding: 14px 0 18px; box-shadow: var(--shadow-md); }
.search-form { display: flex; align-items: center; gap: 12px; }
.search-form input { flex: 1; border: 0; background: transparent; font-size: 1.15rem; padding: 10px 0; outline: none; }
.search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 12px; }
.search-result { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius); transition: background 0.2s; }
.search-result:hover { background: var(--primary-soft); }
.search-result img, .search-result .result-placeholder { width: 54px; height: 54px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface); }
.search-result strong { display: block; font-size: 0.92rem; }
.search-result span { color: var(--muted); font-size: 0.85rem; }
.only-mobile { display: none !important; }

/* ---------- Drawers ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); animation: fade-in 0.25s; }
.drawer-panel {
    position: absolute; top: 0; bottom: 0; width: min(420px, 92vw); background: var(--bg); display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.drawer-right .drawer-panel { right: 0; animation: slide-left 0.3s var(--ease); }
.drawer-left .drawer-panel { left: 0; animation: slide-right 0.3s var(--ease); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 1.2rem; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-left { from { transform: translateX(100%); } }
@keyframes slide-right { from { transform: translateX(-100%); } }
.mobile-nav { display: flex; flex-direction: column; padding: 10px 20px; overflow-y: auto; }
.mobile-nav details { border-bottom: 1px solid var(--border); }
.mobile-nav summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-sub { display: block; padding: 10px 14px; color: var(--muted); }
.mobile-account { display: flex; align-items: center; gap: 10px; padding: 18px 0; font-weight: 600; }

/* ---------- Cart ---------- */
.cart-panel .cart-lines { flex: 1; overflow-y: auto; padding: 8px 20px; }
.cart-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: start; }
.cart-line img, .cart-line .line-placeholder { width: 72px; height: 88px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface); }
.cart-line-name { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.cart-line-variant { color: var(--muted); font-size: 0.85rem; }
.cart-line-price { font-weight: 600; }
.cart-line-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cart-line.is-unavailable { opacity: 0.6; }
.cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); padding: 40px 20px; text-align: center; }
.cart-footer { border-top: 1px solid var(--border); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.discount-row { color: var(--success); }
.total-row { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; font-size: 1.15rem; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.qty-stepper button { width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.qty-stepper button:hover { background: var(--primary-soft); color: var(--primary); }
.qty-stepper input { width: 44px; text-align: center; border: 0; background: transparent; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-small button { width: 30px; height: 30px; }
.qty-small input { width: 34px; font-size: 0.9rem; }
.remove-line { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.remove-line:hover { color: var(--danger); }
.cart-page { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; padding-bottom: 60px; align-items: start; }
.cart-lines-large .cart-line { grid-template-columns: 100px 1fr auto; }
.cart-lines-large .cart-line img { width: 100px; height: 120px; }
.summary-card { position: sticky; top: calc(var(--header-height) + 20px); display: flex; flex-direction: column; gap: 10px; }
.summary-card h2 { font-size: 1.2rem; }
.coupon-form { display: flex; gap: 8px; margin: 6px 0; }
.applied-coupon { display: flex; align-items: center; gap: 8px; color: var(--success); font-weight: 600; font-size: 0.9rem; }
.applied-coupon .link-button { margin-left: auto; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide {
    flex: 0 0 100%; scroll-snap-align: start; min-height: clamp(380px, 58vh, 620px); display: flex; align-items: center;
    background: linear-gradient(110deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.12) 70%), var(--hero-image, linear-gradient(135deg, var(--primary), var(--accent)));
    background-size: cover; background-position: center; color: #fff;
}
.hero-plain { min-height: 420px; display: flex; align-items: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: var(--on-primary); }
.hero-content { padding-top: 60px; padding-bottom: 60px; max-width: var(--container); }
.hero-title { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 14ch; margin-bottom: 14px; color: inherit; animation: rise 0.7s var(--ease) both; }
.hero-subtitle { font-size: clamp(1rem, 1.6vw, 1.25rem); max-width: 46ch; opacity: 0.92; margin-bottom: 26px; animation: rise 0.7s 0.1s var(--ease) both; }
.hero .button { animation: rise 0.7s 0.2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.hero-dots { position: absolute; bottom: 20px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 9px; height: 9px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.5); cursor: pointer; padding: 0; transition: all 0.3s var(--ease); }
.hero-dots button.is-active { width: 28px; background: #fff; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.page-header { padding: 34px 0 26px; }
.page-header h1 { margin-bottom: 6px; }
.page-lead { color: var(--muted); max-width: 70ch; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--primary); }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.category-tile {
    position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: flex-end; isolation: isolate;
}
.category-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.6s var(--ease); }
.category-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(15, 23, 42, 0.7)); z-index: -1; }
.category-tile:hover img { transform: scale(1.06); }
.category-name { display: flex; align-items: center; gap: 8px; color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; padding: 18px; }
.category-tile:hover .category-name { color: #fff; }
.benefits { border-top: 1px solid var(--border); background: var(--surface); }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 28px; padding-bottom: 28px; }
.benefit { display: flex; gap: 12px; align-items: center; color: var(--primary); }
.benefit div { display: flex; flex-direction: column; color: var(--text); }
.benefit span { color: var(--muted); font-size: 0.85rem; }

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.product-card { display: flex; flex-direction: column; gap: 12px; }
.product-media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); display: block; }
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.45s var(--ease), transform 0.7s var(--ease); }
.product-media .hover-image { opacity: 0; }
.product-card:hover .product-media .hover-image { opacity: 1; }
.product-card:hover .product-media .primary-image { transform: scale(1.04); }
.image-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: var(--surface); }
.product-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.quick-view {
    position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: center; gap: 6px;
    background: rgba(255, 255, 255, 0.94); color: #111827; border-radius: var(--radius); padding: 10px; font-weight: 600; font-size: 0.88rem;
    opacity: 0; transform: translateY(8px); transition: all 0.3s var(--ease);
}
.product-card:hover .quick-view { opacity: 1; transform: translateY(0); }
.product-card.is-sold-out .product-media img { filter: grayscale(0.7); opacity: 0.75; }
.product-info { display: flex; flex-direction: column; gap: 3px; }
.product-brand { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; font-weight: 600; color: var(--muted); }
.product-name { font-size: 0.98rem; font-weight: 600; margin: 0; font-family: var(--font-body); line-height: 1.35; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 700; }
.price-lg { font-size: 1.75rem; font-family: var(--font-heading); }
.price-from { color: var(--muted); font-size: 0.8rem; }
.price-compare { color: var(--muted); text-decoration: line-through; font-size: 0.9rem; }

/* ---------- Listing ---------- */
.listing { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; padding-bottom: 64px; }
.filters form { position: sticky; top: calc(var(--header-height) + 20px); display: flex; flex-direction: column; gap: 4px; }
.filter-group { padding: 14px 0; border-bottom: 1px solid var(--border); }
.filter-group h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.listing-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 20px; text-align: center; color: var(--muted); }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.page-link { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--border); font-weight: 600; padding: 0 8px; }
.page-link.is-current { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.page-gap { padding: 8px; color: var(--muted); }

/* ---------- Product page ---------- */
.product-page { padding-top: 20px; padding-bottom: 40px; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.gallery { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--header-height) + 16px); }
.gallery-main { position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s; }
.gallery-main img.is-fading { opacity: 0.3; }
.gallery-badge { position: absolute; top: 16px; left: 16px; font-size: 0.85rem; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.thumb { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--surface); opacity: 0.7; transition: all 0.2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active, .thumb:hover { border-color: var(--primary); opacity: 1; }
.product-details { display: flex; flex-direction: column; gap: 14px; }
.product-title { font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin: 0; }
.product-price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 6px; border-bottom: 1px solid var(--border); padding-bottom: 18px; }
.buy-form { display: flex; flex-direction: column; gap: 16px; }
.option-group { border: 0; padding: 0; margin: 0; }
.option-group legend { font-size: 0.9rem; margin-bottom: 10px; color: var(--muted); }
.option-group legend strong { color: var(--text); }
.option-values { display: flex; flex-wrap: wrap; gap: 8px; }
.option-pill input { position: absolute; opacity: 0; pointer-events: none; }
.option-pill span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 9px 16px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; font-size: 0.92rem; transition: all 0.15s;
}
.option-pill span:hover { border-color: var(--primary); }
.option-pill input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.option-pill input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.option-pill.is-unavailable span { opacity: 0.45; text-decoration: line-through; }
.stock-note { margin: 0; font-size: 0.9rem; font-weight: 600; min-height: 1.4em; }
.stock-note.is-low { color: var(--warning); }
.stock-note.is-out { color: var(--danger); }
.stock-note.is-ok { color: var(--success); }
.buy-row { display: flex; gap: 12px; }
.buy-row .qty-stepper button { height: 50px; width: 42px; }
.trust-list { list-style: none; padding: 16px 0 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; color: var(--muted); border-top: 1px solid var(--border); }
.trust-list li { display: flex; align-items: center; gap: 10px; }
.trust-list .icon { color: var(--primary); }
.accordion details { border-bottom: 1px solid var(--border); }
.accordion summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-weight: 600; cursor: pointer; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion details[open] summary .icon { transform: rotate(180deg); }
.accordion summary .icon { transition: transform 0.2s; }
.rich-text { color: var(--text); line-height: 1.7; }
.rich-text > :first-child { margin-top: 0; }
.rich-text a { color: var(--primary); text-decoration: underline; }
.rich-text ul, .rich-text ol { padding-left: 1.3em; }
.accordion .rich-text { padding-bottom: 16px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 0.92rem; }
.spec-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 9px 12px 9px 0; width: 40%; border-bottom: 1px solid var(--border); }
.spec-table td { padding: 9px 0; border-bottom: 1px solid var(--border); }

/* ---------- Checkout ---------- */
.checkout-body .benefits { display: none; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; padding-top: 32px; padding-bottom: 64px; align-items: start; }
.checkout-form { display: flex; flex-direction: column; gap: 20px; }
.checkout-step h2 { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; margin-bottom: 18px; }
.step-number { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: 0.9rem; }
.subhead { margin: 22px 0 12px; font-size: 0.95rem; }
.option-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.option-card { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; transition: all 0.2s; align-items: flex-start; }
.option-card:hover { border-color: var(--primary); }
.option-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary); }
.option-card input { accent-color: var(--primary); margin-top: 3px; width: 18px; height: 18px; }
.option-card-body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.option-card-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.option-card-text { color: var(--muted); font-size: 0.88rem; }
.option-card-extra { white-space: pre-line; font-size: 0.85rem; background: var(--bg); border-radius: var(--radius-sm); padding: 8px 10px; margin-top: 6px; }
.option-card-price { font-weight: 700; white-space: nowrap; }
.option-card-price.is-free { color: var(--success); }
.checkout-summary .summary-items { max-height: 320px; overflow-y: auto; }
.summary-items { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.summary-items li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; font-size: 0.92rem; }
.summary-thumb { position: relative; width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); }
.summary-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.summary-qty { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--muted); color: #fff; font-size: 0.72rem; display: grid; place-items: center; font-weight: 700; }
.summary-name small { display: block; color: var(--muted); }

/* ---------- Order page ---------- */
.order-page { padding-top: 32px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 20px; }
.order-hero { display: flex; gap: 20px; align-items: center; }
.order-hero h1 { margin: 0 0 4px; font-size: 1.7rem; }
.order-hero p { margin: 0; }
.order-hero-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.order-hero-icon.is-success { background: rgba(22, 163, 74, 0.12); color: var(--success); }
.order-hero-icon.is-warning { background: rgba(217, 119, 6, 0.12); color: var(--warning); }
.order-hero-icon.is-danger { background: rgba(220, 38, 38, 0.12); color: var(--danger); }
.timeline-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: step; }
.timeline-steps li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 0.85rem; color: var(--muted); position: relative; }
.timeline-steps li .icon { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-strong); box-sizing: border-box; }
.timeline-steps li.is-done { color: var(--text); font-weight: 600; }
.timeline-steps li.is-done .icon { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.timeline-steps li:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: calc(50% + 24px); right: calc(-50% + 24px); height: 2px; background: var(--border-strong); }
.timeline-steps li.is-done:not(:last-child)::after { background: var(--primary); }
.notice h2 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.notice-warning { border-color: rgba(217, 119, 6, 0.4); background: rgba(217, 119, 6, 0.06); }
.instructions { white-space: pre-wrap; font-family: inherit; background: var(--bg); padding: 12px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--border-strong); }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.order-side { display: flex; flex-direction: column; gap: 20px; }
.tracking-events { list-style: none; margin: 16px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--border-strong); display: flex; flex-direction: column; gap: 14px; font-size: 0.9rem; }
.tracking-events li { position: relative; }
.tracking-events li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }

/* ---------- Account ---------- */
.auth-page { display: grid; place-items: center; padding: 56px 20px 80px; }
.auth-card { width: 100%; max-width: 460px; padding: 34px; box-shadow: var(--shadow-md); }
.auth-card h1 { font-size: 1.7rem; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 0.9rem; color: var(--primary); font-weight: 600; flex-wrap: wrap; }
.account-header { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; padding-bottom: 64px; align-items: start; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--border); }
.table a { color: var(--primary); font-weight: 600; }
.page-body { padding-bottom: 64px; }
.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-family: var(--font-heading); font-size: clamp(5rem, 15vw, 9rem); font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; padding-top: 56px; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-name { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.site-footer h3 { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: 0.92rem; }
.footer-brand p { margin: 12px 0; color: #94a3b8; }
.contact-list li { display: flex; align-items: center; gap: 8px; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); display: grid; place-items: center; transition: background 0.2s; }
.socials a:hover { background: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 0.85rem; color: #94a3b8; flex-wrap: wrap; }
.payment-icons { display: flex; gap: 10px; opacity: 0.7; }
.whatsapp-float {
    position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
    display: grid; place-items: center; box-shadow: var(--shadow-lg); transition: transform 0.2s var(--ease);
}
.whatsapp-float:hover { color: #fff; transform: scale(1.08); }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
    pointer-events: auto; display: flex; align-items: center; gap: 10px; background: #111827; color: #fff; padding: 12px 18px; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); font-size: 0.92rem; font-weight: 500; animation: toast-in 0.35s var(--ease);
}
.toast.is-error { background: var(--danger); }
.toast.is-leaving { animation: toast-out 0.3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .only-mobile { display: inline-flex !important; }
    .only-desktop { display: none !important; }
    .header-row { gap: 6px; }
    .brand { margin-right: auto; }
    .listing, .cart-page, .checkout, .order-grid, .account-grid, .product-layout { grid-template-columns: minmax(0, 1fr); }
    .filters { position: fixed; inset: 0; z-index: 70; background: var(--bg); padding: 20px; overflow-y: auto; display: none; }
    .filters.is-open { display: block; }
    .filters form { position: static; }
    .filters-head { display: flex !important; justify-content: space-between; align-items: center; margin-bottom: 10px; }
    .gallery, .summary-card { position: static; }
    .benefits-grid { grid-template-columns: 1fr 1fr; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
    .quick-view { display: none; }
}
@media (max-width: 560px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-grid .span-2 { grid-column: auto; }
    .footer-grid, .benefits-grid { grid-template-columns: minmax(0, 1fr); }
    .section { padding: 40px 0; }
    .timeline-steps { font-size: 0.75rem; }
    .order-hero { flex-direction: column; align-items: flex-start; }
    .card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
