/* ==========================================================================
   Storefront styles
   Brand colours come from admin settings (partials/theme-variables) and are
   mapped onto the tokens below. Legacy class names (btn, glass-card, grid-*,
   form-group, alert …) are kept so every existing page picks up the design.
   ========================================================================== */

:root {
    /* Palette: orange (actions), sky blue (links, highlights), dark blue (chrome). */
    --brand: var(--primary, #f97316);
    --brand-ink: color-mix(in srgb, var(--brand) 82%, #7c2d12);
    --brand-soft: color-mix(in srgb, var(--brand) 9%, #fff);
    --brand-line: color-mix(in srgb, var(--brand) 25%, #fff);
    --sky: var(--secondary, #38bdf8);
    --sky-ink: color-mix(in srgb, var(--accent, #0ea5e9) 75%, #0b1f4b);
    --sky-soft: color-mix(in srgb, var(--sky) 13%, #fff);
    --sky-line: color-mix(in srgb, var(--sky) 40%, #fff);
    --navy: var(--primary-dark, #0b1f4b);
    --navy-2: color-mix(in srgb, var(--navy) 80%, #fff);

    --ink: #111827;
    --ink-2: #374151;
    --muted: #6b7280;
    --line: #e5e7eb;
    --line-2: #f1f2f4;
    --bg: #f5f6f8;
    --card: #ffffff;
    --ok: #16a34a;
    --ok-soft: #ecfdf3;
    --warn: #c2410c;
    --warn-soft: #fff7ed;
    --bad: #dc2626;
    --bad-soft: #fef2f2;
    --star: #f59e0b;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow: 0 6px 20px rgba(16, 24, 40, .08);
    --shadow-lg: 0 24px 56px rgba(16, 24, 40, .18);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Plus Jakarta Sans', var(--font);
    --container: 1320px;
    --gutter: 24px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    /* Legacy aliases used by older views */
    --primary-color: var(--brand);
    --text-color: var(--ink);
    --text-muted: var(--muted);
    --text-muted-light: var(--muted);
    --border-color: var(--line);
    --background-color: var(--bg);
    --glass-bg: var(--card);
    --glass-bg-strong: var(--card);
    --glass-border: var(--line);
    --card-shadow: var(--shadow-sm);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -.01em; color: var(--ink); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--sky-soft); color: var(--navy); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main { flex: 1; }
.page { padding-top: 28px; padding-bottom: 56px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: .93rem; line-height: 1.2; white-space: nowrap;
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
    transition: background .2s, border-color .2s, color .2s, box-shadow .2s, transform .1s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 28%, transparent); }
.btn-primary:hover:not(:disabled) { background: var(--brand-ink); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--sky-ink); }
.btn-secondary, .btn-outline { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover:not(:disabled), .btn-outline:hover:not(:disabled) { border-color: var(--sky); color: var(--sky-ink); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .84rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn.is-loading > i:first-child { animation: spin .8s linear infinite; }
.btn.is-loading > i:first-child::before { content: "\f110"; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
    position: relative; display: inline-grid; place-items: center;
    width: 44px; height: 44px; border-radius: 12px; color: var(--ink-2);
    transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.count-badge {
    position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--brand); color: #fff; font-size: .68rem; font-weight: 700;
    display: grid; place-items: center; border: 2px solid var(--card);
}
.count-badge:empty, .count-badge[data-count="0"] { display: none; }
.count-badge.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- Cards & legacy surfaces ---------- */
.card, .glass, .glass-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card-body { padding: 24px; }
.card-title { font-size: 1.05rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }

/* ---------- Forms ---------- */
.glass-input, .input, select.input, textarea.input {
    width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
    background: var(--card); border: 1px solid var(--line); color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
.glass-input:focus, .input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px var(--sky-soft); }
.glass-input::placeholder, .input::placeholder { color: #9ca3af; }
select.glass-input, select.input {
    appearance: none; padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.form-group { margin-bottom: 18px; }
.form-label, .form-group > label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink-2); }
.form-error, .invalid-feedback { color: var(--bad); font-size: .82rem; margin-top: 6px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .92rem; }
.check input { width: 17px; height: 17px; accent-color: var(--sky-ink); flex-shrink: 0; }

/* ---------- Alerts & toasts ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: var(--radius-sm); font-size: .92rem; border: 1px solid; margin-bottom: 16px; }
.alert-success { background: var(--ok-soft); border-color: #bbf7d0; color: #166534; }
.alert-error, .alert-danger { background: var(--bad-soft); border-color: #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert-warning { background: var(--warn-soft); border-color: #fed7aa; color: var(--warn); }

.toasts { position: fixed; z-index: 400; bottom: 24px; right: 80px; display: grid; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
    background: var(--ink); color: #fff; border-radius: 12px; box-shadow: var(--shadow-lg);
    font-size: .92rem; animation: toast-in .35s var(--ease);
}
.toast i { margin-top: 3px; }
.toast-success i { color: #4ade80; }
.toast-error i { color: #f87171; }
.toast-info i { color: #93c5fd; }
.toast a { text-decoration: underline; font-weight: 600; }
.toast.out { animation: toast-out .3s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ---------- Grid helpers (legacy) ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ==========================================================================
   Header
   ========================================================================== */
.announce {
    background: var(--navy); color: rgba(255, 255, 255, .86); font-size: .82rem;
}
.announce .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.announce-msg { display: flex; align-items: center; gap: 8px; }
.announce-msg strong { color: #fff; }
.announce-links { display: flex; gap: 20px; }
.announce-links a { display: inline-flex; align-items: center; gap: 7px; opacity: .9; }
.announce-links a:hover { opacity: 1; color: #fff; }

.site-header {
    position: sticky; top: 0; z-index: 100; background: var(--card);
    border-bottom: 1px solid var(--line); transition: box-shadow .25s;
}
.site-header.is-stuck { box-shadow: 0 6px 24px rgba(16, 24, 40, .08); }
.header-main { display: flex; align-items: center; gap: 28px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; min-width: 0; }
.brand img { height: 96px; width: auto; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; line-height: 1.15; color: var(--ink); max-width: 230px; }
.brand-tag { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }

.search { position: relative; flex: 1; max-width: 680px; }
.search-form {
    display: flex; align-items: stretch; height: 48px; border-radius: 12px;
    border: 2px solid var(--navy); background: var(--card); overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.search-form:focus-within { border-color: var(--sky); box-shadow: 0 0 0 4px var(--sky-soft); }
.search-cat {
    border: 0; border-right: 1px solid var(--line); background: var(--line-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23374151' stroke-width='1.6'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none; padding: 0 30px 0 14px; font-size: .85rem; font-weight: 600; color: var(--ink-2);
    max-width: 170px; cursor: pointer; outline: none;
}
.search-input { flex: 1; min-width: 0; border: 0; outline: none; padding: 0 16px; font-size: .95rem; background: transparent; }
.search-btn { padding: 0 20px; background: var(--navy); color: #fff; font-size: 1rem; transition: background .2s; }
.search-form:focus-within .search-btn { background: var(--brand); }

.suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 120;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 8px; max-height: 70vh; overflow: auto;
}
.suggest-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); padding: 8px 10px 4px; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; }
.suggest-item:hover, .suggest-item.is-active { background: var(--line-2); }
.suggest-thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--line-2); object-fit: contain; flex-shrink: 0; display: grid; place-items: center; color: #9ca3af; }
.suggest-name { flex: 1; font-size: .9rem; font-weight: 500; }
.suggest-name mark { background: none; color: var(--sky-ink); font-weight: 700; }
.suggest-price { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.suggest-oos { font-size: .72rem; color: var(--bad); display: block; font-weight: 600; }
.suggest-all { display: block; text-align: center; padding: 10px; margin-top: 4px; border-top: 1px solid var(--line); font-weight: 600; color: var(--sky-ink); font-size: .9rem; }
.suggest-empty { padding: 18px; text-align: center; color: var(--muted); font-size: .9rem; }

.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.account-link { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 12px; }
.account-link:hover { background: var(--line-2); }
.account-link .icon-btn { width: 36px; height: 36px; background: var(--line-2); }
.account-text { display: flex; flex-direction: column; line-height: 1.2; }
.account-text small { color: var(--muted); font-size: .74rem; }
.account-text strong { font-size: .88rem; }
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 130;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .2s, transform .2s, visibility .2s;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu, .dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; font-size: .9rem; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--line-2); }
.dropdown-menu i { width: 16px; color: var(--sky-ink); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.cart-btn .cart-total { display: none; }

.menu-toggle { display: none; }

/* Category navigation bar */
.catnav { border-top: 1px solid var(--line-2); }
.catnav .container { display: flex; align-items: center; gap: 6px; min-height: 50px; }
.catnav-all { position: relative; }
.catnav-all > button {
    display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px; border-radius: 10px;
    background: var(--navy); color: #fff; font-weight: 700; font-size: .9rem;
}
.catnav-links { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.catnav-links::-webkit-scrollbar { display: none; }
.catnav-links a {
    display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px;
    font-size: .9rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s;
}
.catnav-links a:hover, .catnav-links a.is-active { background: var(--sky-soft); color: var(--navy); }
.catnav-links a.is-deal { color: var(--bad); font-weight: 600; }
.catnav-help { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.catnav-help strong { color: var(--ink); }
.catnav-help i { color: var(--sky-ink); font-size: 1.1rem; }

.mega {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 140; width: min(860px, calc(100vw - 48px));
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    display: grid; grid-template-columns: 260px 1fr; overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s;
}
.catnav-all:hover .mega, .catnav-all:focus-within .mega, .catnav-all.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega-list { padding: 8px; background: var(--line-2); max-height: 440px; overflow: auto; }
.mega-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: .9rem; font-weight: 500; }
.mega-list a i:first-child { width: 18px; text-align: center; color: var(--sky-ink); }
.mega-list a .fa-chevron-right { margin-left: auto; font-size: .7rem; color: var(--muted); }
.mega-list a:hover, .mega-list a.is-active { background: var(--card); box-shadow: var(--shadow-sm); }
.mega-panel { padding: 22px 24px; display: none; }
.mega-panel.is-active { display: block; }
.mega-panel h4 { font-size: 1.05rem; margin-bottom: 4px; }
.mega-panel p { color: var(--muted); font-size: .88rem; margin-bottom: 16px; }
.mega-children { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 20px; margin-bottom: 18px; }
.mega-children a { padding: 7px 0; font-size: .9rem; color: var(--ink-2); }
.mega-children a:hover { color: var(--sky-ink); }

/* ==========================================================================
   Drawers, modal, overlay
   ========================================================================== */
.overlay { position: fixed; inset: 0; z-index: 300; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.overlay.is-open { opacity: 1; visibility: visible; }
.drawer {
    position: fixed; top: 0; bottom: 0; z-index: 310; width: min(420px, 100vw); background: var(--card);
    display: flex; flex-direction: column; box-shadow: var(--shadow-lg); transition: transform .32s var(--ease);
}
.drawer-right { right: 0; transform: translateX(100%); }
.drawer-left { left: 0; transform: translateX(-100%); width: min(340px, 88vw); }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); background: var(--card); }
.drawer-loading { display: grid; place-items: center; height: 200px; color: var(--muted); }

.mini-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.mini-item:last-child { border-bottom: 0; }
.mini-thumb { width: 72px; height: 72px; border-radius: 10px; background: var(--line-2); overflow: hidden; display: grid; place-items: center; color: #9ca3af; }
.mini-thumb img { width: 100%; height: 100%; object-fit: contain; }
.mini-name { font-weight: 600; font-size: .9rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-meta { color: var(--muted); font-size: .8rem; margin: 2px 0 8px; }
.mini-price { font-weight: 700; font-size: .92rem; text-align: right; }
.mini-remove { color: var(--muted); font-size: .8rem; margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; }
.mini-remove:hover { color: var(--bad); }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: .93rem; }
.summary-row.total { font-size: 1.1rem; font-weight: 800; padding-top: 12px; margin-top: 6px; border-top: 1px dashed var(--line); }
.summary-row .ok { color: var(--ok); font-weight: 600; }

.ship-meter { background: var(--sky-soft); border: 1px solid var(--sky-line); border-radius: 12px; padding: 12px 14px; font-size: .86rem; margin-bottom: 14px; }
.ship-meter.done { background: var(--ok-soft); border-color: #bbf7d0; color: #166534; }
.ship-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--sky) 25%, #fff); margin-top: 9px; overflow: hidden; }
.ship-bar span { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .4s var(--ease); }
.ship-meter.done .ship-bar span { background: var(--ok); }

.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; margin: 0 auto 18px; font-size: 2rem; color: #9ca3af; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 6px; }
.empty-state p { color: var(--muted); margin-bottom: 20px; }

.mobile-nav .drawer-body { padding: 8px 12px; }
.mnav-section { padding: 12px 8px 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); }
.mnav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 10px; border-radius: 10px; font-weight: 500; text-align: left; }
.mnav-link:hover { background: var(--line-2); }
.mnav-link > i:first-child { width: 20px; text-align: center; color: var(--sky-ink); }
.mnav-link .fa-chevron-down { margin-left: auto; font-size: .75rem; color: var(--muted); transition: transform .2s; }
.mnav-link[aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.mnav-sub { display: none; padding: 0 0 6px 42px; }
.mnav-sub.is-open { display: block; }
.mnav-sub a { display: block; padding: 8px 0; color: var(--ink-2); font-size: .9rem; }

.modal { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 20px; visibility: hidden; }
.modal.is-open { visibility: visible; }
.modal-dialog {
    position: relative; width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: auto;
    background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .25s, transform .25s var(--ease);
}
.modal.is-open .modal-dialog { opacity: 1; transform: none; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: var(--card); box-shadow: var(--shadow-sm); }

/* ==========================================================================
   Product card
   ========================================================================== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.pcard {
    position: relative; display: flex; flex-direction: column; background: var(--card);
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    transition: box-shadow .25s, border-color .25s, transform .25s var(--ease);
}
.pcard:hover { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-3px); }
.pcard-media { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; }
/* Cards stretched wide (few items in a row) get a shorter image area. */
.pcard { container-type: inline-size; }
@container (min-width: 340px) { .pcard-media { aspect-ratio: 4 / 3; } }
.pcard-media > a { display: grid; place-items: center; width: 100%; height: 100%; padding: 14px; }
.pcard-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .45s var(--ease); }
.pcard:hover .pcard-media img { transform: scale(1.05); }
.img-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #cbd5e1; font-size: 2.4rem; background: var(--line-2); border-radius: 10px; }
.pcard.is-oos .pcard-media img { opacity: .55; filter: grayscale(.4); }

.badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; z-index: 1; }
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 6px;
    font-size: .72rem; font-weight: 700; letter-spacing: .01em; line-height: 1.3;
}
.badge-sale { background: var(--bad); color: #fff; }
.badge-new { background: var(--sky-ink); color: #fff; }
.badge-hot { background: var(--brand); color: #fff; }
.badge-oos { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.badge-low { background: var(--brand-soft); color: var(--brand-ink); border: 1px solid var(--brand-line); }
.badge-soft { background: var(--line-2); color: var(--ink-2); }

.pcard-actions { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 1; }
.pcard-action {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: #fff; color: var(--ink-2); box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    transition: transform .25s var(--ease), opacity .25s, color .2s, background .2s;
}
.pcard-action:hover { color: var(--sky-ink); }
[data-wishlist].is-saved i { font-weight: 900; color: var(--bad); }
.pcard-actions .js-quick-view { opacity: 0; transform: translateX(8px); }
.pcard:hover .pcard-actions .js-quick-view, .pcard-actions .js-quick-view:focus-visible { opacity: 1; transform: none; }

.pcard-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; border-top: 1px solid var(--line-2); }
.pcard-cat { font-size: .74rem; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-cat:hover { color: var(--sky-ink); }
.pcard-title { font-family: var(--font); font-size: .95rem; font-weight: 600; line-height: 1.35; letter-spacing: 0; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title a:hover { color: var(--sky-ink); }
.stars { display: inline-flex; gap: 2px; color: var(--star); font-size: .78rem; }
.stars .empty { color: #d1d5db; }
.rating { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.pcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.price { display: flex; flex-direction: column; line-height: 1.2; }
.price-now { font-weight: 800; font-size: 1.08rem; color: var(--ink); }
.price-was { font-size: .8rem; color: var(--muted); text-decoration: line-through; }
.pcard-add {
    width: 42px; height: 42px; border-radius: 12px; background: var(--navy); color: #fff; flex-shrink: 0;
    display: grid; place-items: center; transition: background .2s, transform .15s;
}
.pcard-add:hover { background: var(--brand); }
.pcard-add:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.pcard-add.is-loading i::before { content: "\f110"; }
.pcard-add.is-loading i { animation: spin .8s linear infinite; }
.pcard-add.is-done { background: var(--ok); }

/* List view variant on the shop page */
.products-grid.is-list { grid-template-columns: 1fr; }
.products-grid.is-list .pcard { flex-direction: row; }
.products-grid.is-list .pcard-media { width: 200px; flex-shrink: 0; }
.products-grid.is-list .pcard-body { border-top: 0; border-left: 1px solid var(--line-2); padding: 20px 24px; }
.products-grid.is-list .pcard-title { font-size: 1.05rem; min-height: 0; }
.products-grid.is-list .pcard-excerpt { display: block; }
.pcard-excerpt { display: none; color: var(--muted); font-size: .88rem; }

/* ==========================================================================
   Sections, carousels, tabs
   ========================================================================== */
.section { margin-top: 48px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2, .section-title { font-size: 1.55rem; font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 4px; }
.section-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--sky-ink); font-size: .92rem; }
.section-link:hover { gap: 12px; }
.section-head-tools { display: flex; align-items: center; gap: 10px; }

.carousel { position: relative; }
.carousel-arrow {
    position: absolute; top: calc(50% - 30px); z-index: 3; width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; background: var(--card); color: var(--navy);
    border: 1px solid var(--line); box-shadow: var(--shadow); transition: background .2s, color .2s, transform .2s;
}
.carousel-arrow:hover { background: var(--sky); color: #fff; border-color: var(--sky); transform: scale(1.06); }
.carousel-arrow.prev { left: -14px; }
.carousel-arrow.next { right: -14px; }
.carousel-arrow[hidden] { display: none; }
/* Fade at the scrollable edge hints that there is more to see. */
.carousel.is-scrollable::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 14px; width: 48px; pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--bg)); border-radius: 0 var(--radius) var(--radius) 0;
}
.carousel.is-scrollable:has(.carousel-arrow.next[hidden])::after { display: none; }
/* Columns never shrink below one fifth of the row, and stretch to fill it when
   there are fewer products than slots (no empty gap on the right). */
.carousel-track {
    --cols: 5;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(calc((100% - (var(--cols) - 1) * 18px) / var(--cols)), 1fr); gap: 18px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    scrollbar-width: thin; scrollbar-color: var(--sky-line) transparent;
    padding: 4px 2px 14px; margin: -4px -2px 0;
    cursor: grab;
}
.carousel-track:focus-visible { outline-offset: 4px; }
.carousel-track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.carousel-track.is-dragging a { pointer-events: none; }
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--sky-line); border-radius: 3px; }
.carousel-track::-webkit-scrollbar-thumb:hover { background: var(--sky); }
.carousel-track::-webkit-scrollbar-track { background: transparent; }
.carousel-track > * { scroll-snap-align: start; min-width: 0; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
    padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--ink-2);
    border: 1px solid var(--line); background: var(--card); transition: all .2s;
}
.tab:hover { border-color: var(--sky); color: var(--sky-ink); }
.tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fade .35s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Home: hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 18px; margin-top: 24px; }
.hero-main {
    position: relative; overflow: hidden; border-radius: var(--radius-lg); min-height: 400px; color: #fff;
    background:
        radial-gradient(900px 420px at 100% 0%, color-mix(in srgb, var(--sky) 38%, transparent), transparent 62%),
        radial-gradient(520px 260px at 0% 100%, color-mix(in srgb, var(--accent, #0ea5e9) 30%, transparent), transparent 65%),
        linear-gradient(135deg, var(--navy), color-mix(in srgb, var(--navy) 85%, #1e3a8a));
    display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; padding: 44px 48px; gap: 24px;
}
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: .78rem; font-weight: 600; letter-spacing: .02em; margin-bottom: 18px; }
.hero-eyebrow i { color: var(--brand); }
.hero-main h1 { color: #fff; font-size: clamp(1.9rem, 3.2vw, 2.9rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.hero-main h1 span { color: var(--brand); }
.hero-main p { color: rgba(255, 255, 255, .78); font-size: 1.02rem; max-width: 470px; margin-bottom: 26px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-main .btn-secondary { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.hero-main .btn-secondary:hover { background: rgba(255, 255, 255, .18); border-color: #fff; }
.hero-points { display: flex; gap: 22px; margin-top: 30px; flex-wrap: wrap; font-size: .84rem; color: rgba(255, 255, 255, .8); }
.hero-points span { display: inline-flex; align-items: center; gap: 8px; }
.hero-points i { color: var(--sky); }
.hero-stack { position: relative; height: 320px; }
.hero-tile {
    position: absolute; width: 58%; background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 24px 50px rgba(0, 0, 0, .35);
    color: var(--ink); transition: transform .4s var(--ease);
}
.hero-tile img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; }
.hero-tile span { display: block; font-size: .78rem; font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-tile strong { font-size: .85rem; color: var(--brand-ink); }
.hero-tile:nth-child(1) { left: 0; top: 30px; transform: rotate(-6deg); z-index: 1; }
.hero-tile:nth-child(2) { right: 0; top: 0; transform: rotate(5deg); z-index: 2; }
.hero-tile:nth-child(3) { left: 22%; bottom: -10px; width: 52%; transform: rotate(-1deg); z-index: 3; }
.hero-tile:hover { transform: rotate(0) translateY(-6px) scale(1.03); z-index: 5; }

.hero-side { display: grid; gap: 18px; }
.promo {
    position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 26px; min-height: 190px;
    display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line);
    transition: transform .3s var(--ease), box-shadow .3s;
}
.promo:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.promo small { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.promo h3 { font-size: 1.4rem; font-weight: 800; margin: 6px 0 4px; }
.promo p { font-size: .88rem; opacity: .8; }
.promo .section-link { margin-top: 14px; }
.promo-deal { background: linear-gradient(135deg, var(--brand-soft), #fff 70%); }
.promo-deal small { color: var(--bad); }
.promo-ship { background: linear-gradient(135deg, var(--sky-soft), #fff 70%); }
.promo-ship small { color: var(--sky-ink); }
.promo-icon { position: absolute; right: -10px; bottom: -14px; font-size: 6.5rem; opacity: .08; transform: rotate(-12deg); }

.slider { position: relative; overflow: hidden; border-radius: var(--radius-lg); min-height: 400px; background: var(--navy); }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; display: flex; align-items: center; padding: 48px; opacity: 0; transition: opacity .8s; }
.slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .55), transparent 70%); }
.slide.is-active { opacity: 1; z-index: 1; }
.slide-content { position: relative; max-width: 520px; color: #fff; }
.slide-content h2 { color: inherit; font-size: clamp(1.8rem, 3vw, 2.7rem); font-weight: 800; margin: 10px 0 12px; }
.slide-content p { opacity: .85; margin-bottom: 22px; }
.slider-dots { position: absolute; z-index: 2; bottom: 18px; left: 48px; display: flex; gap: 8px; }
.slider-dots button { width: 10px; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .45); transition: width .3s; }
.slider-dots button.is-active { width: 28px; background: #fff; }

/* ---------- Home: departments ---------- */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.dept {
    position: relative; display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--line); overflow: hidden; transition: all .25s var(--ease);
}
.dept:hover { border-color: var(--sky-line); box-shadow: var(--shadow); transform: translateY(-2px); }
.dept-img { width: 92px; height: 92px; border-radius: 14px; background: var(--line-2); flex-shrink: 0; overflow: hidden; display: grid; place-items: center; color: var(--sky-ink); font-size: 2rem; }
.dept-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.dept:hover .dept-img img { transform: scale(1.08); }
.dept h3 { font-family: var(--font); font-size: 1rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.dept-count { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); margin-top: 6px; }
.dept:hover .dept-count { color: var(--sky-ink); }

/* ---------- Home: flash sale ---------- */
.flash { border-radius: var(--radius-lg); padding: 26px; background: linear-gradient(135deg, #fff1f2, #fff 60%); border: 1px solid #fecdd3; }
.flash .section-head h2 { color: var(--bad); display: flex; align-items: center; gap: 10px; }
.countdown { display: flex; gap: 8px; align-items: center; }
.countdown span { min-width: 52px; text-align: center; padding: 8px 6px; border-radius: 10px; background: var(--navy); color: #fff; font-weight: 800; font-size: 1.1rem; line-height: 1; }
.countdown small { display: block; font-size: .62rem; font-weight: 600; opacity: .7; margin-top: 4px; text-transform: uppercase; }

/* ---------- Brands ---------- */
.brand-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.brand-chip {
    display: grid; place-items: center; text-align: center; height: 84px; padding: 12px; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--line); font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--ink-2);
    transition: all .25s;
}
.brand-chip img { max-height: 46px; width: auto; filter: grayscale(1); opacity: .75; transition: all .25s; }
.brand-chip small { display: block; font-family: var(--font); font-weight: 500; font-size: .74rem; color: var(--muted); }
.brand-chip:hover { border-color: var(--sky-line); color: var(--sky-ink); box-shadow: var(--shadow-sm); }
.brand-chip:hover img { filter: none; opacity: 1; }

/* ==========================================================================
   Breadcrumbs & page header
   ========================================================================== */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .84rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--sky-ink); }
.crumbs i { font-size: .6rem; opacity: .6; }
.crumbs span:last-child { color: var(--ink-2); font-weight: 500; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 760px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line); font-size: .85rem; font-weight: 500; color: var(--ink-2); transition: all .2s;
}
.chip:hover { border-color: var(--sky); color: var(--sky-ink); }
.chip.is-active { background: var(--sky-soft); border-color: var(--sky-line); color: var(--navy); }
.chip i { font-size: .72rem; }
.chip small { color: var(--muted); }

/* ==========================================================================
   Shop listing
   ========================================================================== */
.shop { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.filters { position: sticky; top: 150px; max-height: calc(100vh - 170px); overflow-y: auto; scrollbar-width: thin; }
.filters-inner { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.filters-head h3 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.filters-head a { font-size: .82rem; color: var(--sky-ink); font-weight: 600; }
.filter-group { border-bottom: 1px solid var(--line); }
.filter-group:last-of-type { border-bottom: 0; }
.filter-group > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; font-weight: 700; font-size: .9rem;
}
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary i { font-size: .7rem; color: var(--muted); transition: transform .2s; }
.filter-group[open] > summary i { transform: rotate(180deg); }
.filter-body { padding: 0 18px 16px; display: grid; gap: 10px; }
.filter-body .check span:first-of-type { flex: 1; }
.filter-body .check small { color: var(--muted); font-size: .78rem; }
.filter-sub { padding-left: 27px; display: grid; gap: 8px; }
.filter-scroll { max-height: 220px; overflow-y: auto; display: grid; gap: 10px; padding-right: 4px; }
.price-inputs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.price-inputs .input { padding: 9px 10px; font-size: .88rem; }
.filters-apply { padding: 14px 18px; border-top: 1px solid var(--line); display: none; }
.filters-close { display: none !important; }

.toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 10px 12px 10px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px;
}
.toolbar-count { font-size: .9rem; color: var(--muted); }
.toolbar-count strong { color: var(--ink); }
.toolbar-tools { display: flex; align-items: center; gap: 10px; }
.toolbar select.input { width: auto; padding-top: 8px; padding-bottom: 8px; font-size: .88rem; }
.view-toggle { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.view-toggle button { width: 38px; height: 36px; color: var(--muted); }
.view-toggle button.is-active { background: var(--navy); color: #fff; }
.filters-toggle { display: none; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.active-filters .chip { background: var(--sky-soft); border-color: var(--sky-line); color: var(--navy); }
.active-filters .clear { font-size: .85rem; color: var(--muted); text-decoration: underline; margin-left: 4px; }

/* Pagination */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 36px; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; display: inline-grid; place-items: center;
    border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: .9rem;
}
.pager a:hover { border-color: var(--sky); color: var(--sky-ink); }
.pager .is-current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pager .is-disabled { opacity: .4; }
.pager .dots { border: 0; background: none; }

/* ==========================================================================
   Product page
   ========================================================================== */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.gallery { position: sticky; top: 150px; display: grid; grid-template-columns: 76px 1fr; gap: 14px; }
.gallery.single { grid-template-columns: 1fr; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 10px; }
.gallery-thumb { width: 76px; height: 76px; border-radius: 12px; border: 2px solid var(--line); background: #fff; overflow: hidden; padding: 4px; transition: border-color .2s; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb.is-active, .gallery-thumb:hover { border-color: var(--sky); }
.gallery-main {
    position: relative; aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; cursor: zoom-in;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 24px; transition: transform .2s ease-out; }
.gallery-main.is-zoomed img { transform: scale(2.1); }
.gallery-main .badges { top: 18px; left: 18px; }

.pdp-info { display: flex; flex-direction: column; gap: 18px; }
.pdp-brand { font-size: .85rem; font-weight: 600; color: var(--sky-ink); }
.pdp-title { font-size: clamp(1.5rem, 2.4vw, 2.05rem); font-weight: 800; letter-spacing: -.02em; }
.pdp-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.pdp-meta .dot { width: 4px; height: 4px; border-radius: 2px; background: #d1d5db; }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pdp-price .now { font-size: 2rem; font-weight: 800; font-family: var(--font-display); }
.pdp-price .was { color: var(--muted); text-decoration: line-through; font-size: 1.05rem; }
.pdp-price .save { margin-left: auto; color: var(--ok); background: var(--ok-soft); padding: 5px 10px; border-radius: 8px; font-size: .84rem; font-weight: 700; }
.pdp-summary { color: var(--ink-2); line-height: 1.7; }

.stock { display: flex; flex-direction: column; gap: 8px; font-weight: 600; font-size: .92rem; }
.stock-line { display: flex; align-items: center; gap: 8px; }
.stock .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.stock.in { color: var(--ok); }
.stock.low { color: var(--warn); }
.stock.out { color: var(--bad); }
.stock.backorder { color: #2563eb; }
.stock-bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; max-width: 320px; }
.stock-bar span { display: block; height: 100%; background: currentColor; border-radius: 3px; }

.buy-box { display: grid; gap: 12px; }
.buy-row { display: flex; gap: 12px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); height: 50px; flex-shrink: 0; }
.qty button { width: 42px; height: 100%; color: var(--ink-2); font-size: .8rem; }
.qty button:hover { color: var(--sky-ink); }
.qty input { width: 48px; height: 100%; border: 0; text-align: center; font-weight: 700; outline: none; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; }
.qty.sm { height: 36px; }
.qty.sm button { width: 32px; }
.qty.sm input { width: 38px; font-size: .88rem; }
.buy-row .btn { flex: 1; height: 50px; font-size: 1rem; }
.buy-alt { display: flex; gap: 10px; }
.buy-alt .btn { flex: 1; }
.share { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); }
.share a, .share button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); transition: all .2s; }
.share a:hover, .share button:hover { border-color: var(--sky); color: var(--sky-ink); }

.assurance { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.assurance div { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--card); font-size: .84rem; color: var(--muted); }
.assurance i { color: var(--sky-ink); font-size: 1.15rem; margin-top: 2px; width: 22px; text-align: center; }
.assurance strong { display: block; color: var(--ink); font-size: .88rem; }
.spec-list { display: grid; gap: 0; font-size: .9rem; }
.spec-list div { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.spec-list dt { color: var(--muted); }
.spec-list dd a { color: var(--sky-ink); font-weight: 500; }

.pdp-tabs { margin-top: 48px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.pdp-tabs .tabs { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pdp-tabs .tab-panel { padding: 26px 28px; }
.prose { color: var(--ink-2); line-height: 1.75; max-width: 820px; }
.prose p, .prose ul, .prose ol { margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose h2, .prose h3 { margin: 20px 0 10px; }
.prose img { border-radius: 12px; margin: 12px 0; }

.reviews { display: grid; grid-template-columns: 280px 1fr; gap: 36px; }
.rating-big { font-size: 3rem; font-weight: 800; font-family: var(--font-display); line-height: 1; }
.rating-bars { display: grid; gap: 8px; margin-top: 18px; }
.rating-bar { display: grid; grid-template-columns: 34px 1fr 28px; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); }
.rating-bar div { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.rating-bar div span { display: block; height: 100%; background: var(--star); }
.review { padding: 18px 0; border-bottom: 1px solid var(--line-2); }
.review:first-child { padding-top: 0; }
.review-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.review-author { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sky-soft); color: var(--navy); font-weight: 700; font-size: .85rem; }
.verified { font-size: .74rem; color: var(--ok); font-weight: 600; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { display: none; }
.star-input label { font-size: 1.5rem; color: #d1d5db; cursor: pointer; transition: color .15s; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }

.sticky-buy {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: none; align-items: center; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(16, 24, 40, .08); transform: translateY(110%); transition: transform .3s var(--ease);
}
.sticky-buy.is-visible { transform: none; }
.sticky-buy .price-now { font-size: 1.05rem; }
.sticky-buy .btn { flex: 1; }

/* Quick view */
.qv { display: grid; grid-template-columns: 1fr 1fr; }
.qv-media { background: #fff; padding: 32px; display: grid; place-items: center; border-right: 1px solid var(--line); min-height: 420px; }
.qv-media img { max-height: 420px; object-fit: contain; }
.qv-body { padding: 34px 32px; display: flex; flex-direction: column; gap: 14px; }
.qv-body h2 { font-size: 1.5rem; padding-right: 30px; }

/* ==========================================================================
   Cart page
   ========================================================================== */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.cart-lines { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.cart-lines-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.cart-line:last-child { border-bottom: 0; }
.cart-thumb { width: 96px; height: 96px; border-radius: 12px; background: #fff; border: 1px solid var(--line-2); overflow: hidden; display: grid; place-items: center; color: #cbd5e1; }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cart-line h3 { font-family: var(--font); font-size: .98rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; }
.cart-line h3 a:hover { color: var(--sky-ink); }
.cart-line-meta { font-size: .82rem; color: var(--muted); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.cart-line-meta .warn { color: var(--warn); font-weight: 600; }
.cart-line-total { font-weight: 800; min-width: 110px; text-align: right; }
.cart-line-actions { display: flex; gap: 14px; margin-top: 10px; }
.link-btn { font-size: .82rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.link-btn:hover { color: var(--bad); }
.summary { position: sticky; top: 150px; display: grid; gap: 16px; }
.summary-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.summary-card h3 { font-size: 1.1rem; margin-bottom: 14px; }
.coupon-form { display: flex; gap: 8px; }
.coupon-form .input { text-transform: uppercase; }
.coupon-applied { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--ok-soft); color: #166534; font-weight: 600; font-size: .9rem; }
.pay-icons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.pay-icons span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--line); font-size: .74rem; font-weight: 700; color: var(--ink-2); background: var(--card); }
.secure-note { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 12px; display: flex; gap: 6px; justify-content: center; align-items: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.trust { background: var(--card); border-top: 1px solid var(--line); margin-top: 64px; }
.trust .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 26px; padding-bottom: 26px; }
.trust-item { display: flex; gap: 14px; align-items: center; }
.trust-item i { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--sky-soft); color: var(--sky-ink); font-size: 1.15rem; flex-shrink: 0; }
.trust-item strong { display: block; font-size: .92rem; }
.trust-item span { font-size: .82rem; color: var(--muted); }

.footer { background: var(--navy); color: rgba(255, 255, 255, .72); font-size: .9rem; }
.footer a:hover { color: #fff; }
.footer-news { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-news .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 32px; padding-bottom: 32px; flex-wrap: wrap; }
.footer-news h3 { color: #fff; font-size: 1.3rem; }
.footer-news p { margin-top: 4px; }
.news-form { display: flex; gap: 8px; flex: 1; max-width: 480px; min-width: 280px; }
.news-form input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07); color: #fff; outline: none; }
.news-form input::placeholder { color: rgba(255, 255, 255, .5); }
.news-form input:focus { border-color: var(--sky); }
.news-form .btn { height: 48px; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-top: 44px; padding-bottom: 36px; }
.footer h4 { color: #fff; font-family: var(--font); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer-brand img { height: 56px; width: auto; background: #fff; border-radius: 12px; padding: 6px; margin-bottom: 14px; }
.footer-brand strong { display: block; color: #fff; font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 8px; }
.social { display: flex; gap: 8px; margin-top: 18px; }
.social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); transition: background .2s; }
.social a:hover { background: var(--brand); }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; }
.contact-list i { color: var(--sky); margin-top: 4px; width: 16px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; font-size: .82rem; }
.footer-bottom .pay-icons { margin: 0; }
.footer-bottom .pay-icons span { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); }

.to-top {
    position: fixed; right: 20px; bottom: 24px; z-index: 80; width: 46px; height: 46px; border-radius: 50%;
    background: var(--navy); color: #fff; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--sky-ink); }

.tabbar { display: none; }

/* ==========================================================================
   Account & content pages (legacy views)
   ========================================================================== */
.page-content, .prose-page { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.auth-wrap { max-width: 460px; margin: 20px auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
th { font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1500px) {
    .catnav-help { display: none; }
}

@media (max-width: 1200px) {
    .carousel-track { --cols: 4; }
    .account-text { display: none; }
}

@media (max-width: 1024px) {
    :root { --gutter: 18px; }
    .header-main { gap: 16px; }
    .brand-tag { display: none; }
    .hero { grid-template-columns: 1fr; }
    .hero-side { grid-template-columns: 1fr 1fr; }
    .shop { grid-template-columns: 1fr; }
    .filters {
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 310; width: min(340px, 88vw); max-height: none;
        background: var(--card); transform: translateX(-100%); transition: transform .32s var(--ease); display: flex; flex-direction: column;
    }
    .filters.is-open { transform: none; }
    .filters-inner { border: 0; border-radius: 0; flex: 1; overflow-y: auto; }
    .filters-apply { display: block; position: sticky; bottom: 0; background: var(--card); }
    .filters-close { display: inline-grid !important; }
    .filters-toggle { display: inline-flex; }
    .pdp { grid-template-columns: 1fr; gap: 28px; }
    .gallery { position: static; }
    .cart-layout { grid-template-columns: 1fr; }
    .summary { position: static; }
    .footer-main { grid-template-columns: 1fr 1fr; }
    .trust .container { grid-template-columns: 1fr 1fr; }
    .reviews { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .announce-links { display: none; }
    .announce .container { justify-content: center; text-align: center; }
    .menu-toggle { display: inline-grid; }
    .header-main { flex-wrap: wrap; min-height: 64px; padding-top: 8px; padding-bottom: 10px; gap: 6px 10px; }
    .brand img { height: 64px; }
    .brand { flex: 1; min-width: 0; }
    .brand-name { font-size: .95rem; max-width: 180px; }
    .search { order: 3; flex-basis: 100%; max-width: none; }
    .search-form { height: 44px; }
    .search-cat { display: none; }
    .catnav { display: none; }
    .header-actions .wish-btn, .header-actions .dropdown { display: none; }
    .hero-main { grid-template-columns: 1fr; padding: 32px 26px; min-height: 0; }
    .hero-stack { display: none; }
    .carousel-track { grid-auto-columns: minmax(calc((100% - 2 * 14px) / 2.3), 1fr); gap: 14px; }
    .carousel-arrow { display: none !important; }
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .products-grid.is-list .pcard-media { width: 130px; }
    .products-grid.is-list .pcard-body { padding: 14px; }
    .qv { grid-template-columns: 1fr; }
    .qv-media { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; }
    .qv-media img { max-height: 260px; }
    .sticky-buy { display: flex; }
    .tabbar {
        display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 95; left: 0; right: 0; bottom: 0;
        background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
    }
    .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; font-size: .68rem; font-weight: 600; color: var(--muted); }
    .tabbar i { font-size: 1.12rem; }
    .tabbar .is-active { color: var(--sky-ink); }
    .tabbar .count-badge { top: 4px; right: calc(50% - 22px); }
    body { padding-bottom: 62px; }
    body.has-sticky-buy .tabbar { display: none; }
    .to-top { bottom: 80px; }
    .toasts { top: auto; bottom: 76px; right: 12px; left: 12px; width: auto; }
}

@media (max-width: 640px) {
    :root { --gutter: 14px; }
    body { font-size: 14.5px; }
    .page { padding-top: 18px; }
    .section { margin-top: 36px; }
    .section-head h2, .section-title { font-size: 1.25rem; }
    .hero-side { grid-template-columns: 1fr; }
    .promo { min-height: 0; }
    .hero-main h1 { font-size: 1.75rem; }
    .dept-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .dept { flex-direction: column; align-items: flex-start; gap: 12px; padding: 12px; }
    .dept-img { width: 100%; height: 110px; }
    .pcard-body { padding: 12px; }
    .pcard-title { font-size: .88rem; }
    .price-now { font-size: .98rem; }
    .pcard-add { width: 38px; height: 38px; border-radius: 10px; }
    .pcard-actions .js-quick-view { display: none; }
    .gallery { grid-template-columns: 1fr; }
    .gallery-thumbs { flex-direction: row; order: 2; overflow-x: auto; }
    .gallery-thumb { width: 64px; height: 64px; flex-shrink: 0; }
    .assurance { grid-template-columns: 1fr; }
    .pdp-tabs .tab-panel { padding: 20px 18px; }
    .spec-list div { grid-template-columns: 120px 1fr; }
    .cart-line { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 16px; }
    .cart-thumb { width: 76px; height: 76px; }
    .cart-line .qty, .cart-line-total { grid-column: 2; justify-self: start; text-align: left; }
    .footer-main { grid-template-columns: 1fr; gap: 28px; }
    .trust .container { grid-template-columns: 1fr; gap: 14px; }
    .toolbar-count { flex-basis: 100%; }
    .toolbar-tools { flex: 1; }
    .toolbar select.input { flex: 1; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

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