/* Montserrat 700/800, кириллица и латиница. Файлы лежат на нашем сервере:
   обращений к fonts.googleapis.com и fonts.gstatic.com больше нет,
   IP посетителей за границу не уходят. Лицензия SIL Open Font License 1.1 */
/* Файлы «700» и «800» оказались одним и тем же переменным шрифтом, и браузер качал
   его дважды. Теперь один файл на алфавит обслуживает оба начертания. */
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url(/fonts/montserrat-800-cyrillic.woff2) format(woff2);
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url(/fonts/montserrat-800-latin.woff2) format(woff2);
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =============================================
   МАЯКАВТО — Apple-style Design System
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-dark: #004ea8;
  --bg: #f5f5f7;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-light: #a1a1a6;
  --border: #d2d2d7;
  --border-light: #e8e8ed;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
  --orange: #ff6b00;
  --orange-hover: #e55d00;
}

html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
}
html::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}
body {
  overflow-x: clip;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---- UTILITY ---- */
.container { max-width: 1440px; margin: 0 auto; padding: 0 12px; }

/* =============================================
   HEADER
   ============================================= */
/* Родитель не должен мешать sticky дочернему элементу */
.site-header {
  background: transparent;
  position: relative;
  overflow: visible !important;
}

/* Только логотип + поиск + навигация — sticky */
.header-sticky-wrap {
  overflow: visible;
}

/* ---- TOP BAR ---- */
.header-topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}

.topbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 0;
  gap: 16px;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  justify-self: start;
}
.topbar-schedule-block {
  display: flex;
  align-items: center;
  gap: 7px;
}
.topbar-schedule-block > svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}
.topbar-schedule-times {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.topbar-schedule-times span {
  font-size: 16px;
  color: #3a3a3f;
  font-weight: 500;
  line-height: 1.3;
}
.topbar-links { display: flex; flex-direction: row; gap: 12px; align-items: center; }
.topbar-links-col { display: flex; flex-direction: column; gap: 2px; padding: 6px 0 2px; }
.topbar-links a {
  font-size: 16px;
  color: #3a3a3f;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
  font-weight: 500;
}
.topbar-links a svg { width: 14px; height: 14px; flex-shrink: 0; }
.topbar-links a:hover { color: var(--blue); text-decoration: none; }
.topbar-about-link {
  font-size: 16px;
  color: #3a3a3f;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
  font-weight: 500;
}
.topbar-about-link svg { width: 14px; height: 14px; flex-shrink: 0; color: #3a3a3f; }
.topbar-about-link:hover { color: var(--blue); text-decoration: none; }

.topbar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
}
.topbar-wholesale-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.topbar-phones { display: flex; gap: 20px; margin: 4px 0; }
.topbar-phones a {
  font-size: 19px;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
}
.topbar-phones a:hover { text-decoration: underline; }
.topbar-email { font-size: 14px; color: #3a3a3f; }
.topbar-email a { color: #3a3a3f; text-decoration: none; font-weight: 500; }
.topbar-email a:hover { color: var(--blue); }
.topbar-desc { font-size: 13px; color: #3a3a3f; max-width: 480px; line-height: 1.5; }
.topbar-min { font-size: 14px; color: #3a3a3f; font-weight: 500; }
.topbar-min strong { color: var(--text-primary); font-size: 14px; }

.topbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  justify-self: end;
}
.topbar-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #3a3a3f;
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
  border: 1.5px dashed rgba(120, 120, 130, 0.45);
  border-radius: 10px;
  padding: 6px 14px;
}
.topbar-cart-link:hover { color: var(--blue); text-decoration: none; }
.topbar-cart-link svg { width: 22px; height: 22px; }
.topbar-cart-total { font-size: 15px; color: #3a3a3f; font-weight: 400; }
.topbar-cart-badge {
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  position: static !important;
  flex-shrink: 0;
}
.topbar-auth { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.topbar-auth a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  font-weight: 500;
}
.topbar-auth a:hover { color: var(--blue); text-decoration: none; }

/* Styled login button */
.topbar-login-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  background: var(--blue) !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  padding: 11px 28px;
  border-radius: 50px;
  text-decoration: none !important;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 2px 10px rgba(0,113,227,0.25);
  white-space: nowrap;
}
.topbar-login-btn:hover {
  background: var(--blue-hover) !important;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(0,113,227,0.38);
  transform: translateY(-1px);
}
.topbar-btn-logout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: #dc2626;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(220,38,38,0.35);
  transition: background .18s, transform .18s, box-shadow .18s;
  flex-shrink: 0;
}
.topbar-btn-logout-icon:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(220,38,38,0.5);
}

/* ---- Избранное: круглая кнопка-сердце в шапке ---- */
.topbar-fav-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #dc2626 !important;
  color: #fff !important;
  border-radius: 50%;
  text-decoration: none !important;
  box-shadow: 0 2px 10px rgba(220,38,38,0.35);
  transition: background .18s, transform .18s, box-shadow .18s;
  flex-shrink: 0;
}
.topbar-fav-btn:hover {
  background: #b91c1c !important;
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 4px 16px rgba(220,38,38,0.55);
}
.topbar-fav-btn svg { width: 22px; height: 22px; }

/* ---- Избранное: сердечко на карточке товара ---- */
.product-card { position: relative; }
.fav-heart-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: color .18s, background .18s, transform .18s, box-shadow .18s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: all;
}
.fav-heart-btn svg { width: 20px; height: 20px; }
.fav-heart-btn:hover {
  color: #dc2626;
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(220,38,38,0.25);
}
.fav-heart-btn.is-active {
  color: #dc2626;
  background: #fff;
}
.fav-heart-btn.pulse { animation: favPulse .45s ease; }
@keyframes favPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* На странице товара — компактная кнопка-сердце рядом с «В корзину» */
.product-page-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 2px solid #dc2626;
  background: #fff;
  color: #dc2626;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(220,38,38,0.15);
  transition: background .2s, transform .2s, box-shadow .2s, border-color .2s;
}
.product-page-fav svg {
  width: 22px;
  height: 22px;
  fill: #dc2626;
  stroke: #dc2626;
  transition: fill .2s, stroke .2s, transform .2s;
}
.product-page-fav:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220,38,38,0.35);
}
.product-page-fav:hover svg { fill: #fff; stroke: #fff; transform: scale(1.12); }
.product-page-fav.is-active {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-color: #b91c1c;
  box-shadow: 0 4px 14px rgba(220,38,38,0.4);
}
.product-page-fav.is-active svg { fill: #fff; stroke: #fff; }
.product-page-fav.is-active:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}
.product-page-fav.pulse { animation: favPulse .45s ease; }

/* =============================================
   СТРАНИЦА О КОМПАНИИ
   ============================================= */
.about-page { padding: 24px 0 80px; max-width: 1180px; }

/* HERO */
.about-hero {
  margin: 18px 0 36px;
  padding: 48px 50px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,0,0.18), transparent 55%),
    linear-gradient(135deg, #0f1923 0%, #1a2b3c 55%, #0f2540 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.about-hero::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,107,0,0.07);
  pointer-events: none;
}
.about-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.about-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255,107,0,0.18);
  border: 1px solid rgba(255,107,0,0.35);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: #ff6b00;
  margin-bottom: 22px;
}
.about-hero h1 {
  font-size: 40px;
  font-weight: 800;
  margin: 0 0 18px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.about-brand { color: #ff6b00; }
.about-hero-text {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255,255,255,0.82);
  margin: 0;
}

/* СТАТИСТИКА */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 44px;
}
.about-stat {
  background: #fff;
  border-radius: 18px;
  padding: 26px 24px;
  text-align: center;
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
  transition: transform .22s, box-shadow .22s;
}
.about-stat:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(0,0,0,0.1); }
.about-stat-num {
  font-size: 30px;
  font-weight: 800;
  color: #ff6b00;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  line-height: 1.1;
}
.about-stat-label { font-size: 13px; color: #6b7280; font-weight: 500; }

/* СЕКЦИИ */
.about-section { margin-bottom: 44px; }
.about-section h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 22px;
  color: #1a1a1a;
  letter-spacing: -0.3px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.about-card {
  background: #fff;
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
  transition: transform .22s, box-shadow .22s;
}
.about-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,0.1); }
.about-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.about-card-icon svg { width: 26px; height: 26px; }
.about-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1a1a1a;
}
.about-card p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.55;
  margin: 0;
}

/* СКЛАД */
.about-warehouse {
  background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
  border-radius: 22px;
  padding: 42px 44px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  border: 1px solid #fed7aa;
}
.about-warehouse-left h2 {
  font-size: 28px;
  margin-bottom: 12px;
  line-height: 1.15;
}
.about-warehouse-left h2 span { color: #ff6b00; }
.about-warehouse-left p { color: #555; line-height: 1.6; margin: 0; font-size: 15px; }
.about-warehouse-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.about-warehouse-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.about-warehouse-list li svg {
  width: 18px;
  height: 18px;
  color: #16a34a;
  flex-shrink: 0;
  background: #dcfce7;
  border-radius: 50%;
  padding: 4px;
  box-sizing: content-box;
}

/* ПРИНЦИПЫ */
.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.about-value {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform .22s;
}
.about-value:hover { transform: translateY(-3px); }
.about-value > span {
  font-size: 28px;
  font-weight: 800;
  color: #fed7aa;
  line-height: 1;
  flex-shrink: 0;
  font-family: 'Segoe UI', sans-serif;
}
.about-value h4 { font-size: 15px; font-weight: 700; margin: 4px 0 4px; color: #1a1a1a; }
.about-value p { font-size: 13px; color: #6b7280; line-height: 1.5; margin: 0; }

/* КОНТАКТЫ */
.about-contacts { margin-bottom: 36px; }
.about-contacts h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 22px;
  color: #1a1a1a;
}
.about-contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.about-contact-card {
  background: #fff;
  border-radius: 18px;
  padding: 24px 24px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.06);
  transition: transform .22s, box-shadow .22s;
}
.about-contact-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,0.1); }
.about-contact-card-wide { grid-column: span 2; }
.about-contact-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.about-contact-icon svg { width: 22px; height: 22px; }
.about-contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 6px;
}
.about-contact-main {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #1a1a1a;
  text-decoration: none;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
a.about-contact-main:hover { color: #ff6b00; }
.about-contact-sub {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}
.about-contact-sub a {
  display: block;
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 600;
}
.about-contact-sub a:hover { color: #ff6b00; }

/* РЕКВИЗИТЫ */
.about-legal {
  background: #f9fafb;
  border-radius: 20px;
  padding: 32px 36px;
  border: 1px solid #e5e7eb;
}
.about-legal h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 8px;
  color: #1a1a1a;
}
.about-legal-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 22px;
  max-width: 720px;
}
.about-legal-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 18px;
}
.about-legal-grid > div {
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px;
}
.about-legal-grid span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  color: #9ca3af;
  margin-bottom: 4px;
}
.about-legal-grid b {
  font-size: 15px;
  color: #1a1a1a;
  font-weight: 700;
}

@media (max-width: 900px) {
  .about-hero { padding: 32px 26px; border-radius: 18px; }
  .about-hero h1 { font-size: 28px; }
  .about-hero-text { font-size: 15px; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .about-warehouse { grid-template-columns: 1fr; padding: 28px 24px; gap: 24px; }
  .about-contact-card-wide { grid-column: auto; }
  .about-legal-grid { grid-template-columns: 1fr; }
  .about-legal { padding: 24px 22px; }
}

/* ---- Страница избранного ---- */
.favorites-page { padding: 0 0 60px; }

.fav-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px 30px;
  margin-bottom: 24px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.12), transparent 55%),
    linear-gradient(135deg, rgba(220,38,38,0.78) 0%, rgba(185,28,28,0.78) 60%, rgba(153,27,27,0.78) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(220,38,38,0.18);
  position: relative;
  overflow: hidden;
}
.fav-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.fav-hero-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
  animation: favHeroBeat 2.2s ease-in-out infinite;
}
.fav-hero-icon svg {
  width: 34px;
  height: 34px;
  fill: #fff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}
@keyframes favHeroBeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.fav-hero-text { flex: 1; position: relative; z-index: 1; }
.fav-hero-text h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #fff;
  letter-spacing: -0.3px;
}
.fav-hero-text .fav-subtitle {
  color: rgba(255,255,255,0.92);
  font-size: 15px;
  margin: 0;
}
.fav-hero-text .fav-subtitle b { font-weight: 700; }

@media (max-width: 560px) {
  .fav-hero { padding: 20px; gap: 14px; border-radius: 16px; }
  .fav-hero-icon { width: 54px; height: 54px; }
  .fav-hero-icon svg { width: 26px; height: 26px; }
  .fav-hero-text h1 { font-size: 22px; }
  .fav-hero-text .fav-subtitle { font-size: 13px; }
}
.favorites-page .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.favorites-empty {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 16px;
  color: #6b7280;
}
.favorites-empty svg { width: 64px; height: 64px; color: #fecaca; fill: currentColor; margin-bottom: 16px; }
.favorites-empty h2 { font-size: 22px; color: #1f2937; margin-bottom: 8px; }
.favorites-empty a {
  display: inline-block;
  margin-top: 20px;
  background: #ff6b00;
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: background .18s;
}
.favorites-empty a:hover { background: #e05e00; }

/* ---- MAIN HEADER ROW ---- */
.header-main {
  padding: 14px 0;
  background: rgba(255,255,255,0.92);
}
.header-main-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo-icon {
  width: 72px !important;
  height: 72px !important;
  border-radius: 18px !important;
  background: none !important;
  padding: 0 !important;
}
.logo-icon img { width: 72px !important; height: 72px !important; border-radius: 18px !important; display: block; }
.logo-icon svg { width: 42px !important; height: 42px !important; }
.logo-text h1 { font-size: 26px !important; }
.logo-text span { font-size: 15px !important; }
.search-area {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-search-form.large {
  flex: 1;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 50px;
}
.header-search-form.large input { font-size: 16px; }

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.logo-area:hover { text-decoration: none; }

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 26px; height: 26px; }

.logo-text h1 {
  font-family: 'Montserrat', var(--font);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.2;
}
.logo-text span {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

.header-search-form {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 7px 14px;
  gap: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 260px;
}
.header-search-form:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}
.header-search-form input {
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  flex: 1;
  min-width: 0;
}
.header-search-form input::placeholder { color: var(--text-light); }
.header-search-form button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}
.header-search-form button:hover { color: var(--blue); }

/* ── Живой поиск: подсказки под строкой поиска (search-suggest.js) ── */
.ss-panel {
  position: fixed; z-index: 2000; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.14); padding: 6px;
  animation: ssIn .14s ease;
}
.ss-panel[hidden] { display: none; }
@keyframes ssIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ss-head { padding: 10px 12px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-secondary); }
.ss-fix { margin: 4px 6px 2px; padding: 8px 12px; border-radius: 10px; background: #f2f6fd; color: #33475b; font-size: 13px; }
.ss-cat, .ss-item, .ss-all { display: flex; align-items: center; gap: 12px; border-radius: 10px; color: var(--text-primary); text-decoration: none; }
.ss-cat { padding: 8px 12px; font-size: 14px; font-weight: 600; }
.ss-cat svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--blue); }
.ss-item { padding: 8px 12px 8px 8px; }
.ss-item img { width: 44px; height: 44px; flex-shrink: 0; object-fit: contain; border-radius: 8px; border: 1px solid var(--border-light); background: #fff; }
.ss-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ss-name { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ss-meta { font-size: 12px; color: var(--text-secondary); display: flex; gap: 8px; flex-wrap: wrap; }
.ss-in { color: #188038; font-weight: 600; }
.ss-out { color: #8a8f98; }
.ss-price { font-size: 14.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ss-panel mark { background: #fff3c4; color: inherit; border-radius: 3px; padding: 0 1px; }
.ss-all { justify-content: center; margin-top: 4px; padding: 11px 12px; font-size: 14px; font-weight: 600; color: var(--blue); border-top: 1px solid var(--border-light); border-radius: 0 0 10px 10px; }
.ss-cat:hover, .ss-item:hover, .ss-all:hover, .ss-panel .is-active { background: #f2f5fa; text-decoration: none; }
.ss-none { padding: 22px 16px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.ss-none b { font-size: 15px; }
.ss-none span { font-size: 13px; color: var(--text-secondary); }
@media (max-width: 768px) {
  .ss-item img { width: 40px; height: 40px; }
  .ss-name { font-size: 14px; }
}

.btn-catalog-dl {
  background: #fff;
  color: #1a1a1a;
  border: 1.5px solid #e3e7ee;
  border-radius: 14px;
  padding: 4px 16px 4px 4px;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.btn-catalog-dl:hover { border-color: #c9d1db; box-shadow: 0 6px 18px rgba(16,24,40,.10); text-decoration: none; transform: translateY(-1px); color: #1a1a1a; }
.btn-catalog-dl:active { transform: translateY(0); }
/* Значок файла — серый квадрат (как значки разделов в каталоге слева), при наведении темнеет */
.cdl-ico { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center;
           background: #eef1f5; color: #5f6b7a; transition: background .15s, color .15s; }
.btn-catalog-dl:hover .cdl-ico { background: #e3e7ee; color: #1a1a1a; }
.cdl-ico svg { width: 19px; height: 19px; }
.cdl-text { display: flex; flex-direction: column; line-height: 1.2; }
.cdl-text b { font-size: 14.5px; font-weight: 800; }
.cdl-text small { font-size: 12px; font-weight: 600; color: #8a94a3; }
.btn-catalog-dl:hover .cdl-text small { color: #5f6b7a; }

/* ---- MAIN NAV ---- */
.main-nav {
  position: relative;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  width: 100%;
  left: 0;
  min-height: 46px;
  contain: layout style;
}
html.page-ready .main-nav {
  position: sticky;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
  padding: 7px 0;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  overflow: visible;
}

.nav-item { position: relative; flex-shrink: 0; }
/* Мост между пунктом и его списком: мышь не «проваливается» в зазор под пунктом */
.nav-item.has-dropdown::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }

/* Пункт меню — «таблетка»: значок раздела + название; наведение и текущий раздел — голубой фон */
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 6px;
  font-size: 17px !important;
  font-weight: 700 !important;
  letter-spacing: .2px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 12px;
  transition: color .15s, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.nav-ico { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
           background: #f2f4f7; color: #5f6b7a; transition: background .15s, color .15s; }
.nav-ico svg { width: 17px; height: 17px; }
.nav-link:hover { color: var(--blue); background: #f2f7ff; text-decoration: none; }
.nav-link:hover .nav-ico { background: #e3eeff; color: var(--blue); }
.nav-link.active { color: var(--blue); background: #eaf2ff; box-shadow: inset 0 0 0 1px #d6e5fb; }
.nav-link.active .nav-ico { background: #fff; color: var(--blue); }
/* «Хит» и «Новинки» — цветные таблетки, отделены от разделов чертой */
.nav-link.nav-badge-hit { color: #e8710a !important; background: #fff5ec; }
.nav-link.nav-badge-hit .nav-ico { background: #ffe8d4; color: #e8710a; }
.nav-link.nav-badge-hit:hover, .nav-link.nav-badge-hit.active { background: #ffecdb; box-shadow: inset 0 0 0 1px #ffd9b8; }
.nav-link.nav-badge-new { color: #2f8be0 !important; background: #f0f7ff; }
.nav-link.nav-badge-new .nav-ico { background: #dcecfd; color: #2f8be0; }
.nav-link.nav-badge-new:hover, .nav-link.nav-badge-new.active { background: #e3f0fd; box-shadow: inset 0 0 0 1px #cde3fa; }
.nav-item.is-special + .nav-item:not(.is-special) { margin-left: 9px; padding-left: 13px; }
.nav-item.is-special + .nav-item:not(.is-special)::before { content: ''; position: absolute; left: 0; top: 50%; width: 1px; height: 26px;
                                                            margin-top: -13px; background: var(--border-light); }

/* Хит / Новинки в левом сайдбаре — те же цвета, что и в верхнем меню */
.sidebar-badge-hit .sidebar-label { color: #e67e22 !important; font-weight: 700; }
.sidebar-badge-new .sidebar-label { color: #3a9be8 !important; font-weight: 700; }
.nav-link .nav-chev { width: 13px; height: 13px; margin-left: -3px; stroke-width: 3; color: #9aa4b2; transition: transform .2s, color .15s; }
.nav-item:hover .nav-link .nav-chev { transform: rotate(180deg); color: var(--blue); }
/* На ноутбуках поуже значки разделов убираем — иначе меню не помещается в одну строку */
@media (max-width: 1280px) {
  .nav-item:not(.is-special) .nav-ico { display: none; }
  .nav-item:not(.is-special) .nav-link { padding-left: 14px; }
  .nav-link { font-size: 16px !important; }
}
@media (max-width: 1100px) {
  .nav-list { gap: 2px; }
  .nav-link, .nav-item:not(.is-special) .nav-link { font-size: 15px !important; padding: 6px 10px; gap: 7px; }
  .nav-item.is-special .nav-link { padding-left: 5px; }
  .nav-item.is-special + .nav-item:not(.is-special) { margin-left: 5px; padding-left: 8px; }
}


.nav-item.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity 0.2s ease 0.4s, visibility 0s linear 0.4s, transform 0.2s ease 0.4s; }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(16,24,40,.14);
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.15s ease 0s, visibility 0s linear 0.15s, transform 0.15s ease 0s;
  z-index: 999;
  overflow: visible;
}

.dropdown-inner { padding: 8px; }

.dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.dropdown a:hover { background: #f2f7ff; color: var(--blue); text-decoration: none; }
.dropdown a svg { width: 12px; height: 12px; color: var(--text-light); }

/* Вложенные дропдауны (бесконечная вложенность) */
.nav-dd-item {
  position: relative;
}
.nav-dd-item { transition: opacity 0.15s ease; }
.nav-dd-item > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.nav-dd-item > a:hover { background: #f2f7ff; color: var(--blue); }
.nav-dd-item .dd-arrow { display: flex; align-items: center; margin-left: 8px; opacity: 1; color: #9aa4b2; }
.nav-dd-item > a:hover .dd-arrow { color: var(--blue); }
.nav-dd-item .dd-arrow svg { width: 13px; height: 13px; stroke-width: 3; }
/* Стрелка слева от текста для правой части экрана */
.nav-dd-item.opens-left > a { flex-direction: row-reverse; }
.nav-dd-item.opens-left .dd-arrow { margin-left: 0; margin-right: 6px; }
/* Если в списке есть хоть один пункт со стрелкой влево — пункты БЕЗ стрелки
   в этом же списке тоже уводим текст вправо, чтобы список смотрелся ровно */
.dd-list-align-right > .nav-dd-item:not(.has-sub) > a { justify-content: flex-end; text-align: right; }
.nav-sub-dropdown {
  display: none;
  position: absolute;
  left: 100%;
  right: auto;
  top: -8px;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(16,24,40,.14);
  padding: 8px;
  z-index: 1001;
}
/* Прозрачный мост — мышь не проваливается в зазор */
.nav-dd-item.has-sub {
  padding-right: 8px;
}
.nav-dd-item.has-sub:hover > .nav-sub-dropdown { display: block; }

/* Широкий дропдаун — колонки по 10 элементов. Колонка не шире 270 px, длинные названия
   переносятся: раньше у ИНСТРУМЕНТА (24 подраздела) список был шириной 1200 px и уходил за край экрана */
.dropdown-wide { min-width: 0; width: max-content; }
.dropdown-wide .dropdown-inner {
  display: grid;
  grid-template-rows: repeat(10, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(170px, 270px);
  gap: 0;
}
.dropdown-wide .dropdown-inner > .nav-dd-item > a { white-space: normal; line-height: 1.3; }

/* Подменю, которому мало места у края окна (ставит скрипт в header.php): названия переносятся,
   слишком длинное у низа окна — прокручивается внутри */
.fly-wrap { min-width: 0 !important; }
.fly-wrap > .nav-dd-item > a, .fly-wrap > li > a { white-space: normal !important; line-height: 1.3; }
.fly-wrap.sidebar-submenu-wide { grid-auto-columns: minmax(0, 1fr); }
.fly-scroll { overflow-y: auto; overscroll-behavior: contain; }
.sidebar-menu li.opens-left > a .sidebar-arrow svg { transform: scaleX(-1); }

/* =============================================
   PRODUCT PAGE
   ============================================= */
.product-page {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  gap: 40px;
  padding: 0 0 50px;
  align-items: start;
}
/* Экраны 769–1180 px (планшет, небольшой ноутбук): фото 460 px вместе с каталогом слева не помещалось,
   и страница товара прокручивалась вбок. Теперь фото и описание делят место поровну, а уже 900 px — друг под другом */
@media (max-width: 1180px) {
  .product-page { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
  .product-page-img img { height: 360px; }
}
@media (max-width: 900px) {
  .product-page { grid-template-columns: minmax(0, 1fr); }
  .product-page-img { max-width: 460px; width: 100%; }
}
.product-page-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #fff;
}
.product-page-img img {
  width: 100%;
  height: 460px;
  object-fit: contain;
  display: block;
  padding: 16px;
}
.product-page-name {
  overflow-wrap: anywhere;   /* «(17,19,21мм,1450Hм,7000об/мин,…» из 1С — без пробелов, иначе страница шире экрана */
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text-primary);
}
/* Артикул и остаток — одной строкой; остаток — крупная таблетка как на карточках каталога */
.product-page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.product-page-article { font-size: 16px; color: #6e6e73; }
.product-page-article b { color: var(--text-primary); font-weight: 600; }
.product-page-stock {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 15px; border-radius: 24px;
  font-size: 17px; font-weight: 500; line-height: 1.25;
  background: #f2f3f5; color: #6e7480;
}
.product-page-stock i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: #b5bac1; }
.product-page-stock b { font-weight: 700; }
.product-page-stock.in-stock { background: #e8f6ed; color: #17703a; }
.product-page-stock.in-stock i { background: #22a052; box-shadow: 0 0 0 4px rgba(34,160,82,.18); }
.product-page-stock.out-stock { background: #f2f3f5; color: #6e7480; }

.product-page-price {
  font-size: 36px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 24px;
}
.product-page-cart {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.product-page-qty .card-qty-btn {
  width: 42px;
  height: 42px;
  font-size: 20px;
}
.product-page-qty .card-qty-val {
  width: 56px;
  height: 42px;
  font-size: 18px;
}
.product-page-btn {
  padding: 12px 32px !important;
  font-size: 17px !important;
  border-radius: 12px !important;
}
.product-page-desc h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.product-page-desc-text {
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* =============================================
   HERO BANNER
   ============================================= */
@keyframes shake-warn {
  0%,100% { transform: translateX(0); }
  15%      { transform: translateX(-6px); }
  30%      { transform: translateX(6px); }
  45%      { transform: translateX(-5px); }
  60%      { transform: translateX(5px); }
  75%      { transform: translateX(-3px); }
  90%      { transform: translateX(3px); }
}
.shake-warn { animation: shake-warn .5s ease; }

.hero {
  background: linear-gradient(135deg, #0f1923 0%, #1a2b3c 50%, #0f2540 100%);
  color: #fff;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,113,227,0.3) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,107,0,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 540px;
}
.hero-content {
  align-self: center;
  padding: 70px 56px 70px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,113,227,0.18);
  border: 1px solid rgba(90,160,255,0.35);
  color: #9cc6ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.hero h2 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero h2 em { font-style: normal; color: #7ab8f5; }
/* «оптом выгодно» — голубой перелив (08.10.2026, вариант «А», выбран владельцем) */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h2 em { background: linear-gradient(90deg, #5aa8ff, #8fd0ff); -webkit-background-clip: text; background-clip: text;
                color: transparent; -webkit-text-fill-color: transparent; }
}

.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.82);
  margin-bottom: 28px;
  max-width: 520px;
  line-height: 1.6;
}

.hero-min-order {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 15px;
  color: rgba(187,247,208,0.95);
  margin-bottom: 28px;
  transition: background .4s, border-color .4s, color .4s;
}
.hero-min-order strong { color: #fff; transition: color .4s; }
.hero-min-order .hero-min-icon { stroke: rgba(187,247,208,0.95); }
.hero-min-check { display: none; color: #4ade80; }
.hero-min-order.reached {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.28);
  color: rgba(134,239,172,0.9);
}
.hero-min-order.reached strong { color: #86efac; }
.hero-min-order.reached .hero-min-icon { stroke: rgba(134,239,172,0.9); }
.hero-min-order.reached .hero-min-check { display: inline-flex; align-items: center; }

.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,113,227,0.35); text-decoration: none; color: #fff; }
.btn-primary:active { transform: translateY(0); }

/* Увеличенная кнопка в герое главной страницы */
.hero-btns { margin-bottom: 0; }
.hero-btns .btn-primary {
  font-size: 23px;
  padding: 20px 44px;
  gap: 14px;
  border-radius: 60px;
  box-shadow: 0 10px 28px rgba(0,113,227,0.45);
}

/* Белая панель-врезка на всю высоту hero (синий градиент огибает её скруглениями) */
.hero-visual {
  align-self: stretch;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 0;               /* белый прямоугольник без скруглений */
  margin: 0 60px 0 0;             /* справа — синий градиент; сверху/снизу во всю высоту */
  box-shadow: 0 30px 70px rgba(0,0,0,.30);
}

/* Logo in hero banner */
.hero-logo-wrap {
  position: relative;
}
/* Логотип внутри белой панели */
.hero-logos {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 24px 20px;
}
/* Один совмещённый логотип (МАЯКАВТО + значок МТ на одном изображении) */
.hero-logo-main {
  display: block;
  width: 600px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  animation: heroLogoFloat 4s ease-in-out infinite;
}
@keyframes heroLogoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* =============================================
   CATEGORY CHIPS
   ============================================= */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.section-header h2 a,
.section-header h2 a:hover {
  all: unset;
  cursor: pointer;
}
.section-header h2 a::after,
.section-header h2 a:hover::after {
  display: none !important;
}
.section-header a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  background: #fff;
  border: 1.5px solid #d0d0d0;
  padding: 7px 16px;
  border-radius: 50px;
  text-decoration: none;
  transition: background .18s, border-color .18s, transform .18s, box-shadow .18s, color .18s;
  white-space: nowrap;
}
.section-header a::after {
  content: '';
  display: inline-block;
  width: 15px;
  height: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23444' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M12 5l7 7-7 7'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform .18s;
}
.section-header a:hover {
  background: #f5f5f5;
  border-color: #aaa;
  color: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.section-header a:hover::after {
  transform: translateX(3px);
}

/* =============================================
   PRODUCTS SECTION
   ============================================= */
.products-section { padding: 48px 0; }

/* ── КАРУСЕЛЬ ТОВАРОВ ─────────────────────────────────── */
.carousel-wrap {
  overflow: hidden;
  width: 100%;
  margin-top: 8px;
  padding: 8px 0 12px;
  border-radius: 16px;
}

.carousel-track {
  display: flex;
  gap: 16px;
  width: max-content;
  will-change: transform;
  animation: carousel-slide 60s linear infinite;
}

/* -33.333% = ровно 1 копия из 3 — работает для любого кол-ва товаров */
/* from -33% → 0: трек движется вправо → товары идут слева направо */
@keyframes carousel-slide {
  from { transform: translate3d(-33.333%, 0, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

/* Уменьшенные карточки в карусели */
.carousel-track .product-card {
  width: 230px !important;
  min-width: 230px;
  flex-shrink: 0;
}
.carousel-track .product-card .product-name {
  font-size: 13px;
  -webkit-line-clamp: 2;
}
.carousel-track .product-card .product-price {
  font-size: 15px;
}
/* ─────────────────────────────────────────────────────── */

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

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.product-card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }

.product-card-body {
  padding: 12px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.product-card-link:hover { text-decoration: none; color: inherit; }
.product-card-link:hover .product-name { color: var(--blue); }

.product-name {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 8px 12px 0;
}

.product-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

/* Cart controls inside product card */
.product-cart-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-qty-ctrl {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  flex-shrink: 0;
}
.card-qty-btn {
  border: none;
  background: transparent;
  width: 30px;
  height: 30px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  font-family: var(--font);
  line-height: 1;
}
.card-qty-btn:hover { background: var(--border-light); }
.card-qty-val {
  width: 36px;
  min-width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  border: none;
  background: transparent;
  outline: none;
  padding: 0;
  font-family: inherit;
  -moz-appearance: textfield;
}
.card-qty-val::-webkit-outer-spin-button,
.card-qty-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-qty-input { width: 48px !important; cursor: text; }
.cart-qty-input:focus { outline: none; }
.btn-add-cart {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.btn-add-cart:hover { background: var(--orange-hover); }
.btn-add-cart.added { background: #34c759; }   /* размер шрифта не меняем — иначе кнопка меняла высоту */

/* В каруселях главной: счётчик и «В корзину» в одну строку.
   Счётчик компактнее, кнопка занимает остаток — текст «В корзину» помещается. */
.carousel-track .product-cart-row {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}
.carousel-track .card-qty-ctrl { flex-shrink: 0; }
.carousel-track .card-qty-btn { width: 26px; height: 28px; font-size: 15px; }
.carousel-track .card-qty-val { width: 34px; min-width: 34px; font-size: 13px; }
.carousel-track .btn-add-cart {
  flex: 1;
  min-width: 0;
  padding: 8px 8px;
  font-size: 12.5px;
  white-space: nowrap;
}

/* =============================================
   FLOATING CART BUTTON
   ============================================= */
@keyframes floatIn {
  from { opacity: 0; transform: translateY(20px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

/* Остаток в карточке товара: над ценой, зелёная точка — есть, серая — нет */
.card-stock { display: inline-flex; align-self: flex-start; align-items: center; gap: 7px; max-width: 100%;
              padding: 4px 10px 4px 9px; border-radius: 20px; font-size: 13px; font-weight: 500; line-height: 1.25;
              background: #f2f3f5; color: #6e7480; margin-bottom: -2px; }
.card-stock i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: #b5bac1; }
.card-stock.in { background: #e8f6ed; color: #17703a; }
.card-stock.in i { background: #22a052; box-shadow: 0 0 0 3px rgba(34,160,82,.18); }
.card-stock.in b { font-weight: 700; }
.carousel-track .product-card .card-stock { font-size: 11.5px; gap: 6px; padding: 3px 8px 3px 7px; }

.badge-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  z-index: 2;
}
.badge-hit {
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 50px;
  display: inline-block;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  transform: rotate(-7deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.badge-new {
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 50px;
  display: inline-block;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}
/* Заход под «Хит» — только когда обе наклейки рядом; одна «Новинка» стояла в 2 px от края карточки */
.badge-hit + .badge-new { margin-left: -8px; }

/* =============================================
   NEWS
   ============================================= */
.news-section { padding: 0 0 64px; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex; /* карточка растягивается на всю высоту грид-ряда */
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Внутренний контейнер — колонка на всю высоту, чтобы «Читать далее»
   всегда прижималось к низу карточки, даже без текста анонса */
.news-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.news-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}
.news-title a { color: var(--text-primary); text-decoration: none; }
.news-title a:hover { color: var(--blue); }
.news-excerpt { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.news-readmore { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--blue); margin-top: auto; padding-top: 14px; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #1d1d1f;
  color: #f5f5f7;
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.75); text-decoration: none; transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; text-decoration: none; }
/* «Компания» — ссылки в две колонки: сверху вниз, по 4 в колонке */
.footer-col ul.footer-links-2col {
  display: grid; grid-template-rows: repeat(4, auto); grid-auto-flow: column;
  grid-auto-columns: max-content; column-gap: 28px; row-gap: 10px;
}

/* Company info column */
.footer-company-info p { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 6px; line-height: 1.5; }
.footer-company-info strong { color: #fff; font-size: 15px; }
.footer-company-info a { color: #7ab8f5; text-decoration: none; }
.footer-company-info a:hover { text-decoration: underline; }

/* Contacts column */
.footer-contacts p { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 6px; line-height: 1.5; }
.footer-contacts a { color: #7ab8f5; text-decoration: none; }
.footer-contacts a:hover { text-decoration: underline; }
.footer-info-label { font-size: 12px !important; font-weight: 700; color: #f5a623 !important; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 10px !important; margin-bottom: 8px !important; }

/* Footer brand compat */
.footer-brand .logo-text h1 { color: #fff; }
.footer-brand .logo-text span { color: rgba(255,255,255,0.5); }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.55); margin-top: 16px; line-height: 1.7; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  margin-top: 8px;
}
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.45); margin-bottom: 8px; }
.footer-bottom a { font-size: 13px; color: rgba(255,255,255,0.45); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

/* ── Scroll-to-top button ── */
#scroll-top-btn {
  position: fixed;
  bottom: 100px;
  left: 28px;
  z-index: 9997;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(29,29,31,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
#scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#scroll-top-btn:hover { background: rgba(0,113,227,0.9); }
#scroll-top-btn svg { width: 20px; height: 20px; }

/* ── Floating cart button ── */
.float-cart-anchor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 1440px;
  margin: 0 auto;
  height: 0;
  pointer-events: none;
  z-index: 9998;
}
#float-cart {
  position: absolute;
  bottom: 36px;
  right: 12px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #ff6b00;
  color: #fff;
  text-decoration: none;
  border-radius: 13px;
  padding: 12px 19px;
  box-shadow: 0 4px 18px rgba(255,107,0,0.45);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  font-weight: 600;
  line-height: 1;
  min-width: 155px;
  width: 155px;
}
#float-cart:hover {
  background: #e05a00;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255,107,0,0.55);
}
.float-cart-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}
.float-cart-top svg { flex-shrink: 0; width: 19px; height: 19px; }
.float-cart-count { font-weight: 700; }
.float-cart-sum {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.92;
  padding-left: 27px;
}
@media (max-width: 640px) {
  #float-cart { bottom: 72px; padding: 9px 13px; }
  .float-cart-top { font-size: 13px; }
  .float-cart-sum { font-size: 12px; padding-left: 22px; }
}


/* =============================================
   BOTTOM MOBILE BAR
   ============================================= */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 999;
}
.mobile-bar-inner {
  display: flex;
  justify-content: space-around;
}
.mobile-bar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}
.mobile-bar-btn.active, .mobile-bar-btn:hover { color: var(--blue); }
.mobile-bar-btn svg { width: 22px; height: 22px; }

/* =============================================
   SIDEBAR + CATALOG LAYOUT
   ============================================= */
.catalog-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);   /* minmax: широкое содержимое не растягивает страницу шире экрана */
  gap: 10px;
  padding: 16px 0 64px;
  align-items: start;
}

/* Сайдбар прокручивается вместе со страницей (без закрепления) */
.sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: visible;
}

.sidebar-section { border-bottom: 1px solid var(--border-light); }
.sidebar-section:last-child { border-bottom: none; }

.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}
.sidebar-title:hover { background: var(--bg); text-decoration: none; color: var(--text-primary); }
.sidebar-title svg { width: 16px; height: 16px; color: var(--text-secondary); }

.sidebar-menu { list-style: none; padding: 4px; }
.sidebar-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 15px;
  color: #111;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.sidebar-menu li a:hover, .sidebar-menu li a.active { background: rgba(0,113,227,0.06); color: var(--blue); text-decoration: none; }
.sidebar-menu li a svg { width: 18px; height: 18px; }

/* Сайдбар — позиционирование для flyout */
.sidebar-menu li,
.sidebar-submenu li {
  position: relative;
  padding-right: 8px; /* мост hover */
}

.sidebar-label {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
}
.sidebar-arrow {
  display: flex;
  align-items: center;
  opacity: .45;
  flex-shrink: 0;
}

/* Flyout подменю */
.sidebar-submenu {
  display: none;
  position: absolute;
  left: 100%;
  top: -8px;
  min-width: 190px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  border: 1px solid var(--border-light);
  list-style: none;
  padding: 8px;
  z-index: 500;
}
.sidebar-menu li:hover > .sidebar-submenu,
.sidebar-submenu li:hover > .sidebar-submenu { display: block; animation: sidebarSubIn 0.15s ease 0.2s both; }

@keyframes sidebarSubIn {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Сайдбар — 2 колонки когда много подкатегорий */
.sidebar-submenu.sidebar-submenu-wide {
  display: none;
  grid-template-rows: repeat(10, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(170px, 270px);   /* как в верхнем меню: колонка не шире 270 px, длинное — переносом */
  width: max-content;
  min-width: 360px;
}
.sidebar-submenu.sidebar-submenu-wide > li > a { white-space: normal; line-height: 1.3; }
.sidebar-menu li:hover > .sidebar-submenu.sidebar-submenu-wide,
.sidebar-submenu li:hover > .sidebar-submenu.sidebar-submenu-wide { display: grid; animation: sidebarSubIn 0.15s ease 0.2s both; }

.sidebar-submenu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 7px;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.sidebar-submenu li a:hover,
.sidebar-submenu li a.active { background: rgba(0,113,227,0.07); color: var(--blue); }

/* ── Каталог в боковой колонке: заголовок со значком, у главных разделов — свои значки,
      «Хит» и «Новинки» отделены от разделов линией ── */
.sidebar-title.sb-head { padding: 14px 14px 14px 16px; font-size: 17px; }
.sb-head-l { display: flex; align-items: center; gap: 11px; }
.sb-head-ico { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
               background: linear-gradient(135deg, #e3eeff, #f2f7ff); }
.sidebar-title .sb-head-ico svg { width: 19px; height: 19px; color: var(--blue); }
.sb-head-all { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--text-secondary); transition: color .15s; }
.sidebar-title .sb-head-all svg { width: 13px; height: 13px; color: currentColor; transition: transform .15s; }
.sidebar-title.sb-head:hover .sb-head-all { color: var(--blue); }
.sidebar-title.sb-head:hover .sb-head-all svg { transform: translateX(2px); }

.sidebar-menu { padding: 6px; }
.sidebar-menu > li > a { gap: 12px; padding: 7px 10px 7px 7px; font-size: 15.5px; }
.sb-ico { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
          background: #f2f4f7; color: #5f6b7a; transition: background .15s, color .15s; }
.sidebar-menu li a .sb-ico svg { width: 18px; height: 18px; }
/* Сколько товаров в разделе (с вложенными) — серая таблетка справа */
.sb-count { margin-left: auto; flex-shrink: 0; padding: 1px 8px; border-radius: 20px; background: #f2f4f7; color: #8a94a3;
            font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.sidebar-menu li a:hover .sb-count, .sidebar-menu li a.active .sb-count { background: #e3eeff; color: var(--blue); }
/* Подразделы без своего значка — точка */
.sb-dot { width: 7px; height: 7px; margin: 0 4px 0 6px; border-radius: 50%; flex-shrink: 0; background: #c9d1db; transition: background .15s; }
.sidebar-menu li a:hover .sb-dot, .sidebar-menu li a.active .sb-dot { background: var(--blue); }
/* Страница раздела: «‹ назад» и карточка текущего раздела над его подразделами */
.sb-back { display: flex; align-items: center; gap: 4px; padding: 12px 16px 4px; font-size: 13.5px; font-weight: 600;
           color: var(--text-secondary); text-decoration: none; transition: color .15s; }
.sb-back svg { width: 15px; height: 15px; flex-shrink: 0; transition: transform .15s; }
.sb-back:hover { color: var(--blue); text-decoration: none; }
.sb-back:hover svg { transform: translateX(-2px); }
.sb-current { display: flex; align-items: center; gap: 12px; margin: 8px 8px 4px; padding: 12px; border-radius: 14px;
              background: linear-gradient(135deg, #eef4ff, #f7faff); border: 1px solid #dfe9fb; }
.sb-current .sb-ico { width: 40px; height: 40px; border-radius: 11px; background: #fff; color: var(--blue); box-shadow: 0 1px 4px rgba(0,113,227,.12); }
.sb-current .sb-ico svg { width: 20px; height: 20px; }
.sb-current-text { min-width: 0; }
.sb-current-name { font-size: 16px; font-weight: 800; line-height: 1.25; color: var(--text-primary); word-break: break-word; }
.sb-current-sub { margin-top: 2px; font-size: 13px; font-weight: 500; color: #5f6b7a; }
.sidebar-menu li a:hover .sb-ico, .sidebar-menu li a.active .sb-ico { background: #e3eeff; color: var(--blue); }
.sb-ico.sb-ico-hit, .sidebar-menu li a:hover .sb-ico.sb-ico-hit { background: #fff1e6; color: #e8710a; }
.sb-ico.sb-ico-new, .sidebar-menu li a:hover .sb-ico.sb-ico-new { background: #e8f2fd; color: #2f8be0; }
.sidebar-menu > li.is-special + li:not(.is-special) { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-light); }
.sidebar-menu > li > a .sidebar-arrow { transition: transform .15s, opacity .15s; }
.sidebar-menu > li > a:hover .sidebar-arrow { opacity: .8; transform: translateX(2px); }

.sidebar-news { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }

.sidebar-news-item {
  display: block;
  padding: 10px 12px;
  border: 1px solid #d8d8dc;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.sidebar-news-item:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(0,113,227,0.08);
  text-decoration: none;
  color: var(--text-primary);
}
.sidebar-news-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.sidebar-news-date {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 5px;
}
.sidebar-news-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* =============================================
   CATALOG PAGE CONTROLS
   ============================================= */
.catalog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.catalog-controls h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}
/* Число товаров рядом с названием раздела — оранжевая таблетка, как «Хит» (выбор владельца) */
.cat-count { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 13px; border-radius: 20px; background: #fff1e6;
             color: #b85a0e; font-size: 14px; font-weight: 600; letter-spacing: 0; line-height: 1.3; white-space: nowrap; }
.cat-count b { font-size: 16px; font-weight: 800; color: #e8710a; font-variant-numeric: tabular-nums; }

.sort-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-white);
  outline: none;
  cursor: pointer;
}
.sort-select:focus { border-color: var(--blue); }

/* Сортировка: свой выпадающий список в стиле сайта (строит catalog-scroll.js).
   Обычный select остаётся скрытым внутри и по-прежнему задаёт порядок товаров */
.sort-dd { position: relative; display: inline-block; }
.sort-dd > select.sort-select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sort-dd-btn {
  display: inline-flex; align-items: center; gap: 9px; min-width: 220px;
  padding: 10px 12px 10px 14px; border: 1.5px solid var(--border-light); border-radius: 12px;
  background: var(--bg-white); color: var(--text-primary); font: 600 14px var(--font);
  cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: border-color .15s, box-shadow .15s;
}
.sort-dd-btn:hover { border-color: #c7c7cc; }
.sort-dd.open .sort-dd-btn, .sort-dd-btn:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,.12); outline: none; }
.sort-dd-btn svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-secondary); }
.sort-dd-btn .sort-dd-chev { width: 14px; height: 14px; transition: transform .2s; }
.sort-dd.open .sort-dd-chev { transform: rotate(180deg); }
.sort-dd-label { flex: 1; text-align: left; white-space: nowrap; }
.sort-dd-list {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; min-width: 100%;
  margin: 0; padding: 6px; list-style: none; background: var(--bg-white);
  border: 1px solid var(--border-light); border-radius: 14px; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s;
}
.sort-dd.open .sort-dd-list { opacity: 1; transform: none; pointer-events: auto; }
.sort-dd-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 10px 12px; border-radius: 9px; font-size: 14px; color: var(--text-primary);
  cursor: pointer; white-space: nowrap; user-select: none;
}
.sort-dd-opt:hover, .sort-dd-opt.is-focus { background: #f2f5fa; }
.sort-dd-opt[aria-selected="true"] { color: var(--blue); font-weight: 600; }
.sort-dd-opt svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0; }
.sort-dd-opt[aria-selected="true"] svg { opacity: 1; }

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 0 0;
  margin-left: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { color: var(--border); }

/* =============================================
   AUTH PAGES
   ============================================= */

.form-group { margin-bottom: 20px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .catalog-layout { grid-template-columns: 260px minmax(0, 1fr); }
}

@media (max-width: 768px) {
  /* Топбар — компактная версия для мобильных */
  .header-topbar { display: block; background: #f9fafb; }

  /* Грид: строка 1 = телефоны + кнопка входа, строка 2 = ссылки + время */
  .topbar-inner {
    display: grid;
    grid-template-areas: "center auth" "left left";
    grid-template-columns: 1fr auto;
    padding: 0;
    gap: 0;
  }

  /* Строка 1 левая: телефоны + email */
  .topbar-center {
    grid-area: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
    column-gap: 10px;
    row-gap: 1px;
    padding: 7px 0 7px 12px;
    text-align: left;
  }
  .topbar-wholesale-title { display: none; }
  .topbar-phones { margin: 0; gap: 10px; flex-wrap: wrap; }
  .topbar-phones a { font-size: 14px; white-space: nowrap; }
  .topbar-email { font-size: 12px; flex-basis: 100%; }   /* email на своей строке */
  .topbar-email a { color: var(--text-secondary); }
  .topbar-desc, .topbar-min { display: none; }

  /* Строка 1 правая: кнопка входа/профиля — вертикально по центру (равный отступ сверху и снизу) */
  .topbar-right {
    grid-area: auth;
    display: flex !important;
    flex-direction: row;   /* сброс column с десктопа — иначе justify прижимает кнопку вниз */
    align-items: center;
    justify-content: flex-end;
    padding: 7px 12px;
    gap: 6px;
  }
  .topbar-right .topbar-auth { margin: 0 !important; }   /* убираем сдвиг сверху (с десктопа) */
  .topbar-cart-link { display: none !important; }
  .topbar-fav-btn { display: none !important; }
  .topbar-admin-btn { display: none !important; }
  .topbar-login-btn { font-size: 12px; padding: 6px 12px; }
  .topbar-btn-logout-icon { display: none !important; }

  /* Строка 2: [Как нас найти · Контакты] [время] [О компании] */
  .topbar-left {
    grid-area: left;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;          /* на узких экранах переносим, чтобы не было горизонт. скролла */
    /* единая сплошная линия-разделитель на ВСЮ ширину экрana (от края до края).
       margin -12px компенсирует паддинг .container, паддинг 12px держит контент на месте */
    border-top: 1px solid var(--border-light);
    margin-left: -12px;
    margin-right: -12px;
    padding: 5px 12px 4px;
    justify-self: auto;
    gap: 3px 10px;
  }
  /* Как нас найти + Контакты — слева, в одну строку */
  .topbar-links { order: 1; gap: 0; }
  .topbar-links-col { flex-direction: row; flex-wrap: nowrap; gap: 10px; padding: 0; }
  .topbar-links a { font-size: 10px; gap: 3px; white-space: nowrap; }
  .topbar-links a svg { width: 10px; height: 10px; flex-shrink: 0; }
  /* Время — по центру, в столбик (узкое) */
  .topbar-schedule-block { order: 2; }
  .topbar-schedule-block > svg { display: none; }
  .topbar-schedule-times { flex-direction: column; gap: 0; }
  .topbar-schedule-times span { font-size: 10px; white-space: nowrap; line-height: 1.35; }
  /* О компании — справа, всегда в одну строку */
  .topbar-about-link { order: 3; font-size: 10px; gap: 3px; white-space: nowrap; }
  .topbar-about-link svg { width: 10px; height: 10px; flex-shrink: 0; }

  /* Убираем кнопку входа из строки поиска — теперь она в топбаре */
  .mob-header-actions { display: none !important; }

  /* Строка поиска теперь полной ширины */
  .search-area { flex: 1; }

  /* Шапка */
  .header-main { padding: 10px 0; }
  .header-main-inner { gap: 10px; }
  .logo-icon img { width: 36px; height: 36px; }
  .logo-text h1 { font-size: 18px !important; }
  .logo-text span { display: none; }
  .btn-catalog-dl { display: none; }
  .search-area { gap: 8px; }
  .header-search-form.large input { font-size: 14px; padding: 10px 14px; }

  /* Навигация */
  .main-nav { display: none; }
  .mobile-bar { display: block; }
  /* Отступ под фикс-панель переносим в футер (ниже), чтобы не было белой полосы */
  body { padding-bottom: 0; }

  /* Герой */
  .hero { padding: 32px 0 24px; overflow: hidden; }
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-content { padding: 0; }
  /* Логотип — полупрозрачный водяной знак справа (без белой панели) */
  .hero-visual {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.18;
    z-index: 0;
    pointer-events: none;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    margin: 0;
    border-radius: 0;
  }
  .hero-logo-main { width: 175px; height: auto; }
  .hero-content { position: relative; z-index: 2; }
  .hero h2 { font-size: 30px; }
  .hero-content p { font-size: 15px; }
  .hero-btns .btn-primary { font-size: 17px; padding: 14px 28px; }
  .hero-badge { font-size: 11px; padding: 4px 10px; }
  .hero-min-order { font-size: 13px; }

  /* Секции */
  .section-header h2 { font-size: 20px; }
  .section-header { margin-bottom: 14px; }

  /* Карусель */
  .carousel-track .product-card { width: 160px !important; min-width: 160px; }

  /* Новости */
  .news-grid { grid-template-columns: 1fr; gap: 12px; }
  .news-section { padding: 0 0 40px; }

  /* Каталог */
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }

  /* Футер — одна колонка, всё по центру */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; max-width: 320px; }
  .footer-brand .logo-area { justify-content: center; }
  .footer-company-info { display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .footer-col ul { align-items: center; }
  .footer-col ul.footer-links-2col { justify-content: center; }
  .footer-contacts p { margin-left: auto; margin-right: auto; }
  .footer-contacts a { display: inline-block; }
  .footer-bottom { text-align: center; }
  .footer-bottom > div { justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* Избранное: 2 товара в ряд на телефоне (было 1 из-за minmax 220px) */
  .favorites-page .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero h2 { font-size: 26px; }
  .hero-btns .btn-primary { font-size: 15px; padding: 12px 22px; width: 100%; justify-content: center; }
  .news-card { padding: 0; }
  .product-card .product-name { font-size: 12px; }
  .product-card .product-price { font-size: 14px; }
  .carousel-track .product-card { width: 145px !important; min-width: 145px; }
}

/* ── Password eye toggle ──────────────────────────────────────────── */
.pw-wrap { position: relative; display: block; }
.pw-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #aaa;
  display: flex;
  align-items: center;
  transition: color .15s;
  z-index: 2;
}
.pw-eye-btn:hover { color: #555; }

/* ── Custom Scrollbar ─────────────────────────────────────────────── */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(26,26,46,0.35) #e8e8e8;
}
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #e8e8e8;
}
::-webkit-scrollbar-thumb {
  background: rgba(26,26,46,0.35);
  border-radius: 4px;
  border: 2px solid #e8e8e8;
  min-height: 30px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(26,26,46,0.55);
}
::-webkit-scrollbar-thumb:active {
  background: rgba(26,26,46,0.75);
}

/* ==============================================
   МОБИЛЬНАЯ ШАПКА — кнопки (только мобильные)
   ============================================== */

/* На десктопе скрыты — там всё есть в topbar */
.mob-header-actions { display: none; }

/* Мобильная навигация по категориям: скрыта на десктопе */
.mob-cat-nav { display: none; }
.mob-cat-tree-wrap { display: none; }

/* ==============================================
   МОБИЛЬНАЯ ВЕРСИЯ — ПОЛНЫЕ УЛУЧШЕНИЯ
   ============================================== */

@media (max-width: 768px) {

  /* ── Шапка: sticky + тень ────────────────── */
  .header-sticky-wrap {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0,0,0,0.07), 0 2px 12px rgba(0,0,0,0.05);
  }
  .header-main { padding: 8px 0; background: #fff; }
  .header-main-inner { gap: 8px; align-items: center; }
  .logo-area { gap: 8px; flex-shrink: 0; }
  .logo-icon { width: 34px !important; height: 34px !important; border-radius: 9px !important; }
  .logo-icon img { width: 34px !important; height: 34px !important; }
  .logo-text h1 { font-size: 16px !important; font-weight: 800 !important; letter-spacing: 0.2px; }
  .logo-text span { display: none; }
  .search-area { flex: 1; min-width: 0; }
  .header-search-form.large {
    padding: 8px 12px;
    border-radius: 11px;
    background: #f5f5f7;
    border-color: transparent;
    min-width: 0;   /* критично: даёт форме ужиматься в узкой шапке (иначе горизонт. скролл) */
    width: auto;
  }
  .header-search-form.large:focus-within {
    background: #fff;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
  }
  /* 16px у ВСЕХ полей ввода — iOS не делает авто-зум при фокусе (срабатывает при font<16px).
     !important — чтобы перебить инлайн-стили в формах входа/регистрации/профиля. */
  input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
  input[type="number"], input[type="search"], input[type="url"], input:not([type]),
  textarea, select {
    font-size: 16px !important;
  }

  /* ── Мобильные кнопки в шапке ───────────── */
  .mob-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }

  .mob-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    transition: background .18s, transform .18s;
    white-space: nowrap;
  }
  .mob-auth-guest {
    padding: 0 14px;
    background: var(--blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,113,227,0.28);
  }
  .mob-auth-guest:hover { background: var(--blue-hover); color: #fff; text-decoration: none; }
  .mob-auth-logged {
    width: 36px;
    background: rgba(0,113,227,0.1);
    color: var(--blue);
    border-radius: 50%;
  }
  .mob-auth-logged:hover { background: rgba(0,113,227,0.18); color: var(--blue); text-decoration: none; }
  .mob-auth-admin {
    width: 36px;
    background: rgba(255,107,0,0.12);
    color: var(--orange);
    border-radius: 50%;
  }
  .mob-auth-admin:hover { background: rgba(255,107,0,0.22); color: var(--orange); text-decoration: none; }

  /* ── Мобильная навигация по категориям ─── */
  /* Чипы категорий убраны — их заменяет раскрывающееся дерево ниже */
  .mob-cat-nav {
    display: none;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0;
  }
  .mob-cat-nav-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px 10px;
  }
  .mob-cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: var(--bg);
    border: 1.5px solid var(--border-light);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
  }
  .mob-cat-chip:hover { background: var(--border-light); text-decoration: none; }
  .mob-cat-chip.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    text-decoration: none;
  }

  /* ── Дерево категорий (аккордеон: подкатегории и глубже) ── */
  .mob-cat-tree-wrap {
    display: block;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
  }
  .mob-cat-tree-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 12px 14px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
  }
  .mob-cat-tree-btn > svg:first-child { width: 18px; height: 18px; color: var(--blue); flex-shrink: 0; }
  .mob-cat-tree-btn .mct-caret { width: 17px; height: 17px; margin-left: auto; color: var(--text-secondary); transition: transform .2s; flex-shrink: 0; }
  .mob-cat-tree-wrap.open .mob-cat-tree-btn .mct-caret { transform: rotate(180deg); }

  .mob-cat-tree { display: none; padding-bottom: 6px; }
  .mob-cat-tree-wrap.open .mob-cat-tree { display: block; }

  .mct-list { list-style: none; margin: 0; padding: 0; }
  .mct-item { border-top: 1px solid var(--border-light); }
  .mct-list > .mct-item:first-child { border-top: none; }
  .mct-row { display: flex; align-items: stretch; min-height: 42px; }
  .mct-link {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 9px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    min-width: 0;
  }
  .mct-has > .mct-row > .mct-link { color: var(--text-primary); font-weight: 600; }
  .mct-link.mct-active { color: var(--blue); font-weight: 700; }
  .mct-toggle {
    width: 48px;
    flex-shrink: 0;
    background: none;
    border: none;
    border-left: 1px solid var(--border-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    -webkit-tap-highlight-color: transparent;
  }
  .mct-toggle svg { width: 16px; height: 16px; transition: transform .2s; }
  .mct-item.mct-open > .mct-row > .mct-toggle svg { transform: rotate(180deg); }
  .mct-children { display: none; background: #f8f9fb; }
  .mct-item.mct-open > .mct-children { display: block; }
  /* Отступы вложенности */
  .mct-children .mct-link { padding-left: 30px; }
  .mct-children .mct-children .mct-link { padding-left: 46px; }
  .mct-children .mct-children .mct-children .mct-link { padding-left: 62px; }

  /* ── Карточка товара: отключаем hover-прыжок (мешает тапу) ── */
  .product-card:hover { transform: none; box-shadow: var(--shadow-sm); }

  /* ── Кнопка-сердце: больше тач-цель ─────── */
  .fav-heart-btn {
    width: 40px;
    height: 40px;
    top: 8px;
    right: 8px;
  }
  .fav-heart-btn svg { width: 22px; height: 22px; }

  /* ── Карточка товара: счётчик и «В корзину» в одну строку ─
     Счётчик компактный и не сжимается, кнопка забирает весь остаток.
     Дубли для .carousel-track обязательны: там селектор из двух классов
     (.carousel-track .product-cart-row) перебивает одноклассовые правила
     этого медиа-запроса, и без них строка ведёт себя иначе. */
  .product-cart-row,
  .carousel-track .product-cart-row {
    flex-direction: row;
    flex-wrap: wrap;       /* не влезло рядом — кнопка уезжает на свою строку, а не сжимается */
    align-items: center;
    justify-content: center;
    gap: 5px;
  }
  .card-qty-ctrl,
  .carousel-track .card-qty-ctrl {
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
  }
  .card-qty-btn,
  .carousel-track .card-qty-btn {
    width: 24px;
    height: 30px;
    font-size: 15px;
  }
  .card-qty-val,
  .carousel-track .card-qty-val {
    width: 24px;
    min-width: 24px;
    font-size: 12px;
  }
  .btn-add-cart,
  .carousel-track .btn-add-cart {
    width: auto;
    /* Кнопка по размеру надписи (не растягивается на весь остаток строки).
       Если рядом со счётчиком не остаётся даже 66px, flex-wrap уводит её
       на следующую строку. */
    flex: 0 1 auto;
    min-width: 66px;
    justify-content: center;
    align-self: stretch;   /* в одной строке со счётчиком — ровно его высота */
    min-height: 30px;      /* на своей строке высота не схлопывается (padding по вертикали нулевой) */
    padding: 0 8px;
    font-size: 11px;
  }

  /* ── Страница товара: мобильный вид ─────── */
  .product-page {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px;
    padding: 16px 0 40px;
  }
  .product-page-img img { height: 280px; }
  .product-page-name { font-size: 20px; margin-bottom: 12px; }
  .product-page-price { font-size: 28px; margin-bottom: 18px; }
  /* Счётчик и «В корзину» в одну строку, на одном уровне.
     Размеры задаём через .product-page-qty (2 класса) — иначе общие мобильные
     правила .card-qty-btn с !important ужимают кнопки до карточных 21px. */
  .product-page-cart {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
  }
  /* два класса, а не один: одноклассовое .card-qty-ctrl { height: 30px }
     лежит ниже по файлу и при равном весе перебивало бы высоту,
     а overflow:hidden обрезал бы кнопки «−/+» */
  .product-page-cart .product-page-qty {
    width: auto;
    flex: 0 0 auto;
    height: 44px;
    justify-content: center;
  }
  .product-page-qty .card-qty-btn {
    width: 38px !important;
    height: 41px !important;
    font-size: 19px;
  }
  .product-page-qty .card-qty-val {
    width: 44px;
    min-width: 44px;
    height: 41px;
    font-size: 16px;
  }
  .product-page-btn {
    flex: 1 1 auto;
    width: auto;
    align-self: stretch;
    min-height: 44px;
    padding: 0 16px !important;
    font-size: 16px !important;
    justify-content: center;
  }
  .product-page-desc h3 { font-size: 20px; }
  .product-page-desc-text { font-size: 16px; }

  /* ── Корзина: одна колонка ───────────────── */
  .cart-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    min-width: 0;
  }
  .cart-grid > * { min-width: 0; }

  /* ── Корзина на мобильном: строки таблицы → карточки (без горизонт. скролла) ── */
  .cart-table-scroll { overflow: visible !important; margin: 0 !important; padding: 0 !important; min-width: 0; }
  .cart-table-scroll table {
    display: block;
    min-width: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .cart-table-scroll thead { display: none; }
  .cart-table-scroll tbody, #cart-items { display: block; }
  #cart-items tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: #fff;
    border: 1px solid #eee !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin-bottom: 10px;
    position: relative;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  }
  /* Название + фото — на всю ширину карточки */
  #cart-items td:nth-child(1) {
    flex: 1 1 100%;
    padding: 0 28px 10px 0 !important;
    gap: 10px !important;
  }
  #cart-items td:nth-child(1) img { width: 46px !important; height: 46px !important; }
  #cart-items td:nth-child(1) > div > div:first-child { font-size: 13.5px !important; line-height: 1.35; }
  /* Количество — слева на 2-й строке, компактно */
  #cart-items td:nth-child(2) { padding: 0 !important; text-align: left !important; }
  #cart-items td:nth-child(2) .card-qty-ctrl { justify-content: flex-start !important; gap: 0; }
  #cart-items td:nth-child(2) .card-qty-btn { width: 30px !important; height: 30px !important; }
  #cart-items td:nth-child(2) .cart-qty-input { width: 38px !important; font-size: 16px !important; } /* 16px — чтобы iOS не зумил */
  /* Цена за штуку — рядом с количеством, приглушённо, с пометкой «/ шт» */
  #cart-items td:nth-child(3) {
    display: block !important;
    padding: 0 0 0 10px !important;
    font-size: 12.5px !important;
    color: #8a8a8a !important;
    font-weight: 500 !important;
    white-space: nowrap;
  }
  #cart-items td:nth-child(3)::after { content: ' / шт'; }
  /* Сумма (итого по позиции) — жирная, прижата к правому краю */
  #cart-items td:nth-child(4) {
    margin-left: auto;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
  }
  /* Удалить — в правый верхний угол карточки */
  #cart-items td:nth-child(5) { position: absolute !important; top: 8px; right: 6px; padding: 0 !important; }

  /* Блок «минимальная сумма» — разрешаем перенос, чтобы не распирал сводку */
  #cart-min-order { white-space: normal !important; }

  /* ── Герой: компактнее ───────────────────── */
  .hero { padding: 22px 0 28px; }
  .hero-badge { margin-bottom: 10px; font-size: 10px; padding: 4px 10px; }
  .hero h2 { font-size: 30px; letter-spacing: -0.8px; margin-bottom: 10px; line-height: 1.1; }
  .hero-content p { font-size: 14px; margin-bottom: 14px; line-height: 1.55; }
  .hero-min-order { margin-bottom: 18px; padding: 8px 12px; font-size: 12px; }
  .hero-btns { gap: 8px; }
  .hero-btns .btn-primary { font-size: 16px; padding: 13px 26px; gap: 10px; }
  .hero-btns .btn-primary svg { width: 20px; height: 20px; }

  /* ── Карусель: CSS-анимация на мобильном ── */
  .carousel-wrap { overflow: hidden; border-radius: 0; }
  .carousel-track {
    animation: carousel-slide 50s linear infinite;
    gap: 10px;
  }
  .carousel-track .product-card { width: 155px !important; min-width: 155px; }
  .carousel-track .product-card .product-name { font-size: 12px; }
  .carousel-track .product-card .product-price { font-size: 13px; }
  .carousel-track .product-card .card-qty-btn { width: 28px; height: 28px; }
  .carousel-track .product-card .btn-add-cart { font-size: 11px; padding: 7px 8px; }

  /* ── Секция-заголовок ────────────────────── */
  .section-header { margin-bottom: 10px; align-items: center; }
  .section-header h2 { font-size: 19px; font-weight: 800; }
  .section-header a {
    font-size: 13px; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 4px;
  }
  .products-section { padding-top: 20px; }

  /* ── Профиль: адаптивный грид ────────────── */
  .profile-grid{ grid-template-columns: 1fr !important; gap: 16px !important; }

  /* ── Поиск по каталогу ──────────────────── */
  .catalog-controls {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .catalog-controls h1 { font-size: 20px; }
  .sort-select { width: 100%; }
  .catalog-controls > div:has(.sort-dd) { width: 100%; }
  .sort-dd, .sort-dd-btn { width: 100%; }
  .sort-dd-list { left: 0; right: 0; }
  .sort-dd-opt { padding: 12px; font-size: 15px; }

  /* ── Новости ─────────────────────────────── */
  .news-section { padding: 0 0 28px; }
  .news-card-body { padding: 14px 16px; }
  .news-title { font-size: 16px; line-height: 1.35; }
  .news-excerpt { font-size: 13px; line-height: 1.5; }
  .news-readmore { font-size: 12px; }

  /* ── Футер: компактно + отступ под фикс-панель (тёмный фон закрывает полосу) ── */
  .site-footer { padding: 28px 0 calc(72px + env(safe-area-inset-bottom)); }
  .footer-brand p,
  .footer-brand .footer-company-info { display: none; }
  .footer-col h4 { font-size: 13px; margin-bottom: 8px; }
  .footer-col li a,
  .footer-contacts a,
  .footer-contacts p { font-size: 13px; }
  .footer-grid { gap: 20px; }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    padding-top: 16px;
  }
  .footer-bottom p,
  .footer-bottom div a { font-size: 11px; }
  .footer-bottom div { flex-wrap: wrap; justify-content: center; gap: 12px; }

  /* ── Плавающая корзина: выше мобильного бара ── */
  .float-cart-anchor { z-index: 990; }
  #float-cart {
    bottom: 78px;
    right: 10px;
    padding: 10px 14px;
    min-width: 0;
    width: auto;
    border-radius: 14px;
  }
  .float-cart-top { font-size: 14px; gap: 6px; }
  /* Сумма выравнивается под текстом «N товаров» (отступ = иконка 19px + gap 6px) */
  .float-cart-sum { font-size: 12px; padding-left: 25px; }

  /* ── Кнопка «наверх» ──────────────────────── */
  #scroll-top-btn { bottom: 78px; right: 10px; }

  /* ── Нижняя навигация ────────────────────── */
  .mobile-bar {
    background: rgba(255,255,255,0.96);
    box-shadow: 0 -1px 0 rgba(0,0,0,0.07), 0 -4px 16px rgba(0,0,0,0.06);
    padding: 5px 0 max(8px, env(safe-area-inset-bottom));
  }
  .mobile-bar-inner { padding: 0 4px; }
  .mobile-bar-btn {
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    padding: 5px 10px 4px;
    min-width: 52px;
    border-radius: 10px;
    position: relative;
    transition: color .15s, background .15s;
  }
  .mobile-bar-btn svg { width: 23px; height: 23px; }
  .mobile-bar-btn.active { color: var(--blue); }
  .mobile-bar-btn.active svg { color: var(--blue); }
  /* Избранное — красное сердце когда активно */
  .mob-fav-btn.active { color: #dc2626; }
  .mob-fav-btn.active svg { color: #dc2626; fill: #dc2626; stroke: #dc2626; }

  /* ── Бейдж корзины в нижней навигации ─────── */
  .mob-cart-badge {
    position: absolute;
    top: 1px; right: 4px;
    background: var(--orange);
    color: #fff;
    border-radius: 50%;
    min-width: 17px;
    height: 17px;
    font-size: 10px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
  }
  .mob-cart-badge.has-items { display: inline-flex; }

  /* ── Breadcrumb ─────────────────────────── */
  .breadcrumb { font-size: 12px; padding: 8px 0; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  .breadcrumb::-webkit-scrollbar { display: none; }
}

@media (max-width: 480px) {
  /* ── Герой ── */
  .hero { padding: 18px 0 22px; }
  .hero h2 { font-size: 26px; margin-bottom: 8px; }
  .hero-content p { font-size: 13px; margin-bottom: 12px; }
  .hero-btns .btn-primary {
    font-size: 15px; padding: 12px 20px;
    width: 100%; justify-content: center;
  }

  /* ── Карусель ── */
  /* 176px, а не 150: при 150 счётчику и «В корзину» в одной строке
     остаётся 35px на текст надписи — она обрезается. 176 даёт запас
     на случай, если системный шрифт окажется шире Inter */
  .carousel-track .product-card { width: 176px !important; min-width: 176px; }
  .carousel-track .product-card .product-name { font-size: 12px; }

  /* ── Каталог: 2 колонки ── */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-card .product-name { font-size: 12px; }
  .product-card .product-price { font-size: 13px; }
  .product-card-body { padding: 10px 10px 12px; }
  /* Узкий экран: счётчик ужимаем до минимума, иначе «В корзину» не влезает рядом */
  .product-cart-row, .carousel-track .product-cart-row { gap: 4px; }
  .card-qty-ctrl, .carousel-track .card-qty-ctrl { height: 30px; }
  .card-qty-btn, .carousel-track .card-qty-btn { width: 21px !important; height: 28px !important; font-size: 14px; }
  .card-qty-val, .carousel-track .card-qty-val { width: 24px; min-width: 24px; font-size: 12px; }
  .btn-add-cart, .carousel-track .btn-add-cart { font-size: 10.5px; padding: 0 3px; letter-spacing: -0.2px; }

  /* ── Страница товара ── */
  .product-page-img img { height: 240px; }
  .product-page-name { font-size: 18px; }
  .product-page-price { font-size: 24px; }

  /* ── Корзина: прокрутка таблицы ── */
  .cart-table-scroll table { min-width: 380px; }

  /* ── Навигация категорий ── */
  .mob-cat-chip { font-size: 12px; padding: 5px 11px; }

  /* ── Нижняя навигация ── */
  .mobile-bar-btn { min-width: 46px; padding: 5px 7px 4px; font-size: 9px; }
  .mobile-bar-btn svg { width: 22px; height: 22px; }
}

/* ── Подгрузка товаров при прокрутке (каталог, категория) ── */
.catalog-spinner { width: 36px; height: 36px; border: 3px solid #e0e0e0; border-top-color: #ff6b00; border-radius: 50%; animation: cat-spin .7s linear infinite; }
@keyframes cat-spin { to { transform: rotate(360deg); } }
.catalog-end-msg { font-size: 13px; color: #aaa; padding: 8px 20px; border: 1px solid #e8e8e8; border-radius: 20px; background: #fafafa; }

/* ── Страницы документов и информации (legal.php, info.php) ── */
.legal-wrap { max-width: 920px; margin: 0 auto; padding: 28px 16px 70px; }
.legal-hero {
  background: linear-gradient(135deg, #0f1923 0%, #1a2b3c 55%, #0f2540 100%);
  border-radius: 20px; padding: 32px 34px; color: #fff;
  display: flex; align-items: center; gap: 18px; position: relative; overflow: hidden;
}
.legal-hero::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0,113,227,0.35) 0%, transparent 70%); pointer-events: none;
}
.legal-hero-icon {
  width: 58px; height: 58px; border-radius: 15px; background: rgba(255,107,0,0.18);
  border: 1.5px solid rgba(255,107,0,0.4); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.legal-hero-icon svg { width: 28px; height: 28px; fill: none; stroke: #ff8a3d; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.legal-hero-text h1 { font-size: 24px; font-weight: 800; margin: 0 0 4px; line-height: 1.2; }
.legal-hero-text .legal-updated { font-size: 13px; color: rgba(255,255,255,0.5); }

.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 24px; }
.legal-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 50px;
  background: var(--bg); border: 1.5px solid var(--border-light); color: var(--text-secondary);
  font-size: 13.5px; font-weight: 600; text-decoration: none; transition: all .15s; white-space: nowrap;
}
.legal-tab:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.legal-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.legal-doc {
  background: #fff; border: 1px solid var(--border-light); border-radius: 18px;
  padding: 34px 38px; box-shadow: 0 2px 16px rgba(0,0,0,0.05);
}
.legal-doc h2 {
  font-size: 18px; font-weight: 700; color: var(--text-primary);
  margin: 26px 0 10px; padding-top: 4px;
}
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc p { font-size: 15px; line-height: 1.7; color: #3a3a3f; margin-bottom: 12px; }
.legal-doc ul { margin: 0 0 14px; padding-left: 22px; }
.legal-doc li { font-size: 15px; line-height: 1.7; color: #3a3a3f; margin-bottom: 5px; }
.legal-doc b { color: var(--text-primary); font-weight: 700; }
.legal-doc a { color: var(--blue); }

.legal-foot-note {
  margin-top: 22px; padding: 16px 20px; background: var(--bg); border-radius: 12px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.6;
}

@media (max-width: 600px) {
  .legal-wrap { padding: 16px 12px 70px; }
  .legal-hero { padding: 22px 20px; border-radius: 16px; gap: 14px; }
  .legal-hero-icon { width: 48px; height: 48px; }
  .legal-hero-text h1 { font-size: 19px; }
  .legal-doc { padding: 22px 18px; border-radius: 14px; }
  .legal-doc h2 { font-size: 16px; }
  .legal-doc p, .legal-doc li { font-size: 14px; }
  .legal-tabs { gap: 6px; }
  .legal-tab { font-size: 12px; padding: 8px 12px; }
}

/* ── Уведомление о файлах cookie ──
   Раньше эти правила лежали в самом низу страницы, и плашка успевала мелькнуть
   до того, как браузер до них доходил. Здесь они применяются до первой отрисовки. */
#cookie-banner{
  display:none; position:fixed; left:16px; right:16px; bottom:16px; z-index:99998;
  max-width:780px; margin:0 auto;
  background:#fff; border:1px solid #e8ebef; border-radius:16px;
  box-shadow:0 12px 44px rgba(0,0,0,.18);
  padding:16px 20px; align-items:center; gap:16px; flex-wrap:wrap;
}
#cookie-banner.show{ display:flex; }
.cookie-ico{ font-size:30px; flex-shrink:0; }
.cookie-text{ flex:1; min-width:200px; font-size:13.5px; color:#555; line-height:1.55; }
.cookie-text a{ color:#0071e3; font-weight:600; text-decoration:none; }
.cookie-text a:hover{ text-decoration:underline; }
.cookie-btn{
  flex-shrink:0; padding:11px 28px; border:none; border-radius:10px;
  background:linear-gradient(135deg,#0071e3,#0077ed); color:#fff;
  font-size:14px; font-weight:700; cursor:pointer; transition:opacity .15s, transform .12s;
}
.cookie-btn:hover{ opacity:.9; transform:translateY(-1px); }
@media (max-width:768px){
  #cookie-banner{ bottom:74px; padding:14px 16px; gap:12px; }  /* над нижней мобильной панелью */
  .cookie-btn{ width:100%; }
}

/* ── Уведомление «Пока нет в наличии» (showStockNotice в cart-sync.js, 08.10.2026):
      товар с остатком 0 в корзину не кладётся, кнопка «вздрагивает», справа сверху на 2 с — карточка с названием ── */
.stock-notice { position: fixed; top: 20px; right: 20px; z-index: 100000; width: min(360px, calc(100vw - 24px)); overflow: hidden;
                display: flex; align-items: center; gap: 12px; padding: 13px 16px 15px 13px; background: #fff;
                border: 1px solid #f3e4d6; border-radius: 14px; box-shadow: 0 14px 36px rgba(16,24,40,.16), 0 2px 6px rgba(16,24,40,.06);
                opacity: 0; transform: translateX(28px); transition: opacity .2s ease, transform .3s cubic-bezier(.2,.8,.2,1);
                pointer-events: none; }
.stock-notice.show { opacity: 1; transform: translateX(0); }
/* Полоска внизу тает за 2 секунды — видно, что уведомление сейчас исчезнет */
.stock-notice::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #f59a4a;
                       transform-origin: left; animation: snTimer var(--sn-ms, 2s) linear forwards; }
@keyframes snTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.sn-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center;
          background: #fff1e6; color: #e8710a; }
.sn-ico svg { width: 21px; height: 21px; }
.sn-body { min-width: 0; }
.sn-title { font-size: 15.5px; font-weight: 800; line-height: 1.3; color: #1a1a1a; }
.sn-name { margin-top: 2px; font-size: 13px; line-height: 1.4; color: #6b7684; overflow-wrap: anywhere;
           display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 768px) {
  .stock-notice { top: 12px; right: 12px; left: 12px; width: auto; transform: translateY(-16px); }
  .stock-notice.show { transform: translateY(0); }
}
.btn-add-cart.shake { animation: btnShake .4s ease; }
@keyframes btnShake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
