/* ==========================================================================
   HYDRAX design system
   Light theme: white + blue. Dark theme: graphite slate + blue, deliberately
   mid-dark rather than black. Every token lives here and is overridden once
   under [data-theme="dark"].
   ========================================================================== */

:root {
    /* --- brand ------------------------------------------------------- */
    /* Derived from the logo blue #2770A5, darkened so body links clear AA. */
    --brand: #1f6598;
    --brand-hover: #18507a;
    --brand-active: #123d5d;
    --brand-ink: #14425f;
    --brand-soft: #e7f1f8;
    --brand-soft-2: #d2e5f2;
    --brand-contrast: #ffffff;

    /* The logo keeps its own ink and knocks shapes out in the surface colour. */
    --logo-ink: #2770a5;
    --logo-cut: var(--surface);

    /* --- surfaces ---------------------------------------------------- */
    --bg: #f4f7fb;
    --bg-alt: #eaf0f8;
    --surface: #ffffff;
    --surface-2: #f7fafd;
    --surface-3: #eef3fa;
    --overlay: rgba(12, 28, 46, 0.45);

    /* --- text -------------------------------------------------------- */
    --text: #0f1c2e;
    --text-strong: #061020;
    --text-muted: #56677f;
    --text-subtle: #7d8da3;
    --text-on-brand: #ffffff;

    /* --- lines ------------------------------------------------------- */
    --border: #dde5ee;
    --border-strong: #c3d2df;
    --border-brand: #a5cae4;

    /* --- status ------------------------------------------------------ */
    --success: #0f8a4f;
    --success-soft: #e2f5ea;
    --warning: #9a6812;
    --warning-soft: #fbf1dd;
    --danger: #c8362f;
    --danger-soft: #fdeceb;

    /* --- effects ----------------------------------------------------- */
    --shadow-xs: 0 1px 2px rgba(15, 28, 46, 0.06);
    --shadow-sm: 0 2px 6px rgba(15, 28, 46, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 28, 46, 0.08);
    --shadow-lg: 0 20px 48px rgba(15, 28, 46, 0.14);
    --ring: 0 0 0 3px rgba(39, 112, 165, 0.3);

    --grid-line: rgba(39, 112, 165, 0.09);
    --hatch: rgba(39, 112, 165, 0.07);

    /* --- geometry (4px scale) ---------------------------------------- */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 20px;
    --s-6: 24px;
    --s-8: 32px;
    --s-10: 40px;
    --s-12: 48px;
    --s-16: 64px;
    --s-20: 80px;

    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --r-full: 999px;

    --container: 1280px;
    --section-y: clamp(48px, 7vw, 96px);

    /* --- type -------------------------------------------------------- */
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.8125rem;
    --fs-base: 0.9375rem;
    --fs-md: 1rem;
    --fs-lg: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
    --fs-xl: clamp(1.25rem, 1vw + 1rem, 1.5rem);
    --fs-2xl: clamp(1.625rem, 2.2vw + 1rem, 2.25rem);
    --fs-3xl: clamp(2.125rem, 3.4vw + 1rem, 3.25rem);

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --dur: 180ms;

    color-scheme: light;
}

[data-theme="dark"] {
    --brand: #64aee0;
    --brand-hover: #82bfe9;
    --brand-active: #9dcfef;
    --brand-ink: #a9d5f0;
    --brand-soft: #2c3f4f;
    --brand-soft-2: #36495a;
    --brand-contrast: #0f2433;

    --logo-ink: #6fb6e6;
    --logo-cut: var(--surface);

    --bg: #212b38;
    --bg-alt: #1c252f;
    --surface: #2a3543;
    --surface-2: #303c4c;
    --surface-3: #374555;
    --overlay: rgba(9, 14, 20, 0.6);

    --text: #e9eff7;
    --text-strong: #ffffff;
    --text-muted: #adbbcc;
    --text-subtle: #8b9aad;
    --text-on-brand: #0f2433;

    --border: #3b4958;
    --border-strong: #4c5c6e;
    --border-brand: #4a7391;

    --success: #5cd193;
    --success-soft: #2b3f39;
    --warning: #e3b063;
    --warning-soft: #3d3729;
    --danger: #f18b84;
    --danger-soft: #402c2c;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.26);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.42);
    --ring: 0 0 0 3px rgba(100, 174, 224, 0.38);

    --grid-line: rgba(140, 196, 240, 0.08);
    --hatch: rgba(140, 196, 240, 0.06);

    color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--fs-base);
    line-height: 1.6;
    font-feature-settings: "cv05" 1, "ss03" 1;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.is-locked {
    overflow: hidden;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--text-strong);
    font-weight: 650;
    line-height: 1.16;
    letter-spacing: -0.021em;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0; }

a {
    color: var(--brand);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

a:hover { color: var(--brand-hover); }

img,
svg { display: block; max-width: 100%; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: var(--r-xs);
}

::selection {
    background: var(--brand);
    color: var(--brand-contrast);
}

/* The overlays below set display, which would otherwise defeat [hidden]. */
.modal[hidden],
.drawer[hidden] {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--s-4);
    z-index: 200;
    padding: var(--s-3) var(--s-5);
    background: var(--brand);
    color: var(--brand-contrast);
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    color: var(--brand-contrast);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--s-4);
}

main { flex: 1 0 auto; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(32px, 4.5vw, 56px); }
.section--alt { background: var(--bg-alt); }

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-4);
    margin-bottom: var(--s-8);
}

.section-head__text { max-width: 60ch; }

.section-head__sub {
    margin-top: var(--s-3);
    color: var(--text-muted);
    font-size: var(--fs-md);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--brand);
    border-radius: var(--r-full);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    --btn-bg: transparent;
    --btn-fg: var(--text);
    --btn-bd: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    padding: 11px var(--s-5);
    min-height: 44px;
    border: 1px solid var(--btn-bd);
    border-radius: var(--r-sm);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-size: var(--fs-base);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
        color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
}

.btn--primary {
    --btn-bg: var(--brand);
    --btn-fg: var(--brand-contrast);
    --btn-bd: var(--brand);
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
    --btn-bg: var(--brand-hover);
    --btn-bd: var(--brand-hover);
    color: var(--brand-contrast);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    --btn-bg: var(--surface);
    --btn-fg: var(--text);
    --btn-bd: var(--border-strong);
}

.btn--secondary:hover {
    --btn-bd: var(--brand);
    --btn-fg: var(--brand);
}

.btn--ghost {
    --btn-fg: var(--text-muted);
    --btn-bd: transparent;
}

.btn--ghost:hover {
    --btn-bg: var(--surface-3);
    --btn-fg: var(--text);
}

.btn--soft {
    --btn-bg: var(--brand-soft);
    --btn-fg: var(--brand-ink);
    --btn-bd: transparent;
}

.btn--soft:hover {
    --btn-bd: var(--border-brand);
    color: var(--brand-ink);
}

.btn--on-brand {
    --btn-bg: #ffffff;
    --btn-fg: #0f1c2e;
    --btn-bd: #ffffff;
}

.btn--on-brand:hover { color: #0f1c2e; }

.btn--outline-light {
    --btn-bd: rgba(255, 255, 255, 0.45);
    --btn-fg: #ffffff;
}

.btn--outline-light:hover {
    --btn-bg: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.btn--lg { min-height: 52px; padding-inline: var(--s-8); font-size: var(--fs-md); }
.btn--sm { min-height: 36px; padding: 6px var(--s-4); font-size: var(--fs-sm); }
.btn--block { width: 100%; }
.btn--icon { padding: 0; width: 44px; min-height: 44px; }

.btn .icon { width: 18px; height: 18px; flex: none; }

.icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-weight: 600;
}

.link-arrow .icon { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--dur) var(--ease);
}

.header.is-stuck { box-shadow: var(--shadow-md); }

.topbar {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    min-height: 38px;
}

.topbar__links {
    display: flex;
    align-items: center;
    gap: var(--s-5);
}

.topbar__links a { color: var(--text-muted); }
.topbar__links a:hover { color: var(--brand); }

.topbar__meta {
    display: flex;
    align-items: center;
    gap: var(--s-5);
}

.topbar__hours {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
}

.topbar__hours .icon { width: 15px; height: 15px; color: var(--text-subtle); }

.bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--s-5);
    min-height: 74px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: var(--s-3);
    color: var(--text-strong);
}

.logo:hover { color: var(--text-strong); }

.brand-logo {
    height: 34px;
    width: auto;
    aspect-ratio: 739 / 215;
    flex: none;
    color: var(--logo-ink);
}

.footer .brand-logo { height: 38px; }
.drawer__head .brand-logo { height: 28px; }

.logo__tagline {
    max-width: 15ch;
    padding-left: var(--s-3);
    border-left: 1px solid var(--border);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
    text-wrap: balance;
    color: var(--text-subtle);
}

.search {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    width: 100%;
    max-width: 560px;
    padding: 4px 4px 4px var(--s-4);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
        background var(--dur) var(--ease);
}

.search:focus-within {
    background: var(--surface);
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.search .icon { color: var(--text-subtle); }

.search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 9px 0;
    font-size: var(--fs-base);
}

.search__input:focus { outline: none; }
.search__input::placeholder { color: var(--text-subtle); }

.bar__actions {
    display: flex;
    align-items: center;
    gap: var(--s-2);
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
        border-color var(--dur) var(--ease);
}

.icon-btn:hover {
    background: var(--surface-3);
    color: var(--brand);
}

.icon-btn__badge {
    position: absolute;
    top: 4px;
    right: 3px;
    min-width: 18px;
    height: 18px;
    padding-inline: 5px;
    border-radius: var(--r-full);
    background: var(--brand);
    color: var(--brand-contrast);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.lang {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.lang__item {
    padding: 4px 9px;
    border-radius: var(--r-xs);
    color: var(--text-subtle);
    line-height: 1.3;
}

.lang__item.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}

.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.navbar {
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.navbar__inner {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 54px;
}

.nav-link {
    padding: var(--s-2) var(--s-4);
    border-radius: var(--r-sm);
    color: var(--text-muted);
    font-weight: 550;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-link:hover {
    background: var(--surface-3);
    color: var(--text);
}

.nav-link.is-active {
    color: var(--brand);
    background: var(--brand-soft);
}

.catalog-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    margin-right: var(--s-3);
    padding: 10px var(--s-5);
    border: 0;
    border-radius: var(--r-sm);
    background: var(--brand);
    color: var(--brand-contrast);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--dur) var(--ease);
}

.catalog-btn:hover { background: var(--brand-hover); }
.catalog-btn .icon { width: 18px; height: 18px; }

.header__phone {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    color: var(--text-strong);
    font-weight: 650;
    font-size: var(--fs-md);
    font-variant-numeric: tabular-nums;
}

.header__phone .icon { width: 17px; height: 17px; color: var(--brand); }
.header__phone:hover { color: var(--brand); }

/* --- mega menu --------------------------------------------------------- */

.mega {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 99;
}

.mega.is-open { display: block; }

.mega__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--s-2);
    padding-block: var(--s-6);
}

.mega__item {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-3);
    border: 1px solid transparent;
    border-radius: var(--r-md);
    color: var(--text);
}

.mega__item:hover {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text);
}

.mega__icon {
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: var(--r-sm);
    background: var(--brand-soft);
    color: var(--brand);
}

.mega__icon .icon { width: 22px; height: 22px; }
.mega__title { font-weight: 600; line-height: 1.3; }
.mega__count { font-size: var(--fs-sm); color: var(--text-subtle); }

/* --- mobile ------------------------------------------------------------ */

.burger { display: none; }

.drawer {
    position: fixed;
    inset: 0;
    z-index: 150;
    visibility: hidden;
}

.drawer.is-open { visibility: visible; }

.drawer__backdrop {
    position: absolute;
    inset: 0;
    background: var(--overlay);
    opacity: 0;
    transition: opacity 220ms var(--ease);
}

.drawer.is-open .drawer__backdrop { opacity: 1; }

.drawer__panel {
    position: absolute;
    inset-block: 0;
    right: 0;
    width: min(400px, 88vw);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 240ms var(--ease);
    overflow-y: auto;
}

.drawer.is-open .drawer__panel { transform: translateX(0); }

.drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-4);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface);
}

.drawer__body { padding: var(--s-4); display: grid; gap: var(--s-5); }

.drawer__group { display: grid; gap: var(--s-1); }

.drawer__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: var(--s-2);
}

.drawer__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-3);
    border-radius: var(--r-sm);
    color: var(--text);
    font-weight: 550;
}

.drawer__link:hover { background: var(--surface-2); color: var(--text); }
.drawer__link .icon { width: 16px; height: 16px; color: var(--text-subtle); }

.drawer__foot {
    margin-top: auto;
    padding: var(--s-4);
    border-top: 1px solid var(--border);
    display: grid;
    gap: var(--s-3);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1100px 520px at 88% -10%, var(--brand-soft) 0%, transparent 62%),
        linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(900px 480px at 78% 12%, #000 0%, transparent 76%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    gap: var(--s-12);
    padding-block: clamp(48px, 7vw, 92px);
}

.hero__text { max-width: 44rem; }

.hero h1 { margin-top: var(--s-4); }

.hero__lead {
    margin-top: var(--s-5);
    max-width: 52ch;
    font-size: var(--fs-lg);
    color: var(--text-muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    margin-top: var(--s-8);
}

.hero__note {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    margin-top: var(--s-5);
    font-size: var(--fs-sm);
    color: var(--text-subtle);
}

.hero__note .icon { width: 16px; height: 16px; color: var(--success); }

.hero__panel {
    position: relative;
    align-self: center;
    display: none;
    padding: var(--s-6);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.hero__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid var(--border);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-subtle);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero__spec {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-4);
    padding-block: var(--s-3);
    border-bottom: 1px dashed var(--border);
    font-size: var(--fs-base);
}

.hero__spec:last-child { border-bottom: 0; padding-bottom: 0; }
.hero__spec dt { color: var(--text-muted); }
.hero__spec dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }

/* --- stats ------------------------------------------------------------- */

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.stats__item {
    padding: var(--s-5) var(--s-5);
    background: var(--surface);
}

.stats__value {
    font-size: clamp(1.375rem, 2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-strong);
    font-variant-numeric: tabular-nums;
}

.stats__label {
    margin-top: var(--s-1);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.grid {
    display: grid;
    gap: var(--s-4);
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.grid--cats { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* --- category ---------------------------------------------------------- */

.cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    padding: var(--s-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    color: var(--text);
    overflow: hidden;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
        transform var(--dur) var(--ease);
}

.cat-card::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 3px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 240ms var(--ease);
}

.cat-card:hover {
    border-color: var(--border-brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text);
}

.cat-card:hover::after { transform: scaleX(1); }

.cat-card__icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: var(--r-md);
    background: var(--brand-soft);
    color: var(--brand);
}

.cat-card__icon .icon { width: 26px; height: 26px; }

.cat-card__title { font-size: var(--fs-lg); font-weight: 650; line-height: 1.25; }

.cat-card__lead {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    flex: 1;
}

.cat-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding-top: var(--s-3);
    border-top: 1px solid var(--border);
    font-size: var(--fs-sm);
    color: var(--text-subtle);
    font-variant-numeric: tabular-nums;
}

.cat-card__foot .icon { width: 17px; height: 17px; color: var(--brand); }

/* --- product ----------------------------------------------------------- */

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
        transform var(--dur) var(--ease);
}

.product-card:hover {
    border-color: var(--border-brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    background:
        repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 11px),
        var(--surface-2);
    border-bottom: 1px solid var(--border);
    color: var(--brand);
}

/* Stand-in artwork until real product photos land: a quiet watermark, not a
   picture, so the card reads as data rather than clipart. */
.product-card__media .icon {
    width: 30%;
    height: auto;
    max-height: 48%;
    stroke-width: 1.25;
    opacity: 0.32;
}

.product-card__chip {
    position: absolute;
    top: var(--s-3);
    left: var(--s-3);
    padding: 4px 10px;
    border-radius: var(--r-full);
    background: var(--brand);
    color: var(--brand-contrast);
    font-size: var(--fs-xs);
    font-weight: 650;
    letter-spacing: 0.01em;
}

.product-card__sale {
    position: absolute;
    top: var(--s-3);
    right: var(--s-3);
    padding: 4px 9px;
    border-radius: var(--r-full);
    background: var(--danger);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 700;
}

.product-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-4);
    flex: 1;
}

.product-card__sku {
    font-size: var(--fs-xs);
    letter-spacing: 0.04em;
    color: var(--text-subtle);
    font-variant-numeric: tabular-nums;
}

.product-card__title {
    font-size: var(--fs-md);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-strong);
}

.product-card__title a { color: inherit; }
.product-card__title a:hover { color: var(--brand); }

.product-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.product-card__lead {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-3);
    margin-top: auto;
    padding: var(--s-4);
    border-top: 1px solid var(--border);
}

.price {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.price__now {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.price__old {
    font-size: var(--fs-sm);
    color: var(--text-subtle);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

.price__unit { font-size: var(--fs-xs); color: var(--text-subtle); }

.stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    font-weight: 550;
    white-space: nowrap;
}

.stock::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: var(--r-full);
    background: currentColor;
}

.stock--in { color: var(--success); }
.stock--out { color: var(--warning); }

.product-card__cart {
    position: relative;
    z-index: 1;
    flex: none;
}

/* --- list view --------------------------------------------------------- */

.products--list { display: grid; gap: var(--s-3); grid-template-columns: 1fr; }

.products--list .product-card { flex-direction: row; align-items: stretch; }

.products--list .product-card__media {
    width: 190px;
    flex: none;
    aspect-ratio: auto;
    border-bottom: 0;
    border-right: 1px solid var(--border);
}

.products--list .product-card__body { padding: var(--s-5); }

.products--list .product-card__foot {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    width: 220px;
    flex: none;
    border-top: 0;
    border-left: 1px solid var(--border);
    gap: var(--s-3);
}

.products--list .product-card__lead { -webkit-line-clamp: 3; }

/* ==========================================================================
   Advantages / CTA
   ========================================================================== */

.feature {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    padding: var(--s-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}

.feature__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--r-md);
    background: var(--brand-soft);
    color: var(--brand);
}

.feature__title { font-size: var(--fs-lg); font-weight: 650; }
.feature__text { font-size: var(--fs-base); color: var(--text-muted); }

.cta {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 5vw, 56px);
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, #2770a5 0%, #1c5680 55%, #143e5e 100%);
    color: #fff;
}

.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(600px 300px at 90% 0%, #000, transparent 75%);
}

.cta__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-6);
}

.cta h2 { color: #fff; max-width: 22ch; }

.cta__text {
    margin-top: var(--s-3);
    max-width: 52ch;
    color: rgba(255, 255, 255, 0.82);
}

.cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }

.cta__phone {
    color: #fff;
    font-weight: 650;
    font-size: var(--fs-md);
    font-variant-numeric: tabular-nums;
}

.cta__phone:hover { color: #fff; text-decoration: underline; }

/* ==========================================================================
   Page header + breadcrumbs
   ========================================================================== */

.page-head {
    padding-block: var(--s-8) var(--s-6);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.page-head__title { margin-top: var(--s-3); }

.page-head__lead {
    margin-top: var(--s-3);
    max-width: 62ch;
    color: var(--text-muted);
    font-size: var(--fs-md);
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--fs-sm);
    color: var(--text-subtle);
}

.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs li { display: inline-flex; align-items: center; gap: var(--s-2); }
.crumbs li + li::before { content: "/"; color: var(--border-strong); }
.crumbs [aria-current] { color: var(--text); }

/* ==========================================================================
   Catalog layout
   ========================================================================== */

.catalog {
    display: grid;
    gap: var(--s-6);
    grid-template-columns: 1fr;
    padding-block: var(--s-8) var(--s-16);
    align-items: start;
}

.filters {
    display: none;
    position: sticky;
    top: 96px;
    padding: var(--s-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}

.filters.is-open { display: block; }

.filters__group + .filters__group {
    margin-top: var(--s-5);
    padding-top: var(--s-5);
    border-top: 1px solid var(--border);
}

.filters__title {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: var(--s-3);
}

.filters__list { display: grid; gap: 2px; }

.filters__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: 9px var(--s-3);
    border-radius: var(--r-sm);
    color: var(--text-muted);
    font-size: var(--fs-base);
}

.filters__link:hover { background: var(--surface-2); color: var(--text); }

.filters__link.is-active {
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-weight: 600;
}

.filters__count {
    font-size: var(--fs-xs);
    color: var(--text-subtle);
    font-variant-numeric: tabular-nums;
}

.check {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: 9px var(--s-3);
    border-radius: var(--r-sm);
    color: var(--text-muted);
    cursor: pointer;
}

.check:hover { background: var(--surface-2); color: var(--text); }

.check__box {
    width: 19px;
    height: 19px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1.5px solid var(--border-strong);
    border-radius: 5px;
    background: var(--surface);
    color: transparent;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
        color var(--dur) var(--ease);
}

.check__box .icon { width: 13px; height: 13px; stroke-width: 2.6; }

.check.is-active { color: var(--text); font-weight: 550; }

.check.is-active .check__box {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-contrast);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-3);
    margin-bottom: var(--s-5);
    padding: var(--s-3) var(--s-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}

.toolbar__count {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.toolbar__count b { color: var(--text); font-weight: 650; }

.toolbar__spacer { flex: 1; }

.select {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.select select {
    appearance: none;
    padding: 8px 34px 8px var(--s-3);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
    font-size: var(--fs-sm);
    font-weight: 550;
    cursor: pointer;
}

.select .icon {
    position: absolute;
    right: 9px;
    width: 15px;
    height: 15px;
    pointer-events: none;
    color: var(--text-subtle);
}

.viewswitch {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-2);
}

.viewswitch a {
    display: grid;
    place-items: center;
    width: 34px;
    height: 32px;
    border-radius: var(--r-xs);
    color: var(--text-subtle);
}

.viewswitch a.is-active {
    background: var(--surface);
    color: var(--brand);
    box-shadow: var(--shadow-xs);
}

.chips {
    display: flex;
    gap: var(--s-2);
    overflow-x: auto;
    padding-bottom: var(--s-2);
    margin-bottom: var(--s-4);
    scrollbar-width: thin;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px var(--s-4);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    background: var(--surface);
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-weight: 550;
    white-space: nowrap;
}

.chip:hover { border-color: var(--border-brand); color: var(--brand); }

.chip.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-contrast);
}

.empty {
    display: grid;
    justify-items: center;
    gap: var(--s-3);
    padding: var(--s-16) var(--s-5);
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-lg);
}

.empty__icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: var(--r-full);
    background: var(--surface-3);
    color: var(--text-subtle);
}

.empty p { color: var(--text-muted); max-width: 46ch; }

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    margin-top: var(--s-10);
}

.pagination a,
.pagination span {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding-inline: var(--s-3);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--text-muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pagination a:hover { border-color: var(--brand); color: var(--brand); }

.pagination .is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-contrast);
}

.pagination .is-gap { border-color: transparent; background: transparent; }

/* ==========================================================================
   Product page
   ========================================================================== */

.product {
    display: grid;
    gap: var(--s-8);
    grid-template-columns: 1fr;
    padding-block: var(--s-8);
    align-items: start;
}

.gallery { display: grid; gap: var(--s-3); }

.gallery__main {
    position: relative;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    background:
        repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 12px),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    color: var(--brand);
}

.gallery__main .icon { width: 28%; height: auto; stroke-width: 1.25; opacity: 0.32; }

.gallery__thumbs { display: flex; gap: var(--s-3); }

.gallery__thumb {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-2);
    color: var(--text-subtle);
    cursor: pointer;
}

.gallery__thumb.is-active { border-color: var(--brand); color: var(--brand); }
.gallery__thumb .icon { width: 34px; height: 34px; }

.product__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-5);
    margin-top: var(--s-4);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.product__meta b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.product__lead {
    margin-top: var(--s-4);
    font-size: var(--fs-md);
    color: var(--text-muted);
    max-width: 58ch;
}

.buybox {
    margin-top: var(--s-6);
    padding: var(--s-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.buybox__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
}

.buybox__price .price__now { font-size: clamp(1.625rem, 2.6vw, 2rem); }

.buybox__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
    margin-top: var(--s-5);
}

.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface);
}

.qty button {
    width: 42px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.qty button:hover { background: var(--surface-3); color: var(--brand); }

.qty input {
    width: 54px;
    height: 44px;
    border: 0;
    border-inline: 1px solid var(--border);
    background: transparent;
    text-align: center;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.qty input:focus { outline: none; }

.notes {
    display: grid;
    gap: var(--s-3);
    margin-top: var(--s-5);
    padding-top: var(--s-5);
    border-top: 1px solid var(--border);
}

.note {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.note .icon { width: 18px; height: 18px; color: var(--brand); margin-top: 1px; }

.specs {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-base);
}

.specs tr { border-bottom: 1px solid var(--border); }
.specs tr:last-child { border-bottom: 0; }

.specs th {
    width: 45%;
    padding: var(--s-3) var(--s-4) var(--s-3) 0;
    text-align: left;
    font-weight: 450;
    color: var(--text-muted);
    vertical-align: top;
}

.specs td {
    padding: var(--s-3) 0;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.panel {
    padding: var(--s-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}

.panel__title { margin-bottom: var(--s-4); }

/* ==========================================================================
   Cart
   ========================================================================== */

.cart { display: grid; gap: var(--s-6); padding-block: var(--s-8) var(--s-16); align-items: start; }

.cart-line {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: var(--s-4);
    padding: var(--s-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    align-items: center;
}

.cart-line + .cart-line { margin-top: var(--s-3); }

.cart-line__media {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: var(--r-sm);
    background:
        repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 10px),
        var(--surface-2);
    color: var(--brand);
}

.cart-line__media .icon { width: 42px; height: 42px; stroke-width: 1.2; }

.cart-line__title { font-weight: 600; color: var(--text-strong); }
.cart-line__title:hover { color: var(--brand); }

.cart-line__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-4);
    margin-top: var(--s-3);
}

.cart-line__sum {
    margin-left: auto;
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.summary {
    position: sticky;
    top: 96px;
    padding: var(--s-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.summary__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-4);
    padding-block: var(--s-2);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.summary__row b { color: var(--text); font-weight: 600; }

.summary__total {
    margin-top: var(--s-3);
    padding-top: var(--s-4);
    border-top: 1px solid var(--border);
    font-size: 1.05rem;
}

.summary__total .price__now { font-size: 1.5rem; }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { display: grid; gap: var(--s-2); }

.field__label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text);
}

.input,
.textarea {
    width: 100%;
    padding: 12px var(--s-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    background: var(--surface);
    font-size: var(--fs-base);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.input::placeholder,
.textarea::placeholder { color: var(--text-subtle); }

.input:focus,
.textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.textarea { min-height: 104px; resize: vertical; }

.form { display: grid; gap: var(--s-4); }

.form__note {
    font-size: var(--fs-xs);
    color: var(--text-subtle);
    line-height: 1.5;
}

/* ==========================================================================
   Alerts, badges, skeletons, toast
   ========================================================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    padding: var(--s-4);
    border-radius: var(--r-sm);
    font-size: var(--fs-base);
}

.alert .icon { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.alert--success { background: var(--success-soft); color: var(--success); }
.alert--error { background: var(--danger-soft); color: var(--danger); }
.alert--info { background: var(--brand-soft); color: var(--brand-ink); }
.alert[hidden] { display: none; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 650;
}

.badge--brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--neutral { background: var(--surface-3); color: var(--text-muted); }

.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-sm);
    background: var(--surface-3);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: shimmer 1.4s infinite;
}

[data-theme="dark"] .skeleton::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

.skeleton-card {
    display: grid;
    gap: var(--s-3);
    padding: var(--s-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}

.skeleton--media { aspect-ratio: 4 / 3; border-radius: var(--r-md); }
.skeleton--line { height: 12px; }
.skeleton--line.is-short { width: 55%; }
.skeleton--title { height: 18px; width: 80%; }

.toasts {
    position: fixed;
    right: var(--s-4);
    bottom: var(--s-4);
    z-index: 200;
    display: grid;
    gap: var(--s-2);
    width: min(360px, calc(100vw - 32px));
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-lg);
    font-size: var(--fs-base);
    animation: toast-in 260ms var(--ease);
}

.toast .icon { color: var(--success); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 180;
    display: grid;
    place-items: center;
    padding: var(--s-4);
    visibility: hidden;
}

.modal.is-open { visibility: visible; }

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--overlay);
    opacity: 0;
    transition: opacity 200ms var(--ease);
}

.modal.is-open .modal__backdrop { opacity: 1; }

.modal__dialog {
    position: relative;
    width: min(480px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: var(--s-6);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}

.modal.is-open .modal__dialog { opacity: 1; transform: none; }

.modal__close {
    position: absolute;
    top: var(--s-3);
    right: var(--s-3);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text-subtle);
    cursor: pointer;
}

.modal__close:hover { background: var(--surface-3); color: var(--text); }
.modal__text { margin-top: var(--s-2); color: var(--text-muted); }
.modal__form { margin-top: var(--s-5); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    margin-top: auto;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.footer__grid {
    display: grid;
    gap: var(--s-8);
    grid-template-columns: 1fr;
    padding-block: var(--s-12);
}

.footer__about { max-width: 34ch; }

.footer__text {
    margin-top: var(--s-4);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.footer__title {
    margin-bottom: var(--s-4);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-subtle);
}

.footer__list { display: grid; gap: 10px; font-size: var(--fs-base); }
.footer__list a { color: var(--text-muted); }
.footer__list a:hover { color: var(--brand); }

.footer__contact {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    color: var(--text-muted);
    font-size: var(--fs-base);
}

.footer__contact .icon { width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }
.footer__contact a { color: var(--text); font-weight: 600; }
.footer__contact a:hover { color: var(--brand); }

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding-block: var(--s-5);
    border-top: 1px solid var(--border);
    font-size: var(--fs-sm);
    color: var(--text-subtle);
}

.footer__bottom a { color: var(--text-subtle); }
.footer__bottom a:hover { color: var(--brand); }

/* ==========================================================================
   404 + prose
   ========================================================================== */

.notfound {
    display: grid;
    justify-items: center;
    gap: var(--s-4);
    padding-block: clamp(64px, 12vw, 140px);
    text-align: center;
}

.notfound__code {
    font-size: clamp(4rem, 14vw, 8rem);
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(140deg, var(--brand) 0%, var(--brand-ink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.notfound p { max-width: 46ch; color: var(--text-muted); }
.notfound__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-3); }

.prose { max-width: 70ch; display: grid; gap: var(--s-4); }
.prose p { color: var(--text-muted); font-size: var(--fs-md); line-height: 1.75; }

.contact-list { display: grid; gap: var(--s-1); }

.contact-row {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: var(--s-4);
    align-items: center;
    padding: var(--s-4) 0;
    border-bottom: 1px solid var(--border);
}

.contact-row:last-child { border-bottom: 0; }

.contact-row__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--r-md);
    background: var(--brand-soft);
    color: var(--brand);
}

.contact-row__label { font-size: var(--fs-sm); color: var(--text-subtle); }

.contact-row__value {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-strong);
    font-variant-numeric: tabular-nums;
}

.contact-row__value a { color: inherit; }
.contact-row__value a:hover { color: var(--brand); }

/* ==========================================================================
   Styleguide
   ========================================================================== */

.sg { display: grid; gap: var(--s-12); padding-block: var(--s-8) var(--s-20); }
.sg__section { display: grid; gap: var(--s-5); }

.sg__title {
    padding-bottom: var(--s-3);
    border-bottom: 1px solid var(--border);
}

.sg__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }

.swatch {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface);
}

.swatch__chip { height: 68px; }
.swatch__meta { padding: var(--s-3); font-size: var(--fs-xs); }
.swatch__name { font-weight: 650; color: var(--text); }
.swatch__var { color: var(--text-subtle); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1099px) {
    .navbar,
    .topbar { display: none; }

    .burger { display: inline-grid; }

    .bar {
        grid-template-columns: auto 1fr auto;
        min-height: 66px;
        gap: var(--s-3);
    }

    .bar .search { display: none; }
    .header__phone { display: none; }
    .lang { display: none; }
    .search--mobile { display: flex; margin-bottom: var(--s-3); }
}

@media (min-width: 1100px) {
    .search--mobile { display: none; }
    .drawer { display: none; }
}

@media (min-width: 560px) {
    .container { padding-inline: var(--s-6); }
    .stats { grid-template-columns: repeat(4, 1fr); }
    .cart-line { grid-template-columns: 84px 1fr; }
}

@media (min-width: 900px) {
    .hero__inner {
        grid-template-columns: 1.25fr 0.75fr;
        gap: var(--s-16);
        align-items: center;
    }

    .hero__panel { display: block; }

    .catalog { grid-template-columns: 274px 1fr; }
    .filters { display: block; }
    .chips { display: none; }
    .filters-toggle { display: none; }

    .product { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--s-12); }
    .cart { grid-template-columns: minmax(0, 1fr) 340px; }

    .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}

@media (max-width: 899px) {
    .products--list .product-card { flex-direction: column; }

    .products--list .product-card__media {
        width: 100%;
        aspect-ratio: 16 / 9;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .products--list .product-card__foot {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-left: 0;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 400px) {
    .grid--products,
    .grid--cats,
    .grid { grid-template-columns: 1fr; }

    .logo__tagline { display: none; }
}

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