/* =========================================================================
   «Основа» — a free universal shop theme (child of Default)

   ART DIRECTION
   The department index of a department store. One typographic list —
   the name on the left, the number of its products on the right in
   tabular figures — leads the header, the first screen, the catalogue and
   the footer; everything else keeps quiet and lets the photos and the
   prices speak. White or graphite, one deep blue for the action, 2 px
   corners (soft and round on request), a grotesque (Libre Franklin) with
   two alternatives, product photos contained on a neutral plate so a
   supplier's white packshot melts into it. No shadows on cards, no
   gradients, no scroll effects; the only motion is a response (≤ 200 ms)
   and the «В корзину» → «− 1 +» swap.

   SAFE FOR ANY SETTING
   The accent the owner picks is only a seed: --accent-btn is derived from
   it in OKLCH — lightness capped at .50 under white text (≥ 4.5:1), lifted
   to .74 under dark text in the graphite scheme. Yellow, lime, pink and
   near-black all stay readable. Links, focus rings and the active
   department use --accent-btn, never the raw colour.

   Loaded after the parent's theme/blocks/chrome CSS and the modules'
   styles; everything is scoped under html.osnova so it wins without
   !important.
   ========================================================================= */

@font-face {
    font-family: 'Libre Franklin';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(../fonts/libre-franklin-cyrillic-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Libre Franklin';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url(../fonts/libre-franklin-latin-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Alternatives offered in the design settings; downloaded only when chosen. */
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-display: swap;
    font-weight: 200 900;
    src: url(../fonts/source-serif-4-cyrillic-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-display: swap;
    font-weight: 200 900;
    src: url(../fonts/source-serif-4-latin-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Finlandica';
    font-style: normal;
    font-display: swap;
    font-weight: 400 700;
    src: url(../fonts/finlandica-cyrillic-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Finlandica';
    font-style: normal;
    font-display: swap;
    font-weight: 400 700;
    src: url(../fonts/finlandica-latin-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The owner's design settings (theme.json → design.controls). Core prints
   the chosen accent as :root{--os-accent} after this file; the rest are
   data attributes read below. */
:root {
    --os-accent: #1f3a5f;
    --os-font-pick: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* -------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */

html.osnova {
    --os-bg: #ffffff;
    --os-surface: #ffffff;
    --os-tile: #f3f3f1;
    --os-plate: #f3f3f1;          /* the photo plate stays light in every scheme */
    --os-ink: #1a1c1f;
    --os-muted: #5e6166;
    --os-line: #e2e2df;
    --os-sale: #a3231b;
    --os-ink-dark: #15171a;
    --os-danger: #b3261e;
    --os-success: #1f6b3b;

    /* Safe accent: white text on it, ≥ 4.5:1 whatever the seed colour. */
    --accent-btn: oklch(from var(--os-accent) min(l, 0.5) c h);
    --accent-ink: #ffffff;
    --accent-hover: oklch(from var(--accent-btn) calc(l - 0.05) c h);
    --accent-soft: color-mix(in oklch, var(--accent-btn) 8%, var(--os-bg));

    --os-r: 2px;
    --os-r-btn: 2px;
    --os-ratio: 1 / 1;

    --os-font-ui: 'Libre Franklin', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --os-font-head: var(--os-font-pick, var(--os-font-ui));

    --c-bg: var(--os-bg);
    --c-surface: var(--os-surface);
    --c-surface-sunk: var(--os-tile);
    --c-text: var(--os-ink);
    --c-text-strong: var(--os-ink);
    --c-text-muted: var(--os-muted);
    --c-text-faint: var(--os-muted);
    --c-border: var(--os-line);
    --c-border-strong: color-mix(in srgb, var(--os-ink) 28%, var(--os-bg));
    --c-accent: var(--accent-btn);
    --c-accent-hover: var(--accent-hover);
    --c-accent-soft: var(--accent-soft);
    --c-accent-contrast: var(--accent-ink);
    --c-link: var(--accent-btn);
    --c-link-hover: var(--accent-hover);
    --c-mark: var(--os-ink);
    --c-mark-text: var(--os-ink);
    --c-mark-soft: var(--os-tile);
    --c-slab: #1a1c1f;
    --c-slab-text: #ecedee;
    --c-slab-muted: #b4b8be;
    --c-danger: var(--os-danger);
    --c-success: var(--os-success);
    --shop-star: var(--os-ink);

    --font-ui: var(--os-font-ui);
    --font-display: var(--os-font-head);
    --font-prose: var(--os-font-ui);
    --fw-heading: 600;
    --tr-tight: -0.025em;
    --tr-snug: -0.015em;
    --lh-tight: 1.02;

    /* five sizes: display, head, body, price, small */
    --t-xs: 0.8125rem;
    --t-sm: 0.8125rem;
    --t-base: 1rem;
    --t-md: 1.25rem;
    --t-lg: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
    --t-xl: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
    --t-2xl: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
    --t-3xl: clamp(2.25rem, 1.2rem + 4.2vw, 4.75rem);

    --r-xs: var(--os-r);
    --r-sm: var(--os-r);
    --r-md: var(--os-r);
    --r-lg: var(--os-r);
    --r-btn: var(--os-r-btn);
    --r-pill: var(--os-r-btn);
    --w-container: 76rem;
    --w-wide: 88rem;
    --gutter: clamp(1rem, 3vw, 2rem);

    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lift: 0 8px 24px rgba(0, 0, 0, 0.12);
    --card-bg: transparent;
    --card-border: 1px solid transparent;
    --card-shadow: none;
    --card-radius: var(--os-r);
    --sp-sm: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
    --sp-md: clamp(2.5rem, 2rem + 2.5vw, 4rem);
    --sp-lg: clamp(3.5rem, 2.5rem + 4vw, 5.5rem);

    --dur: 150ms;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    color-scheme: light;
    accent-color: var(--accent-btn);
}

/* Graphite: the whole page darkens, the photo plates do not. */
html.osnova[data-os-scheme='graphite'] {
    --os-bg: #15171a;
    --os-surface: #1f2226;
    --os-tile: #1b1e22;
    --os-ink: #ecedee;
    --os-muted: #a4a8ae;
    --os-line: #2e3238;
    --os-sale: #ff9a90;
    --os-danger: #ff9a90;
    --os-success: #6fd09a;
    --accent-btn: oklch(from var(--os-accent) max(l, 0.74) c h);
    --accent-ink: var(--os-ink-dark);
    --accent-soft: color-mix(in oklch, var(--accent-btn) 14%, var(--os-bg));
    --shadow-md: none;
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 8px 24px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
}

html.osnova[data-os-corners='soft'] { --os-r: 8px; --os-r-btn: 8px; }
html.osnova[data-os-corners='round'] { --os-r: 16px; --os-r-btn: 999px; }
html.osnova[data-os-font='soft'] {
    --os-font-ui: 'Finlandica', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
html.osnova[data-os-ratio='3x4'] { --os-ratio: 3 / 4; }
html.osnova[data-os-topline='off'] .os-top { display: none; }

/* A tone section the engine paints (the parent sets its own colours there). */
html.osnova .cms-tone-soft {
    --c-bg: var(--os-tile);
    background: var(--os-tile);
}
html.osnova .cms-tone-dark,
html.osnova .cms-on-dark {
    --c-bg: #1a1c1f;
    --c-text: #ecedee;
    --c-text-strong: #ffffff;
    --c-text-muted: #b4b8be;
    --c-border: #34383e;
    --c-link: #ecedee;
}

/* -------------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------------- */

html.osnova body {
    background: var(--os-bg);
    color: var(--os-ink);
    font-family: var(--os-font-ui);
    font-size: 1rem;
    line-height: 1.55;
    font-feature-settings: 'tnum' 0;
}
html.osnova ::selection {
    background: color-mix(in oklch, var(--accent-btn) 28%, var(--os-bg));
    color: var(--os-ink);
}
html.osnova :is(h1, h2, h3, .os-hero__title) {
    font-family: var(--os-font-head);
    text-wrap: balance;
}
html.osnova h1 { letter-spacing: -0.025em; }
html.osnova :focus-visible {
    outline: 2px solid var(--accent-btn);
    outline-offset: 2px;
}
html.osnova input,
html.osnova select,
html.osnova textarea { caret-color: var(--accent-btn); }
html.osnova { scrollbar-color: color-mix(in srgb, var(--os-ink) 30%, var(--os-bg)) var(--os-bg); }
html.osnova a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
html.osnova .cms-prose a,
html.osnova .shop-cattext a { color: var(--accent-btn); }

.os-wrap {
    width: 100%;
    max-width: var(--w-wide);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Buttons: the action is the only place the accent lives. */
html.osnova .cms-btn {
    border-radius: var(--os-r-btn);
    font-family: var(--os-font-ui);
    font-weight: 500;
    letter-spacing: 0;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform 100ms var(--ease);
}
html.osnova .cms-btn:active { transform: scale(0.97); }
html.osnova .cms-btn--primary {
    background: var(--accent-btn);
    border-color: var(--accent-btn);
    color: var(--accent-ink);
}
html.osnova .cms-btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--accent-ink);
}
html.osnova .cms-btn--ghost {
    background: transparent;
    border: 1px solid var(--c-border-strong);
    color: var(--os-ink);
}
html.osnova .cms-btn--ghost:hover {
    border-color: var(--os-ink);
    background: transparent;
    color: var(--os-ink);
}
html.osnova .cms-btn:disabled { opacity: 0.45; }

/* Fields: one frame, the focus ring on the field itself. */
html.osnova :is(input[type='text'], input[type='email'], input[type='tel'], input[type='search'], input[type='number'], input[type='password'], select, textarea):not(.shop-qty__input):not(.shop-pqty__input) {
    border: 1px solid var(--c-border-strong);
    border-radius: var(--os-r);
    background: var(--os-surface);
    color: var(--os-ink);
    font-family: var(--os-font-ui);
}
html.osnova :is(input, select, textarea):focus-visible {
    outline: 2px solid var(--accent-btn);
    outline-offset: 0;
    border-color: var(--accent-btn);
}

/* -------------------------------------------------------------------------
   3. The department index — one component, four places
   ------------------------------------------------------------------------- */

.os-index { margin: 0; padding: 0; list-style: none; }
.os-index__row {
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.75rem 0.55rem 1rem;
    color: var(--os-ink);
    text-decoration: none;
    transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.os-index__name { min-width: 0; }
.os-index__n {
    color: var(--os-muted);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}
.os-index__row::before {
    content: '';
    position: absolute;
    inset-block: 0.35rem;
    inset-inline-start: 0;
    width: 2px;
    background: transparent;
    transition: background-color var(--dur) var(--ease);
}
.os-index__row:hover { background: var(--accent-soft); }
.os-index__row.is-active::before,
.os-index__row:hover::before { background: var(--accent-btn); }
.os-index__row.is-active { font-weight: 600; }
.os-index__item.is-hot .os-index__name { font-weight: 600; }

/* the list: first screen and sidebar — the 1px line between rows is the index's own */
.os-index--list .os-index__item + .os-index__item,
.os-index--side .os-index__item + .os-index__item { border-top: 1px solid var(--os-line); }
.os-index--list,
.os-index--side { border-block: 1px solid var(--os-line); }

/* the strip under the header: names only */
.os-index--strip {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.os-index--strip::-webkit-scrollbar { display: none; }
.os-index--strip .os-index__row { padding: 0.65rem 0.85rem; white-space: nowrap; }
.os-index--strip .os-index__row::before { inset-block: auto 0; inset-inline: 0.85rem; width: auto; height: 2px; }
.os-index--strip .os-index__n { display: none; }

/* the panel: columns, sub-departments under the name */
.os-index--panel {
    columns: 3 14rem;
    column-gap: 2rem;
}
.os-index--panel .os-index__item { break-inside: avoid; padding-bottom: 0.5rem; }
.os-index--panel .os-index__row { font-weight: 600; }
.os-index__subs { margin: 0; padding: 0 0 0.25rem 1rem; list-style: none; }
.os-index__subs a {
    display: block;
    padding: 0.2rem 0;
    color: var(--os-muted);
    font-size: 0.875rem;
    text-decoration: none;
}
.os-index__subs a:hover { color: var(--accent-btn); text-decoration: underline; }

/* the footer: four columns on the graphite */
.os-index--foot { columns: 4 12rem; column-gap: 2rem; }
.os-index--foot .os-index__item { break-inside: avoid; }
.os-index--foot .os-index__row { color: #ecedee; padding-inline: 0 0.25rem; }
.os-index--foot .os-index__row::before { display: none; }
.os-index--foot .os-index__row:hover { background: transparent; text-decoration: underline; }
.os-index--foot .os-index__n { color: #b4b8be; }

/* -------------------------------------------------------------------------
   4. Header
   ------------------------------------------------------------------------- */

html.osnova .site-header {
    background: var(--os-bg);
    color: var(--os-ink);
    border-bottom: 1px solid var(--os-line);
    box-shadow: none;
}

.os-top { background: var(--os-tile); font-size: 0.8125rem; color: var(--os-ink); }
.os-top__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 34px; }
.os-top__zone { display: flex; align-items: center; gap: 1.25rem; }
.os-top .hdr-el { display: flex; align-items: center; gap: 0.4rem; }
.os-top a { color: var(--os-ink); text-decoration: none; }
.os-top a:hover { text-decoration: underline; }
.os-top .hdr-phone__caption { display: none; }
.os-top .hdr-phone__icon { display: none; }
.os-top .hdr-links { display: flex; gap: 1.25rem; }
.os-top .cms-icon { width: 14px; height: 14px; }

.os-main__inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.os-logo { display: inline-flex; align-items: center; flex: none; color: var(--os-ink); text-decoration: none; }
.os-logo__img { height: var(--logo-h, 28px); width: auto; }
.os-logo__name {
    font-family: var(--os-font-head);
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.os-main__phone { margin-inline-start: auto; }
.os-phone { color: var(--os-ink); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }

.os-catbtn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex: none;
    height: 44px;
    padding: 0 1.1rem 0 0.95rem;
    border: 0;
    border-radius: var(--os-r-btn);
    background: var(--accent-btn);
    color: var(--accent-ink);
    font: 500 0.9375rem/1 var(--os-font-ui);
    cursor: pointer;
    transition: background-color var(--dur) var(--ease), transform 100ms var(--ease);
}
.os-catbtn:hover { background: var(--accent-hover); }
.os-catbtn:active { transform: scale(0.97); }
.os-catbtn__bars { display: grid; gap: 3px; width: 16px; }
.os-catbtn__bars span { display: block; height: 2px; background: currentColor; }
.os-catbtn__bars span:nth-child(2) { width: 70%; }

.os-main__center { flex: 1 1 auto; min-width: 0; }
.os-main__right { display: flex; align-items: center; gap: 0.25rem; flex: none; }
.os-main .hdr-actions:empty { display: none; }

html.osnova .os-main .shop-hsearch { position: relative; display: flex; align-items: center; width: 100%; max-width: none; }
html.osnova .os-main__center .hdr-mod,
html.osnova .os-main__center .hdr-el { width: 100%; }
html.osnova .os-main .shop-hsearch input {
    width: 100%;
    height: 44px;
    padding-inline: 1rem 3rem;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--os-r-btn);
    background: var(--os-surface);
    color: var(--os-ink);
    font-size: 0.9375rem;
}
html.osnova .os-main .shop-hsearch button { color: var(--os-muted); }
html.osnova .os-main .shop-hlink {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 56px;
    height: 48px;
    padding: 0 0.4rem;
    border: 0;
    border-radius: var(--os-r);
    background: transparent;
    color: var(--os-ink);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
html.osnova .os-main .shop-hlink:hover { color: var(--accent-btn); background: var(--accent-soft); }
html.osnova .os-main .shop-hlink .cms-icon { width: 21px; height: 21px; }
html.osnova .os-main .shop-minicart { min-height: 0; padding: 0 0.4rem; border: 0; border-radius: var(--os-r); font-weight: 500; }
html.osnova .os-main .shop-minicart__count,
html.osnova .os-main [data-shop-count] {
    background: var(--accent-btn);
    color: var(--accent-ink);
}

.os-strip { border-top: 1px solid var(--os-line); }

/* The panel: a native popover under the header. */
.os-panel {
    inset: 0 0 auto 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1.25rem 0 1.5rem;
    border: 0;
    border-bottom: 1px solid var(--os-line);
    background: var(--os-bg);
    color: var(--os-ink);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 90vh;
    overflow-y: auto;
}
.os-panel:popover-open { animation: os-panel-in 180ms var(--ease); }
@keyframes os-panel-in { from { opacity: 0; } }
.os-panel__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.os-panel__title { margin: 0; font-size: 0.8125rem; color: var(--os-muted); }
.os-panel__close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--os-ink);
    cursor: pointer;
}
.os-panel__all { margin: 0.75rem 0 0; font-size: 0.9375rem; }
.os-panel__all a { color: var(--accent-btn); font-weight: 500; }
.os-panel::backdrop { background: rgba(0, 0, 0, 0.35); }

html.osnova .hdr-burger { color: var(--os-ink); }
html.osnova .hdr-drawer { background: var(--os-bg); color: var(--os-ink); }

/* -------------------------------------------------------------------------
   5. The first screen
   ------------------------------------------------------------------------- */

.os-hero { display: grid; gap: 1.5rem; }
@media (min-width: 64rem) {
    .os-hero.has-index { grid-template-columns: 3fr 9fr; gap: 2rem; align-items: stretch; }
}
.os-hero__index { align-self: start; }
.os-hero__promo {
    display: grid;
    min-height: 100%;
    border-radius: var(--os-r);
    background: var(--os-tile);
    overflow: hidden;
}
.os-hero__promo.has-photo { grid-template-columns: 7fr 5fr; }
.os-hero__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
}
.os-hero__title {
    margin: 0;
    font-size: var(--t-3xl);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.025em;
    text-wrap: balance;
}
.os-hero__promo.has-photo .os-hero__title { font-size: clamp(2rem, 1rem + 2.6vw, 3.25rem); }
.os-hero__condition { margin: 0; max-width: 34rem; color: var(--os-muted); font-size: 1rem; }
.os-hero__action { margin: 0.25rem 0 0; }
.os-hero__photo { position: relative; min-height: 20rem; background: var(--os-plate); }
.os-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 63.99rem) {
    .os-hero__promo.has-photo { grid-template-columns: 1fr; }
    .os-hero__photo { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
    .os-hero__index { order: 2; }
    .os-hero__index .os-index {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        border: 0;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
    }
    .os-hero__index .os-index::-webkit-scrollbar { display: none; }
    .os-hero__index .os-index__item { flex: none; border: 0 !important; }
    .os-hero__index .os-index__row {
        gap: 0.5rem;
        padding: 0.5rem 0.85rem;
        border: 1px solid var(--os-line);
        border-radius: var(--os-r-btn);
        white-space: nowrap;
    }
    .os-hero__index .os-index__row::before { display: none; }
    .os-hero__index .os-index__row.is-active { border-color: var(--accent-btn); }
}

/* -------------------------------------------------------------------------
   6. Department plates
   ------------------------------------------------------------------------- */

.os-depts__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (max-width: 63.99rem) { .os-depts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 0.75rem; } }

html.osnova .os-tile {
    display: block;
    position: relative;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.os-tile__plate {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    border-radius: var(--os-r);
    background: var(--os-plate);
    overflow: hidden;
}
.os-tile__img {
    width: 100%;
    height: 100%;
    padding: 8%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.os-tile__word {
    padding: 1rem;
    color: #1a1c1f;
    font-family: var(--os-font-head);
    font-size: clamp(1.25rem, 0.9rem + 1.1vw, 1.875rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: auto;
}
.os-tile__body { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; padding: 0.6rem 0 0; }
.os-tile__title { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.os-tile__link { color: var(--os-ink); text-decoration: none; }
.os-tile__link::after { content: ''; position: absolute; inset: 0; }
.os-tile:hover .os-tile__link { text-decoration: underline; }
.os-tile__count { margin: 0; color: var(--os-muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.os-tile__text { margin: 0.25rem 0 0; color: var(--os-muted); font-size: 0.875rem; }

/* -------------------------------------------------------------------------
   7. Shelves and the product card
   ------------------------------------------------------------------------- */

.os-shelf__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; }
.os-shelf__title { margin: 0; font-size: var(--t-2xl); font-weight: 600; letter-spacing: -0.015em; }
.os-shelf__all { color: var(--os-muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.os-shelf__all:hover { color: var(--accent-btn); text-decoration: underline; }
.os-shelf__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (max-width: 63.99rem) { .os-shelf__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 39.99rem) { .os-shelf__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 0.75rem; } }

html.osnova .shop-card {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
}
html.osnova .shop-card:hover { box-shadow: none; border-color: transparent; transform: none; }
html.osnova .shop-card__media {
    display: grid;
    place-items: center;
    aspect-ratio: var(--os-ratio);
    border-radius: var(--os-r);
    background: var(--os-plate);
    overflow: hidden;
}
html.osnova .shop-card__img {
    width: 100%;
    height: 100%;
    padding: 8%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: none;
}
html.osnova .shop-card:hover .shop-card__img { transform: none; }
html.osnova .shop-card--out .shop-card__img { opacity: 0.5; filter: none; }
html.osnova .shop-card__placeholder.os-card__letter {
    height: auto;
    color: #5e6166;
    font-family: var(--os-font-head);
    font-size: 4rem;
    font-weight: 500;
    line-height: 1;
}
html.osnova .shop-card__body { gap: 0.35rem; padding: 0.75rem 0 0; }
html.osnova .shop-card__brand {
    color: var(--os-muted);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}
html.osnova .shop-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.3em);
    font-family: var(--os-font-ui);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0;
}
html.osnova .shop-card:hover .shop-card__title { color: var(--os-ink); text-decoration: underline; text-underline-offset: 0.2em; }
html.osnova .shop-card__foot { gap: 0.6rem; }

/* The price is the main graphic of the card. */
html.osnova .shop-price p { margin: 0; }
html.osnova .shop-price__now,
html.osnova .shop-price__value { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--os-ink); }
html.osnova .shop-price__from { font-size: 0.8125rem; font-weight: 400; color: var(--os-muted); }
html.osnova .shop-price__was:not([hidden]) { display: flex; align-items: baseline; gap: 0.5rem; }
html.osnova .shop-price__old { color: var(--os-muted); font-size: 0.8125rem; font-weight: 400; }
html.osnova .shop-price__off { color: var(--os-sale); font-size: 0.8125rem; font-weight: 600; background: none; padding: 0; }
html.osnova .shop-price:has(.shop-price__was:not([hidden])) .shop-price__value { color: var(--os-sale); }

/* Stickers: plain text badges at the top left. */
html.osnova .shop-stickers { top: 0.5rem; left: 0.5rem; gap: 0.25rem; }
html.osnova .shop-sticker {
    padding: 0.2rem 0.5rem;
    border-radius: var(--os-r);
    background: var(--os-bg);
    color: var(--os-ink);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}
html.osnova .shop-sticker--sale,
html.osnova .shop-sticker--discount {
    background: #1a1c1f;
    color: #ffffff;
}
html.osnova .shop-stock { font-size: 0.8125rem; color: var(--os-muted); }

html.osnova .shop-card__btn { min-height: 40px; font-size: 0.875rem; }

/* The quick buy: «В корзину» ↔ «− 1 +», same place, same size. */
.os-buy { position: relative; display: flex; flex: 1 1 auto; min-width: 0; }
.os-buy__form { flex: 1 1 auto; }
.os-buy__form[hidden] { display: none; }
.os-buy__step {
    display: grid;
    grid-template-columns: 2.75rem 1fr 2.75rem;
    align-items: center;
    flex: 1 1 auto;
    min-height: 40px;
    border: 1px solid var(--accent-btn);
    border-radius: var(--os-r-btn);
    background: var(--accent-soft);
    animation: os-fade 120ms var(--ease);
}
.os-buy__step[hidden] { display: none; }
@keyframes os-fade { from { opacity: 0; } }
.os-buy__btn {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 38px;
    border: 0;
    background: transparent;
    color: var(--accent-btn);
    font: 500 1.25rem/1 var(--os-font-ui);
    cursor: pointer;
    transition: background-color var(--dur) var(--ease), transform 100ms var(--ease);
}
.os-buy__btn:hover { background: color-mix(in oklch, var(--accent-btn) 14%, transparent); }
.os-buy__btn:active { transform: scale(0.97); }
.os-buy__btn:disabled { opacity: 0.4; cursor: default; }
.os-buy__qty { text-align: center; color: var(--os-ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------------------
   8. Terms, reviews, subscribe
   ------------------------------------------------------------------------- */

.os-terms__list {
    display: grid;
    grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
    gap: 2rem 2.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (max-width: 63.99rem) { .os-terms__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 39.99rem) { .os-terms__list { grid-template-columns: 1fr; gap: 1.5rem; } }
.os-terms__fact { margin: 0; font-family: var(--os-font-head); font-size: var(--t-2xl); font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.os-terms__fact a { color: inherit; text-decoration: none; }
.os-terms__fact a:hover { color: var(--accent-btn); }
.os-terms__title { margin: 0.35rem 0 0; font-weight: 500; }
.os-terms__text { margin: 0.35rem 0 0; color: var(--os-muted); font-size: 0.9375rem; }

.os-reviews[hidden] { display: none; }
.os-reviews__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (max-width: 63.99rem) { .os-reviews__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 39.99rem) { .os-reviews__list { grid-template-columns: 1fr; } }
.os-reviews__item { display: flex; flex-direction: column; gap: 0.75rem; border-top: 1px solid var(--os-line); padding-top: 1rem; }
.os-reviews__text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 1rem;
}
.os-reviews__who { display: flex; gap: 0.5rem; margin: 0; font-size: 0.9375rem; }
.os-reviews__name { font-weight: 600; }
.os-reviews__city { color: var(--os-muted); }
.os-reviews__product { display: flex; align-items: center; gap: 0.6rem; margin-top: auto; color: var(--os-ink); font-size: 0.8125rem; text-decoration: none; }
.os-reviews__product:hover .os-reviews__pname { text-decoration: underline; }
.os-reviews__thumb {
    display: grid;
    place-items: center;
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: var(--os-r);
    background: var(--os-plate);
    color: #5e6166;
    font-weight: 500;
    overflow: hidden;
}
.os-reviews__thumb img { width: 100%; height: 100%; padding: 4px; object-fit: contain; mix-blend-mode: multiply; }
.os-reviews__pname { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.os-reviews__note { margin: 1.25rem 0 0; color: var(--os-muted); font-size: 0.8125rem; }

.os-sub { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 64rem) { .os-sub { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.os-sub__title { margin: 0; font-size: var(--t-2xl); font-weight: 600; letter-spacing: -0.015em; }
.os-sub__lead { margin: 0.5rem 0 0; color: var(--os-muted); }
.os-sub__missing { margin: 0; color: var(--os-muted); }
html.osnova .os-sub .cms-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; align-items: end; }
html.osnova .os-sub .cms-form > .cms-form__field { order: 1; margin: 0; }
html.osnova .os-sub .cms-form > .cms-form__field--check { order: 3; grid-column: 1 / -1; font-size: 0.8125rem; color: var(--os-muted); }
html.osnova .os-sub .cms-form > :is(button, .cms-btn, .cms-form__actions) { order: 2; }

/* -------------------------------------------------------------------------
   9. Footer — graphite in both schemes
   ------------------------------------------------------------------------- */

html.osnova .os-ftr { background: #1a1c1f; color: #ecedee; border-top: 0; }
.os-ftr a { color: #ecedee; text-underline-offset: 0.2em; }
.os-ftr__depts { padding-block: 2.5rem 1.5rem; border-bottom: 1px solid #34383e; }
.os-ftr__title { margin: 0 0 1rem; color: #b4b8be; font-size: 0.8125rem; }
.os-ftr__main { padding-block: 2rem; }
.os-ftr__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 2rem; }
@media (max-width: 63.99rem) { .os-ftr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 39.99rem) { .os-ftr__grid { grid-template-columns: 1fr; } }
.os-ftr__h { margin: 0 0 0.75rem; color: #b4b8be; font-family: var(--os-font-ui); font-size: 0.8125rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.os-ftr__about { margin: 0.75rem 0 1rem; color: #ecedee; font-size: 0.9375rem; max-width: 26rem; }
.os-ftr__menu { margin: 0; padding: 0; list-style: none; }
.os-ftr__menu li { padding: 0.2rem 0; }
.os-ftr__menu a { text-decoration: none; }
.os-ftr__menu a:hover { text-decoration: underline; }
.os-ftr__contacts { font-style: normal; }
.os-ftr__phone { margin: 0 0 0.5rem; font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.os-ftr__phone span { display: block; color: #b4b8be; font-size: 0.8125rem; font-weight: 400; }
.os-ftr__phone a { text-decoration: none; }
.os-ftr__line { margin: 0 0 0.4rem; color: #ecedee; font-size: 0.9375rem; }
.os-ftr__pay { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.os-ftr__pay li { padding: 0.3rem 0.65rem; border: 1px solid #4a4e55; border-radius: var(--os-r); color: #ecedee; font-size: 0.8125rem; }
.os-ftr__socials { display: flex; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.os-ftr__socials a { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #4a4e55; border-radius: var(--os-r); color: #ecedee; }
.os-ftr__socials a:hover { border-color: #ecedee; }
.os-ftr__bottom { border-top: 1px solid #34383e; }
.os-ftr__bottom-inner { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; align-items: center; padding-block: 1.25rem; color: #b4b8be; font-size: 0.8125rem; }
.os-ftr__copy, .os-ftr__company { margin: 0; }
.os-ftr__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.os-ftr__links a { color: #ecedee; }
.os-logo--foot .os-logo__name { color: #ffffff; }
html.osnova .os-ftr .os-logo { color: #ffffff; }

.os-shelf__grid > li,
.os-depts__grid > li { display: flex; }
.os-shelf__grid > li > .shop-card,
.os-depts__grid > li > .os-tile { width: 100%; }
html.osnova .shop-card__foot { margin-top: auto; }

.os-ftr .os-ftr__socials a { background: transparent; color: #ecedee; }
.os-ftr .os-ftr__socials svg { color: #ecedee; fill: currentColor; }
html.osnova .shop-filter__title { letter-spacing: 0; text-transform: none; font-size: 0.8125rem; font-weight: 500; }
html.osnova .shop-tree__title { letter-spacing: 0; text-transform: none; }
.os-side__title { margin: 0 0 0.5rem; color: var(--os-muted); font-size: 0.8125rem; }
html.osnova .shop-side.os-side { display: none; }
@media (min-width: 64rem) { html.osnova .shop-side.os-side { display: block; } }

html.osnova .shop-gallery__stage { border-radius: var(--os-r); background: var(--os-plate); }
html.osnova .shop-gallery__img { object-fit: contain; padding: 8%; mix-blend-mode: multiply; }
html.osnova .shop-gallery__empty { color: #5e6166; }
html.osnova .shop-product__brand { letter-spacing: 0; text-transform: none; font-weight: 400; font-size: 0.8125rem; }
html.osnova .shop-buy { border-radius: var(--os-r); box-shadow: none; }
html.osnova .shop-gallery__thumb { border-radius: var(--os-r); background: var(--os-plate); }

/* -------------------------------------------------------------------------
   10. Phones and tablets: the header becomes two rows (wordmark, «Каталог»,
   icons; then the search), the strip gives way to the chips of the first screen.
   ------------------------------------------------------------------------- */
@media (max-width: 63.99rem) {
    .os-main__inner { flex-wrap: wrap; gap: 0.6rem; min-height: 0; padding-block: 0.6rem; }
    .os-main__center { order: 5; flex-basis: 100%; }
    .os-main__right { margin-left: auto; }
    .os-catbtn { height: 40px; }
    html.osnova .os-main .shop-hlink { min-width: 42px; height: 42px; font-size: 0; gap: 0; }
    html.osnova .os-main .shop-hlink span:not([class*='count']):not([data-shop-count]) { display: none; }
    html.osnova .os-main .shop-minicart__label { display: none; }
    html.osnova .os-main__right .hdr-el:not(.hdr-el--mobile) { display: none; }
    html.osnova .os-main__center .hdr-el { display: block; }
    html.osnova .os-main .shop-hsearch input { height: 42px; }
    .os-strip { display: none; }
    .os-top__zone--left, .os-top .hdr-links { display: none; }
    .os-top__inner { justify-content: flex-end; }
    html.osnova .os-main__inner .hdr-burger { display: inline-flex; }
}
@media (max-width: 39.99rem) {
    .os-logo__name { font-size: 1.2rem; }
}
.os-hero > *, .os-hero__promo > * { min-width: 0; }
.os-hero { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 64rem) { .os-hero.has-index { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); } }
html.osnova .os-burger { border-radius: var(--os-r); background: transparent; border: 0; }
