/* Kupident — Visual clone of old kupident.ru (Bitrix Universe S1)
   Core tokens & base styles — Gilroy font, #404040 palette, 1384px container
*/

/* =====================================================================
   === FONT-FACE: Gilroy
   ===================================================================== */
@font-face { font-family: 'Gilroy'; font-weight: 300; font-style: normal; src: url('/assets/fonts/gilroy/gilroy-light.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Gilroy'; font-weight: 400; font-style: normal; src: url('/assets/fonts/gilroy/gilroy-regular.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Gilroy'; font-weight: 500; font-style: normal; src: url('/assets/fonts/gilroy/gilroy-medium.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Gilroy'; font-weight: 600; font-style: normal; src: url('/assets/fonts/gilroy/gilroy-semibold.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Gilroy'; font-weight: 700; font-style: normal; src: url('/assets/fonts/gilroy/gilroy-bold.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'Gilroy'; font-weight: 800; font-style: normal; src: url('/assets/fonts/gilroy/gilroy-extrabold.woff') format('woff'); font-display: swap; }

/* =====================================================================
   === TOKENS
   ===================================================================== */
:root {
  --bg: #f8f9fb;
  --surface: #FFFFFF;
  --surface-2: #f5f5f5;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --border: #e5e5e5;
  --primary: #404040;
  --primary-hover: #5a5a5a;
  --primary-dark: #272727;
  --primary-600: #272727;
  --primary-50: #f5f5f5;
  --accent: #0065ff;
  --success: #0f5132;
  --warning: #F59E0B;
  --danger: #EF4444;
  --shadow: 0 4px 20px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.04);
  --radius-xl: 12px;
  --radius-lg: 6px;
  --radius-md: 4px;
  --radius-sm: 3px;
  --ring: 0 0 0 3px rgba(64,64,64,.15);
  --container: 1384px;
  --gutter: 20px;
  --font-body: Gilroy, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-display: Gilroy, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
}

/* Контейнер: gutter 12px на узких экранах */
@media (max-width: 480px) {
  :root { --gutter: 12px; }
}

/* =====================================================================
   === RESET & BASE
   ===================================================================== */
* { box-sizing: border-box }
html { overflow-x: hidden; }
html, body { height: 100% }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none }
a:hover { text-decoration: none }
img { max-width: 100%; height: auto; display: block }
button, input, select, textarea { font: inherit; color: inherit }
::selection { background: rgba(64,64,64,.15) }

/* Mobile: prevent page horizontal overflow */
@media (max-width: 980px) {
  html, body { overflow-x: hidden }
}

main { overflow-x: clip; }

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin: 0 auto;
}

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

.hr { height: 1px; background: var(--border); border: 0; margin: 0 }

/* =====================================================================
   === TYPOGRAPHY
   ===================================================================== */
.h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 0;
}
.h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; font-weight: 800 }
.h2 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.2; font-weight: 700 }
.h3 { font-size: 18px; line-height: 1.3; font-weight: 700 }
.h4 { font-size: 16px; line-height: 1.3; font-weight: 600 }
.p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 15px }
.small { font-size: 13px; color: var(--muted); line-height: 1.5 }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace }

/* =====================================================================
   === LAYOUT HELPERS
   ===================================================================== */
.stack { display: flex; flex-direction: column; gap: var(--space-4) }
.row { display: flex; gap: var(--space-4); align-items: center }
.wrap { flex-wrap: wrap }
.space-between { justify-content: space-between }
.center { align-items: center }
.grid { display: grid; gap: var(--space-4) }
.grid-1 { grid-template-columns: repeat(1, minmax(0,1fr)) }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)) }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)) }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)) }

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)) }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)) }
  .grid-2 { grid-template-columns: repeat(1, minmax(0,1fr)) }
}
@media (max-width: 600px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(1, minmax(0,1fr)) }
}

/* Spacing utilities */
.mt-1 { margin-top: 4px }  .mt-2 { margin-top: 8px }
.mt-3 { margin-top: 12px } .mt-4 { margin-top: 16px }
.mt-5 { margin-top: 20px } .mt-6 { margin-top: 24px }
.gap-2 { gap: 8px }  .gap-3 { gap: 12px }
.gap-4 { gap: 16px } .gap-5 { gap: 20px }

/* =====================================================================
   === CARD
   ===================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.card.pad { padding: var(--space-6) }
.card.pad-sm { padding: var(--space-4) }
.card-soft { background: rgba(255,255,255,.75); padding: var(--space-4); }

@media (max-width: 520px) {
  .card.pad { padding: var(--space-4) }
}

/* =====================================================================
   === PILL / BADGE
   ===================================================================== */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(255,255,255,.6);
  backdrop-filter: saturate(1.1) blur(8px);
}
.pill--active {
  border-color: rgba(64,64,64,.35);
  color: var(--primary);
  background: rgba(64,64,64,.07);
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}
.badge-ok    { background: rgba(22,163,74,.12);  color: #166534;  border-color: rgba(22,163,74,.18) }
.badge-warn  { background: rgba(245,158,11,.14); color: #92400E;  border-color: rgba(245,158,11,.2) }
.badge-bad   { background: rgba(239,68,68,.12);  color: #991B1B;  border-color: rgba(239,68,68,.16) }
.badge-info  { background: rgba(64,64,64,.08);  color: var(--primary); border-color: rgba(64,64,64,.15) }
.badge-ghost { background: rgba(2,6,23,.04);     color: var(--text);    border-color: rgba(2,6,23,.06) }
.badge-green { background: #eaf7ef; border-color: #bfe6cd; color: #1f7a3c }
.badge-amber { background: #fff3e6; border-color: #f2d3b0; color: #9a4a13 }

/* =====================================================================
   === BUTTONS
   Touch-target min 44px (Apple HIG / Google Material)
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 12px 16px;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
  user-select: none;
}
.btn:active  { transform: translateY(1px) }
.btn:focus   { outline: none; box-shadow: var(--ring) }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none }

.btn-primary   { background: var(--primary); color: #fff }
.btn-primary:hover { background: var(--primary-600) }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text) }
.btn-secondary:hover { border-color: #cbd5e1; background: #fff }
.btn-soft      { background: var(--primary-50); color: var(--primary); border-color: rgba(64,64,64,.12) }
.btn-soft:hover { background: rgba(64,64,64,.08) }
.btn-danger    { background: #991b1b; color: #fff; border-color: #991b1b }
.btn-ghost     { background: transparent; border-color: transparent; color: var(--text) }
.btn-ghost:hover { background: rgba(2,6,23,.04); border-color: rgba(2,6,23,.06) }

/* "В корзине" — тёмно-зелёный */
.btn-in-cart {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
  font-weight: 800;
}
.btn-in-cart:hover { background: #166534; border-color: #166534 }

/* "1 клик" — тёмный акцент */
.btn-oneclick {
  background: var(--surface);
  border-color: #1a1a1a;
  color: #1a1a1a;
  font-weight: 800;
}
.btn-oneclick:hover { background: #f5f5f5; border-color: #404040 }

.btn-sm    { padding: 9px 12px; border-radius: 4px; font-size: 14px; min-height: 36px }
.btn-lg    { padding: 14px 18px; border-radius: 6px; font-size: 15px }
.btn-block { width: 100% }

/* =====================================================================
   === FORMS
   font-size 16px на мобиле предотвращает zoom на iOS
   ===================================================================== */
.input, .select, .textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.textarea { min-height: 120px; resize: vertical }
.input:focus, .select:focus, .textarea:focus {
  box-shadow: var(--ring);
  border-color: rgba(64,64,64,.5);
}
.label  { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: block }
.field  { display: flex; flex-direction: column; gap: 8px }
.help   { font-size: 12px; color: var(--muted) }
.error  { font-size: 12px; color: #B91C1C }

/* iOS: предотвращаем zoom при фокусе */
@media (max-width: 767px) {
  .input, .select, .textarea { font-size: 16px; min-height: 44px }
  .label { font-size: 14px }
}

/* =====================================================================
   === ICON BTN
   ===================================================================== */
.icon-btn {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--border);
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.icon-btn:hover  { background: #fff; border-color: #cbd5e1 }
.icon-btn.active {
  background: rgba(64,64,64,.08);
  border-color: rgba(64,64,64,.35);
  color: var(--primary);
}
.icon { width: 18px; height: 18px; display: block }

@media (max-width: 520px) {
  .icon-btn { width: 40px; height: 40px; border-radius: 4px }
}

/* =====================================================================
   === HEADER (3-row: topbar + main + menu bar like old kupident.ru)
   ===================================================================== */

/* Row 1: Top panel (pixel-perfect) */
.topbar {
  background: #f8f9fb;
  border-bottom: 1px solid #e8e8e8;
  font-size: 13px; color: #666;
}
.topbar .container {
  padding: 8px 0;
  display: flex; gap: 40px; align-items: center; justify-content: space-between;
}
.topbar a { color: #555; text-decoration: none; transition: color .3s }
.topbar a:hover { color: #0065ff }
.topbar-left { display: flex; gap: 20px; align-items: center }
.topbar-right { display: flex; gap: 20px; align-items: center }
.topbar-social { display: flex; gap: 6px; align-items: center }
.topbar-social a {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: opacity .3s;
}
.topbar-social a:hover { opacity: .8 }
.topbar-social .social-vk { background: #4C75A3; color: #fff }
.topbar-social .social-ig { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff }
.topbar-social .social-wa { background: #25D366; color: #fff }
.topbar-social svg.icon { width: 14px; height: 14px }
.topbar-links { display: flex; gap: 20px; align-items: center }
.topbar-links a { font-weight: 500 }
.topbar-info { display: flex; gap: 20px; align-items: center }
.topbar-info-item { display: flex; align-items: center; gap: 5px; color: #666 }
.topbar-info svg { width: 13px; height: 13px; flex-shrink: 0; color: #0065ff }
.topbar-login { display: flex; gap: 6px; align-items: center; cursor: pointer; color: #555; font-weight: 600; transition: color .3s }
.topbar-login:hover { color: #0065ff }
.topbar-login svg { width: 15px; height: 15px }

/* Row 2: Main (pixel-perfect) */
.header-sticky {
  position: sticky; top: 0; z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.header {
  background: #fff;
  border-bottom: none;
}
.header-inner {
  position: relative; height: 85px;
  display: flex; gap: 10px; align-items: center;
}

.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto }
.brand-logo { height: auto; width: 191px; display: block; object-fit: contain }

.search {
  flex: 1; display: flex; align-items: center;
  border: none; border-radius: 10px; overflow: hidden;
  background: #f0f0f0;
  transition: background .2s, box-shadow .2s;
}
.search:focus-within {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(0,101,255,.2);
}
.search .input {
  border: 0; border-radius: 0; background: transparent;
  padding: 10px 16px; flex: 1; box-shadow: none;
  font-size: 14px; color: #1d1d1d;
}
.search .input::placeholder { color: #999 }
.search .input:focus { box-shadow: none; border-color: transparent }
.search .search-submit {
  background: transparent; border: 0; padding: 10px 14px;
  color: #0065ff; cursor: pointer; display: flex; align-items: center;
}
.search .search-submit:hover { color: #004acc }
.search .btn { display: none }
.search-btn { display: none }
.actions .search-btn { display: none }

.header-phone {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  flex: 0 0 auto; position: relative;
}
.header-phone-number {
  font-weight: 700; font-size: 14px; line-height: 20px;
  color: #1a1a1a; white-space: nowrap; text-decoration: none;
  transition: color .3s;
}
.header-phone-number:hover { color: #0065ff }
.header-phone-toggle {
  background: none; border: none; padding: 2px; cursor: pointer;
  color: #1a1a1a; display: inline-flex; align-items: center;
  transition: color .3s;
}
.header-phone-toggle:hover { color: #0065ff }
.header-phone-popup {
  position: absolute; top: 100%; right: 0; z-index: 50;
  background: #fff; border: 1px solid #e8e8e8; border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1); padding: 8px 0;
  min-width: 220px;
}
.header-phone-popup a {
  display: block; padding: 8px 14px;
  font-weight: 700; font-size: 15px; line-height: 1.3;
  color: #1a1a1a; text-decoration: none; white-space: nowrap;
  transition: background .2s;
}
.header-phone-popup a:hover { background: #f5f5f5 }
.header-callback {
  font-size: 12px; color: #0065ff; cursor: pointer; font-weight: 500;
  border-bottom: 1px dashed #0065ff; display: inline-block;
  line-height: 1.2; margin-top: 2px; transition: color .3s;
  width: 100%;
}
.header-callback:hover { color: #004acc; border-color: #004acc }
.actions { display: flex; gap: 10px; align-items: center; padding-left: 20px }
.actions .icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0; background: transparent; border: none;
  transition: color .3s; color: #1a1a1a; position: relative;
}
.actions .icon-btn:hover { color: #0065ff }
.actions .icon-btn.active { color: #0065ff }
.actions .icon { width: 20px; height: 20px; display: block }

.count {
  position: absolute; top: -4px; right: -6px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: #404040; color: #fff;
  border-radius: 9px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  pointer-events: none;
}

.header-account-btn {
  display: inline-flex; align-items: center; gap: 8px;
  width: auto; max-width: 200px; min-width: 0;
  padding: 6px 10px; flex: 0 0 auto;
}
.header-account-name {
  display: block; min-width: 0; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  background: rgba(64,64,64,.08); color: var(--primary);
  border: 1px solid var(--border);
}
.user-avatar__img      { width: 100%; height: 100%; object-fit: cover; display: block }
.user-avatar__fallback { font-weight: 800; font-size: 14px; line-height: 1 }
.user-avatar--sm  { width: 28px; height: 28px }
.user-avatar--sm .user-avatar__fallback { font-size: 11px }
.user-avatar--md  { width: 40px; height: 40px }
.user-avatar--lg  { width: 72px; height: 72px }
.user-avatar--xl  { width: 96px; height: 96px }

.actions .mobile-toggle { display: none }

/* Row 3: Menu bar */
.header-menu { background: #404040 }
.header-menu .container { display: flex; align-items: stretch }
.nav { display: flex; align-items: stretch }
.nav a {
  display: flex; align-items: center;
  padding: 12px 16px; color: #fff; font-weight: 600; font-size: 14px;
  white-space: nowrap; transition: background .15s;
  border-right: 1px solid rgba(255,255,255,.1);
}
.nav a:first-child { border-left: 1px solid rgba(255,255,255,.1) }
.nav a:hover { background: #008ffc }
.nav a.nav-catalog { background: rgba(255,255,255,.08); gap: 8px; font-weight: 700 }
.nav a.nav-catalog svg { width: 16px; height: 16px }


/* Mega dropdown для Каталог товаров */
.header-menu {
  position: relative;
}
.nav-catalog-wrap {
  position: static;
}
.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f5f5f5;
  border-top: 3px solid var(--primary-hover);
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .2s, visibility .2s, transform .2s;
  padding: 30px 0;
}
.nav-catalog-wrap:hover .mega-dropdown,
.mega-dropdown:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-dropdown-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.mega-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: #fff;
  border-radius: 6px;
  transition: box-shadow .2s;
}
.mega-cat:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.mega-cat-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 16px;
}
.mega-cat-img-placeholder {
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  border-radius: 6px;
  margin-bottom: 16px;
  color: #aaa;
}
.mega-cat-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.mega-cat:hover .mega-cat-name {
  color: var(--primary);
}

/* Простые дропдауны для пунктов меню */
.nav-item-wrap {
  position: relative;
}
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border-top: 3px solid var(--primary-hover);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  border-radius: 0 0 6px 6px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .2s, visibility .2s, transform .2s;
  padding: 8px 0;
}
.nav-item-wrap:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 10px 20px;
  color: var(--text) !important;
  font-size: 14px;
  font-weight: 500 !important;
  white-space: nowrap;
  border-right: none !important;
  border-left: none !important;
  transition: background .15s, color .15s;
}
.nav-dropdown a:hover {
  background: #f5f5f5 !important;
  color: var(--primary) !important;
}

@media (max-width: 720px) {
  .topbar { display: none }
  .header-menu { display: none }
  .search { display: none }
  .header-phone { display: none }
  .search-btn { display: inline-flex !important }
  .actions .mobile-toggle { display: inline-flex }
  .hide-mobile { display: none !important }
  .header-inner { height: 56px }
}

@media (max-width: 520px) {
  .header-sticky {
    position: sticky; top: 0; z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
  }
  .header { overflow-x: clip }
  .header .container { width: 100%; padding: 0 6px }
  .header-inner { gap: 0; height: 48px }
  .brand { flex: 0 0 auto; min-width: 0 }
  .brand-logo { max-width: 100px; height: 36px }
  /* All icons visible, compact sizing to fit 6 icons in a row */
  .actions { gap: 0; flex: 1 1 auto; justify-content: flex-end; align-items: center }
  .icon-btn { width: 36px; height: 36px; border: none; background: transparent; position: relative; align-self: center }
  .icon-btn .icon { width: 20px; height: 20px }
  .icon-btn .count { top: -3px; right: -4px; font-size: 8px; min-width: 13px; height: 13px; line-height: 13px; padding: 0 2px }
  /* Account avatar */
  .header-account-btn { padding: 2px; border-radius: 50%; width: 30px; height: 30px; justify-content: center; border: none; align-self: center }
  .header-account-name { display: none }
}

/* =====================================================================
   === DRAWER (мобильное меню)
   ===================================================================== */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(2,6,23,.42);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(92vw, 420px);
  background: var(--surface);
  border-left: 1px solid var(--border);
  transform: translateX(102%);
  transition: transform .22s ease;
  z-index: 90;
  display: flex; flex-direction: column;
}
.drawer.open              { transform: translateX(0) }
.drawer-backdrop.open     { opacity: 1; pointer-events: auto }
.drawer-head  { padding: 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border) }
.drawer-body  { padding: 16px; overflow: auto }
.drawer-nav   { display: flex; flex-direction: column; gap: 8px }
.drawer-nav a { padding: 12px 14px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; display: flex; align-items: center; gap: 10px }
.drawer-nav a .icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--muted) }
.drawer-nav-count { margin-left: auto; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 10px; padding: 0 6px }

.drawer .brand-logo { height: 40px; width: auto; flex: 0 0 auto }

/* =====================================================================
   === BREADCRUMBS
   ===================================================================== */
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 13px; color: var(--muted);
}
.breadcrumbs a   { color: var(--muted) }
.breadcrumbs .sep { opacity: .6 }

/* =====================================================================
   === HERO
   ===================================================================== */
.hero { padding: 28px 0 0 }
.hero-inner {
  display: grid; gap: var(--space-6);
  grid-template-columns: 1.25fr .75fr;
  align-items: stretch;
}
.hero-main {
  padding: var(--space-8);
  background: radial-gradient(120% 120% at 10% 10%, rgba(64,64,64,.06), rgba(64,64,64,.08));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden; position: relative;
}
.hero-main::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  right: -220px; top: -220px;
  background: radial-gradient(closest-side, rgba(64,64,64,.10), rgba(64,64,64,.0));
  filter: blur(1px); pointer-events: none;
}
.hero-aside { display: flex; flex-direction: column; gap: var(--space-4) }
.hero-box {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: var(--space-3); margin-top: var(--space-6);
}
.kpi {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.75);
}
.kpi-link {
  cursor: pointer; text-align: left; width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.75);
  padding: 12px 14px; border-radius: 6px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.kpi-link:hover  { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(2,6,23,.08); background: rgba(255,255,255,.92) }
.kpi-link:active { transform: translateY(0); box-shadow: none }
.kpi-link:focus  { outline: none; box-shadow: 0 0 0 4px rgba(64,64,64,.18) }
.kpi strong { font-family: var(--font-display); font-size: 16px }
.kpi span   { display: block; font-size: 12px; color: var(--muted); margin-top: 2px }

.hero-actions { width: 100% }

.quick-order-box { padding: 20px }
.quick-order-box > .p   { margin-top: 6px !important; font-size: 14px; line-height: 1.4 }
.quick-order-form        { gap: 10px }
.quick-order-box .field  { gap: 6px }
.quick-order-box .label  { margin-bottom: 4px }
.quick-order-box .input,
.quick-order-box .textarea { padding: 10px 12px; border-radius: 13px }
.quick-order-box .btn    { min-height: 42px; padding-top: 10px; padding-bottom: 10px }
.quick-order-textarea    { min-height: 90px !important }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr }
  .hero-main  { padding: var(--space-6) }
  .kpis       { grid-template-columns: 1fr }
}

@media (max-width: 760px) {
  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px; align-items: stretch;
  }
  .hero-actions .btn { width: 100%; min-width: 0; padding-left: 12px; padding-right: 12px; text-align: center }

  /* Скрываем блок "Быстрый заказ" на мобиле */
  .quick-order-box { display: none }

  .hits-subtitle { font-size: 14px; line-height: 1.35 }
}

@media (max-width: 520px) {
  .hero-actions { gap: 8px }
  .hero-actions .btn { font-size: 14px; padding-left: 10px; padding-right: 10px }
}

/* =====================================================================
   === SECTIONS
   ===================================================================== */
.section      { padding: 26px 0; background: #D5DEE8; position: relative; }
.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  width: 90%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(100,140,220,.35), transparent);
  border-radius: 1px;
}
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-4);
}
.section-head .p { max-width: 64ch }

/* Секция популярных категорий на главной */
.home-categories-section { padding: 40px 0; background: #D5DEE8; }
.home-categories-inner { }

.categories-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.categories-head .h2 { margin: 0 }
.categories-head__action {
  font-family: 'Manrope', var(--font-display);
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  color: var(--primary); white-space: nowrap;
  transition: color .2s, opacity .2s;
  position: relative;
  padding-bottom: 2px;
}
.categories-head__action::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--primary);
  transition: width .3s ease;
}
.categories-head__action:hover::after { width: 100% }
.categories-head__action:hover { opacity: .85 }
.home-hits-head__action { white-space: nowrap }


/* ===== Hero slider ===== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 560px;
  background-color: #0a0a0a;
  overflow: hidden;
}

/* Slide layer (image container) */
.hero-slider__slides {
  position: absolute;
  inset: 0;
}
.hero-slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  will-change: opacity;
}
.hero-slider__slide.is-active {
  opacity: 1;
  z-index: 1;
}
.hero-slider__slide.is-prev {
  opacity: 0;
  z-index: 0;
}

/* Ken Burns zoom effect on images */
.hero-slider__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  animation: none;
}
.hero-slider__slide.is-active .hero-slider__img {
  animation: heroKenBurns 8s ease-out forwards;
}
@keyframes heroKenBurns {
  0%   { transform: scale(1.00); }
  100% { transform: scale(1.08); }
}

/* Gradient overlay — disabled so background image is fully visible */
.hero-slider__fade {
  display: none;
}

/* Text content */
.hero-slider__content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 80px;
}
.hero-slider__text {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
  position: absolute;
  bottom: 80px;
  pointer-events: none;
}
.hero-slider__text.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
  bottom: auto;
}
.hero-slider__title {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  margin: 0 0 12px;
  max-width: 700px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7), 0 1px 3px rgba(0, 0, 0, .6);
  letter-spacing: -0.5px;
}
.hero-slider__subtitle {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  color: #ffffff;
  margin: 0 0 28px;
  max-width: 550px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7), 0 1px 3px rgba(0, 0, 0, .6);
}
.hero-slider__btn {
  display: inline-block;
  padding: 15px 36px;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 4px;
  transition: background .3s, border-color .3s, box-shadow .3s;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.hero-slider__btn:hover {
  background: rgba(255, 255, 255, .25);
  border-color: rgba(255, 255, 255, .55);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
}

/* Dots navigation */
.hero-slider__dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 10px;
}
.hero-slider__dot {
  width: 32px;
  height: 3px;
  border: none;
  border-radius: 2px;
  background: rgba(255, 255, 255, .35);
  cursor: pointer;
  padding: 20px 0;
  background-clip: content-box;
  transition: background .3s, width .3s;
}
.hero-slider__dot.is-active {
  background: #fff;
  background-clip: content-box;
  width: 48px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-slider { height: 420px; }
  .hero-slider__title { font-size: 34px; }
  .hero-slider__subtitle { font-size: 16px; }
  .hero-slider__content { padding-bottom: 60px; }
  .hero-slider__text { bottom: 60px; }
}
@media (max-width: 480px) {
  .hero-slider { height: 340px; }
  .hero-slider__title { font-size: 26px; max-width: 100%; }
  .hero-slider__subtitle { font-size: 14px; margin-bottom: 20px; }
  .hero-slider__btn { padding: 12px 24px; font-size: 12px; }
  .hero-slider__content { padding-bottom: 50px; }
  .hero-slider__text { bottom: 50px; }
}

/* ===== Floating sidebar ===== */
.floating-sidebar {
  position: fixed; right: 0; top: 180px; z-index: 100;
  display: flex; flex-direction: column;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: 52px;
  border-radius: 12px 0 0 12px;
  box-shadow: -2px 0 16px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.06);
  border-right: none;
  padding: 4px 0;
  gap: 2px;
}
.floating-sidebar__item {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 46px;
  color: #666; background: transparent;
  border: none; cursor: pointer; text-decoration: none;
  transition: color .25s, background .25s;
  position: relative;
  border-radius: 8px 0 0 8px;
}
.floating-sidebar__item:hover {
  color: #0065ff; background: rgba(0,101,255,.06);
}
.floating-sidebar__item svg {
  width: 18px; height: 18px;
  stroke: currentColor; stroke-width: 2;
  fill: none;
}
.floating-sidebar__count {
  position: absolute; top: 6px; right: 6px;
  background: #0065ff; color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px;
  border-radius: 8px; display: flex;
  align-items: center; justify-content: center;
  padding: 0 3px; line-height: 1;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .floating-sidebar { display: none }
}

/* ===== Flyout panels (sidebar popouts) ===== */
.flyout-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1050;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.flyout-backdrop.open {
  opacity: 1; visibility: visible;
}
.flyout-panel {
  position: fixed;
  top: 0; right: 0;
  width: 420px; max-width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 1060;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
}
.flyout-panel.open {
  transform: translateX(0);
}
.flyout-panel__header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
  min-height: 56px;
}
.flyout-panel__title {
  font-size: 16px; font-weight: 700;
  color: #333; white-space: nowrap;
}
.flyout-panel__subtitle {
  font-size: 14px; color: #999;
  white-space: nowrap;
}
.flyout-panel__clear {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
  background: none; border: none;
  font-size: 12px; color: #999;
  cursor: pointer; white-space: nowrap;
  padding: 4px 8px; border-radius: 4px;
  transition: color .2s, background .2s;
}
.flyout-panel__clear:hover {
  color: #e53935; background: rgba(229,57,53,.06);
}
.flyout-panel__clear svg {
  width: 8px; height: 8px;
}
.flyout-panel__close {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: none; border: none;
  cursor: pointer; color: #999;
  border-radius: 6px;
  transition: color .2s, background .2s;
  flex-shrink: 0;
}
.flyout-panel__close:hover {
  color: #333; background: #f5f5f5;
}
.flyout-panel__body {
  flex: 1; overflow-y: auto;
  padding: 0;
}
.flyout-panel__empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; padding: 40px 20px;
  color: #999; font-size: 14px;
}
.flyout-panel__footer {
  border-top: 1px solid #e8e8e8;
  padding: 16px 20px;
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.flyout-panel__coupon {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.flyout-panel__coupon-label {
  font-size: 12px;
  color: #777;
}
.flyout-panel__coupon-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.flyout-panel__coupon-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.flyout-panel__coupon-input:focus {
  border-color: #0065ff;
  box-shadow: 0 0 0 3px rgba(0,101,255,.12);
}
.flyout-panel__coupon-submit {
  width: 54px;
  min-width: 54px;
  min-height: 42px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f7f7f7;
  color: #333;
  font-weight: 700;
  cursor: pointer;
}
.flyout-panel__coupon-submit:hover {
  background: #efefef;
}
.flyout-panel__coupon-submit:disabled {
  opacity: .65;
  cursor: wait;
}
.flyout-panel__coupon-list,
.flyout-panel__coupon-statuses {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.flyout-panel__coupon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.flyout-panel__coupon-code {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  background: #f8f8f8;
  font-size: 12px;
  font-weight: 700;
}
.flyout-panel__coupon-remove {
  border: none;
  background: transparent;
  color: #999;
  font-size: 12px;
  cursor: pointer;
}
.flyout-panel__coupon-remove:hover {
  color: #e53935;
}
.flyout-panel__coupon-status {
  font-size: 12px;
  line-height: 1.35;
  color: #777;
}
.flyout-panel__coupon-status--applied {
  color: #14532d;
}
.flyout-panel__total {
  display: flex; align-items: baseline; gap: 8px;
}
.flyout-panel__total-label {
  font-size: 14px; color: #999;
}
.flyout-panel__total-value {
  font-size: 22px; font-weight: 700;
  color: #14532d;
}
.flyout-panel__btn-primary {
  display: block; text-align: center;
  padding: 12px 20px;
  background: #0065ff; color: #fff;
  border-radius: 6px; font-weight: 600;
  font-size: 14px; text-decoration: none;
  transition: background .2s;
}
.flyout-panel__btn-primary:hover {
  background: #0050d0;
}
.flyout-panel__btn-link {
  display: block; text-align: center;
  font-size: 13px; color: #0065ff;
  text-decoration: none;
  padding: 4px 0;
}
.flyout-panel__btn-link:hover {
  text-decoration: underline;
}

/* Account list create form */
.account-list-create {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start;
  margin-top: 16px;
}
.account-list-create .input { flex: 1 1 220px; min-width: 0; }

/* Flyout list tabs */
.flyout-list-tabs {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 16px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid #f1f5f9;
}
.flyout-list-tab {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  font-weight: 400;
  transition: all .15s;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flyout-list-tab:hover { border-color: #94a3b8; }
.flyout-list-tab.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

/* Flyout create list */
.flyout-panel__create-list {
  padding: 0 0 8px;
}
.flyout-panel__btn-create {
  display: block; width: 100%;
  text-align: center;
  padding: 8px 0;
  background: transparent;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.flyout-panel__btn-create:hover {
  background: #eff6ff;
  border-color: #2563eb;
}
.flyout-panel__create-form {
  display: flex; gap: 6px;
}
.flyout-panel__create-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.flyout-panel__create-input:focus {
  border-color: #2563eb;
}
.flyout-panel__create-submit {
  padding: 8px 14px;
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.flyout-panel__create-submit:hover {
  background: #1d4ed8;
}

/* Flyout item row */
.flyout-item {
  display: flex; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}
.flyout-item:last-child {
  border-bottom: none;
}
.flyout-item__img {
  flex-shrink: 0;
  width: 80px; height: 80px;
  border-radius: 4px;
  overflow: hidden;
  background: #fafafa;
}
.flyout-item__img img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.flyout-item__info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.flyout-item__name {
  font-size: 13px; font-weight: 600;
  color: #333; line-height: 1.3;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.flyout-item__name:hover {
  color: #0065ff;
}
.flyout-item__price {
  font-size: 15px; font-weight: 700;
  color: #333;
}
.flyout-item__qty {
  display: flex; align-items: center; gap: 0;
  margin-top: 2px;
}
.flyout-item__qty-btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid #ddd; background: #fff;
  cursor: pointer; font-size: 16px; color: #666;
  transition: background .15s;
  user-select: none;
}
.flyout-item__qty-btn:first-child {
  border-radius: 4px 0 0 4px;
}
.flyout-item__qty-btn:last-child {
  border-radius: 0 4px 4px 0;
}
.flyout-item__qty-btn:hover {
  background: #f5f5f5;
}
.flyout-item__qty-val {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 28px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-size: 13px; font-weight: 600;
  color: #333; background: #fff;
}
.flyout-item__fav {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: #e91e63;
  cursor: pointer; background: none; border: none;
  padding: 2px 0; margin-top: 2px;
}
.flyout-item__fav svg {
  width: 12px; height: 12px;
}
.flyout-item__remove {
  position: absolute; top: 10px; right: 14px;
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: none; border: none;
  cursor: pointer; color: #ccc;
  border-radius: 4px;
  transition: color .2s, background .2s;
}
.flyout-item__remove:hover {
  color: #e53935; background: rgba(229,57,53,.08);
}
.flyout-item__remove svg {
  width: 10px; height: 10px;
}

/* Flyout cart: item checkbox */
.flyout-item__check {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding-top: 28px;
}
.flyout-item__checkbox {
  width: 18px; height: 18px;
  cursor: pointer;
  accent-color: #1d4ed8;
}
.flyout-item--unchecked .flyout-item__img,
.flyout-item--unchecked .flyout-item__info {
  opacity: 0.45;
}
.flyout-panel__btn-primary--disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.flyout-panel__loading {
  display: flex; align-items: center; justify-content: center;
  padding: 40px; color: #999; font-size: 14px;
}

/* Lists flyout: bulk actions bar */
.flyout-actions-bar {
  display: flex; gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}
.flyout-actions-bar__btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  transition: all .2s;
  white-space: nowrap;
}
.flyout-actions-bar__btn svg {
  flex-shrink: 0;
}
.flyout-actions-bar__btn:hover {
  border-color: #bbb;
  color: #333;
  background: #f5f5f5;
}
.flyout-actions-bar__btn--cart {
  color: #2563eb;
  border-color: #2563eb;
}
.flyout-actions-bar__btn--cart:hover {
  background: #2563eb;
  color: #fff;
}
.flyout-actions-bar__btn--cart:hover svg path {
  stroke: #fff;
}
.flyout-actions-bar__btn--clear {
  color: #999;
}
.flyout-actions-bar__btn--clear:hover {
  color: #e53935;
  border-color: #e53935;
  background: rgba(229,57,53,.05);
}
.flyout-actions-bar__btn:disabled {
  opacity: .6;
  pointer-events: none;
}

/* Lists flyout: item action icons */
.flyout-item__actions {
  display: flex; align-items: center; gap: 4px;
  margin-top: 4px;
}
.flyout-item__action-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  color: #999;
  transition: all .2s;
  padding: 0;
}
.flyout-item__action-btn svg {
  width: 14px; height: 14px;
}
.flyout-item__action-btn:hover {
  color: #2563eb;
  border-color: #2563eb;
  background: rgba(37,99,235,.05);
}
.flyout-item__action-btn--loading {
  opacity: .5;
  pointer-events: none;
}
.flyout-item__action-btn--done {
  color: #16a34a;
  border-color: #16a34a;
  background: rgba(22,163,74,.08);
}
.flyout-item__action-btn:disabled {
  opacity: .5;
  pointer-events: none;
}

@media (max-width: 480px) {
  .flyout-panel { width: 100vw; }
}

.popular-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.popular-cat {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #ddd;
}
.popular-cat__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.popular-cat:hover .popular-cat__img,
.popular-cat:active .popular-cat__img { transform: scale(1.08) }
.popular-cat__placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #ccc 0%, #eee 100%);
  transition: transform .4s ease;
}
.popular-cat:hover .popular-cat__placeholder,
.popular-cat:active .popular-cat__placeholder { transform: scale(1.08) }
.popular-cat__name {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 20px 14px;
  background: linear-gradient(transparent 0%, rgba(0,0,0,.85) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0,0,0,.6), 0 0 12px rgba(0,0,0,.3);
}

@media (max-width: 768px) {
  .popular-cats { grid-template-columns: repeat(2, 1fr) }
}
@media (max-width: 520px) {
  .popular-cats { grid-template-columns: repeat(2, 1fr); gap: 10px }
  .popular-cat { aspect-ratio: 4 / 3 }
  .popular-cat__name { font-size: 13px; padding: 24px 12px 10px; letter-spacing: 0.01em }
}

@media (max-width: 760px) {
  .home-hits-section .section-head {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end;
  }
  .home-hits-head__action { align-self: end }
  .home-hits-section .hits-slider { gap: 12px }
}
@media (max-width: 520px) {
  .home-hits-section .section-head { grid-template-columns: 1fr auto }
}

/* =====================================================================
   === BITRIX CATALOG STRUCTURE (точная копия kupident.ru)
   ===================================================================== */

/* Intec grid system (clone) */
.intec-content { max-width: 1384px; margin: 0 auto; padding: 0 20px; box-sizing: border-box }
.intec-content-visible { display: block }
.intec-content-wrapper { width: 100% }
.intec-grid { display: flex }
.intec-grid-wrap { flex-wrap: wrap }
.intec-grid-nowrap { flex-wrap: nowrap }
.intec-grid-a-v-stretch { align-items: stretch }
.intec-grid-a-v-center { align-items: center }
.intec-grid-a-h-start { justify-content: flex-start }
.intec-grid-a-h-end { justify-content: flex-end }
.intec-grid-i-5 { gap: 5px }
.intec-grid-item { flex: 1 1 0 }
.intec-grid-item-auto { flex: 0 0 auto }
.intec-grid-item-1 { flex: 0 0 100%; max-width: 100% }
.intec-grid-item-2 { flex: 0 0 50%; max-width: 50% }
.intec-grid-item-4 { flex: 0 0 25%; max-width: 25% }
@media (max-width: 600px) { .intec-grid-item-600-1 { flex: 0 0 100%; max-width: 100% } }
@media (max-width: 600px) { .intec-grid-item-600-2 { flex: 0 0 50%; max-width: 50% } }
@media (max-width: 700px) { .intec-grid-item-700-2 { flex: 0 0 50%; max-width: 50% } }
@media (max-width: 720px) { .intec-grid-item-720-3 { flex: 0 0 33.333%; max-width: 33.333% } }
@media (max-width: 950px) { .intec-grid-item-950-2 { flex: 0 0 50%; max-width: 50% } }
@media (max-width: 1200px) { .intec-grid-item-1200-3 { flex: 0 0 33.333%; max-width: 33.333% } }
.intec-ui-picture { display: block; position: relative }
.intec-image-effect img { transition: opacity .35s }

/* Color classes (clone from old site) */
.intec-cl-text-hover:hover { color: #404040 !important }
.intec-cl-text { color: #404040 }
.intec-cl-text-light-hover:hover { color: #5a5a5a !important }
.intec-cl-border { border-color: #404040 }
.intec-cl-background { background-color: #404040; color: #fff }
.intec-cl-background-light-hover:hover { background-color: #5a5a5a; color: #fff }

/* Breadcrumbs (Bitrix style) */
.intec-template-breadcrumb {
  padding: 15px 0 5px;
}
.breadcrumb-wrapper { }
.breadcrumb-wrapper-2 { }

/* Page title (Bitrix style) */
.intec-template-title {
  padding: 0 0 20px;
}
.intec-template-title h1,
.intec-template-title #pagetitle {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.3;
  margin: 0;
  color: var(--text);
}
@media (max-width: 768px) {
  .intec-template-title h1,
  .intec-template-title #pagetitle { font-size: 20px }
}

/* Category title bar */
.category-title-bar { display: flex; align-items: baseline; justify-content: flex-start; gap: 16px; flex-wrap: nowrap }
.category-title-link { white-space: nowrap; font-size: 14px; font-weight: 600; color: #333; text-decoration: none; border-bottom: 1px dashed #999 }
@media (max-width: 600px) {
  .category-title-bar { gap: 10px }
  .category-title-link { font-size: 13px }
}

/* Page layout */
.intec-template-layout-page { padding-bottom: 40px }
.intec-template-layout-page-wrapper { }
.intec-template-layout-content { }
.catalog-wrapper { }
.catalog-wrapper-2 { }

/* =====================================================================
   === CATALOG ROOT (Корневой каталог — плитки категорий)
   ===================================================================== */
.catalog-section-list-items {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}
.catalog-section-list-item {
  padding: 8px;
  box-sizing: border-box;
}
.catalog-section-list-item-wrapper {
  display: block;
  background: #fff;
  border: 1px solid #e8e8e8;
  overflow: hidden;
  transition: box-shadow .35s;
  height: 100%;
  position: relative;
  cursor: pointer;
}
.catalog-section-list-item-wrapper:hover {
  box-shadow: 0 0 20px 0 rgba(0,0,0,.15);
}
.catalog-section-list-item-picture-container {
  overflow: hidden;
}
.catalog-section-list-item-picture {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f5f5f5;
}
.catalog-section-list-item-picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.catalog-section-list-item-wrapper:hover .catalog-section-list-item-picture img {
  transform: scale(1.03);
}
.catalog-section-list-item-text {
  padding: 15px 20px;
}
.catalog-section-list-item-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}
.catalog-section-list-item-name a {
  color: #1d1d1d;
  text-decoration: none;
  transition: color .35s;
}
.catalog-section-list-item-name a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.catalog-section-list-item-name a:hover {
  color: #404040;
}

/* =====================================================================
   === CATALOG CATEGORY PAGE (Страница категории с товарами)
   ===================================================================== */
.catalog-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  scroll-margin-top: 90px;
}

/* Левый сайдбар */
.catalog-content-left {
  flex: 0 0 260px;
  width: 260px;
  position: sticky;
  top: 88px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

/* Правая часть */
.catalog-content-right {
  flex: 1;
  min-width: 0;
}
.catalog-content-right-wrapper { }

/* Filter sidebar */
.catalog-filter {
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 15px;
  font-size: 14px;
}
.catalog-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8e8e8;
}
.catalog-filter-title {
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-display);
}
.catalog-filter-reset {
  font-size: 13px;
  color: #888;
  text-decoration: none;
  cursor: pointer;
}
.catalog-filter-reset:hover { color: #404040 }
.catalog-filter-section {
  border-top: 1px solid #e8e8e8;
  padding-top: 12px;
  margin-top: 12px;
}
.catalog-filter-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}
.catalog-filter-arrow {
  display: inline-flex;
  transition: transform .2s;
}
[data-accordion-item].open .catalog-filter-arrow { transform: rotate(180deg) }
.catalog-filter-section-body {
  display: none;
  padding: 10px 0 5px;
}
[data-accordion-item].open .catalog-filter-section-body { display: block }
.catalog-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.catalog-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #e8e8e8;
  background: #fafafa;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: border-color .2s, background .2s;
}
.catalog-filter-chip input { display: none }
.catalog-filter-chip.active {
  border-color: #404040;
  background: rgba(64,64,64,.15);
  color: #202020;
  font-weight: 600;
}
.catalog-filter-chip:hover {
  border-color: #ccc;
}
.catalog-filter-price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.catalog-filter-price-field label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}
.catalog-filter-price-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e8e8e8;
  font-size: 14px;
  box-sizing: border-box;
  background: #fff;
}
.catalog-filter-price-field input:focus {
  border-color: #404040;
  outline: none;
}
.catalog-filter-apply {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 15px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: background .2s;
}

/* Sort/view panel (Bitrix clone) */
.catalog-panel {
  margin-bottom: 15px;
}
.catalog-panel-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid #e8e8e8;
}
.catalog-panel-views { flex: 0 0 auto }
.catalog-panel-views-items {
  display: flex;
  gap: 5px;
}
.catalog-panel-views-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  color: #aaa;
  border: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.catalog-panel-views-item:hover { color: #404040 }
.catalog-panel-views-item.active {
  color: #404040;
  border-color: #e8e8e8;
}
.catalog-panel-sort {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}
.catalog-panel-sort form { margin: 0 }
.catalog-panel-sort-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
}
.catalog-panel-sort-icon {
  display: flex;
  color: #aaa;
}
.catalog-panel-sort-text {
  font-size: 14px;
  color: #888;
  white-space: nowrap;
}
.catalog-panel-sort-select {
  border: 1px solid #e8e8e8;
  padding: 6px 10px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  min-width: 180px;
}
.catalog-panel-sort-select:focus { border-color: #404040; outline: none }

.catalog-panel-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #e8e8e8;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

/* Result count */
.catalog-result-count {
  font-size: 13px;
  color: #888;
  margin-bottom: 15px;
}
.catalog-result-count b { color: #1d1d1d }

/* =====================================================================
   === PRODUCT CARD — минималистичный элегантный дизайн
   ===================================================================== */
.catalog-section-item {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.catalog-section-item-wrapper {
  position: relative;
  border: none;
  border-radius: 14px;
  background: #fff;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow .3s ease, transform .3s ease;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.catalog-section-item-wrapper:hover {
  z-index: 2;
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.catalog-section-item-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Image */
.catalog-section-item-image {
  display: block;
  position: relative;
  background: #f5f5f7;
  overflow: hidden;
  border-radius: 14px 14px 0 0;
}
.catalog-section-item-image-items {
  display: block;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}
.catalog-section-item-image-look {
  width: 100%;
  height: 100%;
}
.catalog-section-item-image-look img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f5f5f7;
  transition: transform .4s ease;
}
.catalog-section-item-wrapper:hover .catalog-section-item-image-look img {
  transform: scale(1.03);
}

/* Action button (favorite) */
.catalog-section-item-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
  opacity: 0;
  transition: opacity .25s ease;
}
.catalog-section-item-actions form { margin: 0 }
.catalog-section-item-wrapper:hover .catalog-section-item-actions {
  opacity: 1;
}
.catalog-section-item-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #999;
  cursor: pointer;
  transition: color .2s, background .2s, transform .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.catalog-section-item-action-btn:hover {
  color: #e74c3c;
  background: #fff;
  transform: scale(1.1);
}
.catalog-section-item-action-btn.active {
  color: #e74c3c;
  background: #fff;
}
.catalog-section-item-action-btn.active svg {
  fill: #e74c3c;
}
.catalog-section-item-action-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}
@media (max-width: 720px) {
  .catalog-section-item-actions { opacity: 1 }
}

/* Stock badge */
.catalog-section-item-quantity-wrap {
  padding: 0 16px;
  margin-top: 8px;
}
.catalog-section-item-quantity {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: #777;
  text-align: left;
}
.catalog-section-item-quantity-icon {
  margin-right: 4px;
  display: inline-flex;
  vertical-align: middle;
}
.catalog-section-item-quantity-check { color: #166534 }
.catalog-section-item-quantity-order { color: #92400e }

/* Name */
.catalog-section-item-name {
  display: block;
  height: 40px;
  overflow: hidden;
  margin-top: 14px;
  padding: 0 16px;
  text-align: left;
}
.catalog-section-item-name-wrapper {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s;
}
.catalog-section-item-name-wrapper:hover {
  color: #000;
}

/* Price row */
.catalog-section-item-price {
  padding: 0 16px;
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 8px;
}
.catalog-section-item-price-old {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #aaa;
  text-decoration: line-through;
}
.catalog-section-item-price-current {
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.3;
  color: #111;
  letter-spacing: -.01em;
}

/* Purchase pair: В корзину + В 1 клик (equal size) */
.catalog-section-item-purchase-pair {
  display: flex;
  gap: 6px;
  padding: 12px 16px 16px;
}
.catalog-section-item-purchase-pair form {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.catalog-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: #f0f0f2;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  text-decoration: none;
  color: #333;
  cursor: pointer;
  transition: background .2s, color .2s, transform .1s;
  white-space: nowrap;
}
.catalog-card-btn span {
  pointer-events: none;
}
.catalog-card-btn__icon {
  display: none;
  width: 16px; height: 16px;
  flex-shrink: 0;
}
.catalog-card-btn--cart:hover {
  background: #222;
  color: #fff;
}
.catalog-card-btn--cart:active {
  transform: scale(.97);
}
.catalog-card-btn--cart.in-cart {
  background: #222;
  color: #fff;
}
.catalog-card-btn--quick {
  flex: 1;
  background: transparent;
  border: 1px solid #ddd;
  color: #555;
}
.catalog-card-btn--quick:hover {
  border-color: #222;
  color: #222;
}
.catalog-card-btn--quick:active {
  transform: scale(.97);
}

/* Modal confirm text */
.modal-confirm-text {
  font-size: 15px;
  line-height: 1.5;
  color: #333;
  margin: 16px 0 8px;
}

/* ===== Responsive: mobile ===== */
@media (max-width: 600px) {
  .catalog-section-items { gap: 0; justify-content: center }
  .intec-grid-item-700-2 { padding: 4px !important }

  .catalog-section-item-wrapper { border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04) }
  .catalog-section-item-wrapper:hover { transform: none; box-shadow: 0 1px 2px rgba(0,0,0,.04) }

  .catalog-section-item-image { padding-top: 100% !important; border-radius: 12px 12px 0 0 }

  .catalog-section-item-actions { top: 6px; right: 6px }
  .catalog-section-item-action-btn {
    width: 28px; height: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
  }
  .catalog-section-item-action-btn svg { width: 13px; height: 13px }

  .catalog-section-item-quantity-wrap { padding: 0 10px; margin-top: 4px }
  .catalog-section-item-quantity { font-size: 11px }

  .catalog-section-item-name { padding: 0 10px; height: auto; max-height: 34px; margin-top: 4px; text-align: center }
  .catalog-section-item-name-wrapper { font-size: 12px; line-height: 1.35 }

  .catalog-section-item-price { padding: 0 10px; padding-top: 4px; text-align: center }
  .catalog-section-item-price-current { font-size: 14px; font-weight: 700 }
  .catalog-section-item-price-old { font-size: 11px }

  .catalog-section-item-purchase-pair { padding: 8px 10px 10px; gap: 4px; justify-content: center }
  .catalog-card-btn { height: 34px; border-radius: 8px; font-size: 11px; padding: 0 6px; flex: 1 }
  .catalog-card-btn span { display: none }
  .catalog-card-btn__icon { display: block !important }
  .catalog-card-btn--quick { border-color: #ddd; flex: 1 }

  /* Mobile in-cart: green border, icon-only (project spec) */
  .catalog-card-btn--cart.in-cart {
    background: none;
    color: #333;
    border: 1.5px solid rgba(34,197,94,.45);
  }
  .catalog-card-btn--cart.in-cart span { display: none }
  .catalog-card-btn--cart.in-cart .catalog-card-btn__icon { display: block !important }
}
@media (max-width: 420px) {
  .catalog-section-item-wrapper { border-radius: 8px }
  .catalog-section-item-image { padding-top: 100% !important; border-radius: 8px 8px 0 0 }
  .catalog-section-item-name { margin-top: 3px; padding: 0 6px; max-height: 30px }
  .catalog-section-item-name-wrapper { font-size: 11px }
  .catalog-section-item-quantity-wrap { padding: 0 6px; margin-top: 2px }
  .catalog-section-item-quantity { font-size: 10px }
  .catalog-section-item-price { padding: 0 6px; padding-top: 2px }
  .catalog-section-item-price-current { font-size: 13px }
  .catalog-section-item-purchase-pair { padding: 6px 6px 8px; gap: 3px }
  .catalog-card-btn { height: 30px; border-radius: 7px; font-size: 11px; padding: 0 4px; flex: 1 }
  .catalog-card-btn span { display: none }
  .catalog-card-btn__icon { display: block !important; width: 14px; height: 14px }
  .catalog-section-item-action-btn { width: 24px; height: 24px }
  .catalog-section-item-action-btn svg { width: 12px; height: 12px }
  .intec-grid-item-700-2 { padding: 3px !important }
}

/* ===== Product grid container ===== */
.catalog-section-items {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  gap: 0;
}
.catalog-section-items > .intec-grid-item-4 {
  padding: 4px;
  box-sizing: border-box;
}

/* ===== LIST MODE: horizontal cards, height = image ===== */
.catalog-section-items--list {
  flex-direction: column;
  gap: 8px;
}
.catalog-section-items--list > [class*="intec-grid-item"] {
  flex: 0 0 100%;
  max-width: 100%;
}
.catalog-section-items--list .catalog-section-item-wrapper {
  flex-direction: row;
  align-items: stretch;
  border-radius: 14px;
  height: 160px;
  overflow: hidden;
}
.catalog-section-items--list .catalog-section-item-content {
  display: grid;
  grid-template-columns: 160px 1fr;
  grid-template-rows: auto auto 1fr auto;
  flex: 1;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.catalog-section-items--list .catalog-section-item-image {
  grid-column: 1;
  grid-row: 1 / -1;
  width: 160px;
  height: 160px;
  padding-top: 0 !important;
  align-self: stretch;
  border-radius: 14px 0 0 14px;
  background: #f5f5f7;
}
.catalog-section-items--list .catalog-section-item-image-items {
  position: relative;
  width: 160px;
  height: 100%;
}
.catalog-section-items--list .catalog-section-item-image-look img {
  object-fit: contain;
}
.catalog-section-items--list .catalog-section-item-quantity-wrap {
  grid-column: 2;
  grid-row: 1;
  padding: 10px 16px 0;
  margin-top: 0;
}
.catalog-section-items--list .catalog-section-item-quantity {
  font-size: 11px;
}
.catalog-section-items--list .catalog-section-item-name {
  grid-column: 2;
  grid-row: 2;
  height: auto;
  max-height: 38px;
  margin-top: 0;
  padding: 4px 16px 0;
  align-self: start;
  overflow: hidden;
}
.catalog-section-items--list .catalog-section-item-name-wrapper {
  font-size: 14px;
  font-weight: 500;
  -webkit-line-clamp: 2;
}
.catalog-section-items--list .catalog-section-item-price {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  padding: 4px 16px 0;
  margin-bottom: 0;
}
.catalog-section-items--list .catalog-section-item-price-current {
  font-size: 17px;
}
.catalog-section-items--list .catalog-section-item-purchase-pair {
  grid-column: 2;
  grid-row: 4;
  align-self: end;
  padding: 4px 16px 10px;
  max-width: 260px;
}
.catalog-section-items--list .catalog-section-item-actions {
  top: 8px;
  right: auto;
  left: 8px;
}
@media (max-width: 600px) {
  .catalog-section-items--list .catalog-section-item-wrapper {
    flex-direction: row;
    height: 110px;
    overflow: hidden;
  }
  .catalog-section-items--list .catalog-section-item-content {
    display: grid;
    grid-template-columns: 110px 1fr;
    grid-template-rows: auto auto 1fr auto;
  }
  .catalog-section-items--list .catalog-section-item-image {
    width: 110px;
    height: 110px;
    padding-top: 0 !important;
    border-radius: 10px 0 0 10px;
  }
  .catalog-section-items--list .catalog-section-item-image-items {
    position: relative;
    width: 110px;
    height: 100%;
  }
  .catalog-section-items--list .catalog-section-item-name {
    margin-top: 0;
    padding: 4px 10px 0;
    max-height: 34px;
    text-align: left;
  }
  .catalog-section-items--list .catalog-section-item-price {
    text-align: left;
    padding: 2px 10px 0;
    margin-bottom: 0;
  }
  .catalog-section-items--list .catalog-section-item-purchase-pair {
    max-width: none;
    padding: 4px 10px 8px;
    justify-content: flex-start;
  }
  .catalog-section-items--list .catalog-section-item-actions {
    left: auto;
    right: 6px;
  }
}

/* =====================================================================
   === CATALOG PAGINATION (точная копия старого сайта)
   ===================================================================== */
.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 25px;
  padding: 15px 0;
}
.catalog-pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #404040;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.catalog-pagination-btn:hover { border-color: #404040 }
.catalog-pagination-btn--disabled {
  color: #ccc;
  cursor: default;
  pointer-events: none;
}
.catalog-pagination-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #404040;
  font-size: 14px;
  text-decoration: none;
  transition: border-color .2s;
}
.catalog-pagination-page:hover { border-color: #e8e8e8 }
.catalog-pagination-page--active {
  border-color: #404040;
  font-weight: 600;
}
.catalog-pagination-dots {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: #aaa;
}

/* =====================================================================
   === CATALOG RESPONSIVE LAYOUT
   ===================================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  .catalog-content-left { flex: 0 0 220px; width: 220px }
}
@media (max-width: 767px) {
  .catalog-content { flex-direction: column }
  .catalog-content-left {
    display: none;
    position: fixed;
    inset: 0;
    top: auto;
    width: 100% !important;
    flex: none;
    height: 80vh;
    background: #fff;
    border-radius: 24px 24px 0 0;
    border-top: 1px solid #e8e8e8;
    overflow-y: auto;
    z-index: 200;
    padding: 20px;
    box-shadow: 0 -20px 60px rgba(2,6,23,.18);
  }
  .catalog-content-left.is-open { display: block; position: fixed }
  .catalog-panel-filter-btn { display: inline-flex; order: 3 }
  .catalog-panel-views { order: 1; flex: 0 0 auto }
  .catalog-panel-sort { order: 2; flex: 1 1 auto; min-width: 0 }
  .filter-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,.45);
    z-index: 199;
  }
  .filter-backdrop.is-open { display: block }
}

/* Keep old .product-card styles as aliases for backwards compatibility */
.product-card { position: relative; border: 1px solid #e8e8e8; border-radius: 10px; overflow: hidden; background: #fff; box-sizing: border-box; display: flex; flex-direction: column; height: 100%; transition: box-shadow 350ms, border-color 350ms }
.product-card:hover { z-index: 2; box-shadow: 0 0 20px 0 rgba(0,0,0,.15) }

/* Картинка: 1:1, object-fit:contain */
.product-card__image {
  display: block;
  position: relative;
  padding-top: 100%;
  background: #fff;
}
.product-card__image a {
  display: block;
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
}
.product-card__image img {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fff;
}

/* Информация */
.product-card__info {
  padding: 0 25px 25px;
  display: flex; flex-direction: column; flex: 1;
}

/* Наличие */
.product-card__stock {
  margin-top: 10px; margin-bottom: 0;
  font-size: 13px; font-weight: 400;
  line-height: 1.5; color: #777;
  text-align: left; white-space: normal;
}
.product-card__stock-icon { margin-right: 5px; display: inline-flex; vertical-align: middle }
.product-card__stock-icon--check { color: #166534 }
.product-card__stock-icon--times { color: #991b1b }

/* Название */
.product-card__name {
  display: block;
  height: 48px; overflow: hidden;
  margin-top: 20px; text-align: left;
}
.product-card__name a {
  display: inline-block; vertical-align: baseline;
  font-size: 16px; font-weight: 400;
  line-height: 1.5; color: #1d1d1d;
  text-decoration: none; cursor: pointer;
  transition: color 350ms;
}
.product-card__name a:hover { color: var(--primary) }

/* Строка цена + корзина */
.product-card__price-row {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-top: 15px; gap: 8px;
}
.product-card__prices { flex: 1; min-width: 0 }
.product-card__price-old {
  display: block; font-size: 13px; font-weight: 400;
  line-height: 1.5; color: #888;
  text-decoration: line-through; overflow: hidden; word-break: break-all;
}
.product-card__price-current {
  display: block; font-size: 18px; font-weight: 400;
  line-height: 1.5; color: #1d1d1d;
  overflow: hidden; word-break: break-all;
}

/* Десктоп: кнопка-иконка корзины 40x40 */
.product-card__cart-desktop form { margin: 0 }
.product-card__cart-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  padding: 9px; border: none; background: none;
  font-size: 20px; color: #0065ff;
  border-radius: 3px; cursor: pointer;
  transition: background-color 350ms, color 350ms;
  line-height: 22px; text-decoration: none;
}
.product-card__cart-btn:hover { background: rgba(0,101,255,.08) }
.product-card__cart-btn--added {
  background: #0065ff; color: #fff;
}
.product-card__cart-btn--added:hover { background: #0050cc }
.product-card__cart-btn svg { width: 20px; height: 20px; display: block }
.product-card__cart-btn:disabled { opacity: .4; cursor: default }

/* Мобильная кнопка: скрыта на десктопе */
.product-card__cart-mobile { display: none }
.product-card__cart-btn-mobile {
  display: block; width: 100%;
  text-align: center; cursor: pointer;
  border: 1px solid; border-color: #0065ff; color: #0065ff;
  border-radius: 0; background: transparent;
  max-height: 40px; padding: 12px 0;
  font-size: 10px; line-height: 14px;
  transition: background-color 350ms, color 350ms;
}
.product-card__cart-btn-mobile span {
  font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
}
.product-card__cart-btn-mobile:hover { background: #0065ff; color: #fff }
.product-card__cart-btn-mobile--added {
  background: #0065ff; color: #fff; border-color: #0065ff;
}
.product-card__cart-btn-mobile:disabled { opacity: .4; cursor: default }

/* Адаптив: <= 720px показать мобильную зону */
@media (max-width: 720px) {
  .product-card__cart-mobile { display: block; margin-top: 15px }
}

/* Адаптив: <= 600px — полная мобилка */
@media (max-width: 600px) {
  .product-card__info {
    display: flex; flex-direction: column; height: auto;
  }
  .product-card__cart-desktop { display: none }
  .product-card__cart-mobile { display: block; margin-top: auto; padding-top: 15px }
  .product-card__name a { font-size: 13px; font-weight: 500 }
  .product-card__price-current { font-size: 14px; font-weight: 500; line-height: 16px }
  .product-card__price-old { margin-top: 5px; line-height: 1.2 }
}

/* Адаптив: <= 550px */
@media (max-width: 550px) {
  .product-card__info { padding: 0 15px 15px }
  .product-card__name { height: 36px; margin-top: 10px }
  .product-card__name a { font-size: 12px }
}

/* Адаптив: <= 500px — скрыть наличие */
@media (max-width: 500px) {
  .product-card__stock { display: none }
  .product-card__name { height: 42px; margin-top: 10px }
  .product-card__price-row { margin-top: 10px }
}

/* =====================
   Promotions / Акции
   ===================== */

/* Hero-шапка страницы акций */
.promotions-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Сетка карточек акций */
.promotions-grid {
  display: grid;
  gap: 16px;
}

/* Карточка акции — горизонтальная компоновка */
.promotion-card {
  display: flex;
  flex-direction: row;
  overflow: hidden;
  min-width: 0;
}

/* Миниатюра слева */
.promotion-card__image {
  position: relative;
  flex: 0 0 160px;
  width: 160px;
  min-height: 140px;
  display: block;
  overflow: hidden;
  background: var(--bg);
  border-right: 1px solid var(--border);
}
.promotion-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.promotion-card__discount {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 8px;
  line-height: 1.4;
}

/* Тело карточки */
.promotion-card__body {
  flex: 1;
  min-width: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.promotion-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.promotion-card__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: break-word;
}
.promotion-card__title a {
  color: var(--text);
  text-decoration: none;
}
.promotion-card__title a:hover { color: var(--primary) }
.promotion-card__excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: break-word;
}
.promotion-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* Мобиле ≤767px — вертикальная карточка */
@media (max-width: 767px) {
  .promotion-card {
    flex-direction: column;
  }
  .promotion-card__image {
    flex: 0 0 auto;
    width: 100%;
    min-height: 160px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .promotion-card__title { font-size: 16px }
  .promotion-card__actions .btn { flex: 1; justify-content: center }
}

/* =====================
   Pagination
   ===================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 0;
}
.pagination__page,
.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  box-sizing: border-box;
  white-space: nowrap;
}
.pagination__page:hover,
.pagination__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(64,64,64,.06);
}
.pagination__page--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  pointer-events: none;
}
.pagination__btn svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
}
/* "назад" — иконка повёрнута влево */
.pagination__btn:not(.pagination__btn--next) svg {
  transform: rotate(90deg);
}
/* "вперёд" — иконка повёрнута вправо */
.pagination__btn--next svg {
  transform: rotate(-90deg);
}
.pagination__btn--disabled {
  opacity: .35;
  pointer-events: none;
  cursor: default;
}
.pagination__dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 38px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .05em;
}

@media (max-width: 767px) {
  .pagination__page,
  .pagination__btn {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
    border-radius: 8px;
  }
  .pagination { gap: 3px; }
}

/* Price stack - цены в одну строку */
.price-stack { display: flex; flex-direction: column; gap: 2px }
.price-stack--center { align-items: center; text-align: center }
.price-stack--left { align-items: flex-start; text-align: left }
.price-stack--right { align-items: flex-end; text-align: right }
.price-stack__label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 2px }

.price-stack__values {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.price-stack__old {
  font-size: 14px; font-weight: 500;
  color: rgba(15,23,42,.45);
  text-decoration: line-through;
}
.price-stack__current {
  font-family: var(--font-display);
  font-weight: 800; letter-spacing: -.02em;
  font-size: 18px; line-height: 1.1;
  color: #0f5132; /* тёмно-зелёный для актуальной цены */
}
.price-stack__current--muted {
  color: rgba(15,23,42,.75);
  font-weight: 700;
}

/* Price generic (used on product detail page) */
.price       { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; font-size: 17px; line-height: 1.1; color: #0f172a }
.price-muted { font-size: 17px; line-height: 1.1; font-weight: 600; color: rgba(15,23,42,.65) }

/* =====================================================================
   === PLP (Product List Page — категория / поиск)
   ===================================================================== */
.plp {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-5);
  padding: 18px 0 30px;
}

/* Sidebar sticky */
.sidebar { position: sticky; top: 88px; align-self: start }

.filter-group { padding: 14px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm) }
.filter-head  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px }

.accordion   { display: flex; flex-direction: column; gap: 10px }
.acc-item    { border-top: 1px solid var(--border); padding-top: 10px }
.acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: transparent; border: 0; padding: 8px 0; cursor: pointer; font-weight: 800;
}
.acc-panel { display: none; padding-bottom: 10px }
.acc-item.open .acc-panel { display: block }
.acc-btn .icon { transition: transform .18s ease }
.acc-item.open .acc-btn .icon { transform: rotate(90deg) }

.chip {
  display: inline-flex; align-items: center;
  padding: 8px 10px; border-radius: 3px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,.02);
  font-size: 13px; cursor: pointer; user-select: none;
}
.chip input { display: none }
.chip.is-pending:not(.active) { border-color: rgba(148,163,184,.65); background: rgba(148,163,184,.18); color: rgba(51,65,85,.9) }
.chip.active { border-color: rgba(64,64,64,.35); background: rgba(64,64,64,.08); color: var(--primary) }
.chip.active.is-pending { border-color: rgba(148,163,184,.65); background: rgba(148,163,184,.18); color: rgba(51,65,85,.9) }

.plp-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-4);
}
.sortbar { display: flex; gap: 10px; align-items: center }

/* Brand header with logo */
.brand-header {
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand-header__logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
}
.brand-header__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* PLP view buttons */
.plp-view-btn { cursor: pointer }
.plp-view-btn.is-active { background: var(--primary); color: #fff; border-color: transparent }

/* PLP grid: 4→3→2 колонки (сетка) */
.plp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
}
@media (max-width: 1023px) { .plp-grid { grid-template-columns: repeat(3, minmax(0,1fr)) } }
@media (max-width: 767px)  { .plp-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px } }
@media (max-width: 400px)  { .plp-grid { gap: 6px } }

/* PLP список: 1 колонка */
.plp-grid.plp-grid-list {
  grid-template-columns: 1fr !important;
  gap: 12px;
}

/* === PLP VIEW MODES === */
/* LIST mode — горизонтальные карточки */
.plp-mode-list .product-card { flex-direction: row; align-items: stretch }
.plp-mode-list .product-card__image { width: 200px; padding-top: 0; height: 200px }
.plp-mode-list .product-card__image a { position: relative }
.plp-mode-list .product-card__info  { flex: 1; padding: 20px 25px }
.plp-mode-list .product-card__cart-mobile { display: block; margin-top: 15px }

/* Список: на планшете чуть меньше фото */
@media (max-width: 1023px) {
  .plp-mode-list .product-card__image { width: 160px; height: 160px }
}

/* Список: на мобиле — вертикальная карточка */
@media (max-width: 767px) {
  .plp-mode-list .product-card  { flex-direction: column }
  .plp-mode-list .product-card__image { width: 100%; height: auto; padding-top: 100% }
  .plp-mode-list .product-card__image a { position: absolute; top: 0; left: 0 }
}

/* TABLE mode */
.plp-mode-table .product-card { flex-direction: row; align-items: stretch }
.plp-mode-table .product-card__image { display: none }
.plp-mode-table .product-card__info  { flex: 1; padding: 20px 25px }
.plp-mode-table .product-card__name a { font-size: 15px }

/* Tablet sidebar */
@media (min-width: 768px) and (max-width: 1023px) {
  .plp { grid-template-columns: 280px 1fr }
  .sidebar { position: sticky; top: 80px }
}

/* Mobile PLP */
@media (max-width: 767px) {
  .plp { grid-template-columns: 1fr }

  /* Мобилка: скрываем sidebar, открывается через кнопку */
  .plp .sidebar { display: none; position: static; top: auto }
}

@media (max-width: 520px) {
  /* Сортировка на мобиле */
  .plp-top-copy { display: none }
  .sortbar { width: 100%; justify-content: space-between }
  .sortbar form { flex: 1; min-width: 0 }
  .sortbar form .select { width: 100%; min-width: 0 !important }

  /* В сетке уменьшаем отступы и ограничиваем название */
  .plp-mode-grid .product-card__info { padding: 0 12px 12px }
  .plp-mode-grid .product-card__name a { -webkit-line-clamp: 4 }
}

/* === Мобильный drawer фильтров === */
.search-filter-toggle { display: none }

@media (max-width: 767px) {
  .search-filter-toggle { display: inline-flex }

  .plp .sidebar.is-open {
    display: block;
    position: fixed; inset: 0; top: auto;
    height: 80vh;
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    border-top: 1px solid var(--border);
    overflow-y: auto;
    z-index: 200;
    padding: 20px;
    box-shadow: 0 -20px 60px rgba(2,6,23,.18);
  }
}

/* =====================================================================
   === PDP (Product Detail Page)
   ===================================================================== */
.pdp {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--space-6);
  padding: 18px 0 34px;
}
/* Оба столбца pdp не должны переполняться */
.pdp > * { min-width: 0 }
.pdp-title       { word-break: break-word }
.pdp-actions-mobile { display: none }

/* Текст цены/акции не выходит за границы */
.product-detail-price-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
/* Текст акции/подсказки переносится */
.pdp-actions-mobile .small,
.buybox .small { overflow-wrap: break-word; word-break: break-word; max-width: 100% }

/* Кнопки "В корзину" / "Купить в 1 клик" — форма растягивается */
.buy-ctas form { width: 100% }

.gallery {
  display: grid; gap: var(--space-3);
  grid-template-columns: 90px 1fr;
  align-items: start;
}
.thumbs { display: flex; flex-direction: column; gap: 10px; min-width: 0 }
.thumb {
  border-radius: 4px; border: 1px solid var(--border);
  overflow: hidden; aspect-ratio: 1/1;
  background: rgba(2,6,23,.03); cursor: pointer;
}
.thumb.active { box-shadow: var(--ring); border-color: rgba(64,64,64,.5) }
.stage {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: rgba(2,6,23,.02);
  overflow: hidden; aspect-ratio: 4/3;
}
.stage img { width: 100%; height: 100%; object-fit: contain }

/* Галерея: миниатюры, не поместившиеся вертикальной колонкой по высоте превью,
   переносятся JS (initGallery, app.js) в .thumbs-extra — горизонтальный ряд под галереей */
.thumbs-extra { display: none }
.thumbs-extra:not(:empty) {
  display: flex; grid-column: 1 / -1;
  flex-direction: row; gap: 10px; width: 100%; min-width: 0; max-width: 100%;
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; scroll-snap-type: x mandatory; padding-bottom: 2px;
}
.thumbs-extra::-webkit-scrollbar { display: none }
.thumbs-extra .thumb { flex: 0 0 92px; min-width: 92px; scroll-snap-align: start }

.pdp-buy { position: sticky; top: 88px; align-self: start }
.buybox  { padding: var(--space-6) }
.buy-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--space-4);
}
.buy-ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 14px }

.kv {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-top: 14px;
}
.kv div {
  padding: 12px 14px; border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(241,245,249,.55);
}

.tabs {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 10px; border: 1px solid var(--border);
  border-radius: 6px; background: rgba(255,255,255,.8);
}
.tab {
  padding: 10px 12px; border-radius: 4px;
  font-weight: 800; font-size: 14px;
  border: 1px solid transparent; background: transparent; cursor: pointer;
}
.tab.active { background: rgba(64,64,64,.08); border-color: rgba(64,64,64,.20); color: var(--primary) }
.tabpanels { margin-top: 14px }
.tabpanel { display: none }
.tabpanel.active { display: block }

.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.spec {
  padding: 12px 14px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
}
.spec b    { display: block; font-size: 12px; color: var(--muted) }
.spec span { display: block; margin-top: 4px; font-weight: 800 }

/* PDP: tablet/mobile */
@media (max-width: 980px) {
  .pdp { grid-template-columns: 1fr }
  .pdp-buy { display: none }
  .pdp-actions-mobile { display: block }

  /* Галерея: фото сверху, миниатюры снизу горизонтально */
  .gallery { display: flex; flex-direction: column; min-width: 0; overflow: hidden }
  .stage  { order: 1 }
  .thumbs { order: 2; flex-direction: row; gap: 10px; width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x mandatory; padding-bottom: 2px }
  .thumbs::-webkit-scrollbar { display: none }
  .thumb  { flex: 0 0 92px; min-width: 92px; scroll-snap-align: start }
  .specs  { grid-template-columns: 1fr }
  .spec   { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; padding: 10px 14px }
  .spec b    { display: inline; font-size: 12px; color: var(--muted); flex-shrink: 0 }
  .spec span { display: inline; margin-top: 0; font-weight: 800; flex: 1; text-align: right; min-width: 0; word-break: break-word }
}

@media (max-width: 767px) {
  /* PDP mobile: полноэкранные кнопки */
  .pdp-actions-mobile { padding: 16px; overflow: clip; min-width: 0 }
  .buy-ctas { gap: 8px; margin-top: 10px }
  .buy-ctas .btn { width: 100%; min-height: 48px; font-size: 15px }
  .buy-ctas form { width: 100% }

  /* Цена на мобиле */
  .price-stack__current { font-size: 22px }
  .price-stack__old { font-size: 14px }

  /* Фото товара: полная ширина, квадратное */
  .stage { aspect-ratio: 1/1; border-radius: 6px }
  .thumb { flex: 0 0 72px; min-width: 72px }

  /* Описание/вкладки */
  .tabs { padding: 6px; gap: 4px }
  .tab  { flex: 1; min-width: 0; text-align: center; padding: 10px 6px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }

  /* Раздел "С этим покупают" */
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px }
  .categories-head { flex-direction: row; align-items: baseline; gap: 16px }
}

@media (max-width: 520px) {
  .pdp-title { font-size: 22px; line-height: 1.15 }
  .pdp-actions-mobile { padding: 14px }
  .stage { border-radius: 4px }
  .thumb { flex: 0 0 60px; min-width: 60px }
}

/* =====================================================================
   === RELATED SLIDER (сопутствующие товары на PDP)  —  wheel-carousel
   ===================================================================== */
.related-slider { position: relative; overflow: hidden; }
.related-slider__viewport {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 16px 0;
}
.related-slider__viewport::-webkit-scrollbar { display: none }
.related-slider__track {
  display: flex;
  gap: 16px;
  padding: 0 24px;
}
.related-slider__slide {
  flex: 0 0 220px;
  transition: transform 100ms linear, opacity 100ms linear;
  transform-origin: center center;
  will-change: transform, opacity;
}

.related-slider__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: box-shadow 0.2s, background 0.2s;
}
.related-slider__nav:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  background: #fafafa;
}
.related-slider__nav--prev { left: 6px; }
.related-slider__nav--prev svg,
.related-slider__nav--prev .icon { transform: rotate(180deg); }
.related-slider__nav--next { right: 6px; }

@media (max-width: 767px) {
  .related-slider__slide { flex: 0 0 160px }
  .related-slider__nav   { display: none }
  .related-slider__track { padding: 0 8px; }
}
@media (max-width: 480px) {
  .related-slider__slide { flex: 0 0 140px }
}

/* Related slider — full-width variant (PDP + Home hits) */
.pdp-related-section {
  padding: 30px 0 40px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}
.related-slider--full .related-slider__slide { flex: 0 0 260px }

@media (max-width: 767px) {
  .related-slider--full {
    overflow: visible;
    /* Выходим за пределы .container на ширину gutter — edge-to-edge */
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
  }
  .related-slider--full .related-slider__viewport {
    scroll-snap-type: x mandatory;
    padding: 12px 0 16px;
  }
  .related-slider--full .related-slider__track {
    gap: 10px;
    /* Отступы = полвьюпорта минус полкарточки — первая/последняя карточка центрируется */
    padding: 0 calc((100vw - 62vw) / 2);
  }
  .related-slider--full .related-slider__slide {
    flex: 0 0 62vw;
    max-width: 280px;
    scroll-snap-align: center;
  }
  .related-slider--full .related-slider__nav { display: none }

  /* --- Карточка товара внутри слайдера: минималистичный вид --- */
  .related-slider--full .catalog-section-item-wrapper {
    border-radius: 14px;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    overflow: hidden;
  }
  .related-slider--full .catalog-section-item-image {
    padding-top: 100%;
    background: #f5f5f7;
  }
  .related-slider--full .catalog-section-item-actions {
    opacity: 1;
    top: 8px;
    right: 8px;
    gap: 4px;
  }
  .related-slider--full .catalog-section-item-action-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
  }
  .related-slider--full .catalog-section-item-action-btn.active {
    color: #e74c3c;
    background: #fff;
  }
  .related-slider--full .catalog-section-item-action-btn svg {
    width: 14px; height: 14px;
  }
  .related-slider--full .catalog-section-item-name {
    padding: 0 12px;
    height: auto;
    max-height: 38px;
    margin-top: 10px;
    overflow: hidden;
  }
  .related-slider--full .catalog-section-item-name-wrapper {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    color: #333;
  }
  .related-slider--full .catalog-section-item-price {
    padding: 0 12px;
    margin-top: 6px;
    margin-bottom: 0;
  }
  .related-slider--full .catalog-section-item-price-current {
    font-size: 16px;
    font-weight: 700;
    color: #111;
  }
  .related-slider--full .catalog-section-item-price-old {
    font-size: 12px;
  }
  .related-slider--full .catalog-section-item-purchase-pair {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    padding: 10px 12px 12px;
    gap: 6px;
    margin: 0 !important;
  }
  .related-slider--full .catalog-section-item-purchase-pair form {
    display: flex !important;
    align-items: stretch !important;
    flex: 1 1 0 !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
  }
  .related-slider--full .catalog-card-btn {
    height: 34px;
    width: auto;
    flex: 1 1 0 !important;
    border-radius: 9px;
    font-size: 12px;
    padding: 0 8px;
    white-space: nowrap;
  }
  .related-slider--full .catalog-card-btn__icon {
    display: none;
  }
  .related-slider--full .catalog-card-btn span {
    display: inline;
  }
  .related-slider--full .catalog-card-btn--cart {
    background: #f0f0f2;
    color: #333;
    border: none;
    font-weight: 600;
  }
  .related-slider--full .catalog-card-btn--cart:hover {
    background: #222;
    color: #fff;
  }
  .related-slider--full .catalog-card-btn--cart.in-cart {
    background: #222;
    color: #fff;
  }
  .related-slider--full .catalog-card-btn--quick {
    flex: 1 1 0 !important;
    background: transparent;
    border: 1px solid #ddd;
    color: #555;
  }
  .related-slider--full .catalog-card-btn--quick:hover {
    border-color: #222;
    color: #222;
  }
}

@media (max-width: 420px) {
  .related-slider--full .related-slider__slide {
    flex: 0 0 64vw;
    max-width: 260px;
  }
  .related-slider--full .related-slider__track {
    padding: 0 calc((100vw - 64vw) / 2);
  }
  .related-slider--full .catalog-section-item-name-wrapper {
    font-size: 12px;
  }
  .related-slider--full .catalog-section-item-price-current {
    font-size: 15px;
  }
  .related-slider--full .catalog-card-btn {
    height: 32px;
    width: auto;
    flex: 1 1 0 !important;
    font-size: 11px;
    padding: 0 6px;
  }
}

/* Home page hits section */
.home-hits-section {
  padding: 40px 0 50px;
  background: #D5DEE8;
}
.home-hits-section .section-head { margin-bottom: 20px }

/* PDP description block */
.pdp-description {
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}

/* PDP Q&A inline form */
.pdp-qa-form-wrap {
  margin-top: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(241,245,249,.55);
}
.pdp-qa-form .field { display: flex; flex-direction: column; gap: 6px }

@media (max-width: 767px) {
  .pdp-qa-form-wrap { padding: 16px }
}

/* =====================================================================
   === CART & CHECKOUT
   ===================================================================== */
.table { width: 100%; border-collapse: separate; border-spacing: 0 }
.table th {
  text-align: left; font-size: 12px; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top;
}
.table td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top }

.summary { padding: var(--space-6) }
.summary .row { justify-content: space-between }
.summary .row strong { font-family: var(--font-display); letter-spacing: -.02em }

/* Cart layout */
.cart-layout {
  grid-template-columns: 1fr 360px;
  gap: 18px;
}
@media (max-width: 980px) { .cart-layout { grid-template-columns: 1fr } }
.cart-summary { height: fit-content }

/* Cart line item */
.cart-line { display: flex; gap: 14px; align-items: flex-start }

.cart-line__check { flex: 0 0 auto; display: flex; align-items: center; padding-top: 4px }
.cart-line__checkbox {
  width: 20px; height: 20px; cursor: pointer; accent-color: var(--primary);
}
.cart-line__checkbox:not(:checked) ~ .cart-line__img-link,
[data-cart-line]:has(.cart-line__checkbox:not(:checked)) .cart-line__content { opacity: .5 }

.cart-line__img-link { display: block; flex: 0 0 auto }
.cart-line__img {
  width: 96px; height: 96px;
  border-radius: 4px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.cart-line__content {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column;
}
.cart-line__meta-panel {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start;
}
.cart-line__title {
  margin-top: 10px; font-weight: 900; line-height: 1.25;
}
.cart-line__bottom {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 12px; align-items: end; margin-top: 14px;
}
.cart-line__qty             { align-self: stretch; max-width: 100% !important; min-width: 0 }
.cart-line__qty .label      { display: none }
.cart-line__price,
.cart-line__sum            { text-align: right; white-space: nowrap }
.cart-line__amount         { font-weight: 900 }

/* Cart line: remove button — ghost style */
.cart-line__remove {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #bbb;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color .2s, background .2s;
  white-space: nowrap;
  align-self: center;
}
.cart-line__remove:hover {
  color: #ef4444;
  background: rgba(239,68,68,.06);
}
.cart-line__remove svg { flex-shrink: 0; }

/* Cart: tablet */
@media (max-width: 767px) {
  .cart-page .card.pad { padding: 12px; border-radius: 10px; }

  .cart-line {
    display: grid;
    grid-template-columns: 68px 1fr;
    grid-template-areas:
      "image content"
      "bottom bottom";
    gap: 0 10px;
  }
  .cart-line__check { display: none; }
  .cart-line__img-link { grid-area: image; align-self: start; }
  .cart-line__img {
    width: 68px; height: 68px;
    border-radius: 8px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid var(--border);
  }
  .cart-line__content {
    grid-area: content;
    display: flex; flex-direction: column; gap: 2px;
  }
  .cart-line__meta-panel {
    display: flex; flex-wrap: wrap; gap: 3px 5px;
  }
  .cart-line__meta-panel .badge { font-size: 10px; padding: 2px 6px; }
  .cart-line__title {
    margin-top: 1px; font-size: 13px; line-height: 1.3; font-weight: 600;
  }

  /* Bottom: horizontal flex — [qty] [price] [sum] / [remove] */
  .cart-line__bottom {
    grid-area: bottom;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
  }
  .cart-line__qty { order: 1; flex: 0 0 auto; }
  .cart-line__price { order: 2; flex: 1 1 auto; text-align: right; min-width: 0; }
  .cart-line__sum { order: 3; flex: 0 0 auto; text-align: right; }
  .cart-line__remove { order: 4; flex-basis: 100%; }
  .cart-line__qty .label { display: none; }
  .cart-line__bottom .qty-stepper { height: auto; }

  .cart-page .price-stack__label { font-size: 10px; }
  .cart-page .price-stack__current { font-size: 14px; }

  .cart-page .qty-stepper {
    width: auto;
    min-width: 110px;
    border-radius: 8px;
    grid-template-columns: 34px minmax(36px, 1fr) 34px;
  }
  .cart-page .qty-stepper__btn { min-height: 36px; font-size: 18px; }
}

/* Cart: small mobile — single-row bottom */
@media (max-width: 480px) {
  .cart-page .card.pad { padding: 10px; border-radius: 8px; }

  .cart-line {
    grid-template-columns: 56px 1fr;
    gap: 0 8px;
  }
  .cart-line__img { width: 56px; height: 56px; border-radius: 6px; }
  .cart-line__meta-panel .badge { font-size: 9px; padding: 1px 5px; }
  .cart-line__title { font-size: 12px; line-height: 1.25; }

  /* One-row bottom: [qty] [sum →] [🗑] */
  .cart-line__bottom { gap: 6px; padding-top: 8px; margin-top: 8px; flex-wrap: nowrap; }
  .cart-line__price { display: none; }
  .cart-line__sum { flex: 1 1 0; min-width: 0; text-align: right; }
  .cart-line__remove { flex-basis: auto; flex-shrink: 0; padding: 4px 6px; }
  .cart-line__remove-text { display: none; }

  .cart-page .qty-stepper {
    width: auto;
    min-width: 0;
    grid-template-columns: 28px 44px 28px;
  }
  .cart-page .qty-stepper__btn { min-height: 32px; font-size: 16px; }

  .cart-page .price-stack__label { display: none; }
  .cart-page .price-stack__current { font-size: 14px; font-weight: 700; }
}

/* Qty stepper */
.qty-stepper {
  display: inline-grid;
  grid-template-columns: 36px minmax(48px, 64px) 36px;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden;
  background: var(--surface);
}
.cart-line__bottom .qty-stepper {
  height: 100%;
}
.qty-stepper .input {
  border: 0; border-radius: 0; min-width: 0; min-height: 0;
  text-align: center; padding: 0 4px; box-shadow: none;
}
.qty-stepper .input::-webkit-outer-spin-button,
.qty-stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0 }
.qty-stepper .input[type="number"]             { -moz-appearance: textfield }
.qty-stepper__btn {
  border: 0; border-radius: 0;
  background: rgba(64,64,64,.08); color: var(--text);
  font-size: 24px; line-height: 1; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.qty-stepper__btn:hover { background: rgba(64,64,64,.14) }

@media (max-width: 767px) {
  .qty-stepper { width: 100%; min-width: 0; grid-template-columns: 42px minmax(0,1fr) 42px }
  .qty-stepper__btn { min-height: 44px; font-size: 22px }
}

/* Cart summary: enhanced */
.cart-summary {
  position: sticky;
  top: 88px;
  border-radius: 12px;
}
.cart-summary__heading {
  font-size: 18px;
  font-weight: 900;
  font-family: var(--font-display);
  letter-spacing: -.02em;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--primary);
}
.cart-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 0;
}
.cart-summary__label {
  font-size: 14px;
  color: var(--muted);
}
.cart-summary__notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 13px;
  line-height: 1.5;
  color: #92400e;
  margin-top: 14px;
}
.cart-summary__notice svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #f59e0b;
}
.cart-coupon-box {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.cart-coupon-box__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cart-summary__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.cart-summary .btn-primary {
  min-height: 48px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}
.cart-summary .btn-ghost {
  font-size: 14px;
  color: var(--muted);
}
.cart-summary .btn-ghost:hover {
  color: var(--text);
}

/* Cart page: header refinements */
.cart-page .h1 { font-size: clamp(24px, 3vw, 32px); }
.cart-page > .container > .stack > .row.space-between {
  align-items: flex-end;
}

@media (max-width: 767px) {
  .cart-summary { position: static; border-radius: 10px; }
  .cart-summary .btn-primary { min-height: 50px; font-size: 16px; }
}

/* Checkout */
.checkout-page, .cart-page { overflow-x: clip }
.checkout-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px; align-items: start;
}
.checkout-form-card,
.checkout-summary  { min-width: 0 }
.checkout-summary  { height: fit-content }
.checkout-summary__name  { min-width: 0; max-width: 100%; word-break: break-word }
.checkout-summary__price { flex: 0 0 auto; text-align: right; white-space: nowrap }

@media (max-width: 980px) {
  .checkout-layout { grid-template-columns: minmax(0,1fr) !important }
}

@media (max-width: 767px) {
  .checkout-page .container,
  .cart-page .container { width: min(100% - 24px, var(--container)) }

  .checkout-layout { gap: 14px }
  .checkout-mobile-summary { order: 0 }
  .checkout-summary   { order: 1 }
  .checkout-form-card { order: 2 }

  .checkout-form-card .grid.grid-2 { grid-template-columns: minmax(0,1fr); gap: 12px }
  .checkout-form-card .field,
  .checkout-form-card .input,
  .checkout-form-card textarea,
  .checkout-form-card .btn,
  .checkout-form-card .qty-stepper { width: 100%; max-width: 100% }
  .checkout-form-card textarea { min-height: 120px }
  .checkout-actions { display: grid; grid-template-columns: minmax(0,1fr); width: 100% }
  .checkout-actions .btn { justify-content: center; white-space: normal }

  .checkout-summary__line {
    display: grid; grid-template-columns: minmax(0,1fr); gap: 4px !important;
  }
  .checkout-summary__price { text-align: left; white-space: normal }
}

/* Checkout wizard */
.checkout-steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 24px; padding: 0;
  counter-reset: step;
}
.checkout-step-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  cursor: default; user-select: none;
  transition: color .2s;
}
.checkout-step-item.is-completed {
  color: var(--primary); cursor: pointer;
}
.checkout-step-item.is-active {
  color: var(--primary);
}
.checkout-step-num {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border);
  font-size: 14px; font-weight: 700;
  transition: all .2s;
  flex-shrink: 0;
}
.checkout-step-item.is-active .checkout-step-num {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.checkout-step-item.is-completed .checkout-step-num {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.checkout-step-connector {
  flex: 1; height: 2px; background: var(--border); margin: 0 12px;
  transition: background .2s;
}
.checkout-step-connector.is-completed {
  background: var(--primary);
}

/* Delivery / Payment cards */
.checkout-option-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.checkout-option-cards--pay {
  grid-template-columns: repeat(2, 1fr);
}
.checkout-option-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 20px 16px; border-radius: var(--radius-xl);
  border: 2px solid var(--border); background: var(--surface);
  cursor: pointer; text-align: center;
  transition: all .2s ease;
  user-select: none;
}
.checkout-option-card:hover {
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-sm);
}
.checkout-option-card.is-selected {
  border-color: var(--primary);
  background: rgba(64, 64, 64, .04);
}
.checkout-option-card__icon {
  width: 40px; height: 40px; color: var(--muted);
  transition: color .2s;
}
.checkout-option-card.is-selected .checkout-option-card__icon {
  color: var(--primary);
}
.checkout-option-card__title {
  font-weight: 700; font-size: 15px; color: var(--text);
}
.checkout-option-card__desc {
  font-size: 13px; color: var(--muted); font-weight: 400;
}

/* Address form inside delivery step */
.checkout-address-form {
  display: grid; gap: 12px; margin-top: 16px;
  animation: fadeSlideIn .25s ease;
}
.checkout-address-row {
  display: grid; gap: 12px;
}
.checkout-address-row--2 { grid-template-columns: 2fr 1fr; }
.checkout-address-row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* Pickup info block */
.checkout-pickup-info {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; border-radius: var(--radius-xl);
  background: var(--surface-2); margin-top: 16px;
  font-size: 14px; color: var(--text);
  animation: fadeSlideIn .25s ease;
}
.checkout-pickup-info .icon { flex-shrink: 0; width: 20px; height: 20px; color: var(--muted); }

/* Payment notice (online stub) */
.checkout-payment-notice {
  padding: 12px 16px; border-radius: var(--radius-lg);
  background: #fffbeb; border: 1px solid #fde68a;
  font-size: 13px; color: #92400e; margin-top: 12px;
  animation: fadeSlideIn .25s ease;
}

/* Transport company notice */
.checkout-transport-notice {
  font-size: 13px; color: var(--muted); margin-top: 8px; font-style: italic;
}

/* Address suggestions dropdown */
.address-suggest-wrap {
  position: relative;
}
.address-suggest-dropdown {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 50;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  margin-top: 4px; max-height: 240px; overflow-y: auto;
}
.address-suggest-item {
  padding: 10px 14px; cursor: pointer; font-size: 14px;
  display: flex; flex-direction: column; gap: 2px;
  transition: background .12s;
}
.address-suggest-item:hover,
.address-suggest-item.is-highlighted {
  background: rgba(64, 64, 64, .06);
}
.address-suggest-item__main {
  font-weight: 500; color: var(--text);
}
.address-suggest-item__region {
  font-size: 12px; color: var(--muted);
}

/* Step navigation */
.checkout-nav { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.checkout-nav-back {
  font-size: 14px; color: var(--muted); cursor: pointer;
  background: none; border: none; padding: 0; font-family: inherit;
  transition: color .2s;
}
.checkout-nav-back:hover { color: var(--text); }

/* Summary delivery/payment info */
.checkout-summary__delivery {
  font-size: 13px; color: var(--muted); margin-top: 8px;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.checkout-summary__delivery-line {
  display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px;
}

/* Mobile order summary toggle */
.checkout-mobile-summary {
  display: none;
  padding: 12px 16px; border-radius: var(--radius-xl);
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; margin-bottom: 12px;
}
.checkout-mobile-summary__row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15px; font-weight: 700;
}
.checkout-mobile-summary__chevron {
  width: 20px; height: 20px; color: var(--muted);
  transition: transform .2s;
}
.checkout-mobile-summary__chevron.is-open { transform: rotate(180deg); }

/* Fade slide in animation */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Step content animation */
.checkout-step-content {
  animation: fadeSlideIn .25s ease;
}

/* Checkout wizard responsive */
@media (max-width: 767px) {
  .checkout-option-cards { grid-template-columns: 1fr; }
  .checkout-option-cards--pay { grid-template-columns: 1fr; }
  .checkout-address-row--2 { grid-template-columns: 1fr; }
  .checkout-address-row--3 { grid-template-columns: 1fr; }
  .checkout-steps { gap: 0; }
  .checkout-step-item { font-size: 12px; gap: 4px; }
  .checkout-step-num { width: 28px; height: 28px; font-size: 12px; }
  .checkout-step-connector { margin: 0 6px; }
  .checkout-step-item span:not(.checkout-step-num) { display: none; }
  .checkout-mobile-summary { display: block; }
  .checkout-summary { display: none; }
  .checkout-summary.is-mobile-open { display: block; }
}

@media (min-width: 768px) and (max-width: 980px) {
  .checkout-option-cards { grid-template-columns: 1fr 1fr; }
}

/* =====================================================================
   === ORDERS TABLE (account)
   На мобиле: каждая строка → карточка
   ===================================================================== */
@media (max-width: 767px) {
  .orders-table { display: block }
  .orders-table thead { display: none }
  .orders-table tbody { display: block }
  .orders-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "num date" "status status" "total action";
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 10px;
    background: var(--surface);
  }
  .orders-table td { border: 0; padding: 2px 0; vertical-align: middle }
  .orders-table td:nth-child(1) { grid-area: num;    font-weight: 900 }
  .orders-table td:nth-child(2) { grid-area: date;   text-align: right }
  .orders-table td:nth-child(3) { grid-area: status }
  .orders-table td:nth-child(4) { grid-area: total;  align-self: end }
  .orders-table td:nth-child(5) { grid-area: action; align-self: end; text-align: right }
}

/* =====================================================================
   === HELP (Помощь)
   ===================================================================== */
.help-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-6);
  align-items: start;
}
/* Контентная колонка не вылезает за экран */
.help-layout > * { min-width: 0 }
.help-layout .help-sidebar { align-self: start; position: sticky; top: 88px }

/* Текст и параграфы не переполняют карточку */
.help-layout article,
.help-layout .card { overflow-wrap: break-word; word-break: break-word }
.help-layout .p,
.help-layout .h1,
.help-layout .h3,
.help-layout .h4,
.help-layout .small { max-width: 100%; overflow-wrap: break-word; word-break: break-word }

@media (max-width: 980px) {
  .help-layout { grid-template-columns: 1fr; gap: var(--space-4) }
  .help-layout .help-sidebar { position: static; top: auto }
  .help-layout .help-sidebar .help-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 8px;
  }
  .help-layout .help-sidebar .help-nav::-webkit-scrollbar { display: none }
  .help-layout .help-sidebar .pill { white-space: nowrap; flex: 0 0 auto }
}

@media (max-width: 767px) {
  /* Карточка article — полная ширина без переполнения */
  .help-layout article.card,
  .help-layout .card.pad { padding: var(--space-4); overflow: hidden }

  /* Вложенные grid-2/grid-4 внутри help — 1 колонка */
  .help-layout article .grid-2,
  .help-layout article .grid-4 { grid-template-columns: 1fr !important }

  /* Кнопки в row — в столбик */
  .help-layout article .row.wrap { flex-direction: column; align-items: stretch }
  .help-layout article .row.wrap .btn { width: 100%; justify-content: center }

  /* Поиск брендов — полная ширина */
  .help-layout article form[action*="brands"] { min-width: 0 !important; width: 100% }

  /* Заголовок статьи + форма поиска — в столбик */
  .help-layout article .row.space-between { flex-direction: column; align-items: flex-start; gap: 12px }
}

/* =====================================================================
   === ACCOUNT (Личный кабинет)
   ===================================================================== */
.account-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--space-6);
  align-items: start;
}
.account-sidebar { align-self: start }
.account-sidebar .account-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 12px }

@media (max-width: 980px) {
  .account-layout { grid-template-columns: 1fr; gap: var(--space-4) }
  .account-sidebar { position: static !important; top: auto !important }
  .account-sidebar .account-nav {
    flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 6px; margin-top: 10px; gap: 10px;
  }
  .account-sidebar .account-nav::-webkit-scrollbar { height: 0 }
  .account-sidebar .account-nav .pill {
    white-space: nowrap; flex: 0 0 auto; padding: 10px 12px;
    background: rgba(255,255,255,.85);
  }
}

@media (max-width: 520px) {
  .account-sidebar .account-nav .pill { padding: 9px 11px; font-size: 14px }
  .list-card-actions { display: grid; grid-template-columns: 1fr; gap: 10px }
  .list-card-actions .btn { width: 100% }
}

/* =====================================================================
   === MODAL
   ===================================================================== */
.modal-backdrop { position: fixed; inset: 0; z-index: 1100; background: rgba(2,6,23,.55); display: none }
.modal {
  position: fixed; inset: 0; z-index: 1110;
  display: none; align-items: center; justify-content: center;
  padding: 18px; overflow-y: auto;
}
.modal.open, .modal-backdrop.open { display: flex }

.modal-card {
  width: min(92vw, 620px);
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
}
.modal-head {
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal-body  { padding: 20px }
.modal-close { border: 0; background: transparent; cursor: pointer }

/* Modal box (legacy markup) */
.modal > .modal-box,
.modal > .modal-box--info,
.modal > .modal-box--receipt {
  position: relative;
  width: min(92vw, 760px); max-width: 100%;
  max-height: min(88vh, 920px); overflow: auto;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #dbe3ef);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(15,23,42,.18);
  padding: 32px;
}
.modal > .modal-box--info    { width: min(92vw, 880px) }
.modal > .modal-box--receipt { width: min(92vw, 820px) }

.modal .modal-x {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border: 1px solid var(--border, #dbe3ef); border-radius: 4px;
  background: #fff; color: var(--text, #111827);
  font-size: 24px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 10px 24px rgba(15,23,42,.08); z-index: 2;
}
.modal .modal-title {
  margin: 0; padding-right: 56px;
  font-size: clamp(28px, 2.2vw, 40px); line-height: 1.08;
  font-weight: 900; letter-spacing: -.03em; color: var(--text, #0f172a);
}
.modal .modal-sub { margin: 14px 0 0; font-size: 18px; line-height: 1.45; color: var(--muted, #64748b) }

.modal .modal-copy,
.modal .receipt-summary,
.modal .modal-form,
.modal .modal-actions { margin-top: 22px }

.modal .modal-form  { display: block }
.modal .form-row    { display: flex; flex-direction: column; gap: 8px; margin-top: 18px }
.modal .form-row:first-child { margin-top: 0 }
.modal .form-grid   { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-top: 18px }
.modal .form-grid .form-row { margin-top: 0 }

.modal .form-label { margin: 0; font-size: 14px; line-height: 1.35; font-weight: 800; color: var(--text, #0f172a) }
.modal .form-hint  { margin-top: 18px; font-size: 14px; line-height: 1.45; color: var(--muted, #64748b) }
.modal .req        { color: #dc2626 }
.modal .input,
.modal .textarea   { width: 100% }
.modal textarea.textarea { min-height: 150px; resize: vertical }
.modal .form-row--files input[type="file"] { padding: 14px 16px; min-height: 58px }
.modal .field-error { margin-top: 6px; font-size: 13px; line-height: 1.35; color: #dc2626 }
.modal .input-error { border-color: rgba(220,38,38,.5) !important; box-shadow: 0 0 0 3px rgba(220,38,38,.12) }

.modal .modal-actions        { align-items: center }
.modal .modal-actions--thanks { justify-content: center }
.modal .modal-actions--info   { margin-top: 24px }

.modal .modal-list {
  margin: 0; padding-left: 20px; display: grid; gap: 10px; color: var(--text, #0f172a);
}
.modal .modal-copy__card {
  border: 1px solid var(--border, #dbe3ef); border-radius: 22px; background: #fff;
}
.modal .receipt-summary {
  border: 1px solid var(--border, #dbe3ef); border-radius: 22px;
  padding: 18px 20px; background: rgba(248,250,252,.72);
}
.modal .receipt-summary__head,
.modal .receipt-summary__footer,
.modal .receipt-summary__row {
  display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; align-items: start;
}
.modal .receipt-summary__head,
.modal .receipt-summary__footer { grid-template-columns: minmax(0,1fr) auto }
.modal .receipt-summary__items  { display: grid; gap: 12px; margin: 14px 0 }
.modal .receipt-summary__name,
.modal .receipt-summary__meta,
.modal .receipt-summary__sum    { min-width: 0 }

@media (max-width: 840px) {
  .modal > .modal-box,
  .modal > .modal-box--info,
  .modal > .modal-box--receipt { width: min(94vw, 680px); padding: 26px 22px 22px; border-radius: 24px }
  .modal .modal-title { font-size: clamp(24px, 5vw, 32px) }
}

@media (max-width: 640px) {
  .modal { align-items: flex-start; padding: 12px }
  .modal > .modal-box,
  .modal > .modal-box--info,
  .modal > .modal-box--receipt {
    width: 100%; max-height: calc(100vh - 24px);
    padding: 22px 16px 18px; border-radius: 22px; margin: 0 auto;
  }
  .modal .modal-x   { top: 12px; right: 12px; width: 34px; height: 34px }
  .modal .modal-sub,
  .modal .form-hint { font-size: 15px }
  .modal .form-grid,
  .modal .receipt-summary__row,
  .modal .receipt-summary__head,
  .modal .receipt-summary__footer { grid-template-columns: 1fr }
  .modal .modal-actions .btn { width: 100% }
}

@media (max-width: 520px) {
  .modal { padding: 12px }
  .modal-head { padding: 16px }
  .modal-body { padding: 16px }
  .modal-actions .btn { width: 100% }
}

/* =====================================================================
   === MOBILE BOTTOM BAR (PDP)
   ===================================================================== */
.mobile-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: rgba(255,255,255,.92);
  border-top: 1px solid var(--border);
  backdrop-filter: none;
  padding: 10px 12px;
}
.mobile-bar .container { display: flex; gap: 10px; align-items: center; justify-content: space-between }
@media (max-width: 980px) { .mobile-bar.show { display: block } }

/* =====================================================================
   === MISC UI BLOCKS
   ===================================================================== */
.iconbox {
  width: 40px; height: 40px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-50); color: var(--primary); border: 1px solid var(--border);
  flex: 0 0 auto;
}

/* Status list */
.status-list { display: flex; flex-direction: column; gap: 12px }
.status-item {
  display: grid; grid-template-columns: max-content 1fr;
  gap: 12px; align-items: start;
}
.status-item .small { margin: 0 }
.status-item .badge { align-self: start }

/* Document list */
.doc-list  { display: flex; flex-direction: column; gap: 12px }
.doc-item  { padding: 14px 16px }
.doc-row   { display: flex; align-items: center; justify-content: space-between; gap: 14px }
.doc-text  { min-width: 0 }
.doc-title { font-weight: 900; letter-spacing: -.02em }
.doc-desc  { margin-top: 4px }
.doc-action { white-space: nowrap }
@media (max-width: 520px) {
  .doc-row    { flex-wrap: wrap }
  .doc-action { width: 100%; justify-content: center }
}

/* Modal actions */
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap }
.modal-actions .btn { flex: 0 0 auto }

/* Compare */
.compare-title {
  font-weight: 900; font-size: 16px; line-height: 1.25;
  min-height: 40px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}

/* =====================================================================
   === TOAST
   ===================================================================== */
#toastHost {
  position: fixed; right: 16px; bottom: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
/* Base toast — светло-голубой фон, тёмный текст */
.toast {
  pointer-events: none;
  background: #E0F2FE;          /* sky-100 */
  color: #0C2D48;               /* тёмно-синий нейтральный */
  border: 1px solid #BAE6FD;    /* sky-200 */
  padding: 11px 16px; border-radius: 4px;
  box-shadow: 0 8px 24px rgba(2,6,23,.12);
  transform: translateY(6px); opacity: 0;
  transition: all .2s ease;
  font-weight: 600; font-size: 14px; line-height: 1.3;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1 }

/* Успех — тёмно-зелёный фон */
.toast--success {
  background: #14532d;
  color: #fff;
  border-color: #166534;
}

/* Ошибка — тёмно-красный фон */
.toast--error {
  background: #7f1d1d;
  color: #fff;
  border-color: #991b1b;
}

/* Toast with icon — layout */
.toast[class*="toast--icon-"] {
  display: flex; align-items: center; gap: 8px;
}

/* Distinct toast colors per feature — все тёмно-зелёные */
.toast--icon-favorites.toast--success {
  background: #14532d; color: #fff; border-color: #166534;
}
.toast--icon-lists.toast--success {
  background: #14532d; color: #fff; border-color: #166534;
}
.toast--icon-compare.toast--success {
  background: #14532d; color: #fff; border-color: #166534;
}
.toast--icon-cart.toast--success {
  background: #14532d; color: #fff; border-color: #166534;
}

/* =====================================================================
   === AJAX FAB
   ===================================================================== */
.fab.active { background: rgba(64,64,64,.08); border-color: rgba(64,64,64,.22) }

/* =====================================================================
   === FOOTER (dark theme like old kupident.ru)
   ===================================================================== */
.footer {
  margin-top: 0; padding: 40px 0 0;
  background: #2B2F32; color: #fff;
}
.footer a { color: #fff; transition: color .15s }
.footer a:hover { color: #ccc }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: var(--space-6);
}
.footer-grid > * { min-width: 0 }

.footer-contacts { display: flex; flex-direction: column; gap: 14px }
.footer-phone { font-weight: 700; font-size: 16px; color: #fff; display: flex; align-items: center }
.footer-phone svg { width: 18px; height: 18px; stroke: #fff; margin-right: 6px; display: inline-block; flex-shrink: 0 }
.footer-email { display: flex; align-items: center; gap: 6px }
.footer-email svg { width: 18px; height: 18px; stroke: #fff; display: inline-block; flex-shrink: 0 }
.footer-address { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: #fff }
.footer-address svg { width: 16px; height: 16px; stroke: #fff; flex-shrink: 0; margin-top: 2px }
.footer-callback {
  display: inline-flex; padding: 11px 15px;
  border: none; border-radius: 0;
  color: #C2C2C2; font-weight: 400; font-size: 14px;
  background: transparent;
  transition: color .15s;
  align-self: flex-start;
}
.footer-callback:hover { color: #fff }

.footer-menus {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4);
}
.footer-menu-col h4 {
  margin: 0 0 12px; color: #fff; font-weight: 700; font-size: 16px;
}
.footer-menu-col ul {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.footer-menu-col ul a { font-size: 16px; color: #fff }
.footer-menu-col ul a:hover { color: #ccc }

.footer-right { display: flex; flex-direction: column; gap: 16px }
.footer-search {
  display: flex; border: 1px solid rgba(255,255,255,.2); border-radius: 0; overflow: hidden;
}
.footer-search .input {
  border: 0; background: transparent; color: #fff; padding: 11px 15px; flex: 1; font-size: 13px;
}
.footer-search .input::placeholder { color: #757575 }
.footer-search .btn { border: 0; border-radius: 0; background: rgba(255,255,255,.1); color: #fff; min-height: 41px; padding: 8px 14px }

.footer-social-title { font-size: 13px; color: #fff; margin-bottom: 8px }
.footer-social { display: flex; gap: 10px }
.footer-social a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.3); border-radius: 50%;
  color: #fff; transition: color .15s, border-color .15s;
}
.footer-social a:hover { color: #fff; border-color: rgba(255,255,255,.6) }
.footer-social svg { width: 18px; height: 18px }

.footer-bottom {
  margin-top: 30px; padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  color: #999; font-size: 13px;
}
.footer-logo {
  height: 32px; width: auto;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.8)) drop-shadow(0 0 12px rgba(255,255,255,.5));
  opacity: 1;
  transition: filter .2s, opacity .2s;
}
.footer-logo:hover {
  filter: drop-shadow(0 0 8px rgba(255,255,255,1)) drop-shadow(0 0 16px rgba(255,255,255,.7));
}
.footer-payment-icons {
  display: flex; align-items: center; gap: 12px;
}
.payment-icon {
  display: inline-block;
  height: 24px;
  background-image: url('img/payment-icons.png');
  background-repeat: no-repeat;
  opacity: .8;
  transition: opacity .2s;
}
.payment-icon:hover { opacity: 1 }
.payment-icon[data-icon="alfabank"]   { width: 14px; background-position: -240px 0 }
.payment-icon[data-icon="sberbank"]   { width: 19px; background-position: -294px 0 }
.payment-icon[data-icon="qiwi"]       { width: 20px; background-position: -352px 0 }
.payment-icon[data-icon="yandexmoney"]{ width: 23px; background-position: -413px 0 }
.payment-icon[data-icon="visa"]       { width: 36px; background-position: -477px 0 }
.payment-icon[data-icon="mastercard"] { width: 25px; background-position: -552px 0 }

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr }
  .footer-right { grid-column: 1 / -1 }
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr }
  .footer-menus { grid-template-columns: repeat(3, 1fr) }
  .footer-bottom { justify-content: center; text-align: center; flex-direction: column; gap: 12px }
}

@media (max-width: 520px) {
  .footer-menus { grid-template-columns: 1fr }
}

/* =====================================================================
   === BRANDS (Страница брендов)
   ===================================================================== */
.brand-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  transition: box-shadow .15s, transform .15s;
}
.brand-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.brand-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  margin-bottom: 4px;
}
.brand-card__logo img {
  max-height: 44px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}
.brand-card__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--text);
}
.brand-card__count {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}

/* Группа по букве */
.brand-group { display: flex; flex-direction: column; gap: 10px }
.brand-group__letter {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--primary);
  letter-spacing: -.03em;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(64,64,64,.15);
}

/* Адаптив */
@media (max-width: 767px) {
  .brand-group__letter { font-size: 18px }
}

/* ===== Home advantages section ===== */
.home-advantages-section {
  background: #D5DEE8;
  padding: 40px 0;
}
.advantages-items {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.advantage-item {
  text-align: center;
  padding: 24px 14px;
  background: #bfc7d1;
  border-radius: 12px;
  transition: box-shadow .2s;
}
.advantage-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
}
.advantage-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  background: #fff;
  border-radius: 12px;
}
.advantage-item__icon svg {
  width: 32px;
  height: 32px;
}
.advantage-item__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.advantage-item__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 1000px) {
  .advantages-items { grid-template-columns: repeat(3, 1fr) }
}
@media (max-width: 768px) {
  .home-advantages-section {
    padding: 14px 0;
    overflow: hidden;
  }
  .home-advantages-section .container {
    padding: 0;
  }
  .advantages-items {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 6px calc(50% - 52px);
    scrollbar-width: none;
  }
  .advantages-items::-webkit-scrollbar { display: none; }
  .advantage-item {
    flex: 0 0 104px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 6px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform .2s ease, opacity .2s ease;
    will-change: transform, opacity;
    transform-origin: center center;
  }
  .advantage-item__icon {
    margin: 0 0 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
  }
  .advantage-item__icon svg {
    width: 22px;
    height: 22px;
  }
  .advantage-item__name {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0;
  }
  .advantage-item__desc {
    display: none;
  }
}
@media (max-width: 480px) {
  .home-advantages-section { padding: 10px 0; }
  .advantages-items {
    padding: 4px calc(50% - 46px);
    gap: 8px;
  }
  .advantage-item {
    flex: 0 0 92px;
    padding: 12px 5px 10px;
    border-radius: 12px;
  }
  .advantage-item__icon {
    width: 36px;
    height: 36px;
    margin: 0 0 6px;
  }
  .advantage-item__icon svg {
    width: 20px;
    height: 20px;
  }
  .advantage-item__name {
    font-size: 10.5px;
  }
}

/* ===== Home form section ("Нужна консультация?") ===== */
.home-form-section {
  padding: 0;
}
.home-form-body {
  background-color: #404040;
  padding: 30px 0;
  color: #fff;
}
.home-form-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 25px 20px;
}
.home-form-text {
  max-width: 600px;
}
.home-form-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.1;
}
.home-form-description {
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
}
.home-form-buttons {
  flex-shrink: 0;
}
.home-form-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 28px;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  border: 1px solid #fff;
  border-radius: 2px;
  cursor: pointer;
  transition: background .3s;
  text-transform: none;
  height: 46px;
  min-width: 170px;
}
.home-form-button:hover {
  background: rgba(255,255,255,.15);
}

@media (max-width: 768px) {
  .home-form-content { flex-direction: column; text-align: center }
  .home-form-name { font-size: 18px }
}

/* ===== Home about section (О компании) ===== */
.home-about-section {
  padding: 60px 0;
  background: #D5DEE8;
  position: relative;
  overflow: hidden;
}
.home-about {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* --- Header --- */
.home-about__header {
  text-align: center;
  margin-bottom: 36px;
}
.home-about__accent-line {
  width: 90%;
  max-width: 900px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  border-radius: 2px;
  margin: 0 auto 24px;
}
.home-about__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: -.02em;
}
.home-about__subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  font-weight: 400;
}

/* --- Stats row --- */
.home-about__stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}
.home-about__stat {
  flex: 0 1 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.home-about__stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}
.home-about__stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}

/* --- Body text + button --- */
.home-about__body {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.home-about__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.home-about__text p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}
.home-about__text strong {
  color: var(--text);
  font-weight: 600;
}
.home-about__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: 50px;
  transition: background .25s, transform .2s, box-shadow .25s;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(66,133,244,.25);
}
.home-about__btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(66,133,244,.30);
}
.home-about__btn svg {
  transition: transform .25s;
}
.home-about__btn:hover svg {
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .home-about-section { padding: 40px 0; }
  .home-about__header { margin-bottom: 24px; }
  .home-about__title { font-size: 20px; }
  .home-about__stats { gap: 8px; margin-bottom: 24px; }
  .home-about__stat {
    padding: 14px 8px;
    border-radius: 10px;
  }
  .home-about__stat-num { font-size: 22px; }
  .home-about__stat-label { font-size: 10px; }
  .home-about__text p { font-size: 14px; }
  .home-about__btn { width: 100%; justify-content: center; padding: 14px 24px; }
}

/* ===== Home brands section (Бренды-партнёры) ===== */
.home-brands-section {
  padding: 72px 0 80px;
  background: #0f172a;
  overflow: hidden;
  position: relative;
}
.home-brands-section__decor {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(59,130,246,.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(139,92,246,.1) 0%, transparent 70%);
  pointer-events: none;
}
.home-brands-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.3) 30%, rgba(59,130,246,.4) 50%, rgba(99,102,241,.3) 70%, transparent);
}
.home-brands-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.2) 30%, rgba(59,130,246,.25) 50%, rgba(99,102,241,.2) 70%, transparent);
}
.home-brands-head {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}
.home-brands-head__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px 6px 12px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 20px;
}
.home-brands-head__badge svg {
  width: 14px;
  height: 14px;
  stroke: #60a5fa;
  flex-shrink: 0;
}
.home-brands-head__title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin: 0 0 16px;
}
.home-brands-head__accent {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-brands-head__sub {
  margin: 0 auto 28px;
  font-size: 16px;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 480px;
}
.home-brands-head__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  padding: 12px 28px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border-radius: 100px;
  border: none;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 4px 15px rgba(59,130,246,.3), 0 1px 3px rgba(0,0,0,.2);
}
.home-brands-head__action:hover {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59,130,246,.4), 0 2px 6px rgba(0,0,0,.2);
}
.home-brands-head__action svg {
  transition: transform .25s;
}
.home-brands-head__action:hover svg {
  transform: translateX(3px);
}
.home-brands-carousel {
  width: 100%;
  overflow: clip;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  margin-bottom: 16px;
}
.home-brands-carousel:last-child {
  margin-bottom: 0;
}
.home-brands-carousel__track {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: max-content;
  animation: brands-scroll 120s linear infinite;
}
.home-brands-carousel__track--reverse {
  animation: brands-scroll-reverse 110s linear infinite;
}
.home-brands-carousel__track:hover {
  animation-play-state: paused;
}
@keyframes brands-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes brands-scroll-reverse {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}
.home-brands-carousel__item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 10px 22px 10px 10px;
  background: rgba(255,255,255,.05);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  cursor: pointer;
}
.home-brands-carousel__item:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(59,130,246,.35);
  box-shadow: 0 4px 20px rgba(59,130,246,.15), 0 0 40px rgba(59,130,246,.05);
  transform: translateY(-3px);
}
.home-brands-carousel__initial {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -.02em;
}
.home-brands-carousel__logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.1);
  padding: 4px;
  overflow: hidden;
}
.home-brands-carousel__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(1.1);
}
.home-brands-carousel__label {
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  letter-spacing: -.01em;
  transition: color .25s;
}
.home-brands-carousel__item:hover .home-brands-carousel__label {
  color: #fff;
}

@media (max-width: 768px) {
  .home-brands-section { padding: 48px 0 56px; }
  .home-brands-head { margin-bottom: 36px; }
  .home-brands-head__title { font-size: 28px; }
  .home-brands-head__sub { font-size: 14px; max-width: 360px; margin-bottom: 24px; }
  .home-brands-carousel__track { gap: 12px; }
  .home-brands-carousel__item { height: 56px; padding: 8px 16px 8px 8px; border-radius: 14px; gap: 10px; }
  .home-brands-carousel__initial, .home-brands-carousel__logo { width: 38px; height: 38px; border-radius: 10px; font-size: 16px; }
  .home-brands-carousel__label { font-size: 13px; }
  .home-brands-carousel { margin-bottom: 12px; }
}
@media (max-width: 480px) {
  .home-brands-section { padding: 40px 0 48px; }
  .home-brands-head__title { font-size: 24px; }
  .home-brands-head__badge { font-size: 11px; padding: 5px 12px 5px 10px; }
  .home-brands-carousel__track { gap: 10px; animation-duration: 80s; }
  .home-brands-carousel__track--reverse { animation-duration: 75s; }
  .home-brands-carousel__item { height: 48px; padding: 6px 14px 6px 6px; border-radius: 12px; gap: 8px; }
  .home-brands-carousel__initial, .home-brands-carousel__logo { width: 34px; height: 34px; border-radius: 8px; font-size: 14px; }
  .home-brands-carousel__label { font-size: 12px; }
  .home-brands-carousel { margin-bottom: 10px; }
}

/* =====================================================================
   === AUTH MODAL
   ===================================================================== */
.modal > .modal-box--auth {
  width: min(92vw, 520px);
  padding: 32px 32px 28px;
  border-radius: 28px;
  background: var(--bg, #fff);
  position: relative;
}
.auth-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border, #e2e8f0);
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--muted, #64748b);
  transition: color .15s, border-color .15s;
}
.auth-tab.active {
  color: var(--text, #0f172a);
  border-bottom-color: var(--text, #0f172a);
}
.auth-tab:hover {
  color: var(--text, #0f172a);
}
.auth-pane {
  display: none;
}
.auth-pane.active {
  display: block;
}
.auth-errors {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(220,38,38,.08);
  border: 1px solid rgba(220,38,38,.18);
  margin-bottom: 14px;
  font-size: 14px;
  color: #dc2626;
  line-height: 1.45;
}
.auth-status {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.18);
  margin-bottom: 14px;
  font-size: 14px;
  color: #0f5132;
  line-height: 1.45;
}
.modal-box--auth .modal-form .form-row { margin-top: 14px }
.modal-box--auth .modal-form .form-row:first-child { margin-top: 0 }
.modal-box--auth .modal-form .form-grid { margin-top: 14px }
.modal-box--auth .modal-form .form-grid .form-row { margin-top: 0 }
.modal-box--auth .modal-actions { margin-top: 18px }
.modal-box--auth .modal-actions .btn { width: 100% }
.modal-box--auth [data-auth-submit]:disabled {
  opacity: .6;
  cursor: wait;
}
.auth-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.auth-perks__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface, #f8fafc);
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.3;
}
.auth-perks__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--primary, #0065ff);
}

@media (max-width: 640px) {
  .modal > .modal-box--auth {
    width: min(96vw, 520px);
    padding: 22px 18px 20px;
    border-radius: 20px;
  }
  .modal-box--auth .modal-form .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* =====================================================================
   === COMPREHENSIVE RESPONSIVE ADDITIONS
   Полная адаптивность для ВСЕХ страниц и блоков
   ===================================================================== */

/* ---------- Product Media / Body / Foot (Blog, Contacts, Company cards) ---------- */
.product-media {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}
.product-media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .35s;
}
.product-media:hover img { transform: scale(1.03) }
.product-body {
  padding: 16px 20px;
}
.product-foot {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 0 20px 16px;
  margin-top: auto;
}

@media (max-width: 520px) {
  .product-body { padding: 12px 14px }
  .product-foot { padding: 0 14px 12px }
}

/* ---------- prose (rich content from CMS) ---------- */
.prose { line-height: 1.7; color: var(--muted); word-break: break-word; overflow-wrap: break-word }
.prose p { margin: 0 0 14px }
.prose h2, .prose h3 { margin: 20px 0 10px; font-weight: 700; color: var(--text) }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-lg); margin: 16px 0 }
.prose ul, .prose ol { padding-left: 20px; margin: 10px 0 }
.prose a { color: var(--accent); text-decoration: underline }

/* ---------- 2-column content layouts (Contacts, Company, Requisites) ---------- */
.content-2col {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: var(--space-6);
}
.content-2col > * { min-width: 0 }

.content-2col-equal {
  display: grid;
  grid-template-columns: 1fr .7fr;
  gap: var(--space-6);
}
.content-2col-equal > * { min-width: 0 }

.content-2col-seminar {
  display: grid;
  grid-template-columns: minmax(0,1.3fr) minmax(280px,.7fr);
  gap: var(--space-6);
}
.content-2col-seminar > * { min-width: 0 }

/* Sticky aside for content pages */
.aside-sticky {
  align-self: start;
  position: sticky;
  top: 88px;
}

@media (max-width: 980px) {
  .content-2col,
  .content-2col-equal,
  .content-2col-seminar {
    grid-template-columns: 1fr;
  }
  .aside-sticky {
    position: static;
    top: auto;
  }
}

/* ---------- Blog cards responsive ---------- */
@media (max-width: 767px) {
  .grid.grid-3 .product-card .product-media { aspect-ratio: 16/9 }
  .grid.grid-3 .product-card .product-body .h3 { font-size: 16px }
  .grid.grid-3 .product-card .product-body .h3 a { font-size: 16px }
}
@media (max-width: 520px) {
  .grid.grid-3 .product-card .product-body { padding: 12px 14px }
  .grid.grid-3 .product-card .product-foot { padding: 0 14px 12px }
  .grid.grid-3 .product-card .product-body .h3 { font-size: 15px }
}

/* ---------- Brands index page ---------- */
@media (max-width: 980px) {
  .grid.grid-4 .brand-card { padding: var(--space-3) }
}
@media (max-width: 520px) {
  .brand-group__letter { font-size: 16px }
}

/* ---------- Promotions grid ---------- */
.promotions-grid {
  grid-template-columns: 1fr;
}

/* ---------- Header medium screens (720-980px) — show search ---------- */
@media (min-width: 721px) and (max-width: 980px) {
  .topbar { display: none }
  .header-menu { display: none }
  .search { display: flex; flex: 1 }
  .header-phone { display: none }
  .search-btn { display: none }
  .header-inner { height: 70px }
}

/* ---------- Drawer improvements ---------- */
@media (max-width: 520px) {
  .drawer { width: 85vw }
  .drawer-head { padding: 12px }
  .drawer-body { padding: 12px }
}

/* ---------- Section spacing on mobile ---------- */
@media (max-width: 767px) {
  .section { padding: 20px 0 }
  .section-head { margin-bottom: var(--space-3) }
}
@media (max-width: 520px) {
  .section { padding: 16px 0 }
}

/* ---------- Typography mobile refinement ---------- */
/* Standard: H1 28-32px, H2 22-26px, H3 18-20px on mobile (Shopify/ecommerce guide) */
@media (max-width: 520px) {
  .h1 { font-size: 22px; line-height: 1.2 }
  .h2 { font-size: 18px; line-height: 1.25 }
  .h3 { font-size: 15px }
}

/* ---------- Stack/Row mobile ---------- */
@media (max-width: 520px) {
  .stack { gap: var(--space-3) }
  .row.wrap { gap: var(--space-2) }
}

/* ---------- Toast mobile ---------- */
@media (max-width: 520px) {
  #toastHost { right: 8px; bottom: 8px; left: 8px }
  .toast { max-width: 100% }
}

/* ---------- Orders detail page ---------- */
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-5);
}
@media (max-width: 980px) {
  .order-detail-grid { grid-template-columns: 1fr }
}

/* ---------- Account lists responsive ---------- */
@media (max-width: 767px) {
  .account-list-create { flex-direction: column }
  .account-list-create .input { width: 100%; flex: none }
  .account-list-create .btn { width: 100% }
}

/* ---------- FAQ page ---------- */
@media (max-width: 767px) {
  .acc-btn { font-size: 15px; padding: 10px 0 }
  .acc-panel { font-size: 14px }
}

/* ---------- Compare table mobile ---------- */
@media (max-width: 767px) {
  .compare-title { font-size: 14px; min-height: 36px }
}

/* ---------- Checkout success ---------- */
@media (max-width: 767px) {
  .checkout-success-card { padding: var(--space-4) !important }
}

/* ---------- Mobile search bar ---------- */
.search-mobile {
  display: none;
  background: #fff;
  padding: 8px 12px;
  border-top: 1px solid #eee;
}
.search-mobile.open {
  display: block;
}
.search-mobile__form {
  display: flex; align-items: center; gap: 8px;
  background: #f0f0f0; border-radius: 10px;
  padding: 0; overflow: hidden;
}
.search-mobile__back {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  background: transparent; border: none; color: #1a1a1a; cursor: pointer;
}
.search-mobile__input {
  flex: 1; border: none; background: transparent;
  padding: 10px 0; font-size: 15px; color: #1d1d1d;
  outline: none; min-width: 0;
}
.search-mobile__input::placeholder { color: #999 }
.search-mobile__submit {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  background: transparent; border: none; color: #0065ff; cursor: pointer;
}
.search-mobile__submit svg { width: 18px; height: 18px }

/* ---------- Mega dropdown mobile prevention ---------- */
@media (max-width: 720px) {
  .mega-dropdown { display: none !important }
  .nav-dropdown { display: none !important }
}

/* ---------- Flyout panels tablet ---------- */
@media (max-width: 767px) {
  .flyout-panel { width: min(100vw, 420px) }
  .flyout-item { padding: 12px 14px; gap: 10px }
  .flyout-item__img { width: 64px; height: 64px }
  .flyout-item__name { font-size: 12px }
  .flyout-item__price { font-size: 14px }
  .flyout-item__check { padding-top: 20px }
  .flyout-item__checkbox { width: 20px; height: 20px; min-width: 20px }
}

/* ---------- KPIs on home hero ---------- */
@media (max-width: 520px) {
  .kpis { gap: var(--space-2) }
  .kpi { padding: 10px 12px }
  .kpi strong { font-size: 14px }
  .kpi span { font-size: 11px }
}

/* ---------- Quick order box ---------- */
@media (max-width: 520px) {
  .quick-order-box { padding: 14px }
  .quick-order-box .h3 { font-size: 16px }
}

/* ---------- Mobile bottom bar improvements ---------- */
@media (max-width: 520px) {
  .mobile-bar { padding: 8px 10px }
  .mobile-bar .container { gap: 8px }
  .mobile-bar .btn { font-size: 13px; padding: 10px 12px; min-height: 40px }
  .mobile-bar .price-stack__current { font-size: 18px }
}

/* ---------- Category subcategories tiles ---------- */
@media (max-width: 767px) {
  .catalog-section-list-items { margin: 0 -4px }
  .catalog-section-list-item { padding: 4px }
  .catalog-section-list-item-wrapper { border-radius: 10px; border-color: #eaeaea }
  .catalog-section-list-item-picture-container { border-radius: 10px 10px 0 0; overflow: hidden }
  .catalog-section-list-item-picture { aspect-ratio: 4/3 }
}
@media (max-width: 600px) {
  /* 2 columns — compact tiles */
  .catalog-section-list-items { margin: 0 -3px }
  .catalog-section-list-item { padding: 3px }
  .catalog-section-list-item-wrapper { border-radius: 8px }
  .catalog-section-list-item-picture-container { border-radius: 8px 8px 0 0 }
  .catalog-section-list-item-picture { aspect-ratio: 3/2 }
  .catalog-section-list-item-text { padding: 8px 10px }
  .catalog-section-list-item-name { font-size: 12px; line-height: 1.3 }
  .catalog-section-list-item-count { font-size: 11px !important; margin-top: 2px !important }
}

/* ---------- Catalog filter mobile improvements ---------- */
@media (max-width: 767px) {
  .catalog-filter { border-radius: 0; border: none; padding: 0 }
  .catalog-filter-header { margin-bottom: 12px; padding-bottom: 12px }
  .catalog-filter-title { font-size: 18px }
  .catalog-filter-section { padding-top: 14px; margin-top: 14px }
  .catalog-filter-section-title { font-size: 15px; padding: 6px 0 }
  .catalog-filter-chip { padding: 8px 12px; font-size: 14px }
  .catalog-filter-apply { padding: 12px; font-size: 15px; margin-top: 20px }
}

/* ---------- Catalog panel mobile ---------- */
@media (max-width: 520px) {
  /* Standard: 36px control height (Material compact controls) */
  .catalog-panel-wrapper { flex-wrap: nowrap; gap: 6px; padding: 6px 0 }
  .catalog-panel-views { order: 1; flex: 0 0 auto }
  .catalog-panel-views-items { gap: 2px }
  .catalog-panel-views-item { width: 36px; height: 36px }
  .catalog-panel-sort { order: 2; flex: 1 1 auto; min-width: 0 }
  .catalog-panel-sort-icon { display: none }
  .catalog-panel-sort-text { display: none }
  /* Standard: 14px select text (Material body-medium) */
  .catalog-panel-sort-select { width: 100%; min-width: 0; font-size: 14px; padding: 6px 8px; height: 36px }
  .catalog-panel-filter-btn { order: 3; height: 36px; font-size: 13px; padding: 0 12px; gap: 4px; white-space: nowrap }
  .catalog-panel { margin-bottom: 8px }
  /* Standard: 13px secondary text (Material label-medium) */
  .catalog-result-count { font-size: 13px; margin-bottom: 6px }
}

/* ---------- Error pages ---------- */
@media (max-width: 520px) {
  .error-page { padding: var(--space-6) var(--space-4) }
}

/* ---------- Breadcrumbs mobile ---------- */
@media (max-width: 520px) {
  .breadcrumbs { font-size: 12px; gap: 4px }
  .breadcrumbs a { white-space: nowrap }
  .intec-template-breadcrumb { padding: 10px 0 4px }
}

/* ---------- Auth pages (standalone account/login, account/register) ---------- */
.auth-standalone {
  max-width: 460px;
  margin: 0 auto;
}
@media (max-width: 520px) {
  .auth-standalone { padding: 0 }
  .auth-standalone .card.pad { padding: var(--space-4) }
}

/* ---------- Pagination mobile ---------- */
@media (max-width: 400px) {
  .pagination { gap: 2px }
  .pagination__page,
  .pagination__btn { min-width: 30px; height: 30px; font-size: 12px }
  .catalog-pagination-btn { width: 30px; height: 30px }
  .catalog-pagination-page { min-width: 30px; height: 30px; font-size: 13px }
}

/* ---------- Price block responsive ---------- */
@media (max-width: 520px) {
  .price-stack__current { font-size: 16px }
  .price-stack__old { font-size: 12px }
  .price { font-size: 15px }
}

/* ---------- Tab component mobile ---------- */
@media (max-width: 400px) {
  .tabs { gap: 2px; padding: 4px }
  .tab { font-size: 12px; padding: 8px 4px }
}

/* ---------- Specs grid mobile ---------- */
@media (max-width: 400px) {
  .specs { gap: 6px }
  .spec { padding: 10px 12px }
  .spec b { font-size: 11px }
  .spec span { font-size: 13px }
}

/* ---------- Gallery mobile ---------- */
@media (max-width: 400px) {
  .thumb { flex: 0 0 48px; min-width: 48px }
}

/* ---------- Product card image square ratio ---------- */
.catalog-section-item-image {
  padding-top: 100%;
}

/* ---------- Print safety ---------- */
@media print {
  .header-sticky, .footer, .floating-sidebar, .drawer, .drawer-backdrop,
  .flyout-panel, .flyout-backdrop, .mobile-bar, .modal, .modal-backdrop,
  #toastHost { display: none !important }
  .container { max-width: 100% }
  body { background: #fff }
}

/* ---------- Safe area (iPhone notch) ---------- */
@supports (padding: env(safe-area-inset-bottom)) {
  .mobile-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)) }
  .drawer { padding-bottom: env(safe-area-inset-bottom) }
  .footer { padding-bottom: env(safe-area-inset-bottom) }
}

/* ---------- Smooth scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Touch improvements ---------- */
/* Note: min-width/min-height for touch targets are now handled
   per-component in the responsive media queries above.
   We only keep non-conflicting touch improvements here. */
@media (pointer: coarse) {
  .nav a { padding: 14px 16px }
  .pill { padding: 10px 14px }
  .chip { padding: 10px 12px }
  .catalog-filter-chip { padding: 10px 12px }
  .tab { padding: 12px 14px }
  .flyout-item__qty-btn { min-width: 44px; min-height: 44px }
  .flyout-item__remove { min-width: 44px; min-height: 44px }
  .flyout-item__checkbox { min-width: 22px; min-height: 22px }
  .flyout-panel__close { min-width: 44px; min-height: 44px }
}

/* ---------- Horizontal scroll helpers ---------- */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none }

/* ---------- Account sidebar profile ---------- */
.account-sidebar__profile {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.account-sidebar__profile-text { min-width: 0 }
.account-sidebar__name {
  font-weight: 900; font-size: 16px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 980px) {
  .account-sidebar__profile { gap: 10px; padding-bottom: 10px }
  .account-sidebar__name { font-size: 15px }
  .account-sidebar .user-avatar--lg { width: 48px; height: 48px }
}

/* ---------- List cards responsive ---------- */
.list-card {
  display: flex; flex-direction: column; gap: 12px;
}
@media (max-width: 767px) {
  .account-lists-grid.grid-2 { grid-template-columns: 1fr }
  .list-card-actions { flex-direction: column }
  .list-card-actions form { width: 100% }
  .list-card-actions .btn { width: 100% }
}

/* ---------- Checkout old price ---------- */
.checkout-summary__old-price {
  font-size: 13px; color: var(--muted);
  text-decoration: line-through; font-weight: 400;
}

/* ---------- Help sidebar responsive additions ---------- */
.help-sidebar {
  align-self: start;
  position: sticky;
  top: 88px;
}
@media (max-width: 980px) {
  .help-sidebar { position: static; top: auto }
  .help-sidebar__cta { display: none }
}
@media (max-width: 520px) {
  .help-sidebar .help-nav .pill { font-size: 13px; padding: 8px 10px }
}

/* ---------- Services page ---------- */
@media (max-width: 520px) {
  .services-grid.grid-2 { grid-template-columns: 1fr }
}

/* ---------- Account login / register standalone pages ---------- */
.account-auth-page { max-width: 480px; margin: 0 auto }
@media (max-width: 520px) {
  .account-auth-page .card.pad { padding: var(--space-4) }
}

/* ---------- Blog show page ---------- */
.blog-article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-6);
  align-items: start;
}
.blog-article-layout > * { min-width: 0 }
@media (max-width: 980px) {
  .blog-article-layout { grid-template-columns: 1fr }
}

/* ---------- Shares show page ---------- */
.shares-show-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-6);
  align-items: start;
}
.shares-show-layout > * { min-width: 0 }
@media (max-width: 980px) {
  .shares-show-layout { grid-template-columns: 1fr }
}

/* ---------- Order receipt modal responsive ---------- */
@media (max-width: 640px) {
  .modal .receipt-summary__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .modal .receipt-summary { padding: 14px }
}

/* ---------- Chat widget responsive ---------- */
@media (max-width: 520px) {
  .chat-widget { bottom: 8px; right: 8px }
  .chat-widget__window {
    width: calc(100vw - 16px);
    height: calc(100vh - 80px);
    bottom: 52px;
    right: 0;
  }
}

/* ---------- Summary card responsive ---------- */
@media (max-width: 520px) {
  .summary { padding: var(--space-4) }
  .summary .row { flex-wrap: wrap }
}

/* ---------- Global safe word-break ---------- */
.card, .modal-box, .drawer-body, article {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---------- Responsive media safety ---------- */
video, iframe { max-width: 100% }

/* ---------- Table responsive wrapper ---------- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- Select full width on mobile ---------- */
@media (max-width: 520px) {
  .select { width: 100%; min-width: 0 }
}

/* ---------- Promotion detail page ---------- */
.promotion-detail {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-6);
  align-items: start;
}
.promotion-detail__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--surface-2);
}
.promotion-detail__media img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.promotion-detail__content { min-width: 0 }
.promotion-detail__description { margin-top: 8px }

@media (max-width: 767px) {
  .promotion-detail {
    grid-template-columns: 1fr;
  }
  .promotion-detail__media {
    aspect-ratio: 16/9;
    max-height: 240px;
  }
}
@media (max-width: 520px) {
  .promotion-detail.card.pad { padding: var(--space-4) }
  .promotion-detail__media { max-height: 180px; border-radius: var(--radius-md) }
}

/* ---------- Favorites page responsive ---------- */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
}
@media (max-width: 1023px) { .favorites-grid { grid-template-columns: repeat(3, minmax(0,1fr)) } }
@media (max-width: 767px)  { .favorites-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px } }
@media (max-width: 400px)  { .favorites-grid { gap: 6px } }

/* ---------- Seminar card responsive ---------- */
@media (max-width: 520px) {
  .grid.grid-3 article.card.pad { padding: var(--space-3) }
  .grid.grid-3 article.card.pad img { height: 160px !important; border-radius: 12px !important }
}

/* ---------- Empty state responsive ---------- */
@media (max-width: 520px) {
  .empty-state { padding: var(--space-6) var(--space-4) }
  .empty-state .h3 { font-size: 16px }
}

/* ---------- Row buttons mobile wrap ---------- */
@media (max-width: 520px) {
  .row.wrap .btn { min-width: 0 }
  .row.wrap form { min-width: 0 }
}

/* ---------- Account dashboard stats ---------- */
@media (max-width: 520px) {
  .account-layout .grid.grid-3 { grid-template-columns: 1fr }
}

/* ---------- Consent page ---------- */
@media (max-width: 767px) {
  .consent-content .prose { font-size: 14px }
}

/* ---------- Brands index responsive ---------- */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
}
@media (max-width: 980px)  { .brands-grid { grid-template-columns: repeat(3, minmax(0,1fr)) } }
@media (max-width: 767px)  { .brands-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px } }
@media (max-width: 400px)  { .brands-grid { grid-template-columns: 1fr } }

/* ---------- Help sub-pages (delivery, payment, returns) ---------- */
@media (max-width: 767px) {
  .help-layout article .grid.grid-3 { grid-template-columns: 1fr !important }
}

/* ---------- Header actions count badge (cart, favorites) ---------- */
@media (max-width: 520px) {
  .count { min-width: 14px; height: 14px; font-size: 9px; top: 1px; right: 1px }
}

/* ---------- Flyout list tabs mobile ---------- */
@media (max-width: 520px) {
  .flyout-list-tabs { padding: 6px 12px 8px; gap: 4px }
  .flyout-list-tab { font-size: 12px; padding: 5px 10px }
}

/* ---------- Cart page header row mobile ---------- */
@media (max-width: 520px) {
  .cart-page .row.space-between { flex-direction: column; align-items: flex-start; gap: 10px }
  .cart-page .row.space-between .row { width: 100% }
  .cart-page .row.space-between .btn { flex: 1 }
}

/* ---------- Checkout success page ---------- */
@media (max-width: 767px) {
  .checkout-success .grid.grid-2 { grid-template-columns: 1fr }
}

/* ---------- Topbar on larger tablets ---------- */
@media (min-width: 721px) and (max-width: 980px) {
  .topbar-links { gap: 12px }
  .topbar-info { gap: 12px }
}

/* ---------- Navigation menu on large tablet ---------- */
@media (min-width: 721px) and (max-width: 1100px) {
  .nav a { padding: 12px 10px; font-size: 13px }
}

/* ---------- Mega dropdown on tablet ---------- */
@media (max-width: 1100px) {
  .mega-cat-img, .mega-cat-img-placeholder { width: 140px; height: 140px }
  .mega-dropdown-inner { gap: 16px }
}

/* ---------- Auth layout (standalone login/register pages) ---------- */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 767px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    max-width: 480px;
  }
}
@media (max-width: 520px) {
  .auth-layout .card.pad { padding: var(--space-4) }
  .auth-layout .grid.grid-2 { grid-template-columns: 1fr }
}

/* ---------- Forgot password page ---------- */
.forgot-layout {
  max-width: 460px;
  margin: 0 auto;
}

/* ---------- Verify email page ---------- */
.verify-layout {
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- Error pages (404, 500) ---------- */
.error-layout {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4);
}
.error-layout .h1 {
  font-size: clamp(48px, 10vw, 96px);
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--border);
}
.error-layout .h2 {
  margin-top: var(--space-4);
}
.error-layout .p {
  margin-top: var(--space-3);
}
.error-layout .row {
  margin-top: var(--space-5);
  justify-content: center;
}

/* ---------- Brands show page ---------- */
.brand-show-header {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.brand-show-logo {
  width: 120px; height: 80px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 8px;
}
@media (max-width: 520px) {
  .brand-show-logo { width: 80px; height: 56px }
  .brand-show-header { gap: var(--space-3) }
}

/* ---------- Blog buttons mobile ---------- */
@media (max-width: 520px) {
  .blog-article-actions .row.wrap { flex-direction: column; align-items: stretch }
  .blog-article-actions .row.wrap .btn { width: 100%; justify-content: center }
}

/* ---------- Account profile form mobile ---------- */
@media (max-width: 767px) {
  .account-layout .grid.grid-2 { grid-template-columns: 1fr }
}

/* ---------- Order items table mobile ---------- */
@media (max-width: 767px) {
  .order-items-table { display: block }
  .order-items-table thead { display: none }
  .order-items-table tbody { display: block }
  .order-items-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "name name" "qty price" "sum sum";
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
    background: var(--surface);
    gap: 6px;
  }
  .order-items-table td { border: 0; padding: 2px 0 }
  .order-items-table td:nth-child(1) { grid-area: name; font-weight: 900 }
  .order-items-table td:nth-child(2) { grid-area: qty }
  .order-items-table td:nth-child(3) { grid-area: price; text-align: right }
  .order-items-table td:nth-child(4) { grid-area: sum; font-weight: 900 }
}

/* ---------- Homepage hero section with KPIs ---------- */
@media (max-width: 520px) {
  .hero { padding: 16px 0 0 }
  .hero-main { padding: var(--space-4) }
  .hero-main::after { display: none }
}

/* ---------- Home categories responsive ---------- */
@media (max-width: 520px) {
  .home-categories-section { padding: 24px 0 }
  .categories-head { margin-bottom: 16px }
}

/* ---------- Footer callback button responsive ---------- */
@media (max-width: 520px) {
  .footer-callback { padding: 10px 0 }
  .footer { padding: 28px 0 0 }
}

/* ---------- Catalog scroll anchor offset ---------- */
#catalog-products {
  scroll-margin-top: 20px;
}

