:root {
  --primary: #d9342a;
  --primary-dark: #b22a21;
  --primary-soft: #fbeae7;
  --navy: #14171c;
  --navy-2: #22272f;
  --accent: #1f242b;
  --accent-dark: #14171c;
  --success: #1a9e4b;
  --danger: #d93025;
  --warning: #c77700;
  --bg: #f6f5f3;
  --surface: #ffffff;
  --border: #e7e3e0;
  --border-strong: #cfcac6;
  --text: #1b1c1f;
  --muted: #6b6f76;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 28, .05), 0 1px 3px rgba(20, 23, 28, .06);
  --shadow: 0 4px 16px rgba(20, 23, 28, .08);
  --shadow-lg: 0 16px 48px rgba(20, 23, 28, .18);
  --ring: 0 0 0 3px rgba(217, 52, 42, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }

input, select, textarea {
  font-family: inherit; font-size: 15px; padding: 11px 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 90px; }
label { font-weight: 600; font-size: 13px; color: var(--muted); display: block; margin: 0 0 5px; }

.container { max-width: 1220px; margin: 0 auto; padding: 0 22px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 11px; padding: 12px 20px; font-weight: 600; font-size: 15px;
  background: var(--primary); color: #fff; white-space: nowrap;
  transition: background .15s, transform .05s, box-shadow .15s, opacity .15s;
}
.btn:hover { background: var(--primary-dark); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn.ghost:hover { background: #f2f0ee; box-shadow: none; }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-dark); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b3261e; }
.btn.small { padding: 7px 13px; font-size: 13.5px; border-radius: 9px; }
.btn.block { width: 100%; }

/* ---------- Верхняя полоса ---------- */
.utilitybar { background: var(--navy); color: #b4b7bc; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.06); }
.utilitybar-inner { display: flex; align-items: center; gap: 22px; height: 36px; }
.utilitybar .u-item { display: inline-flex; align-items: center; gap: 6px; }
.utilitybar a:hover { color: #fff; }
.utilitybar .spacer { flex: 1; }
.utilitybar .u-note { color: #83878e; }

/* ---------- Шапка ---------- */
.header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand .logo { width: 40px; height: 40px; flex: 0 0 auto; display: block; }
.brand .brand-text { line-height: 1.1; white-space: nowrap; }
.brand .brand-name { font-weight: 800; font-size: 19px; letter-spacing: -.2px; color: var(--navy); font-family: "Segoe UI", system-ui, -apple-system, sans-serif; }
.brand .brand-tag { font-size: 12px; color: var(--muted); }
.header .search { flex: 1 1 560px; max-width: 900px; min-width: 380px; }
.search { position: relative; display: flex; align-items: center; }
.search input { padding: 11px 44px 11px 42px; border-radius: 11px; background: #f3f1ef; border: 1px solid transparent; }
.search input:focus { background: #fff; border-color: var(--primary); }
.search .s-icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search .s-clear { position: absolute; right: 10px; background: none; border: none; color: var(--muted); font-size: 18px; display: none; }
.search .s-clear.show { display: block; }
.header .spacer { flex: 1; }
.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.cart-btn {
  position: relative; display: flex; align-items: center; gap: 10px;
  background: var(--primary-soft); color: var(--primary-dark); border: 1px solid transparent;
  border-radius: 11px; padding: 10px 14px; font-weight: 600;
}
.cart-btn:hover { border-color: var(--primary); }
.cart-btn .c-icon { font-size: 20px; }
.cart-btn .c-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.cart-btn .c-total { font-weight: 800; font-size: 15px; }
.cart-btn .c-label { font-size: 11px; color: var(--muted); }
.cart-btn .badge {
  position: absolute; top: -7px; right: -7px; background: var(--primary); color: #fff;
  border-radius: 20px; min-width: 20px; height: 20px; padding: 0 6px; font-size: 12px;
  font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.phone-btn { display: flex; flex-direction: column; line-height: 1.2; align-items: flex-start; flex: 0 0 auto; white-space: nowrap; }
.phone-btn .p-num { font-weight: 800; font-size: 15px; color: var(--navy); }
.phone-btn .p-note { font-size: 11.5px; color: var(--muted); }

/* ---------- Поиск по артикулу (главный блок) ---------- */
.pricing-band {
  background: radial-gradient(120% 180% at 20% 0%, #2a3038 0%, var(--navy) 60%);
  color: #fff; padding: 22px 0 26px;
}
.pricing-head { margin-bottom: 14px; }
.pricing-title { font-size: 21px; font-weight: 800; letter-spacing: -.2px; }
.pricing-sub { font-size: 13.5px; color: #b9bec6; margin-top: 2px; }
.pricing-form {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end;
  background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow-lg);
}
.pricing-form .pf-field { min-width: 0; }
.pricing-form label { color: var(--muted); }
.pricing-form select, .pricing-form input { border-color: var(--border-strong); }
.pf-code input { font-size: 16px; font-weight: 600; }
.pf-btn { height: 46px; padding-left: 26px; padding-right: 26px; }
.pricing-hint { font-size: 12.5px; color: #b9bec6; margin-top: 10px; }
.pricing-hint code { background: rgba(255,255,255,.14); padding: 1px 6px; border-radius: 5px; font-family: Consolas, Menlo, monospace; }

/* ---------- Категории ---------- */
.catnav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 70px; z-index: 40; }
.catnav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.catnav-inner::-webkit-scrollbar { display: none; }
.catlink {
  flex: 0 0 auto; padding: 13px 16px; font-weight: 600; font-size: 14px; color: var(--muted);
  border-bottom: 3px solid transparent; background: none; border-top: none; border-left: none; border-right: none;
  transition: color .15s, border-color .15s;
}
.catlink:hover { color: var(--text); }
.catlink.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Преимущества ---------- */
.main-content { padding-bottom: 20px; }
.benefits { border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.benefits-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 20px 0; }
.benefit { display: flex; align-items: center; gap: 12px; }
.benefit .b-icon { width: 46px; height: 46px; border-radius: 11px; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; font-size: 21px; flex: 0 0 auto; }
.benefit .b-title { font-weight: 700; font-size: 14.5px; }
.benefit .b-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- Секции ---------- */
.section { padding: 24px 0 6px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-title { font-size: 23px; font-weight: 800; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; color: var(--navy); }
.section-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.section-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.sortbar { display: flex; align-items: center; gap: 10px; }
.sortbar label { margin: 0; font-size: 13.5px; }
.sortbar select { width: auto; padding: 9px 12px; font-size: 14px; font-weight: 600; }

/* ---------- Фильтры (щётки стеклоочистителя) ---------- */
.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin: 0 0 18px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.f-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.f-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; min-width: 60px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.2;
  transition: background .15s, border-color .15s, color .15s;
}
.chip b { color: var(--muted); font-weight: 600; font-size: 12px; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.active b { color: rgba(255, 255, 255, .78); }
.f-row-reset { gap: 12px; }
.f-hint { font-size: 12.5px; color: var(--muted); }
.f-reset {
  border: none; background: var(--primary-soft); color: var(--primary);
  border-radius: 999px; padding: 9px 15px; font-size: 13px; font-weight: 700;
  transition: background .15s;
}
.f-reset:hover { background: #f6dad6; }

/* ---------- Фильтры выдачи проценки ---------- */
.sr-filters { margin: 14px 0 18px; }
.sr-filters .f-label { min-width: 74px; }
.sr-in {
  border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--text);
  font-size: 14px; font-weight: 600; padding: 8px 10px;
}
.sr-in:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(217, 52, 42, .14); }
.sr-num { width: 104px; }
.sr-sort { width: auto; min-width: 220px; cursor: pointer; }
.sr-dash { color: var(--muted); font-weight: 700; }
.sr-gap { flex: 1 1 12px; }

/* ---------- Сетка товаров ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 18px; padding-bottom: 26px; }

/* ---------- Постраничный вывод ---------- */
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 4px 0 34px; }
.pager.hidden { display: none; }
.pg-info { margin-right: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.pg {
  min-width: 40px; height: 40px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 10px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.pg:hover:not(:disabled):not(.active) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.pg.active { background: var(--primary); border-color: var(--primary); color: #fff; cursor: default; }
.pg.nav { font-size: 20px; line-height: 1; padding: 0 8px; }
.pg:disabled { opacity: .45; cursor: not-allowed; }
.pg-dots { color: var(--muted); padding: 0 2px; user-select: none; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card .thumb { position: relative; aspect-ratio: 4 / 3; background: #f1efed; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .thumb img { transform: scale(1.05); }
.card .badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.badge-hit, .badge-sale { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 7px; color: #fff; letter-spacing: .2px; }
.badge-hit { background: var(--accent); }
.badge-sale { background: var(--danger); }
.card .fav {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: 1px solid var(--border); font-size: 16px;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.card .fav:hover { color: var(--danger); border-color: var(--danger); }
.card .stock-out {
  position: absolute; inset: 0; background: rgba(20,23,28,.62); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; letter-spacing: .3px;
}
.card .body { padding: 14px 15px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card .cat { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.card .name {
  font-weight: 700; font-size: 15px; line-height: 1.35; min-height: 41px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .name a:hover { color: var(--primary); }
.card .meta { color: var(--muted); font-size: 12.5px; }
.card .rating { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.card .price-row { margin-top: auto; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card .price { font-size: 20px; font-weight: 800; color: var(--navy); }
.card .price.onrequest, .detail .price.onrequest { font-size: 15px; font-weight: 700; color: var(--muted); }
.card .old-price { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.card .stock-line { font-size: 12.5px; font-weight: 600; }
.stock-in { color: var(--success); }
.stock-low { color: var(--warning); }
.stock-none { color: var(--danger); }
.card .actions { display: flex; gap: 8px; }
.card .actions .btn { flex: 1; }
.card .actions .details { flex: 0 0 auto; padding: 10px 12px; font-size: 13px; white-space: nowrap; }
.card .spec-brief { font-size: 12.5px; color: var(--muted); margin: -2px 0 6px; letter-spacing: .1px; }
.card .quickview { width: 42px; flex: 0 0 auto; }

/* Звёзды */
.stars { position: relative; display: inline-block; font-size: 15px; line-height: 1; color: #d7d9dd; letter-spacing: 1px; }
.stars .fill { position: absolute; top: 0; left: 0; white-space: nowrap; overflow: hidden; color: #f5a623; }

/* ---------- Модальные окна ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(20,23,28,.62); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 34px 16px;
  overflow-y: auto; opacity: 0; pointer-events: none; transition: opacity .2s; backdrop-filter: blur(2px);
}
.overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 580px;
  box-shadow: var(--shadow-lg); padding: 28px; animation: pop .2s ease; margin: auto 0;
}
@keyframes pop { from { transform: translateY(14px) scale(.985); opacity: .6; } to { transform: none; opacity: 1; } }
.modal.wide { max-width: 800px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { font-size: 21px; color: var(--navy); }
.close-x { background: #f2f0ee; border: none; font-size: 22px; color: var(--muted); line-height: 1; padding: 6px 10px; border-radius: 8px; }
.close-x:hover { color: var(--text); background: #e9e6e3; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- Детальная карточка ---------- */
.detail { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.detail .photo { background: #f1efed; border-radius: 13px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail .photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Просмотр фото ---------- */
.card .thumb img, #pdPhoto img { cursor: zoom-in; }
.overlay.lightbox { z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.overlay.lightbox img { max-width: min(92vw, 1100px); max-height: 86vh; width: auto; height: auto; object-fit: contain; border-radius: 14px; background: #fff; box-shadow: var(--shadow-lg); animation: pop .2s ease; }
.lightbox-close { position: fixed; top: 18px; right: 20px; z-index: 201; background: rgba(255,255,255,.94); }
.lightbox-cap { position: fixed; left: 0; right: 0; bottom: 20px; text-align: center; color: #e6e3e0; font-size: 14px; line-height: 1.4; padding: 0 20px; pointer-events: none; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.detail .info h2 { font-size: 21px; margin: 0 0 6px; line-height: 1.3; color: var(--navy); }
.detail .info .rating { margin: 4px 0 10px; }
.detail .info .meta { color: var(--muted); font-size: 14px; }
.detail .price-box { display: flex; align-items: baseline; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.detail .price { font-size: 30px; font-weight: 800; color: var(--navy); }
.detail .old-price { font-size: 18px; color: var(--muted); text-decoration: line-through; }
.detail .discount { font-size: 14px; font-weight: 700; color: var(--danger); }
.detail .desc { color: #3a3d42; font-size: 14.5px; margin: 8px 0 14px; }
.specs { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin: 14px 0; font-size: 14px; }
.specs .spec { display: flex; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.specs .spec:last-child { border-bottom: none; }
.specs .spec:nth-child(odd) { background: #faf9f8; }
.specs .spec b { flex: 0 0 45%; color: var(--muted); font-weight: 600; }
.specs .spec span { flex: 1; overflow-wrap: anywhere; }
.qty { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.qty-box { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 11px; overflow: hidden; }
.qty-box button { width: 42px; height: 46px; border: none; background: #faf9f8; font-size: 20px; font-weight: 700; color: var(--text); }
.qty-box button:hover { background: #f1efed; }
.qty-box input { width: 56px; height: 46px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.stock-status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; }
.stock-status .s-dot { width: 9px; height: 9px; border-radius: 50%; }

/* ---------- Корзина ---------- */
.cart-lines { display: flex; flex-direction: column; gap: 12px; max-height: 46vh; overflow-y: auto; margin: 16px 0; padding-right: 4px; }
.cart-line { display: flex; align-items: center; gap: 13px; border: 1px solid var(--border); border-radius: 12px; padding: 11px; }
.cart-line img { width: 62px; height: 62px; object-fit: cover; border-radius: 9px; background: #f1efed; flex: 0 0 auto; }
.cart-line .info { flex: 1; min-width: 0; }
.cart-line .info .n { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-line .info .p { color: var(--muted); font-size: 13px; }
.cart-line .qty-mini { display: flex; align-items: center; gap: 4px; }
.cart-line .qty-mini button { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border); background: #fff; font-weight: 700; }
.cart-line .qty-mini input { width: 42px; text-align: center; padding: 5px; font-size: 14px; }
.cart-line .sum { font-weight: 800; min-width: 82px; text-align: right; font-size: 15px; }
.cart-line .rm { background: none; border: none; color: var(--muted); font-size: 20px; padding: 4px; }
.cart-line .rm:hover { color: var(--danger); }
.cart-total { display: flex; align-items: center; justify-content: space-between; font-size: 18px; font-weight: 800; border-top: 1px solid var(--border); padding-top: 15px; }
.cart-total .total-num { font-size: 22px; color: var(--primary-dark); }
.cart-total .total-count { font-size: 13px; color: var(--muted); font-weight: 500; display: block; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty .big { font-size: 52px; }
.empty h4 { color: var(--text); margin: 8px 0 4px; }

/* ---------- Уведомления ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 140%); z-index: 300;
  background: var(--navy); color: #fff; padding: 14px 22px; border-radius: 12px;
  font-weight: 600; box-shadow: var(--shadow-lg); max-width: 90vw; font-size: 14.5px;
  transition: transform .28s cubic-bezier(.2,.8,.3,1); display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translate(-50%, 0); }
.toast.ok { background: var(--success); }
.toast.err { background: var(--danger); }

/* ---------- Футер ---------- */
.footer { background: var(--navy); color: #b4b7bc; padding: 44px 0 24px; margin-top: 28px; }
.footer .grid4 { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
.footer h4 { color: #fff; margin: 0 0 14px; font-size: 15px; }
.footer .f-brand { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer .f-logo { border-radius: 7px; flex: 0 0 auto; }
.footer p, .footer a { color: #9a9ea5; font-size: 14px; margin: 6px 0; display: block; }
.footer a:hover { color: #fff; }
.footer .f-col ul { list-style: none; padding: 0; margin: 0; }
.footer .f-col li { margin: 6px 0; }
.pay-methods { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pay-methods span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 5px 11px; font-size: 12.5px; font-weight: 700; color: #d8dade; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 30px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #83878e; }

/* ---------- Результаты поиска по артикулу (Mikado/Rossko) ---------- */
.mk-loading { padding: 24px; text-align: center; color: #d8dade; }
.mk-summary { font-size: 13.5px; color: #c7cad0; margin-top: 14px; padding: 10px 14px; background: rgba(255,255,255,.08); border-radius: 9px; }
.mk-summary b { color: #fff; }
.mk-group { margin-top: 16px; }
.mk-group-title { font-weight: 800; font-size: 15px; margin-bottom: 9px; display: flex; align-items: center; gap: 8px; color: #fff; }
.mk-count { background: var(--primary); color: #fff; border-radius: 20px; padding: 1px 9px; font-size: 12.5px; font-weight: 700; }
.mk-list { display: flex; flex-direction: column; gap: 10px; }
.mk-row { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: #fff; }
.mk-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.mk-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 9px; background: #f1efed; flex: 0 0 auto; }
.mk-row .mk-main { flex: 1; min-width: 0; }
.mk-name { font-weight: 600; font-size: 14px; color: #2b2f36; line-height: 1.35; }
.mk-name.mk-desc { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.mk-spec { display: grid; grid-template-columns: 148px minmax(0, auto) 1fr; align-items: center; gap: 4px 12px; margin-top: 7px; }
.mk-brand { font-weight: 800; font-size: 13.5px; letter-spacing: .01em; text-transform: uppercase; color: #14171c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-code { justify-self: start; font-family: Consolas, Menlo, monospace; font-size: 15px; font-weight: 700; color: #b22a21; background: #f7ecea; border-radius: 5px; padding: 3px 10px; white-space: nowrap; }
.mk-type { justify-self: end; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.mk-type .mk-match { margin-left: 8px; color: var(--success); }
.mk-match { color: var(--success); font-weight: 700; }
@media (max-width: 700px) {
  .mk-spec { grid-template-columns: 1fr auto; }
  .mk-brand { grid-column: 1 / -1; }
  .mk-type { justify-self: start; grid-column: 1 / -1; }
}
.mk-stocks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.mk-stock { background: #f2f0ee; border-radius: 7px; padding: 3px 9px; font-size: 12.5px; color: #3a3d42; }
.mk-stock b { color: var(--success); }
.mk-wh { background: #e6f6ec; color: #157347; border: 1px solid #bfe6cd; font-weight: 600; }
.mk-term { background: #f2f0ee; color: #4a4e55; border: 1px solid #ded9d5; font-weight: 700; }
.mk-term b { color: #2b2f36; }
.mk-term-fast { background: #e6f6ec; color: #157347; border-color: #bfe6cd; }
.mk-term-fast b { color: #12643c; }
.mk-price { font-size: 18px; font-weight: 800; white-space: nowrap; color: var(--navy); }
.wh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wh-chip { border: 1px solid var(--border); background: #fff; color: #3a3d42; border-radius: 8px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; transition: border-color .15s, background .15s, color .15s; line-height: 1.35; }
.wh-chip b { color: var(--navy); }
.wh-chip:hover { border-color: var(--primary); color: var(--primary); }
.wh-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.wh-chip.active b { color: #fff; }
.wh-more { font-size: 12px; color: var(--muted); align-self: center; }
.mk-detail { margin-top: 14px; background: #fff; border-radius: 13px; padding: 18px; }
.mk-detail-head { display: flex; gap: 16px; align-items: flex-start; margin-top: 10px; }
.mk-detail-photo { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; background: #f1efed; flex: 0 0 auto; }
.mk-detail-title { flex: 1; min-width: 0; }
.mk-detail-title h3 { margin-top: 0; color: var(--navy); }
.mk-detail-sub { font-weight: 800; font-size: 14px; margin: 16px 0 8px; color: var(--navy); }
.mk-prices { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.mk-price-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; }
.mk-pl-price { font-size: 17px; font-weight: 800; color: var(--primary-dark); }
.mk-pl-meta { color: var(--muted); font-size: 13px; }
.mk-warn { background: #fdf3e0; color: #8a5a00; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-top: 10px; }
.mk-dims { background: var(--primary-soft); border: 1px solid #f0cdc9; border-radius: 10px; padding: 10px 14px; margin: 10px 0 4px; font-size: 14.5px; }
.mk-dims b { color: var(--primary-dark); }
.mk-dims-none { background: #faf9f8; border-color: var(--border); color: var(--muted); }
.mk-dims-none b { color: var(--muted); }

/* ---------- Админка ---------- */
.admin-wrap { min-height: 100vh; background: var(--bg); }
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(120% 140% at 50% 0%, #2a3038 0%, var(--navy) 70%); }
.login-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 36px; width: 100%; max-width: 400px; }
.login-card .login-logo { width: 54px; height: 54px; margin-bottom: 14px; }
.login-card h2 { margin: 0 0 4px; font-size: 22px; color: var(--navy); }
.login-card .sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }

.admin-header { background: var(--navy); color: #fff; }
.admin-header-inner { display: flex; align-items: center; gap: 14px; height: 62px; }
.admin-header .title { font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; gap: 8px; }
.admin-header .admin-logo { border-radius: 6px; flex: 0 0 auto; }
.admin-header .spacer { flex: 1; }
.admin-header .user { color: #cfcac6; font-size: 14px; }
.admin-header .btn.ghost { color: #e4e6e9; border-color: rgba(255,255,255,.2); }
.admin-header .btn.ghost:hover { background: rgba(255,255,255,.1); }

.admin-nav { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.admin-nav-inner { display: flex; gap: 4px; }
.nav-tab { padding: 14px 20px; font-weight: 600; font-size: 14.5px; color: var(--muted); border-bottom: 3px solid transparent; background: none; border-top: none; border-left: none; border-right: none; }
.nav-tab:hover { color: var(--text); }
.nav-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.admin-body { max-width: 1220px; margin: 0 auto; padding: 26px 22px 60px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.panel-head h2 { margin: 0; font-size: 19px; color: var(--navy); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar select, .toolbar input { width: auto; }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #faf9f8; }
.t-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 9px; background: #f1efed; }
.row-actions { display: flex; gap: 6px; }
.tag { display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 700; }
.tag.new { background: #edeef0; color: #3a3d42; }
.tag.processing { background: #fdf3e0; color: #8a5a00; }
.tag.completed { background: #e6f6ec; color: #157347; }
.tag.cancelled { background: #f6d9d5; color: #8e2318; }
.tag.hit { background: #fbeae7; color: #b22a21; }

.cat-editor { display: flex; gap: 8px; margin-bottom: 12px; }
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-item { display: inline-flex; align-items: center; gap: 6px; background: #f2f0ee; border-radius: 20px; padding: 6px 11px; font-size: 13.5px; }
.cat-item button { background: none; border: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 2px; }
.cat-item button:hover { color: var(--danger); }

.order-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.order-card .oc-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.order-card .oc-id { font-weight: 800; font-size: 16px; }
.order-card .oc-date { color: var(--muted); font-size: 13px; }
.order-card .oc-customer { font-size: 14px; margin-bottom: 8px; }
.order-card .oc-items { font-size: 13.5px; color: #3a3d42; margin-bottom: 8px; }
.order-card .oc-total { font-weight: 800; font-size: 16px; }
.order-card .oc-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 17px; box-shadow: var(--shadow-sm); }
.stat .v { font-size: 27px; font-weight: 800; color: var(--navy); }
.stat .l { color: var(--muted); font-size: 13px; }

.checkbox { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); cursor: pointer; }
.checkbox input { width: auto; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }

/* ---------- Адаптивность ---------- */
@media (max-width: 980px) {
  .benefits-inner { grid-template-columns: repeat(2, 1fr); }
  .footer .grid4 { grid-template-columns: 1fr 1fr; }
  .detail { grid-template-columns: 1fr; }
  .header .search { display: none; }
  .pricing-form { grid-template-columns: 1fr auto; }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .benefits-inner { grid-template-columns: 1fr; }
  .cart-btn .c-meta { display: none; }
  .utilitybar .u-note { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .footer .grid4 { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
  .pricing-form { grid-template-columns: 1fr; }
  .mk-row { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------------------
   Юридические страницы (политика конфиденциальности, гарантии и возврат)
   --------------------------------------------------------------------------- */
.legal { padding: 32px 0 56px; }
.legal-inner { max-width: 940px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 34px 44px 40px; }
.legal h1 { font-size: 30px; line-height: 1.25; margin: 0 0 6px; }
.legal-date { color: var(--muted); font-size: 14px; margin: 0 0 26px; }
.legal h2 { font-size: 19px; line-height: 1.35; margin: 32px 0 12px; padding-top: 4px; }
.legal p { margin: 0 0 12px; font-size: 15px; line-height: 1.65; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin: 0 0 6px; font-size: 15px; line-height: 1.6; }
.legal a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--primary); }
.legal-terms { margin: 0 0 14px; }
.legal-terms dt { font-weight: 700; margin: 14px 0 4px; font-size: 15px; }
.legal-terms dd { margin: 0; font-size: 15px; line-height: 1.6; }
.legal-note { background: var(--primary-soft); border: 1px solid #f3cdc7; border-left: 4px solid var(--primary); border-radius: 12px; padding: 16px 20px 8px; margin: 0 0 26px; }
.legal-note > b { display: block; font-size: 15px; margin: 0 0 10px; color: var(--primary-dark); }
.legal-note ul { margin: 0 0 10px; padding-left: 20px; }
.legal-note li { font-size: 14.5px; }

@media (max-width: 720px) {
  .legal { padding: 18px 0 40px; }
  .legal-inner { padding: 22px 18px 28px; border-radius: 10px; }
  .legal h1 { font-size: 24px; }
  .legal h2 { font-size: 17px; }
}

.checkout-consent { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.checkout-consent a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Плашка согласия с политикой ---------- */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 0 16px 16px; pointer-events: none; }
.cookie-inner {
  pointer-events: auto; max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 22px;
  background: var(--navy); color: #e9eaec; border-radius: 16px; padding: 18px 22px;
  box-shadow: 0 18px 44px rgba(20, 23, 28, .34); border: 1px solid rgba(255, 255, 255, .08);
  animation: cookieUp .28s ease-out;
}
@keyframes cookieUp { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.cookie-text { flex: 1 1 auto; font-size: 13.5px; line-height: 1.55; color: #c9ccd1; }
.cookie-text b { color: #fff; font-weight: 700; }
.cookie-text a { color: #ff9d94; text-decoration: underline; text-underline-offset: 2px; }
.cookie-text a:hover { color: #fff; }
.cookie-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; }
.cookie-more { font-size: 13px; color: #b4b7bc; text-decoration: none; border-bottom: 1px dashed rgba(255, 255, 255, .28); padding-bottom: 1px; white-space: nowrap; }
.cookie-more:hover { color: #fff; border-bottom-color: #fff; }
.cookie-actions .btn.accent { padding: 11px 22px; white-space: nowrap; }
.cookie-bar.closing .cookie-inner { animation: cookieDown .22s ease-in forwards; }
@keyframes cookieDown { to { transform: translateY(14px); opacity: 0; } }
body.with-cookie { padding-bottom: 96px; }
@media (max-width: 760px) {
  .cookie-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 18px; }
  .cookie-actions { justify-content: space-between; }
  .cookie-actions .btn.accent { flex: 1 1 auto; }
  body.with-cookie { padding-bottom: 150px; }
}

/* --- Админка: наличие и счётчик фильтра --- */
.toolbar-info { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
tr.row-out td { background: #fdf3f2; }
tr.row-out td:first-child { box-shadow: inset 3px 0 0 #d9342a; }
.stock-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.stock-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.stock-track {
  position: relative; width: 38px; height: 21px; border-radius: 999px;
  background: #cfcac6; transition: background .18s ease; flex: 0 0 auto;
}
.stock-dot {
  position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(20, 23, 28, .28); transition: transform .18s ease;
}
.stock-toggle input:checked + .stock-track { background: #1a9e4b; }
.stock-toggle input:checked + .stock-track .stock-dot { transform: translateX(17px); }
.stock-toggle input:focus-visible + .stock-track { outline: 2px solid var(--ring); outline-offset: 2px; }
.stock-label { font-size: 12.5px; color: var(--muted); min-width: 24px; }
.stock-toggle input:checked ~ .stock-label { color: #1a9e4b; }
