/* SGAN Опт — витрина. Деловой плотный интерфейс под закупщика (Промт 2). */
:root {
  --brand: #c71111;
  --brand-dark: #a10d0d;
  --text: #1c1c1e;
  --muted: #6b6b70;
  --line: #e4e4e7;
  --bg: #ffffff;
  --bg-soft: #f6f6f7;
  --ok: #1f7d4d;
  --warn: #b26b00;
  --danger: #c71111;
  --radius: 8px;
  --gutter: 16px;
  --font: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Футер прижат к низу окна: на коротких страницах иначе оставалось белое поле */
body { margin: 0; font: 15px/1.45 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
/* width:100% обязателен: в flex-колонке `margin: 0 auto` отменяет растягивание,
   и контейнер сжимался по содержимому */
body > main { flex: 1 0 auto; width: 100%; }
body > .footer { margin-top: auto; }
a { color: inherit; }
a:hover { color: var(--brand); }
img { max-width: 100%; display: block; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: 22px; line-height: 1.25; margin: 24px 0 12px; }
h3 { font-size: 16px; margin: 16px 0 8px; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --- Шапка --- */
.topbar { background: var(--text); color: #fff; font-size: 13px; }
.topbar .container { display: flex; gap: 16px; justify-content: space-between; align-items: center; min-height: 34px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 18px; min-width: 0; }
.topbar-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; opacity: .92; }
.topbar a.topbar-item:hover { opacity: 1; color: #fff; text-decoration: underline; }
.topbar a { color: #fff; text-decoration: none; }
.badge-18 { display: inline-block; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 5px; font-weight: 700; font-size: 12px; line-height: 18px; }
.header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.header .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo img { height: 30px; width: auto; }
.search { flex: 1; display: flex; max-width: 620px; }
.search input { flex: 1; min-width: 0; height: 40px; border: 1.5px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); padding: 0 12px; font: inherit; }
.search input:focus { outline: none; border-color: var(--brand); }
.search button { height: 40px; border: 0; background: var(--brand); color: #fff; padding: 0 16px; border-radius: 0 var(--radius) var(--radius) 0; font: inherit; cursor: pointer; }
.header-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.header-actions a:not(.btn), .header-actions button:not(.btn) { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 8px 10px; border-radius: var(--radius); border: 0; background: none; font: inherit; cursor: pointer; }
.header-actions a:not(.btn):hover { background: var(--bg-soft); }
.cart-count { background: var(--brand); color: #fff; border-radius: 10px; font-size: 12px; padding: 0 6px; min-width: 20px; text-align: center; }
.nav { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 15; }
.nav-inner { display: flex; align-items: center; gap: 8px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav ul::-webkit-scrollbar { display: none; }
.catmenu { flex: none; }
.catmenu-btn { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; margin: 6px 8px 6px 0; padding: 8px 14px; border-radius: var(--radius); background: var(--brand); color: #fff; font-weight: 600; font-size: 14px; user-select: none; }
.catmenu-btn::-webkit-details-marker { display: none; }
.catmenu-btn:hover { background: var(--brand-dark); }
.catmenu[open] .catmenu-caret { transform: rotate(180deg); }
.catmenu-panel { position: absolute; left: 50%; transform: translateX(-50%); top: 100%; width: min(1288px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 0 0 14px 14px; box-shadow: 0 18px 40px rgba(0,0,0,.12); padding: 16px; }
.catmenu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px; }
.catmenu-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-decoration: none; font-weight: 500; font-size: 14px; }
.catmenu-item:hover { background: var(--bg-soft); }
.catmenu-item .cat-icon { width: 40px; height: 40px; border-radius: 10px; }
.catmenu-item small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.catmenu-foot { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; font-size: 14px; }
.catmenu-foot a { text-decoration: none; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 10px 12px; text-decoration: none; font-weight: 500; font-size: 14px; }
.nav a .icon { color: var(--brand); }
.nav a.is-accent { color: var(--brand); }

/* --- Кнопки и формы --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--radius); border: 1.5px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); border-color: var(--line); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 14px; }
.btn-block { width: 100%; }
label { display: block; font-weight: 500; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.input, select.input, textarea.input { width: 100%; height: 40px; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0 10px; font: inherit; background: #fff; }
textarea.input { height: auto; min-height: 90px; padding: 8px 10px; }
.input:focus { outline: none; border-color: var(--brand); }
.input.is-invalid { border-color: var(--danger); }
.error { color: var(--danger); font-size: 13px; margin-top: 4px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin-bottom: 8px; }
.check input { margin-top: 3px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
legend { font-weight: 600; padding: 0 6px; }

/* --- Уведомления --- */
.alert { padding: 12px 14px; border-radius: var(--radius); margin: 16px 0; border: 1px solid; }
.alert-ok { background: #eef8f2; border-color: #bfe3cd; color: #14573a; }
.alert-error { background: #fdf0f0; border-color: #f2c4c4; color: #8c1010; }
.alert-info { background: #f3f6fb; border-color: #cfdbee; color: #2b4a73; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 12px 18px; border-radius: var(--radius); z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: calc(100% - 32px); }

/* --- Хлебные крошки --- */
/* margin-block, иначе `margin: 16px 0` перебивает auto-центрирование .container */
.crumbs { font-size: 13px; color: var(--muted); margin-block: 16px 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs span + span::before, .crumbs a + span::before, .crumbs a + a::before { content: "›"; margin: 0 6px; }

/* --- Каталог --- */
.catalog { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow: auto; padding-right: 4px; }
.filter-group { border-bottom: 1px solid var(--line); padding: 12px 0; }
.filter-group h4 { margin: 0 0 8px; font-size: 14px; }
.filter-group .check { font-size: 14px; margin-bottom: 4px; }
.filter-group .count { color: var(--muted); font-size: 12px; margin-left: auto; }
.filter-list { max-height: 220px; overflow: auto; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; padding: 4px 10px; background: var(--bg-soft); border-radius: 16px; font-size: 13px; text-decoration: none; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.subcats a { border: 1px solid var(--line); border-radius: 16px; padding: 6px 12px; text-decoration: none; font-size: 14px; }
.subcats a:hover { border-color: var(--brand); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.card:hover { border-color: #c9c9ce; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.card-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; padding: 2px 6px; border-radius: 4px; background: var(--text); color: #fff; }
.tag-new { background: #1f5fbf; } .tag-promo { background: var(--brand); } .tag-sale { background: #b26b00; } .tag-hit { background: #6b2fbf; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 14px; line-height: 1.35; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.9em; }
.sku { font-size: 12px; color: var(--muted); }
.price-row { margin-top: auto; }
.price { font-size: 18px; font-weight: 700; }
.price-old { font-size: 13px; color: var(--muted); text-decoration: line-through; margin-left: 6px; }
.variants .price { font-size: 16px; }
.variants .price-old { display: block; margin-left: 0; }
.price-meta { font-size: 12px; color: var(--muted); }
.locked { font-size: 13px; color: var(--muted); }
.stock { font-size: 12px; font-weight: 500; }
.stock-many { color: var(--ok); } .stock-few { color: var(--warn); } .stock-none { color: var(--danger); } .stock-muted { color: var(--muted); }
.buy { display: flex; gap: 6px; }
.qty { width: 72px; height: 32px; border: 1.5px solid var(--line); border-radius: var(--radius); text-align: center; font: inherit; }
.pagination { display: flex; gap: 4px; flex-wrap: wrap; margin: 24px 0; }
.pagination a, .pagination span { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; padding: 0 8px; }
.pagination .active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .disabled { color: var(--muted); }
.empty { padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* --- Карточка товара --- */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; margin-bottom: 32px; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs button { flex: 0 0 64px; height: 64px; border: 2px solid transparent; border-radius: 6px; padding: 0; background: var(--bg-soft); cursor: pointer; }
.thumbs button.is-active { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.buy-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.variants { width: 100%; border-collapse: collapse; font-size: 14px; }
.variants th, .variants td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.variants th { font-weight: 500; color: var(--muted); font-size: 13px; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs td { padding: 7px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.specs td:first-child { color: var(--muted); width: 45%; padding-right: 12px; }
.description { overflow-wrap: anywhere; }
.description img { height: auto; border-radius: var(--radius); }
.description p:first-child { margin-top: 0; }
.pack { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; margin: 8px 0; }
.pack b { font-weight: 600; }

/* --- Таблицы (корзина, заказы) --- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: 13px; background: var(--bg-soft); }
.table .num { text-align: right; white-space: nowrap; }
.table img { width: 48px; height: 48px; object-fit: contain; background: var(--bg-soft); border-radius: 4px; }
.summary { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.summary-total { font-size: 20px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 12px; background: var(--bg-soft); }
.status-info { background: #e8f0fc; color: #1f4f99; } .status-warning { background: #fff4e0; color: #8a5300; }
.status-success { background: #e6f5ec; color: #14573a; } .status-danger { background: #fdeaea; color: #8c1010; }
.timeline { display: flex; gap: 0; margin: 16px 0 24px; overflow-x: auto; }
.timeline div { flex: 1; min-width: 90px; text-align: center; font-size: 12px; color: var(--muted); position: relative; padding-top: 22px; }
.timeline div::before { content: ""; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--line); z-index: 1; }
.timeline div::after { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.timeline div:first-child::after { display: none; }
.timeline .done { color: var(--text); } .timeline .done::before, .timeline .done::after { background: var(--ok); }
.timeline .current { color: var(--text); font-weight: 600; } .timeline .current::before { background: var(--brand); box-shadow: 0 0 0 4px #f6d0d0; }

/* --- Кабинет --- */
.account { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.account-nav a { display: block; padding: 8px 10px; border-radius: var(--radius); text-decoration: none; }
.account-nav a.is-active { background: var(--bg-soft); font-weight: 600; }
.account-nav .is-locked { display: flex; align-items: center; gap: 6px; padding: 8px 10px; color: var(--muted); cursor: help; }
.account-nav .is-locked .icon { opacity: .6; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 22px; margin-top: 4px; }


/* --- Иконки --- */
.icon { flex: none; display: inline-block; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }
.header-actions .action { flex-direction: column; gap: 2px; font-size: 12px; padding: 6px 10px; position: relative; }
.header-actions .action .cart-count { position: absolute; top: 0; right: 4px; }
.center { text-align: center; margin-top: 16px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }

/* --- Карточка: листание фото (п. 8) --- */
.card-img { aspect-ratio: 1 / 1; background: var(--bg-soft); position: relative; overflow: hidden; display: block; }
.card-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.card-track::-webkit-scrollbar { display: none; }
.card-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: start; }
.card-zones { position: absolute; inset: 0; display: flex; z-index: 1; }
.card-zones span { flex: 1; }
.card-dots { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; gap: 4px; justify-content: center; z-index: 2; pointer-events: none; }
.card-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.2); transition: background .2s, width .2s; }
.card-dots span.is-active { background: var(--brand); width: 14px; border-radius: 3px; }
.card-badges { z-index: 3; }
@media (hover: none) { .card-zones { display: none; } }

/* --- Галерея товара (п. 10) --- */
.gallery { min-width: 0; }
.gallery-main { aspect-ratio: 1 / 1; background: var(--bg-soft); border-radius: var(--radius); overflow: hidden; position: relative; }
.gallery-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: start; }
.gallery-empty { margin: auto; color: var(--muted); }
.gallery-counter { position: absolute; right: 10px; bottom: 10px; background: rgba(28,28,30,.7); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
.slider-arrow:hover { color: var(--brand); }
.slider-arrow.prev { left: 10px; } .slider-arrow.next { right: 10px; }
.product-info { display: grid; gap: 32px; margin-bottom: 16px; }
.product-info.has-both { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.product-info h2 { margin-top: 0; }
.product { margin-bottom: 24px; }

/* --- Главная --- */
.main-full { padding: 0; }
.section { margin: 36px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.more { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 500; color: var(--brand); white-space: nowrap; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.slider { position: relative; border-radius: 16px; overflow: hidden; min-height: 340px; }
.slider-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.slider-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 36px 40px; color: #fff; position: relative; overflow: hidden; min-height: 340px; }
.slide-text { position: relative; z-index: 1; max-width: 560px; }
.slide h1, .slide h2 { font-size: 34px; line-height: 1.12; margin: 8px 0 12px; }
.slide p { margin: 0 0 20px; opacity: .88; font-size: 16px; }
.slide-label { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 12px; background: rgba(255,255,255,.18); }
.slide-img { position: absolute; right: 0; top: 0; height: 100%; width: 50%; object-fit: cover; }
.slide-art { opacity: .18; margin-right: 20px; }
.theme-wine { background: linear-gradient(120deg, #7a0b0b 0%, #c71111 60%, #e0473a 100%); color: #fff; }
.theme-dark { background: linear-gradient(120deg, #111113 0%, #2a2a30 100%); color: #fff; }
.theme-rose { background: linear-gradient(120deg, #b83260 0%, #ec7a9c 100%); color: #fff; }
.theme-light { background: linear-gradient(120deg, #f6f1ee 0%, #fbe3e3 100%); color: var(--text); }
.theme-light .slide-label { background: rgba(199,17,17,.1); color: var(--brand); }
.btn-light { background: #fff; color: var(--brand); border-color: #fff; }
.btn-light:hover { background: #fff5f5; color: var(--brand-dark); border-color: #fff5f5; }
.theme-light .btn-light { background: var(--brand); color: #fff; border-color: var(--brand); }
.slider-dots { position: absolute; left: 40px; bottom: 16px; display: flex; gap: 6px; z-index: 2; }
.slider-dots button { width: 8px; height: 8px; border-radius: 4px; border: 0; padding: 0; background: rgba(255,255,255,.45); cursor: pointer; transition: width .2s; }
.slider-dots button.is-active { width: 22px; background: #fff; }
.hero-side { display: grid; gap: 16px; }
.side-card { position: relative; overflow: hidden; border-radius: 16px; padding: 20px 22px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; justify-content: flex-end; min-height: 160px; }
.side-card b { font-size: 20px; }
.side-card span { font-size: 14px; opacity: .8; max-width: 80%; }
.side-card .side-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.side-card .side-icon { position: absolute; right: 16px; top: 16px; opacity: .5; }
.side-new { background: #1c1c1e; color: #fff; }
.side-promo { background: #fdeaea; color: var(--brand-dark); }
.side-card:hover { transform: translateY(-2px); transition: transform .2s; }
.side-new:hover { color: #fff; }

/* Бегущая строка (п. 2) */
.tapes { position: relative; height: 120px; margin: 20px 0 8px; overflow: hidden; }
.tape { position: absolute; left: -5%; width: 110%; overflow: hidden; white-space: nowrap; padding: 10px 0; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 18px; }
.tape-a { top: 20px; background: var(--brand); color: #fff; transform: rotate(-2deg); z-index: 1; }
.tape-b { top: 58px; background: #1c1c1e; color: #fff; transform: rotate(1.5deg); }
.tape-run { display: inline-flex; gap: 22px; align-items: center; animation: tape 38s linear infinite; }
.tape-b .tape-run { animation-direction: reverse; animation-duration: 44s; }
.tape i { font-style: normal; opacity: .6; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape-run { animation: none; } }

/* Категории с иконками (п. 5) */
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cat-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: #fff; transition: border-color .2s, box-shadow .2s; }
.cat-tile:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(199,17,17,.08); color: var(--text); }
.cat-icon { width: 48px; height: 48px; border-radius: 12px; background: #fdeaea; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.cat-name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.cat-count { font-size: 12px; color: var(--muted); margin-top: auto; }

.benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 28px 0; }
.benefit { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--bg-soft); border-radius: 12px; }
.benefit .icon { color: var(--brand); }
.benefit b { display: block; font-size: 14px; }
.benefit span { font-size: 13px; color: var(--muted); }

/* Таймер акции */
.countdown { display: grid; grid-template-columns: minmax(0, 1.4fr) auto auto; gap: 24px; align-items: center; padding: 24px 28px; border-radius: 16px; margin: 28px 0; }
.countdown h2 { margin: 8px 0 4px; }
.countdown p { margin: 0; opacity: .85; }
.timer { display: flex; gap: 8px; }
.timer div { background: rgba(255,255,255,.14); border-radius: 10px; padding: 8px 10px; min-width: 62px; text-align: center; }
.theme-light .timer div { background: #fff; }
.timer b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.timer span { font-size: 11px; text-transform: uppercase; opacity: .75; }

/* Вкладки */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1.5px solid var(--line); background: #fff; border-radius: 20px; padding: 7px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.tab.is-active { background: var(--text); border-color: var(--text); color: #fff; }

/* Поддержка партнёров (п. 15) */
.support { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 24px; align-items: center; }
.support-intro h2 { margin-top: 0; }
.support-intro p { color: var(--muted); }
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.support-item { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.support-item .icon { color: var(--brand); }
.support-item span { font-size: 13px; color: var(--muted); }

/* Квиз */
.quiz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; background: var(--bg-soft); border-radius: 16px; padding: 28px; }
.quiz-head h2 { margin-top: 0; }
.quiz-body { background: #fff; border-radius: 12px; padding: 20px; position: relative; }
.quiz-q { font-weight: 700; font-size: 17px; margin: 0 0 12px; }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz-opts button { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 12px 14px; font: inherit; cursor: pointer; }
.quiz-opts button:hover { border-color: var(--brand); color: var(--brand); }
.quiz-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.quiz-cats a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 20px; background: #fdeaea; color: var(--brand-dark); text-decoration: none; font-weight: 600; font-size: 14px; }
.quiz-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.quiz-progress { height: 4px; background: var(--line); border-radius: 2px; margin-top: 16px; overflow: hidden; }
.quiz-progress span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .3s; }

/* Производство и Telegram (п. 13, 14) */
.duo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin: 36px 0; }
.maker, .tg { border-radius: 16px; padding: 28px; color: #fff; }
.maker { background: linear-gradient(135deg, #1c1c1e 0%, #3b1518 100%); }
.tg { background: linear-gradient(135deg, #1f7fc4 0%, #2aa3e0 100%); }
.maker h2, .tg h2 { margin-top: 0; }
.maker p, .tg p { opacity: .88; }
.maker .kicker, .tg .kicker { color: #fff; opacity: .75; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.checks li { display: flex; gap: 8px; align-items: center; }
.tg .btn-light { color: #1f7fc4; }

/* Статьи */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.post { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; }
.post:hover { border-color: var(--brand); color: var(--text); }
.post-cover { aspect-ratio: 16 / 9; background: #fdeaea; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.post-meta { font-size: 12px; color: var(--muted); }
.post-excerpt { font-size: 14px; color: var(--muted); }
.article { max-width: 820px; }
.article-cover { border-radius: 12px; margin: 16px 0; width: 100%; height: auto; }
.cta-box { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 20px; background: #fdeaea; border-radius: 12px; margin: 24px 0; }

/* FAQ */
.faq-home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 24px; align-items: start; }
.faq-home h2 { margin-top: 0; }
.faq-page { max-width: 860px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: 14px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus { color: var(--brand); transition: transform .2s; display: flex; }
.faq-item[open] .faq-plus { transform: rotate(45deg); }
.faq-answer { padding: 0 0 14px; color: #3a3a3e; }
.faq-answer p { margin: 0 0 8px; }

@media (max-width: 1100px) {
  .benefits { grid-template-columns: 1fr 1fr; }
  .countdown { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .hero-grid, .support, .quiz, .duo, .faq-home, .product-info.has-both { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; }
  .slide-img { opacity: .3; width: 100%; }
}
@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .topbar-left, .topbar-right { gap: 10px; }
  .topbar .badge-18 { display: none; }
  .section { margin: 26px 0; }
  .slider, .slide { min-height: 280px; }
  .slide { padding: 24px 20px 40px; }
  .slide h1, .slide h2 { font-size: 24px; }
  .slide-art { display: none; }
  .slider-dots { left: 20px; }
  .slider .slider-arrow { display: none; }
  .hero-side { gap: 8px; }
  .side-card { min-height: 120px; padding: 14px; }
  .side-card b { font-size: 16px; }
  .side-card span:not(.side-kicker) { display: none; }
  .tapes { height: 96px; }
  .tape { font-size: 14px; padding: 8px 0; }
  .tape-b { top: 50px; }
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benefits, .support-grid, .quiz-opts { grid-template-columns: 1fr; }
  .quiz, .maker, .tg { padding: 18px; }
  .timer div { min-width: 0; flex: 1; }
}

/* --- Подборки --- */
.collections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 8px 0 28px; }
.collection { position: relative; display: flex; align-items: center; justify-content: space-between; aspect-ratio: 3 / 1; min-height: 150px; border-radius: 18px; overflow: hidden; text-decoration: none; padding: 22px 26px 40px; transition: transform .2s, box-shadow .2s; }
.collection:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.14); color: inherit; }
.collection.has-image { padding: 0; background: #1c1c1e; }
.collection.has-image img { width: 100%; height: 100%; object-fit: cover; }
.collection-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; max-width: 70%; }
.collection-text b { font-size: 26px; line-height: 1.1; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; }
.collection-text span { font-size: 14px; opacity: .85; }
.collection-art { opacity: .22; margin-right: -10px; }
.collection-count { position: absolute; left: 22px; bottom: 14px; z-index: 2; font-size: 14px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.theme-light .collection-count { color: var(--text); text-shadow: none; }
.collection-go { position: absolute; right: 16px; top: 16px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--text); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.list-head { margin-top: 8px; }
.collection-intro { margin: -4px 0 20px; max-width: 900px; }
.lead { font-size: 17px; color: var(--muted); margin: 0 0 8px; }

/* Характеристики на фото карточки */
.card-chips { position: absolute; left: 8px; bottom: 18px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.card-chips span { background: rgba(28,28,30,.62); color: #fff; font-size: 11px; line-height: 1; padding: 5px 8px; border-radius: 12px; backdrop-filter: blur(4px); white-space: nowrap; }
.card-chips b { font-weight: 700; }

@media (max-width: 760px) {
  .collections { grid-template-columns: 1fr; }
  .collection { aspect-ratio: auto; min-height: 140px; }
  .collection.has-image { aspect-ratio: 3 / 1; min-height: 0; }
  .collection-text b { font-size: 20px; }
  .card-chips span { font-size: 10px; padding: 4px 6px; }
}

/* --- Брендам --- */
.bp-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: 18px; padding: 40px; margin-top: 16px; }
.bp-hero h1 { font-size: 34px; line-height: 1.12; margin: 10px 0 12px; }
.bp-hero p { max-width: 620px; opacity: .88; margin: 0 0 20px; font-size: 16px; }
.bp-hero-art { opacity: .25; }
.bp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bp-formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bp-formats div { background: var(--bg-soft); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.bp-formats span { font-size: 14px; color: var(--muted); }
.bp-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 0; margin: 0 0 12px; }
.bp-steps li { counter-increment: s; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.bp-steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.bp-steps span { font-size: 14px; color: var(--muted); }
.bp-form-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 24px; background: var(--bg-soft); border-radius: 16px; padding: 28px; }
.bp-form-wrap h2 { margin-top: 0; }
.bp-form { background: #fff; border-radius: 12px; padding: 20px; }
@media (max-width: 960px) {
  .bp-grid, .bp-formats, .bp-steps { grid-template-columns: 1fr 1fr; }
  .bp-form-wrap { grid-template-columns: 1fr; }
  .bp-hero-art { display: none; }
}
@media (max-width: 640px) {
  .bp-grid, .bp-formats, .bp-steps { grid-template-columns: 1fr; }
  .bp-hero { padding: 24px 20px; }
  .bp-hero h1 { font-size: 24px; }
  .bp-form-wrap { padding: 16px; }
}

/* --- Подвал --- */
.footer { background: var(--text); color: #cfcfd4; margin-top: 40px; flex: none; padding: 32px 0 24px; font-size: 14px; }
.footer a { color: #fff; text-decoration: none; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.footer h4 { color: #fff; margin: 0 0 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; } .footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid #3a3a3e; margin-top: 24px; padding-top: 16px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* --- Окно 18+ (ТЗ п. 4.1): оверлей поверх уже загруженного контента --- */
.age-gate { position: fixed; inset: 0; background: rgba(20,20,22,.94); z-index: 100; display: flex; align-items: center; justify-content: center; padding: var(--gutter); }
.age-gate[hidden] { display: none; }
.age-gate-box { background: #fff; border-radius: 12px; padding: 32px 24px; max-width: 440px; width: 100%; text-align: center; }
.age-gate-box .badge-18 { font-size: 28px; line-height: 40px; padding: 0 12px; border-width: 3px; color: var(--brand); margin-bottom: 16px; }
.age-gate-box h2 { margin: 0 0 8px; }
.age-gate-actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
body.age-locked { overflow: hidden; }

/* --- Адаптив: от 360 px (ТЗ п. 6.5) --- */
.filters-toggle { display: none; }
@media (max-width: 960px) {
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; margin-bottom: 12px; }
  .filters.is-open { display: block; }
  .filters-toggle { display: inline-flex; }
  .product, .two-col, .account { grid-template-columns: 1fr; }
  .account-nav { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; }
}
@media (max-width: 640px) {
  h1 { font-size: 22px; }
  .header .container { flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-actions .label { display: none; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-body { padding: 8px; }
  .price { font-size: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .table-responsive { overflow-x: auto; }
  .hero h1 { font-size: 24px; }
}
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.page-article { margin-top: 16px; max-width: 980px; }
@media (max-width: 640px) {
  .catmenu-panel { padding: 10px; max-height: calc(100vh - 160px); overflow-y: auto; }
  .catmenu-grid { grid-template-columns: 1fr 1fr; }
  .catmenu-item { padding: 6px; gap: 8px; font-size: 13px; }
  .catmenu-item .cat-icon { width: 32px; height: 32px; }
  .catmenu-btn { padding: 7px 10px; }
}

/* --- Документы --- */
.docs { display: grid; gap: 10px; }
.doc { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.doc-icon { width: 44px; height: 44px; flex: none; border-radius: 10px; background: #fdeaea; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.doc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); }
.doc-note { margin-top: 2px; }
.doc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.product-docs { margin: 8px 0 24px; }
.doc-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.doc-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; text-decoration: none; font-size: 14px; }
.doc-chip:hover { border-color: var(--brand); color: var(--text); }
.doc-chip .icon { color: var(--brand); }
.doc-chip small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 640px) {
  .doc { flex-direction: column; }
  .doc-side { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; align-items: center; }
}

/* --- Бренды --- */
.brand-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-bottom: 8px; }
.brand-card { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; background: #fff; }
.brand-card:hover { border-color: var(--brand); color: var(--text); }
.brand-logo { width: 64px; height: 64px; flex: none; border-radius: 12px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-logo b { font-size: 22px; font-weight: 800; color: var(--brand); text-transform: uppercase; }
.brand-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.brand-info > b { font-size: 17px; }
.brand-note { font-size: 13px; color: var(--muted); }
.brand-go { color: var(--brand); }

/* --- Подсказки и поддержка --- */
.tip { display: flex; gap: 12px; align-items: flex-start; background: #f3f6fb; border: 1px solid #cfdbee; border-radius: 12px; padding: 12px 14px; margin: 12px 0 16px; font-size: 14px; color: #2b4a73; }
.tip[hidden] { display: none; }
.tip-icon { color: #2b4a73; flex: none; }
.tip-text { flex: 1; }
.tip-text a { color: inherit; }
.tip-close { border: 0; background: none; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .6; }
.tip-close:hover { opacity: 1; }
.support-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.support-form .field:last-of-type { margin-bottom: 8px; }
.ticket { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.ticket-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.ticket-message { margin: 8px 0 0; white-space: pre-line; }
.ticket-reply { margin-top: 10px; padding: 10px 12px; background: var(--bg-soft); border-radius: 10px; }
.ticket-reply p { margin: 6px 0 0; white-space: pre-line; }
.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0 8px; }
.help-step { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.help-num { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.help-step span:not(.help-num) { font-size: 14px; color: var(--muted); }
.help-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.help-table td:first-child { width: 280px; font-weight: 500; color: var(--text); }
@media (max-width: 960px) {
  .support-grid-2, .steps-grid, .help-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .support-grid-2, .steps-grid, .help-cards { grid-template-columns: 1fr; }
  .help-table td:first-child { width: auto; }
}

/* Страница знакомства на выставке: одна колонка, крупные поля для телефона */
.expo { max-width: 460px; margin: 24px auto 40px; }
.expo h1 { margin-bottom: 8px; }
.expo .lead { font-size: 1.05rem; margin-bottom: 20px; }
.expo-form .field { margin-bottom: 14px; }
.expo-form .input { font-size: 16px; min-height: 48px; }
.expo-form .check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; line-height: 1.4; }
.expo-form .check input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.expo-form .btn { min-height: 50px; font-size: 1rem; }
.expo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.expo-actions form { flex: 1 1 160px; }
.expo-actions .btn { width: 100%; }
.expo-event { margin-top: 24px; text-align: center; }

/* Памятка сотрудника у стенда: свёрнута, чтобы не мешать форме */
.expo-brief { margin: 0 0 20px; border: 1px solid var(--line, #e2e2e2); border-radius: 10px; background: var(--card, #fafafa); }
.expo-brief > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.expo-brief > summary::marker { color: var(--muted, #666); }
.expo-brief ol { margin: 0; padding: 0 16px 14px 32px; }
.expo-brief li { margin-bottom: 10px; line-height: 1.45; }
.expo-brief li:last-child { margin-bottom: 0; }
.account-contact { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); gap: 4px 16px; margin: 12px 0 16px; }
.account-contact dt { color: var(--muted, #666); }
.account-contact dd { margin: 0; }

@media (max-width: 520px) {
  .expo { margin-top: 12px; }
  .account-contact { grid-template-columns: 1fr; gap: 0; }
  .account-contact dd { margin-bottom: 8px; }
}
