/*
 * KLICKMAG — публичная часть магазина.
 *
 * Быстрые изменения дизайна выполняются в блоке ПЕРЕМЕННЫЕ.
 * Остальные разделы отвечают каждый за свою часть сайта.
 */

/* =========================================================
   1. ПЕРЕМЕННЫЕ: ЦВЕТА, РАЗМЕРЫ, СКРУГЛЕНИЯ
   ========================================================= */

:root {
    --purple: #5d1f82;
    --purple-dark: #441463;
    --purple-soft: #7a3ca0;
    --purple-pale: #f6effa;
    --purple-pale-2: #fbf8fd;

    --ink: #1e1b22;
    --text: #302b34;
    --muted: #6b7280;
    --line: #e5e7eb;
    --line-strong: #d5d8de;

    --white: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f7f7f9;
    --green: #11864d;
    --green-soft: #e9f8f0;
    --orange: #9a5b00;
    --red: #b42318;

    --footer: #211926;
    --footer-muted: #c9c2ce;

    --container: 1280px;
    --header-height: 78px;
    --radius-small: 10px;
    --radius: 16px;
    --radius-large: 24px;

    --shadow-small: 0 6px 20px rgba(30, 27, 34, .07);
    --shadow-card: 0 14px 38px rgba(68, 20, 99, .11);
}

/* =========================================================
   2. БАЗОВЫЕ СТИЛИ
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(93, 31, 130, .22);
    outline-offset: 2px;
}

.container {
    width: min(var(--container), calc(100% - 40px));
    margin-inline: auto;
}

.muted {
    color: var(--muted);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--purple);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.primary,
.catalog-button,
.button-light,
.product-more {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-small);
    font-weight: 850;
    line-height: 1.2;
    cursor: pointer;
    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        transform .18s ease;
}

.primary,
.catalog-button {
    padding: 12px 18px;
    border: 1px solid var(--purple);
    background: var(--purple);
    color: var(--white);
}

.primary:hover,
.catalog-button:hover {
    border-color: var(--purple-dark);
    background: var(--purple-dark);
}

.button-light,
.product-more {
    padding: 11px 16px;
    border: 1px solid var(--line-strong);
    background: var(--white);
    color: var(--ink);
}

.button-light:hover,
.product-more:hover {
    border-color: var(--purple);
    color: var(--purple);
}

.notice {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #b9e5ca;
    border-radius: 12px;
    background: var(--green-soft);
    color: #087443;
    font-weight: 650;
}

.notice.error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: var(--red);
}

/* =========================================================
   3. ВЕРХНЯЯ СТРОКА
   ========================================================= */

.topbar {
    border-bottom: 1px solid var(--line);
    background: #fafafa;
    color: var(--muted);
    font-size: 13px;
}

.topbar-inner {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.topbar-status,
.topbar-meta {
    display: flex;
    align-items: center;
    gap: 18px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(17, 134, 77, .1);
}

.topbar-meta a {
    transition: color .18s ease;
}

.topbar-meta a:hover {
    color: var(--purple);
}

/* =========================================================
   4. ШАПКА И НАВИГАЦИЯ
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 4px 18px rgba(30, 27, 34, .04);
    backdrop-filter: blur(12px);
}

.header-row {
    display: flex;
    min-height: var(--header-height);
    align-items: center;
    gap: 16px;
}

/*
 * В исходном JPG вокруг логотипа много белого поля.
 * Контейнер ниже показывает центральную часть, не меняя сам файл.
 */
.logo {
    position: relative;
    display: block;
    width: 214px;
    height: 52px;
    flex: 0 0 214px;
    overflow: hidden;
}

.logo-crop {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
}

.logo-crop img {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 270px;
    max-width: none;
    height: 270px;
    transform: translate(-50%, -50%);
}

.catalog-button {
    flex: 0 0 auto;
    gap: 9px;
}

.catalog-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.search {
    position: relative;
    z-index: 55;
    display: flex;
    min-width: 220px;
    flex: 1 1 auto;
    overflow: visible;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--white);
    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.search:focus-within {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(93, 31, 130, .08);
}

.search input {
    width: 100%;
    min-width: 0;
    padding: 13px 15px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.search input::placeholder {
    color: #9297a0;
}

.search button {
    display: grid;
    width: 52px;
    flex: 0 0 52px;
    place-items: center;
    border: 0;
    background: var(--white);
    color: var(--purple);
    cursor: pointer;
    border-radius: 0 11px 11px 0;
}

.search button:hover {
    background: var(--purple-pale);
}

.search svg,
.header-phone svg,
.cart-link svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-suggestions {
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    border: 1px solid #e2d6e7;
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 20px 48px rgba(45, 18, 60, .18);
    overscroll-behavior: contain;
}

.search-suggestions[hidden] {
    display: none;
}

.search-suggestion-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #f0ebf2;
    color: var(--ink);
    transition: background-color .15s ease;
}

.search-suggestion-item:hover,
.search-suggestion-item.is-active {
    background: var(--purple-pale-2);
}

.search-suggestion-image {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #eee8f0;
    border-radius: 9px;
    background: #fff;
}

.search-suggestion-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.search-suggestion-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.search-suggestion-name {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.search-suggestion-meta,
.search-suggestion-code {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-suggestion-code {
    color: var(--purple);
    font-weight: 750;
}

.search-suggestion-price {
    color: var(--ink);
    font-size: 13px;
    white-space: nowrap;
}

.search-suggestions-empty {
    padding: 18px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.search-suggestions-all {
    display: block;
    padding: 11px 14px;
    background: #fbf8fc;
    color: var(--purple);
    font-size: 12px;
    font-weight: 850;
    text-align: center;
}

.search-suggestions-all:hover {
    background: var(--purple-pale);
}

.header-phone {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    color: var(--ink);
}

.header-phone svg {
    color: var(--purple);
}

.header-phone span {
    display: grid;
}

.header-phone small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

.header-phone strong {
    white-space: nowrap;
    font-size: 14px;
}

.cart-link {
    position: relative;
    display: flex;
    min-height: 44px;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 9px 10px;
    border-radius: 11px;
    font-weight: 850;
}

.cart-link:hover {
    background: var(--purple-pale);
    color: var(--purple);
}

.cart-link b {
    display: inline-grid;
    min-width: 23px;
    height: 23px;
    place-items: center;
    padding-inline: 6px;
    border-radius: 999px;
    background: var(--purple);
    color: var(--white);
    font-size: 12px;
}

.main-nav-wrap {
    border-top: 1px solid #f1f1f3;
    background: var(--white);
}

.main-nav {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 5px;
}

.main-nav a {
    padding: 10px 13px;
    border-radius: 9px;
    color: #4b4550;
    font-size: 14px;
    font-weight: 750;
    transition:
        background-color .18s ease,
        color .18s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--purple-pale);
    color: var(--purple);
}

.nav-promise {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.service-strip {
    border-top: 1px solid #eeeaf1;
    background: var(--purple-pale-2);
}

.service-strip-inner {
    display: flex;
    min-height: 35px;
    align-items: center;
    justify-content: center;
    gap: 44px;
    color: #64596a;
    font-size: 12px;
    font-weight: 700;
}

.mobile-menu-toggle {
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--white);
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--purple);
}

/* =========================================================
   5. ГЛАВНАЯ: БАННЕР И СЕКЦИИ
   ========================================================= */

.hero {
    position: relative;
    min-height: 420px;
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid #eee7f2;
    border-radius: var(--radius-large);
    background:
        radial-gradient(circle at 82% 20%, #ffffff 0 9%, transparent 30%),
        linear-gradient(115deg, var(--purple-pale), #fff);
}

.hero::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, .97) 0%,
        rgba(255, 255, 255, .87) 35%,
        rgba(255, 255, 255, .2) 72%,
        transparent 100%
    );
    content: "";
    pointer-events: none;
}

.hero picture,
.hero picture img {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero picture img {
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 420px;
    width: min(650px, 62%);
    align-items: center;
    padding: 54px;
}

.hero h1 {
    max-width: 620px;
    margin: 0 0 17px;
    color: var(--ink);
    font-size: clamp(36px, 4.1vw, 56px);
    line-height: 1.04;
    letter-spacing: -.035em;
}

.hero p {
    max-width: 560px;
    margin: 0 0 24px;
    color: #544b58;
    font-size: 18px;
}

.section {
    padding: 44px 0;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-head h1,
.section-head h2,
.section h1,
.section h2 {
    margin: 0;
    color: var(--ink);
}

.section-head h2,
.section h2 {
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.15;
}

.section-head > a {
    color: var(--purple);
    font-weight: 800;
}

.section-head > a:hover {
    color: var(--purple-dark);
}

.advantages {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.advantage {
    min-height: 112px;
    padding: 21px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 3px 14px rgba(30, 27, 34, .03);
}

.advantage strong {
    color: var(--ink);
    font-size: 16px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.category-tile {
    position: relative;
    display: flex;
    min-height: 138px;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 22px;
    border: 1px solid #e7dceb;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 85% 15%, #fff 0 8%, transparent 35%),
        var(--purple-pale);
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
    transition:
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.category-tile::after {
    position: absolute;
    top: 18px;
    right: 18px;
    color: rgba(93, 31, 130, .35);
    content: "→";
    font-size: 24px;
    transition: transform .2s ease;
}

.category-tile:hover {
    border-color: var(--purple);
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}

.category-tile:hover::after {
    transform: translateX(4px);
}

/* =========================================================
   6. КАРТОЧКИ ТОВАРОВ
   ========================================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.product-card:hover {
    border-color: #d9c4e3;
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}

.product-image {
    display: grid;
    height: 245px;
    place-items: center;
    padding: 20px;
    background: var(--white);
}

.product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .25s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.025);
}

.image-placeholder {
    display: grid;
    place-items: center;
    gap: 10px;
    color: #9993a0;
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}

.image-placeholder svg {
    width: 56px;
    height: 56px;
    fill: none;
    stroke: #c8bdce;
    stroke-width: 1.5;
}

.product-body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    padding: 17px;
    border-top: 1px solid #f1f1f3;
}

.product-category {
    align-self: flex-start;
    overflow: hidden;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--purple-pale);
    color: var(--purple);
    font-size: 10px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sku {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 12px;
}

.product-klickmag-code {
    color: var(--muted);
    font-size: 11px;
}

.product-klickmag-code b {
    color: var(--purple);
    letter-spacing: .025em;
}

.product-name {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: var(--ink);
    font-size: 15px;
    font-weight: 850;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-name:hover {
    color: var(--purple);
}

.product-description {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.product-features {
    display: grid;
    margin: 0;
    font-size: 11px;
}

.product-features > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding: 5px 0;
    border-top: 1px solid #f0f0f2;
}

.product-features dt {
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-features dd {
    margin: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-stock {
    display: grid;
    gap: 2px;
    margin-top: auto;
}

.product-stock small {
    color: var(--muted);
}

.availability {
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
}

.availability.preorder {
    color: var(--orange);
}

.price {
    color: var(--purple);
    font-size: 25px;
    font-weight: 900;
    line-height: 1.15;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 2px;
}

.product-actions form {
    min-width: 0;
}

.product-actions .primary {
    width: 100%;
}

.product-more {
    min-width: 98px;
}

/* =========================================================
   7. ВНУТРЕННИЕ СТРАНИЦЫ И КАТАЛОГ
   ========================================================= */

.page {
    min-height: 440px;
    padding: 34px 0 64px;
}

.page > h1 {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.page > p {
    max-width: 820px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumbs a:hover {
    color: var(--purple);
}

.filters {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.filters input,
.filters select,
.checkout input,
.checkout textarea {
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--white);
    color: var(--ink);
}

.filters input:focus,
.filters select:focus,
.checkout input:focus,
.checkout textarea:focus {
    border-color: var(--purple);
    outline: 3px solid rgba(93, 31, 130, .1);
}

/* =========================================================
   8. ДЕТАЛЬНАЯ КАРТОЧКА ТОВАРА
   ========================================================= */

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    gap: 42px;
}

.gallery-main {
    display: grid;
    height: 520px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--white);
}

.gallery-main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.thumbs img {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
}

.buy-box {
    padding: 26px;
    border: 1px solid #eadff0;
    border-radius: 20px;
    background: var(--purple-pale);
}

.buy-box .price {
    display: block;
    margin: 12px 0;
    font-size: 36px;
}

.buy-box .primary {
    min-height: 50px;
}

.info-note {
    margin: 18px 0;
    padding: 15px 16px;
    border-left: 4px solid var(--purple);
    border-radius: 0 10px 10px 0;
    background: var(--white);
}

.specs {
    width: 100%;
    border-collapse: collapse;
}

.specs td {
    padding: 11px 12px;
}

.specs tr:nth-child(odd) {
    background: var(--surface-soft);
}

/* =========================================================
   9. КОРЗИНА И ОФОРМЛЕНИЕ
   ========================================================= */

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.cart-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: var(--white);
}

.cart-table th,
.cart-table td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.cart-table th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.cart-table input {
    width: 76px;
    padding: 9px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
}

.checkout {
    display: grid;
    max-width: 820px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.checkout label {
    display: grid;
    gap: 7px;
    font-weight: 750;
}

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

.checkout .wide {
    grid-column: 1 / -1;
}

.check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400 !important;
}

.check input {
    width: auto;
    min-height: 0;
    margin-top: 4px;
}

.honeypot {
    position: absolute;
    left: -10000px;
}

/* =========================================================
   10. ПРИЗЫВ К МЕНЕДЖЕРУ
   ========================================================= */

.manager-cta {
    padding: 28px 0;
    background:
        radial-gradient(circle at 84% 0, rgba(255, 255, 255, .7), transparent 32%),
        var(--purple-pale);
}

.manager-cta-inner {
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
    padding: 30px 36px;
    border: 1px solid #e4d4eb;
    border-radius: 22px;
    background: rgba(255, 255, 255, .64);
}

.manager-cta h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: clamp(26px, 3.4vw, 40px);
    line-height: 1.08;
}

.manager-cta p {
    max-width: 650px;
    margin: 0;
    color: #5a515f;
    font-size: 16px;
}

.manager-cta-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================================================
   11. ПОДВАЛ
   ========================================================= */

.site-footer {
    padding: 48px 0 18px;
    background: var(--footer);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(150px, 1fr));
    gap: 40px;
}

.footer-brand,
.footer-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
}

.footer-brand p {
    max-width: 370px;
    margin: 17px 0;
    color: var(--footer-muted);
}

.footer-logo-link {
    display: block;
    width: 226px;
    height: 58px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--white);
}

.footer-logo-crop {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.footer-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 282px;
    max-width: none;
    height: 282px;
    border-radius: 0;
    object-fit: contain;
    transform: translate(-50%, -50%);
}

.footer-trust {
    display: grid;
    gap: 5px;
    color: #ddd5e2;
    font-size: 12px;
}

.footer-trust span::before {
    margin-right: 7px;
    color: #b88bd0;
    content: "✓";
    font-weight: 900;
}

.footer-column {
    gap: 9px;
}

.footer-column h3 {
    margin: 4px 0 10px;
    font-size: 16px;
}

.footer-column a,
.footer-column p {
    margin: 0;
    color: var(--footer-muted);
    font-size: 14px;
}

.footer-column a:hover {
    color: var(--white);
}

.footer-phone {
    color: var(--white) !important;
    font-size: 18px !important;
    font-weight: 850;
}

.footer-contacts iframe {
    margin-top: 8px;
    border-radius: 6px;
    background: var(--white);
}

.footer-bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: #aaa1b0;
    font-size: 12px;
}

.footer-bottom span:last-child {
    max-width: 650px;
    text-align: right;
}

/* =========================================================
   12. МОБИЛЬНАЯ НИЖНЯЯ НАВИГАЦИЯ
   ========================================================= */

.mobile-bottom-nav {
    position: fixed;
    z-index: 80;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 63px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px 4px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -8px 24px rgba(30, 27, 34, .08);
    backdrop-filter: blur(12px);
}

.mobile-bottom-nav > a,
.mobile-bottom-nav > button {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 3px;
    border: 0;
    background: transparent;
    color: #625a67;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.mobile-bottom-nav svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-cart-icon {
    position: relative;
    display: block;
    height: 22px;
}

.mobile-cart-icon b {
    position: absolute;
    top: -5px;
    right: -9px;
    display: grid;
    min-width: 17px;
    height: 17px;
    place-items: center;
    padding-inline: 4px;
    border-radius: 999px;
    background: var(--purple);
    color: var(--white);
    font-size: 9px;
}

/* =========================================================
   13. ПЛАНШЕТ
   ========================================================= */

@media (max-width: 1120px) {
    .header-row {
        gap: 11px;
    }

    .logo {
        width: 180px;
        flex-basis: 180px;
    }

    .logo-crop img {
        width: 230px;
        height: 230px;
    }

    .header-phone small {
        display: none;
    }

    .header-phone strong {
        font-size: 13px;
    }

    .service-strip-inner {
        gap: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1.5fr repeat(2, 1fr);
    }

    .footer-categories {
        display: none;
    }
}

@media (max-width: 900px) {
    .header-phone {
        display: none;
    }

    .advantages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .gallery-main {
        height: 440px;
    }

    .manager-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   14. МОБИЛЬНАЯ ВЕРСИЯ
   ========================================================= */

@media (max-width: 760px) {
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }

    body.menu-open::after {
        position: fixed;
        z-index: 35;
        inset: 0;
        background: rgba(30, 27, 34, .34);
        content: "";
    }

    .container {
        width: min(var(--container), calc(100% - 20px));
    }

    .topbar-inner {
        min-height: 34px;
    }

    .topbar-status {
        width: 100%;
        justify-content: center;
        font-size: 11px;
    }

    .topbar-meta {
        display: none;
    }

    .site-header {
        position: relative;
    }

    .header-row {
        display: grid;
        min-height: auto;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 9px;
        padding: 9px 0 11px;
    }

    .logo {
        width: 158px;
        height: 40px;
        flex-basis: auto;
    }

    .logo-crop img {
        width: 200px;
        height: 200px;
    }

    .header-row > .catalog-button {
        grid-column: 1;
        grid-row: 2;
        min-width: 104px;
        padding: 10px 13px;
    }

    .search {
        grid-column: 2 / 4;
        grid-row: 2;
        min-width: 0;
    }

    .search input {
        padding: 11px 12px;
        font-size: 14px;
    }

    .search button {
        width: 44px;
        flex-basis: 44px;
    }

    .search-suggestion-item {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 9px;
        padding: 9px;
    }

    .search-suggestion-image {
        width: 46px;
        height: 46px;
        grid-row: 1 / 3;
    }

    .search-suggestion-price {
        grid-column: 2;
        font-size: 12px;
    }

    .cart-link {
        grid-column: 2;
        grid-row: 1;
        min-width: 44px;
        justify-content: center;
        padding: 8px;
    }

    .cart-link > span {
        display: none;
    }

    .cart-link b {
        position: absolute;
        top: 1px;
        right: 0;
        min-width: 18px;
        height: 18px;
        font-size: 9px;
    }

    .mobile-menu-toggle {
        display: inline-flex !important;
        grid-column: 3;
        grid-row: 1;
    }

    .main-nav-wrap {
        position: absolute;
        z-index: 50;
        top: 100%;
        right: 10px;
        left: 10px;
        display: none;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 14px;
        box-shadow: 0 18px 45px rgba(30, 27, 34, .18);
    }

    .main-nav-wrap.is-open {
        display: block;
    }

    .main-nav {
        display: grid;
        min-height: 0;
        gap: 2px;
        padding: 10px;
        background: var(--white);
    }

    .main-nav a {
        padding: 12px;
    }

    .nav-promise {
        margin: 4px 0 0;
        padding: 10px 12px;
        border-radius: 9px;
        background: var(--purple-pale);
        color: var(--purple);
    }

    .service-strip {
        overflow: hidden;
    }

    .service-strip-inner {
        justify-content: flex-start;
        gap: 22px;
        overflow-x: auto;
        padding-block: 8px;
        white-space: nowrap;
        scrollbar-width: none;
    }

    .service-strip-inner::-webkit-scrollbar {
        display: none;
    }

    .mobile-bottom-nav {
        display: grid !important;
    }

    .hero {
        min-height: 440px;
        margin-top: 12px;
        border-radius: 18px;
    }

    .hero::after {
        background: linear-gradient(
            0deg,
            rgba(255, 255, 255, .99) 0%,
            rgba(255, 255, 255, .94) 39%,
            rgba(255, 255, 255, .15) 76%,
            transparent 100%
        );
    }

    .hero picture img {
        object-position: center top;
    }

    .hero-content {
        min-height: 440px;
        width: 100%;
        align-items: flex-end;
        padding: 25px 21px;
    }

    .hero h1 {
        margin-bottom: 12px;
        font-size: clamp(30px, 9vw, 39px);
    }

    .hero p {
        margin-bottom: 19px;
        font-size: 15px;
    }

    .section {
        padding: 32px 0;
    }

    .section-head {
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .section-head h2,
    .section h2 {
        font-size: 25px;
    }

    .section-head > a {
        padding-top: 5px;
        font-size: 12px;
        white-space: nowrap;
    }

    .advantages {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .advantage {
        min-height: 0;
        padding: 16px;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .category-tile {
        min-height: 116px;
        padding: 16px;
        font-size: 15px;
    }

    .category-tile::after {
        top: 12px;
        right: 13px;
        font-size: 20px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .product-image {
        height: 168px;
        padding: 12px;
    }

    .product-body {
        gap: 7px;
        padding: 12px;
    }

    .product-category {
        max-width: 100%;
        font-size: 9px;
    }

    .product-name {
        min-height: 40px;
        font-size: 13px;
        line-height: 1.35;
    }

    .product-description,
    .product-features {
        display: none;
    }

    .price {
        font-size: 20px;
    }

    .product-actions {
        grid-template-columns: 1fr;
    }

    .product-actions .primary,
    .product-more {
        min-width: 0;
        min-height: 40px;
        padding: 9px;
        font-size: 12px;
    }

    .page {
        padding: 24px 0 44px;
    }

    .filters {
        display: grid;
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .filters > * {
        width: 100%;
    }

    .gallery-main {
        height: 360px;
    }

    .buy-box {
        padding: 19px;
    }

    .checkout {
        grid-template-columns: 1fr;
    }

    .checkout .wide {
        grid-column: auto;
    }

    .manager-cta {
        padding: 20px 0;
    }

    .manager-cta-inner {
        min-height: 0;
        gap: 22px;
        padding: 23px 20px;
        border-radius: 17px;
    }

    .manager-cta h2 {
        font-size: 28px;
    }

    .manager-cta-actions {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
    }

    .manager-cta-actions > * {
        width: 100%;
    }

    .site-footer {
        padding-top: 36px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px 18px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-categories {
        display: none;
    }

    .footer-logo-link {
        width: 210px;
        height: 54px;
    }

    .footer-logo {
        width: 264px;
        height: 264px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        margin-top: 28px;
    }

    .footer-bottom span:last-child {
        text-align: left;
    }
}

/* =========================================================
   15. ОЧЕНЬ УЗКИЕ ЭКРАНЫ
   ========================================================= */

@media (max-width: 420px) {
    .logo {
        width: 145px;
    }

    .logo-crop img {
        width: 184px;
        height: 184px;
    }

    .header-row > .catalog-button {
        min-width: 96px;
        padding-inline: 10px;
    }

    .search input {
        font-size: 13px;
    }

    .category-tile {
        min-height: 104px;
    }

    .product-image {
        height: 150px;
    }

    .product-body {
        padding: 10px;
    }

    .product-name {
        font-size: 12px;
    }

    .availability {
        font-size: 11px;
    }

    .price {
        font-size: 18px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: auto;
    }
}

/* =========================================================
   16. МАРКЕТИНГОВЫЕ БЛОКИ ГЛАВНОЙ СТРАНИЦЫ
   ========================================================= */

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 15px;
    padding: 7px 11px;
    border: 1px solid rgba(93, 31, 130, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: var(--purple);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hero-eyebrow::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(17, 134, 77, .1);
    content: "";
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-actions > a {
    min-width: 168px;
}

.hero-points {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 22px;
    color: #574d5c;
    font-size: 12px;
    font-weight: 750;
}

.hero-points span::before {
    margin-right: 6px;
    color: var(--purple);
    content: "✓";
    font-weight: 900;
}

.home-stats {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: -18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--white);
    box-shadow: var(--shadow-small);
}

.home-stat {
    display: flex;
    min-width: 0;
    min-height: 91px;
    flex-direction: column;
    justify-content: center;
    padding: 18px 22px;
    border-right: 1px solid var(--line);
}

.home-stat:last-child {
    border-right: 0;
}

.home-stat strong {
    overflow: hidden;
    color: var(--purple);
    font-size: 25px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-stat span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.home-benefits {
    padding-top: 54px;
}

.home-benefits .advantage {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.advantage-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 5px;
    border-radius: 12px;
    background: var(--purple-pale);
    color: var(--purple);
}

.advantage-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-category-section {
    border-block: 1px solid #eee7f2;
    background: var(--purple-pale-2);
}

.category-count {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.empty-showcase {
    max-width: 900px;
    margin-inline: auto;
    padding: 48px;
    border: 1px solid #e6d8ec;
    border-radius: 22px;
    background:
        radial-gradient(circle at 90% 12%, #fff 0 8%, transparent 30%),
        var(--purple-pale);
    text-align: center;
}

.empty-showcase h2 {
    margin: 0 0 12px;
}

.empty-showcase p {
    max-width: 650px;
    margin: 0 auto 24px;
    color: #5d5362;
}

.empty-showcase .hero-actions {
    justify-content: center;
}

.home-order-section {
    background:
        radial-gradient(circle at 85% 0, rgba(122, 60, 160, .34), transparent 32%),
        var(--footer);
    color: var(--white);
}

.home-order-section .section-head h2 {
    color: var(--white);
}

.home-order-section .eyebrow {
    color: #d5aeee;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.how-step {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 17px;
    background: rgba(255, 255, 255, .065);
}

.how-step::after {
    position: absolute;
    right: -18px;
    bottom: -48px;
    color: rgba(255, 255, 255, .035);
    content: attr(data-step);
    font-size: 120px;
    font-weight: 950;
    line-height: 1;
}

.step-number {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--purple);
    color: var(--white);
    font-size: 12px;
    font-weight: 900;
}

.how-step h3 {
    position: relative;
    z-index: 1;
    margin: 22px 0 8px;
    font-size: 18px;
}

.how-step p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #d2cad7;
    font-size: 13px;
}

.map-section {
    display: grid;
    grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr);
    gap: 0;
    overflow: hidden;
    margin-block: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-small);
}

.map-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 38px;
    background:
        radial-gradient(circle at 90% 8%, #fff, transparent 35%),
        var(--purple-pale);
}

.map-copy h2 {
    margin: 0 0 13px;
    color: var(--ink);
    font-size: 34px;
}

.map-copy > p {
    margin: 0 0 24px;
    color: #5e5563;
}

.map-contact {
    display: grid;
    gap: 2px;
    margin-bottom: 15px;
}

.map-contact small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.map-contact strong,
.map-contact a {
    color: var(--ink);
    font-size: 16px;
    font-weight: 850;
}

.map-contact a:hover {
    color: var(--purple);
}

.map-copy > .button-light {
    margin-top: 8px;
}

.map-frame {
    min-height: 440px;
    background: var(--surface-soft);
}

.map-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 440px;
    border: 0;
}

.home-faq-section {
    border-top: 1px solid #eee6f2;
    background: var(--purple-pale-2);
}

.faq-grid {
    display: grid;
    grid-template-columns: minmax(250px, .68fr) minmax(0, 1.32fr);
    gap: 48px;
}

.faq-aside h2 {
    margin: 0 0 12px;
}

.faq-aside p {
    max-width: 360px;
    margin: 0;
    color: var(--muted);
}

.faq-list {
    display: grid;
    gap: 9px;
}

.faq-list details {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--white);
}

.faq-list summary {
    position: relative;
    padding: 17px 52px 17px 18px;
    color: var(--ink);
    font-weight: 850;
    cursor: pointer;
    list-style: none;
}

.faq-list summary::-webkit-details-marker {
    display: none;
}

.faq-list summary::after {
    position: absolute;
    top: 50%;
    right: 18px;
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: var(--purple-pale);
    color: var(--purple);
    content: "+";
    font-size: 18px;
    transform: translateY(-50%);
}

.faq-list details[open] summary {
    color: var(--purple);
}

.faq-list details[open] summary::after {
    content: "−";
}

.faq-list details p {
    margin: 0;
    padding: 0 18px 18px;
    color: var(--muted);
}

.thumbs img {
    cursor: pointer;
    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.thumbs img:hover,
.thumbs img.active {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(93, 31, 130, .1);
}

/* =========================================================
   17. АДАПТАЦИЯ НОВЫХ БЛОКОВ ГЛАВНОЙ
   ========================================================= */

@media (max-width: 980px) {
    .home-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-stat:nth-child(2) {
        border-right: 0;
    }

    .home-stat:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }

    .how-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .map-section {
        grid-template-columns: 1fr;
    }

    .map-copy {
        padding: 30px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 760px) {
    .hero-eyebrow {
        margin-bottom: 11px;
        padding: 6px 9px;
        font-size: 9px;
    }

    .hero-actions {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .hero-actions > a {
        min-width: 0;
        padding-inline: 10px;
        font-size: 12px;
    }

    .hero-points {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px 12px;
        margin-top: 15px;
        font-size: 10px;
    }

    .hero-points span:last-child {
        grid-column: 1 / -1;
    }

    .home-stats {
        margin-top: 10px;
        border-radius: 14px;
    }

    .home-stat {
        min-height: 76px;
        padding: 13px;
    }

    .home-stat strong {
        font-size: 20px;
    }

    .home-stat span {
        font-size: 10px;
    }

    .home-benefits {
        padding-top: 34px;
    }

    .home-benefits .advantage {
        position: relative;
        min-height: 82px;
        padding-left: 70px;
    }

    .advantage-icon {
        position: absolute;
        top: 17px;
        left: 15px;
    }

    .empty-showcase {
        padding: 30px 18px;
        text-align: left;
    }

    .empty-showcase .hero-actions {
        justify-content: stretch;
    }

    .how-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .how-step {
        min-height: 0;
        padding: 18px 18px 18px 76px;
    }

    .step-number {
        position: absolute;
        top: 18px;
        left: 18px;
    }

    .how-step h3 {
        margin: 0 0 5px;
        font-size: 16px;
    }

    .how-step p {
        font-size: 12px;
    }

    .map-section {
        width: calc(100% - 20px);
        margin-block: 28px;
        border-radius: 17px;
    }

    .map-copy {
        padding: 24px 20px;
    }

    .map-copy h2 {
        font-size: 28px;
    }

    .map-frame,
    .map-frame iframe {
        min-height: 330px;
        height: 330px;
    }

    .faq-grid {
        gap: 19px;
    }

    .faq-list summary {
        padding: 15px 48px 15px 15px;
        font-size: 13px;
    }

    .faq-list details p {
        padding: 0 15px 15px;
        font-size: 12px;
    }
}

@media (max-width: 420px) {
    .hero-actions {
        grid-template-columns: 1fr;
    }

    .hero-points {
        grid-template-columns: 1fr;
    }

    .hero-points span:last-child {
        grid-column: auto;
    }

    .home-stat strong {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* =========================================================
   18. КАТАЛОГ V2: ДЕРЕВО, ФИЛЬТРЫ И КОМПАКТНЫЕ КАРТОЧКИ
   ========================================================= */

:root {
    --container: 1420px;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

.product-grid {
    grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
    gap: 14px;
}

.product-image {
    height: 190px;
    padding: 14px;
}

.product-body {
    gap: 7px;
    padding: 13px;
}

.product-name {
    min-height: 40px;
    font-size: 14px;
    line-height: 1.38;
}

.product-description {
    -webkit-line-clamp: 2;
}

.product-features > div {
    padding: 4px 0;
}

.product-stock small {
    font-size: 11px;
}

.price {
    font-size: 22px;
}

.product-actions .primary,
.product-more {
    min-height: 40px;
    padding: 9px 11px;
    font-size: 12px;
}

.store-page-catalog .page {
    padding-top: 22px;
}

.catalog-shell {
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.catalog-sidebar {
    position: sticky;
    top: 174px;
    z-index: 12;
    display: grid;
    max-height: calc(100vh - 192px);
    gap: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.catalog-sidebar-mobile-head,
.catalog-sidebar-backdrop,
.catalog-mobile-filter {
    display: none;
}

.catalog-panel {
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(30, 27, 34, .035);
}

.catalog-categories,
.catalog-filters {
    padding: 14px;
}

.catalog-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 11px;
}

.catalog-panel-title h2 {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
}

.catalog-panel-title a {
    color: var(--purple);
    font-size: 12px;
    font-weight: 750;
}

.category-search {
    position: relative;
    display: block;
    margin-bottom: 9px;
}

.category-search::before {
    position: absolute;
    top: 50%;
    left: 11px;
    color: #918997;
    content: "⌕";
    font-size: 18px;
    transform: translateY(-53%);
}

.category-search input {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px 8px 33px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-soft);
    outline: 0;
}

.category-search input:focus {
    border-color: var(--purple);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(93, 31, 130, .08);
}

.store-category-tree-wrap {
    max-height: min(48vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.store-category-tree {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.store-category-tree .store-category-tree {
    margin: 2px 0 4px 10px;
    padding-left: 8px;
    border-left: 1px solid #eee4f2;
}

.store-category-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 2px;
}

.store-category-row .store-category-link {
    min-width: 0;
    flex: 1 1 auto;
}

.store-category-toggle {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #776c7d;
    cursor: pointer;
    font-size: 17px;
    font-weight: 900;
    transition: transform .18s ease, background-color .18s ease;
}

.store-category-toggle:hover {
    background: var(--purple-pale);
    color: var(--purple);
}

.store-category-node.is-open > .store-category-row .store-category-toggle,
[data-store-category-node].is-open > .store-category-row .store-category-toggle {
    transform: rotate(180deg);
}

.store-category-children {
    display: none;
}

[data-store-category-node].is-open > .store-category-children {
    display: block;
}

.store-category-link,
.store-category-all {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding: 7px 8px;
    border-radius: 8px;
    color: #443d48;
    font-size: 12px;
    font-weight: 680;
    line-height: 1.28;
}

.store-category-all {
    margin-bottom: 3px;
}

.store-category-link span,
.store-category-all span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.store-category-link small,
.store-category-all small {
    min-width: 24px;
    flex: 0 0 auto;
    padding: 2px 5px;
    border-radius: 999px;
    background: #f2eff4;
    color: #756c79;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}

.store-category-link:hover,
.store-category-link.is-active,
.store-category-all:hover,
.store-category-all.is-active {
    background: var(--purple-pale);
    color: var(--purple);
}

.store-category-link.is-active,
.store-category-all.is-active {
    font-weight: 850;
}

.store-category-link.is-active small,
.store-category-all.is-active small {
    background: var(--purple);
    color: var(--white);
}

.category-search-empty {
    margin: 12px 0 2px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.catalog-filters form {
    display: grid;
    gap: 11px;
}

.catalog-filter {
    display: grid;
    gap: 5px;
}

.catalog-filter > span {
    color: #49404e;
    font-size: 12px;
    font-weight: 800;
}

.catalog-filter select,
.catalog-toolbar select {
    width: 100%;
    min-height: 40px;
    padding: 8px 31px 8px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--white);
    color: var(--ink);
}

.catalog-filter-submit {
    width: 100%;
    min-height: 42px;
    margin-top: 2px;
}

.catalog-filter-note {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.catalog-content {
    min-width: 0;
}

.catalog-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.catalog-heading h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(27px, 3vw, 39px);
    line-height: 1.12;
}

.catalog-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.subcategory-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 13px;
    overflow-x: auto;
    padding: 1px 1px 6px;
    scrollbar-width: thin;
}

.subcategory-chips a {
    display: inline-flex;
    min-height: 38px;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid #e7dcec;
    border-radius: 10px;
    background: var(--purple-pale-2);
    color: #4b2c59;
    font-size: 12px;
    font-weight: 750;
}

.subcategory-chips a:hover {
    border-color: var(--purple);
    background: var(--purple-pale);
}

.subcategory-chips small {
    color: var(--muted);
    font-size: 10px;
}

.catalog-toolbar {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-bottom: 13px;
    padding: 7px 9px 7px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.catalog-query {
    min-width: 0;
    margin-right: auto;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-toolbar form,
.catalog-toolbar label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-toolbar label > span {
    color: var(--muted);
    font-size: 11px;
}

.catalog-toolbar select {
    min-width: 172px;
    min-height: 36px;
    padding-block: 6px;
    font-size: 12px;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin: -2px 0 13px;
}

.active-filters span {
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--purple-pale);
    color: #58306c;
    font-size: 11px;
}

.active-filters a {
    color: var(--purple);
    font-size: 11px;
    font-weight: 800;
}

.catalog-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
}

.catalog-product-grid .product-image {
    height: 174px;
}

.catalog-product-grid .product-description {
    display: none;
}

.catalog-product-grid .product-features {
    font-size: 10px;
}

.catalog-product-grid .product-more {
    display: none;
}

.catalog-product-grid .product-actions {
    grid-template-columns: 1fr;
}

.catalog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.catalog-pagination a {
    display: grid;
    min-width: 39px;
    height: 39px;
    place-items: center;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.catalog-pagination a:hover,
.catalog-pagination a.is-active {
    border-color: var(--purple);
    background: var(--purple);
    color: var(--white);
}

.catalog-empty {
    display: grid;
    min-height: 310px;
    place-items: center;
    align-content: center;
    padding: 32px 20px;
    border: 1px dashed #d9c8e1;
    border-radius: 18px;
    background: var(--purple-pale-2);
    text-align: center;
}

.catalog-empty > span {
    color: var(--purple);
    font-size: 48px;
}

.catalog-empty h1,
.catalog-empty h2 {
    margin: 4px 0 5px;
    color: var(--ink);
}

.catalog-empty p {
    margin: 0 0 18px;
    color: var(--muted);
}

.category-description {
    margin-top: 30px;
    padding: 23px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface-soft);
    color: #514956;
}

.category-description h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 21px;
}

/* Компактная страница товара */
.product-detail-v2 {
    width: 100%;
    min-width: 0;
    max-width: 1120px;
    grid-template-columns: minmax(300px, 460px) minmax(0, 560px);
    justify-content: center;
    gap: 26px;
    margin-inline: auto;
}

/*
 * Карточки поставщиков иногда содержат длинные технические названия без
 * пробелов. Они не должны расширять grid и создавать горизонтальную прокрутку.
 */
.product-page,
.product-gallery,
.product-summary {
    min-width: 0;
}

.product-detail-v2 .gallery-main {
    width: 100%;
    height: 360px;
    min-height: 360px;
    max-height: 360px;
    padding: 18px;
    contain: layout paint;
    overflow: hidden;
    border-radius: 16px;
}

.gallery-thumb {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
    cursor: pointer;
}

.gallery-thumb:hover,
.gallery-thumb.is-active {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(93, 31, 130, .09);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
}

.product-summary {
    min-width: 0;
}

.product-summary h1 {
    max-width: 100%;
    margin: 7px 0 7px;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: var(--ink);
    font-size: clamp(23px, 2.3vw, 30px);
    line-height: 1.18;
}

.product-code {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
}

.product-key-specs {
    display: grid;
    gap: 0;
    margin: 0 0 12px;
    font-size: 12px;
}

.product-key-specs > div {
    display: grid;
    grid-template-columns: minmax(120px, .85fr) minmax(0, 1.15fr);
    gap: 14px;
    padding: 5px 0;
    border-bottom: 1px solid #eeebf0;
}

.product-key-specs dt {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--muted);
}

.product-key-specs dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-weight: 700;
}

.product-buy-box {
    width: 100%;
    min-width: 0;
    max-width: 560px;
    padding: 15px;
    border-radius: 14px;
}

.buy-box-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.buy-box-top > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.buy-box-top small {
    color: var(--muted);
    font-size: 11px;
}

.product-buy-box .price {
    margin: 0;
    font-size: 27px;
    white-space: nowrap;
}

.product-buy-box form {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 12px;
}

.quantity-control {
    display: grid;
    width: 108px;
    grid-template-columns: 1fr 43px;
    flex: 0 0 108px;
    align-items: center;
    gap: 7px;
    padding: 3px 4px 3px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--white);
    color: var(--muted);
    font-size: 11px;
}

.quantity-control input {
    width: 43px;
    min-height: 35px;
    border: 0;
    border-radius: 7px;
    background: var(--surface-soft);
    text-align: center;
}

.buy-box-note {
    margin: 9px 0 0;
    color: #665b6c;
    font-size: 10px;
}

.product-information {
    display: grid;
    max-width: 1120px;
    gap: 9px;
    margin: 22px auto 0;
}

.product-legal-notice {
    max-width: 1120px;
    margin: 12px auto 0;
    padding: 13px 15px;
    border: 1px solid #e7ddea;
    border-radius: 12px;
    background: #faf7fb;
    color: #6a616f;
    font-size: 12px;
    line-height: 1.55;
}

.product-info-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--white);
}

.product-info-card h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 20px;
}

.product-description-full {
    max-width: 1000px;
    color: #4f4853;
    font-size: 14px;
    line-height: 1.65;
}

.product-info-card .specs th,
.product-info-card .specs td {
    width: 50%;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.product-info-card .specs th {
    color: var(--muted);
    font-weight: 600;
}

.product-cart-button {
    width: auto;
    min-width: 172px;
    min-height: 41px;
    flex: 0 0 auto;
    gap: 8px;
    padding: 9px 19px;
}

.product-cart-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.product-accordion-item {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--white);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.product-accordion-item[open] {
    border-color: #dbc9e4;
    box-shadow: 0 8px 26px rgba(68, 20, 99, .06);
}

.product-accordion-item > summary {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 15px;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.product-accordion-item > summary::-webkit-details-marker {
    display: none;
}

.product-accordion-item > summary > span {
    display: grid;
    gap: 1px;
}

.product-accordion-item > summary strong {
    font-size: 17px;
}

.product-accordion-item > summary small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.product-accordion-item > summary i {
    position: relative;
    display: block;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: var(--purple-pale);
}

.product-accordion-item > summary i::before,
.product-accordion-item > summary i::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--purple);
    content: "";
    transform: translate(-50%, -50%);
    transition: transform .18s ease;
}

.product-accordion-item > summary i::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.product-accordion-item[open] > summary i::after {
    transform: translate(-50%, -50%) rotate(0);
}

.product-accordion-content {
    padding: 15px;
    border-top: 1px solid #eeeaf0;
}

.product-accordion-content.specs,
.product-accordion-content .specs {
    margin: 0;
}

.product-accordion-content .specs th,
.product-accordion-content .specs td {
    width: 50%;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.product-accordion-content .specs th {
    color: var(--muted);
    font-weight: 600;
}

/* Любое фото товара жёстко остаётся внутри своей области. */
.product-card,
.product-image,
.gallery-main,
.gallery-thumb {
    overflow: hidden;
}

.product-image,
.gallery-main {
    position: relative;
    min-width: 0;
    contain: layout paint;
}

.product-image > img,
.gallery-main > img {
    position: absolute !important;
    inset: 12px !important;
    display: block !important;
    width: calc(100% - 24px) !important;
    height: calc(100% - 24px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: calc(100% - 24px) !important;
    max-height: calc(100% - 24px) !important;
    object-fit: contain !important;
    object-position: center !important;
}

.gallery-main > img {
    inset: 14px !important;
    width: calc(100% - 28px) !important;
    height: calc(100% - 28px) !important;
    max-width: calc(100% - 28px) !important;
    max-height: calc(100% - 28px) !important;
}

.gallery-thumb > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}

@media (max-width: 980px) {
    body.catalog-sidebar-open {
        overflow: hidden;
    }

    .catalog-shell {
        grid-template-columns: 1fr;
    }

    .catalog-sidebar {
        position: fixed;
        z-index: 102;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(360px, calc(100vw - 42px));
        max-height: none;
        padding: 12px;
        overflow-y: auto;
        background: #f7f6f8;
        box-shadow: 18px 0 44px rgba(30, 27, 34, .2);
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    .catalog-sidebar-open .catalog-sidebar {
        transform: translateX(0);
    }

    .catalog-sidebar-backdrop {
        position: fixed;
        z-index: 101;
        inset: 0;
        border: 0;
        background: rgba(30, 27, 34, .43);
    }

    .catalog-sidebar-open .catalog-sidebar-backdrop {
        display: block;
    }

    .catalog-sidebar-mobile-head {
        display: flex;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
        padding: 3px 3px 7px;
        color: var(--ink);
        font-size: 19px;
    }

    .store-category-tree-wrap {
        max-height: none;
        overflow: visible;
    }

    .catalog-sidebar-mobile-head button {
        display: grid;
        width: 40px;
        height: 40px;
        place-items: center;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: var(--white);
        color: var(--purple);
        font-size: 27px;
        line-height: 1;
    }

    .catalog-mobile-filter {
        display: inline-flex;
        min-height: 42px;
        align-items: center;
        gap: 8px;
        padding: 9px 12px;
        border: 1px solid var(--purple);
        border-radius: 10px;
        background: var(--white);
        color: var(--purple);
        font-size: 12px;
        font-weight: 850;
    }

    .catalog-mobile-filter b {
        display: grid;
        min-width: 20px;
        height: 20px;
        place-items: center;
        padding: 0 5px;
        border-radius: 999px;
        background: var(--purple);
        color: var(--white);
        font-size: 9px;
    }

    .product-detail-v2 {
        max-width: 720px;
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 760px) {
    .store-page-catalog .page,
    .product-page {
        padding-top: 17px;
    }

    .breadcrumbs {
        margin-bottom: 14px;
        font-size: 11px;
    }

    .catalog-heading {
        align-items: center;
    }

    .catalog-heading h1 {
        font-size: 25px;
    }

    .catalog-heading p {
        font-size: 11px;
    }

    .catalog-mobile-filter span {
        font-size: 0;
    }

    .catalog-mobile-filter span::after {
        content: "Каталог";
        font-size: 12px;
    }

    .catalog-toolbar {
        min-height: 46px;
        padding: 6px 7px;
    }

    .catalog-toolbar label > span {
        display: none;
    }

    .catalog-toolbar select {
        min-width: 156px;
    }

    .catalog-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .catalog-product-grid .product-image {
        height: 150px;
    }

    .catalog-product-grid .product-features {
        display: none;
    }

    .catalog-product-grid .product-actions {
        grid-template-columns: 1fr;
    }

    .catalog-product-grid .product-more {
        display: none;
    }

    .catalog-product-grid .product-category {
        font-size: 8px;
    }

    .product-detail-v2 {
        grid-template-columns: 1fr;
        gap: 19px;
    }

    .product-detail-v2 .gallery-main {
        height: min(310px, 78vw);
        min-height: min(310px, 78vw);
        max-height: 310px;
        padding: 10px;
    }

    .gallery-main > img {
        inset: 9px !important;
        width: calc(100% - 18px) !important;
        height: calc(100% - 18px) !important;
        max-width: calc(100% - 18px) !important;
        max-height: calc(100% - 18px) !important;
    }

    .product-summary h1 {
        font-size: 22px;
    }

    .product-key-specs > div {
        grid-template-columns: minmax(95px, .8fr) minmax(0, 1.2fr);
        gap: 9px;
    }

    .product-buy-box {
        padding: 13px;
    }

    .buy-box-top {
        align-items: center;
        flex-direction: row;
        gap: 10px;
    }

    .buy-box-top > div {
        width: auto;
        min-width: 0;
    }

    .product-buy-box .price {
        margin-left: auto;
        font-size: 24px;
    }

    .product-buy-box form {
        display: flex;
        grid-template-columns: none;
        gap: 7px;
    }

    .quantity-control {
        width: 96px;
        grid-template-columns: 1fr 40px;
        flex-basis: 96px;
        padding-left: 7px;
    }

    .quantity-control input {
        width: 40px;
    }

    .product-cart-button {
        min-width: 0;
        flex: 1 1 auto;
        padding-inline: 13px;
    }

    .product-information {
        gap: 7px;
        margin-top: 16px;
    }

    .product-accordion-item > summary {
        min-height: 54px;
        padding: 10px 12px;
    }

    .product-accordion-item > summary strong {
        font-size: 15px;
    }

    .product-accordion-content {
        padding: 12px;
    }

    .product-accordion-content .specs tr {
        display: grid;
        padding: 7px 0;
    }

    .product-accordion-content .specs th,
    .product-accordion-content .specs td {
        width: 100%;
        padding: 2px 6px;
    }

    .product-info-card {
        padding: 17px 14px;
    }

    .product-info-card h2 {
        font-size: 20px;
    }

    .product-info-card .specs tr {
        display: grid;
        padding: 8px 0;
    }

    .product-info-card .specs th,
    .product-info-card .specs td {
        width: 100%;
        padding: 2px 8px;
    }

    .product-page .breadcrumbs > span:last-child {
        display: block;
        overflow: hidden;
        width: 100%;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 390px) {
    .catalog-product-grid .product-image {
        height: 134px;
    }

    .catalog-product-grid .product-body {
        padding: 10px;
    }

    .catalog-product-grid .product-name {
        font-size: 12px;
    }

    .catalog-product-grid .price {
        font-size: 18px;
    }
}
