/* ============================================================
   i BuyFix — Public design system (Phase UI-1)
   Mobile-first. Premium electronics aesthetic.
   ============================================================ */

/* ---------------- Tokens ---------------- */
:root {
    --primary: #1769FF;
    --primary-dark: #0D4ED6;
    --primary-light: #EBF1FF;
    --primary-glow: rgba(23, 105, 255, 0.20);

    --navy: #0B1437;
    --navy-2: #1D2A4A;
    --ink: #0F172A;
    --slate: #3F4C6B;
    --muted: #697586;
    --subtle: #98A2B3;

    --border: #EAECF0;
    --border-strong: #D0D5DD;

    --bg: #FAFBFC;
    --bg-alt: #F5F7FB;
    --surface: #FFFFFF;

    --success: #12B76A;
    --success-bg: #ECFDF3;
    --danger: #F04438;
    --danger-bg: #FEF3F2;
    --warn: #F79009;
    --warn-bg: #FFFAEB;
    --amber: #F59E0B;

    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 999px;

    --shadow-xs: 0 1px 2px 0 rgba(16, 24, 40, .05);
    --shadow-sm: 0 1px 3px 0 rgba(16, 24, 40, .10), 0 1px 2px 0 rgba(16, 24, 40, .06);
    --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, .10), 0 2px 4px -2px rgba(16, 24, 40, .06);
    --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, .08), 0 4px 6px -2px rgba(16, 24, 40, .03);
    --shadow-xl: 0 20px 24px -4px rgba(16, 24, 40, .08), 0 8px 8px -4px rgba(16, 24, 40, .03);
    --shadow-2xl: 0 24px 48px -12px rgba(16, 24, 40, .18);
    --shadow-glow: 0 10px 30px -10px rgba(23, 105, 255, .45);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;

    --container: 1200px;
    --container-wide: 1320px;
    --header-height: 80px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------------- Reset ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: .9375rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; }

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    color: var(--navy);
    margin: 0 0 .5rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 700;
}
h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
h4 { font-size: 1rem; font-family: var(--font-sans); letter-spacing: 0; font-weight: 600; }

p { margin: 0 0 1rem; }

::selection { background: var(--primary); color: #fff; }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------------- Utilities ---------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }
@media (min-width: 1024px) { .container { padding: 0 40px; } }

.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.text-center { text-align: center; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8125rem 1.375rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.005em;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s var(--ease), border-color .2s var(--ease),
                color .2s var(--ease), transform .15s var(--ease),
                box-shadow .2s var(--ease);
    user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-sm { padding: .5rem .9375rem; font-size: .875rem; }
.btn-lg { padding: 1.0625rem 1.75rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--navy);
}
.btn-ghost:hover {
    background: var(--bg-alt);
    color: var(--navy);
}

.btn-white {
    background: #fff;
    color: var(--navy);
    box-shadow: var(--shadow-md);
}
.btn-white:hover {
    background: #fff;
    color: var(--navy);
    box-shadow: var(--shadow-lg);
}

.btn-outline-white {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-color: rgba(255, 255, 255, .35);
    backdrop-filter: blur(8px);
}
.btn-outline-white:hover {
    background: rgba(255, 255, 255, .18);
    color: #fff;
    border-color: rgba(255, 255, 255, .75);
}

.btn-icon {
    padding: .5rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: inherit;
    border-radius: var(--radius-sm);
    transition: background .15s var(--ease);
}
.btn-icon:hover { background: var(--bg-alt); }

/* ---------------- Forms ---------------- */
.form-field { margin: 0 0 1rem; }
.form-field > label {
    display: block;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: .5rem;
    font-size: .875rem;
    letter-spacing: -0.005em;
}
.form-field input,
.form-field select,
.form-field textarea {
    display: block;
    width: 100%;
    padding: .8125rem .9375rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: .9375rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--subtle); }
.form-error { color: var(--danger); font-size: .8125rem; margin-top: .375rem; }

/* ---------------- Announcement bar ---------------- */
.announcement-bar {
    background: var(--navy);
    color: #fff;
    font-size: .8125rem;
    text-align: center;
    padding: .625rem 3rem .625rem 1rem;
    position: relative;
    letter-spacing: -0.005em;
    line-height: 1.4;
}
.announcement-bar[hidden] { display: none; }
.announcement-dismiss {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: .15rem .35rem;
    line-height: 1;
    opacity: .6;
    border-radius: 4px;
    transition: opacity .2s var(--ease), background .2s var(--ease);
}
.announcement-dismiss:hover { opacity: 1; background: rgba(255, 255, 255, .1); }

/* ---------------- Site header ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .2s var(--ease);
}

.header-main { padding: .875rem 0; }
.header-main .container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--navy);
    padding: .5rem;
    cursor: pointer;
    transition: background .15s var(--ease);
}
.mobile-menu-toggle:hover { background: var(--bg-alt); }

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1875rem;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: -0.03em;
    line-height: 1;
    flex-shrink: 0;
}
.site-logo:hover { color: var(--navy); }
.site-logo img { max-height: 34px; width: auto; }
.site-logo .logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.2);
}

/* Search */
.header-search {
    flex: 1;
    max-width: 640px;
    display: none;
    align-items: stretch;
    gap: .25rem;
    background: var(--bg-alt);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    padding: .25rem .25rem .25rem 1.0625rem;
    transition: border-color .2s var(--ease), background .2s var(--ease),
                box-shadow .2s var(--ease);
}
.header-search:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.header-search input[type="search"] {
    flex: 1;
    border: 0;
    background: transparent;
    padding: .5rem 0;
    font-size: .9375rem;
    font-family: inherit;
    color: var(--ink);
    min-width: 0;
}
.header-search input[type="search"]:focus { outline: none; }
.header-search button {
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius-full);
    padding: .5rem 1.125rem;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    transition: background .15s var(--ease);
}
.header-search button:hover { background: var(--primary-dark); }

.header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
}
.header-action {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .625rem .75rem;
    border-radius: var(--radius-sm);
    color: var(--navy);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: background .15s var(--ease);
}
.header-action:hover { background: var(--bg-alt); color: var(--navy); }
.header-action svg { width: 20px; height: 20px; }

.header-action--cart {
    background: var(--navy);
    color: #fff;
    padding: .625rem 1rem;
    border-radius: var(--radius-full);
    gap: .5rem;
}
.header-action--cart:hover { background: var(--ink); color: #fff; }
.header-action--cart .action-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: .6875rem;
    font-weight: 700;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .375rem;
    border-radius: var(--radius-full);
    line-height: 1;
}

/* Desktop navigation */
.header-nav { display: none; border-top: 1px solid var(--border); }
.header-nav .container { display: flex; gap: .25rem; }
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .875rem .9375rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--navy);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    letter-spacing: -0.005em;
    transition: color .2s var(--ease), border-color .2s var(--ease);
}
.nav-menu > li > a:hover,
.nav-menu > li > a:focus-visible {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.nav-menu > li.is-active > a {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.nav-menu > li > a .chev { width: 12px; height: 12px; opacity: .65; transition: transform .2s var(--ease); }
.nav-menu > li:hover > a .chev { transform: rotate(180deg); }

.nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    min-width: 240px;
    padding: .375rem;
    list-style: none;
    margin: 0;
    opacity: 0;
    transform: translateY(6px);
    visibility: hidden;
    transition: opacity .15s var(--ease), transform .15s var(--ease), visibility .15s;
    z-index: 10;
}
.nav-menu > li:hover .nav-submenu,
.nav-menu > li:focus-within .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-submenu a {
    display: block;
    padding: .5625rem .8125rem;
    font-size: .875rem;
    color: var(--navy);
    border-radius: var(--radius-sm);
    transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-submenu a:hover { background: var(--bg-alt); color: var(--primary); }

@media (min-width: 900px) {
    .mobile-menu-toggle { display: none; }
    .header-search { display: flex; }
    .header-nav { display: block; }
}

/* ---------------- Mobile drawer ---------------- */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 20, 55, .55);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s var(--ease), visibility .25s;
    z-index: 60;
}
.drawer-overlay.is-open { opacity: 1; visibility: visible; }

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(340px, 88vw);
    background: #fff;
    transform: translateX(-100%);
    transition: transform .25s var(--ease);
    z-index: 70;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.mobile-drawer__head .site-logo { font-size: 1rem; }
.mobile-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}
.mobile-drawer__body .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}
.mobile-drawer__body .nav-menu > li > a {
    padding: .875rem .25rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
    font-size: .9375rem;
}
.mobile-drawer__body .nav-menu > li > a:hover,
.mobile-drawer__body .nav-menu > li > a:focus-visible {
    border-bottom-color: var(--border);
    background: transparent;
    padding-left: .5rem;
}
.mobile-drawer__body .nav-submenu {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    padding: 0 0 0 .5rem;
    background: transparent;
    display: none;
}
.mobile-drawer__body .nav-menu > li.has-children.is-expanded .nav-submenu {
    display: block;
}
.mobile-drawer__body .nav-submenu a {
    padding: .6875rem .5rem;
    font-size: .875rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
}
.mobile-drawer__cta {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
body.drawer-open { overflow: hidden; }

/* ---------------- Mobile bottom nav ---------------- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 30;
    padding: .375rem 0 calc(.375rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(16, 24, 40, .04);
}
.mobile-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: .375rem .25rem;
    color: var(--muted);
    font-size: .6875rem;
    font-weight: 500;
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: color .15s var(--ease);
}
.mobile-bottom-nav__item svg { width: 22px; height: 22px; }
.mobile-bottom-nav__item.is-active { color: var(--primary); }
.mobile-bottom-nav__item .bottom-count {
    position: absolute;
    top: 0;
    right: calc(50% - 22px);
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: .625rem;
    font-weight: 700;
    padding: .0625rem .3125rem;
    min-width: 1rem;
    text-align: center;
    line-height: 1.2;
}
body.has-bottom-nav { padding-bottom: 72px; }
@media (min-width: 900px) {
    .mobile-bottom-nav { display: none; }
    body.has-bottom-nav { padding-bottom: 0; }
}

/* ---------------- Hero (base) ---------------- */
.hero {
    position: relative;
    background:
        radial-gradient(ellipse at 90% 10%, rgba(23, 105, 255, .35) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 90%, rgba(255, 255, 255, .1) 0%, transparent 50%),
        linear-gradient(135deg, #071023 0%, #0B1437 55%, #122A63 100%);
    color: #fff;
    padding: 3rem 0 4rem;
    overflow: hidden;
    isolation: isolate;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    pointer-events: none;
    z-index: -1;
}
.hero--image { background-size: cover; background-position: center; }
.hero--image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(7,16,35,.92) 0%, rgba(11,20,55,.7) 60%, rgba(23,105,255,.4) 100%);
    z-index: -1;
}
.hero__content { position: relative; max-width: 660px; }
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600;
    color: #cfdbff;
    margin-bottom: 1rem;
    padding: .375rem .75rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius-full);
    backdrop-filter: blur(6px);
}
.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5.5vw, 4rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 1.25rem;
    line-height: 1.05;
    letter-spacing: -0.035em;
}
.hero__subtitle {
    font-size: clamp(1rem, 1.6vw, 1.1875rem);
    color: #cbd5e1;
    margin: 0 0 2rem;
    line-height: 1.55;
    max-width: 560px;
}
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; }

@media (min-width: 900px) {
    .hero { padding: 5.5rem 0 6.5rem; }
}

/* ---------------- Sections ---------------- */
.section { padding: 3rem 0; }
.section--tight { padding: 2rem 0; }
.section--bg { background: #fff; }

.section-heading { margin-bottom: 2rem; }
.section-heading__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.section-heading h2 { margin: 0; font-size: clamp(1.375rem, 2vw, 1.75rem); }
.section-heading p { color: var(--muted); margin: .5rem 0 0; font-size: .9375rem; }
.section-heading__row a {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--primary);
    padding: .5rem .875rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: #fff;
    transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.section-heading__row a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

@media (min-width: 900px) {
    .section { padding: 5rem 0; }
    .section--tight { padding: 2.5rem 0; }
    .section-heading { margin-bottom: 2.5rem; }
}

/* ---------------- Trust grid ---------------- */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}
.trust-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .625rem;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.trust-item:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}
.trust-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius);
    margin-bottom: .25rem;
}
.trust-icon svg { width: 22px; height: 22px; }
.trust-item h3 { margin: 0; font-size: .9375rem; font-weight: 600; font-family: var(--font-sans); letter-spacing: -0.005em; }
.trust-item p { margin: 0; color: var(--muted); font-size: .8125rem; line-height: 1.5; }

@media (min-width: 768px) {
    .trust-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
    .trust-item { padding: 1.75rem 1.25rem; }
}

/* ---------------- Product grid & cards ---------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}
@media (min-width: 640px) { .product-grid { gap: 1rem; } }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }

.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.product-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-card__image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--bg-alt) 0%, #EEF2F7 100%);
    overflow: hidden;
    display: block;
}
.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--ease);
}
.product-card:hover .product-card__image { transform: scale(1.04); }

.product-card__badges {
    position: absolute;
    top: .75rem;
    left: .75rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    align-items: flex-start;
}
.product-card__badge {
    font-size: .6875rem;
    font-weight: 700;
    padding: .25rem .5rem;
    border-radius: var(--radius-xs);
    background: var(--primary);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.2;
    box-shadow: var(--shadow-sm);
}
.product-card__badge--sale { background: var(--danger); }
.product-card__badge--new  { background: var(--success); }
.product-card__badge--out  { background: var(--ink); }

.product-card__body {
    padding: .875rem .9375rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    flex: 1;
}
.product-card__brand {
    font-size: .6875rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.product-card__name {
    font-size: .9375rem;
    font-weight: 500;
    color: var(--navy);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.55em;
    letter-spacing: -0.005em;
    margin: .125rem 0;
}
.product-card__name a { color: inherit; }
.product-card__name a:hover { color: var(--primary); }

.product-card__price-row {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .25rem;
}
.product-card__price {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
}
.product-card__was {
    font-size: .8125rem;
    color: var(--muted);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}
.product-card__stock {
    font-size: .75rem;
    color: var(--muted);
    margin-top: .125rem;
}
.product-card__stock.is-out { color: var(--danger); font-weight: 500; }

.product-card__actions {
    display: flex;
    gap: .375rem;
    margin-top: .75rem;
}
.product-card__actions .btn {
    flex: 1;
    padding: .625rem .75rem;
    font-size: .8125rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

/* ---------------- Flash / alerts ---------------- */
.flash-stack {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin: 1rem auto;
    max-width: var(--container);
    padding: 0 16px;
}
.alert {
    padding: .875rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    line-height: 1.5;
    border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); color: #054f31; border-color: #a6f4c5; }
.alert-error   { background: var(--danger-bg); color: #7a271a; border-color: #fecaca; }
.alert-warning { background: var(--warn-bg); color: #7a2e0e; border-color: #fedf89; }
.alert-info    { background: var(--primary-light); color: var(--primary-dark); border-color: #b2ddff; }

/* ---------------- Breadcrumbs ---------------- */
.breadcrumbs {
    font-size: .8125rem;
    color: var(--muted);
    padding: 1.25rem 0 0;
}
.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    align-items: center;
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: .375rem; }
.breadcrumbs li::after { content: "/"; color: var(--border-strong); margin-left: .375rem; }
.breadcrumbs li:last-child::after { content: ""; margin: 0; }
.breadcrumbs li[aria-current="page"] { color: var(--navy); font-weight: 500; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }

/* ---------------- Page banner ---------------- */
.page-banner {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1.75rem 0;
}
.page-banner h1 { margin: 0; font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -0.025em; }
.page-banner p { margin: .5rem 0 0; color: var(--muted); font-size: .9375rem; }

/* ---------------- Pagination ---------------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .375rem;
    flex-wrap: wrap;
    margin: 2.5rem 0 1rem;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 .875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--navy);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    background: #fff;
    transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.pagination a:hover { background: var(--bg-alt); border-color: var(--border-strong); color: var(--navy); }
.pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}
.pagination .disabled { color: var(--subtle); background: var(--bg-alt); cursor: not-allowed; }
.pagination .ellipsis { border: 0; background: transparent; color: var(--muted); min-width: auto; }

/* ---------------- Empty state ---------------- */
.empty-state {
    padding: 4rem 1.5rem;
    text-align: center;
    background: #fff;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--muted);
}
.empty-state svg {
    width: 56px;
    height: 56px;
    color: var(--subtle);
    margin: 0 auto 1rem;
}
.empty-state h2, .empty-state h3 {
    color: var(--navy);
    margin: 0 0 .5rem;
}
.empty-state p { margin: 0 0 1.5rem; max-width: 400px; margin-left: auto; margin-right: auto; }

/* ---------------- Footer ---------------- */
.site-footer {
    background: var(--navy);
    color: #cbd5e1;
    margin-top: 4rem;
    font-size: .875rem;
}

.footer-newsletter {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    padding: 2.5rem 0;
    background: linear-gradient(135deg, #071023 0%, #0B1437 100%);
}
.footer-newsletter__inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
    justify-content: space-between;
}
.footer-newsletter h3 {
    color: #fff;
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}
.footer-newsletter p { margin: .35rem 0 0; color: #94a3b8; font-size: .875rem; }
.footer-newsletter form {
    display: flex;
    gap: .5rem;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--radius-full);
    padding: .25rem .25rem .25rem 1rem;
}
.footer-newsletter input[type="email"] {
    flex: 1;
    border: 0;
    background: transparent;
    padding: .625rem 0;
    font-size: .9375rem;
    font-family: inherit;
    color: var(--ink);
    min-width: 0;
}
.footer-newsletter input[type="email"]:focus { outline: none; }
.footer-newsletter button {
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius-full);
    padding: .625rem 1.125rem;
    font-weight: 600;
    font-size: .875rem;
    cursor: pointer;
    transition: background .15s var(--ease);
    white-space: nowrap;
}
.footer-newsletter button:hover { background: var(--primary-dark); }

@media (min-width: 768px) {
    .footer-newsletter__inner {
        flex-direction: row;
        align-items: center;
    }
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0 2rem;
}
.footer-brand .site-logo { color: #fff; font-size: 1.125rem; }
.footer-brand .site-logo:hover { color: #fff; }
.footer-brand .site-logo .logo-mark {
    background: var(--primary);
    box-shadow: none;
}
.footer-brand p { margin: 1rem 0 0; color: #94a3b8; font-size: .875rem; line-height: 1.6; max-width: 320px; }

.footer-social {
    display: flex;
    gap: .5rem;
    margin-top: 1.25rem;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .06);
    color: #cbd5e1;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.footer-social a:hover { background: var(--primary); color: #fff; }
.footer-social svg { width: 16px; height: 16px; }

.footer-col h3 {
    color: #fff;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 1.25rem;
    font-weight: 600;
    font-family: var(--font-sans);
}
.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.footer-col a {
    color: #94a3b8;
    font-size: .875rem;
    transition: color .15s var(--ease);
}
.footer-col a:hover { color: #fff; }

.footer-contact { display: flex; flex-direction: column; gap: .875rem; }
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    color: #94a3b8;
    font-size: .875rem;
    line-height: 1.5;
}
.footer-contact-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: .25rem;
    color: #64748b;
}
.footer-contact-item a { color: #94a3b8; }
.footer-contact-item a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .06);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    text-align: center;
    font-size: .8125rem;
    color: #64748b;
}
.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #fff; }
.footer-payments {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.footer-payments span {
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    padding: .25rem .5rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 4px;
    background: rgba(255, 255, 255, .03);
}

@media (min-width: 768px) {
    .footer-main { grid-template-columns: 1.5fr 1fr 1fr 1.25fr; gap: 3rem; }
    .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------------- Responsive safety ---------------- */
@media (max-width: 899px) {
    body { padding-bottom: 72px; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
    .product-card:hover { transform: none; }
    .product-card:hover .product-card__image { transform: none; }
}