/* ==========================================================================
   СкладПромо — Витрина оптового склада сувенирной продукции
   Целевая аудитория: Рекламные агентства и корпоративные заказчики
   Дизайн-система: Архитектурный B2B-монохром с швейцарской сеткой
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

img, svg, video {
  max-width: 100%;
  display: block;
}

:root {
  /* Дизайн-токены: чистая архитектурная B2B палитра */
  --ink: #0d0f12;
  --ink-soft: #1e2229;
  --canvas: #ffffff;
  --soft-cloud: #f4f5f7;
  --cloud-hover: #ebeef2;
  --charcoal: #344054;
  --ash: #475467;
  --mute: #667085;
  --stone: #98a2b3;
  --hairline: #e4e7ec;
  --hairline-soft: #f2f4f7;
  --hairline-strong: #d0d5dd;
  
  /* Семантические цвета */
  --brand-accent: #0047ff;
  --brand-accent-hover: #0037cc;
  --brand-accent-soft: rgba(0, 71, 255, 0.08);
  --success: #057a55;
  --success-bg: #edfdf5;
  --sale: #d92d20;
  --sale-bg: #fef3f2;
  
  /* Обратная совместимость */
  --primary: #0d0f12;
  --primary-dark: #000000;
  --accent: #f4f5f7;
  --text: #0d0f12;
  --muted: #667085;
  --border: #e4e7ec;
  --danger: #d92d20;
  
  /* Геометрия */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  --header-h: 64px;
  --max-width: 1440px;
  
  /* Типографика */
  --font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Тени и глубина */
  --shadow-subtle: 0 1px 3px rgba(16, 24, 40, 0.04), 0 1px 2px rgba(16, 24, 40, 0.02);
  --shadow-card: 0 4px 12px -2px rgba(16, 24, 40, 0.06), 0 2px 6px -2px rgba(16, 24, 40, 0.04);
  --shadow-drawer: -4px 0 24px rgba(16, 24, 40, 0.12);
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Пульсирующая точка статуса наличия */
.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background-color: var(--success);
  opacity: 0.4;
  animation: pulseAnimation 2s infinite ease-out;
}
@keyframes pulseAnimation {
  0% { transform: scale(1); opacity: 0.5; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.25s ease;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  height: var(--header-h);
}

.header-brand-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  line-height: 1;
  transition: opacity 0.15s ease;
}
.logo:hover {
  opacity: 0.8;
}
.logo span {
  color: var(--ink);
}

.header-city-badge {
  display: none !important;
}

.header-search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  background: var(--soft-cloud);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  height: 42px;
  padding: 0 8px 0 14px;
  position: relative;
  transition: all 0.2s ease;
}
.header-search:focus-within {
  background: var(--canvas);
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(13, 15, 18, 0.08);
}

.search-icon {
  width: 17px;
  height: 17px;
  color: var(--mute);
  display: flex;
  align-items: center;
  margin-right: 10px;
  flex-shrink: 0;
}
.search-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.header-search input::placeholder {
  color: var(--mute);
  opacity: 0.9;
}

.search-kbd {
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--mute);
  background: var(--canvas);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 6px;
  user-select: none;
  display: inline-block;
}

.search-submit {
  background: var(--ink);
  color: var(--canvas);
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}
.search-submit:hover {
  opacity: 0.85;
}

.header-contacts {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header-meta-pill,
.header-phone,
.messenger-links {
  display: none !important;
}

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--canvas);
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}
.cart-btn:hover {
  background: var(--ink-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}
.cart-btn:active {
  transform: scale(0.97);
}
.cart-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cart-btn-label {
  display: inline-block;
}
.cart-badge {
  background: var(--canvas);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-badge.visible {
  display: inline-flex;
}

/* ==========================================================================
   HERO — B2B Эдиториал для Рекламных Агентств
   ========================================================================== */
.hero {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(360px, 1.35fr);
  gap: 48px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 56px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.eyebrow-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--soft-cloud);
  border: 1px solid var(--hairline);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.eyebrow-loc {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--mute);
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.2vw, 4.6rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 18px;
}

.hero-copy p {
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--charcoal);
  max-width: 48ch;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(13, 15, 18, 0.15);
}
.hero-cta:hover {
  background: var(--ink-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 15, 18, 0.25);
}
.hero-cta svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.15s ease;
}
.hero-cta:hover svg {
  transform: translateX(3px);
}

.hero-secondary-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--soft-cloud);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  transition: all 0.15s ease;
}
.hero-secondary-cta:hover {
  background: var(--canvas);
  border-color: var(--ink);
}

/* Статистическая плашка в Hero */
.hero-stats-ribbon {
  display: flex;
  align-items: center;
  background: var(--soft-cloud);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  gap: 16px;
}

.hero-stat-cell {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-desc {
  font-size: 0.75rem;
  color: var(--mute);
  font-weight: 500;
}

.hero-stat-sep {
  width: 1px;
  height: 28px;
  background: var(--hairline);
}

/* Блок витрины справа */
.hero-showcase-box {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.hero-showcase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline-soft);
}

.showcase-caption {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.showcase-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
}

.hero-contact-sheet {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hero-sheet-tile {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
}
.hero-sheet-tile:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
}

.hero-sheet-photo {
  aspect-ratio: 1 / 1;
  background: var(--soft-cloud);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.hero-sheet-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-sheet-tile:hover .hero-sheet-photo img {
  transform: scale(1.06);
}

.hero-sheet-caption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  font-size: 0.75rem;
  line-height: 1.3;
  background: var(--canvas);
}

.hero-sheet-name {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.5em;
}

.hero-sheet-article {
  color: var(--mute);
  font-size: 0.68rem;
  font-weight: 500;
}

.hero-sheet-price {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* ==========================================================================
   OVERVIEW & STATS SECTION
   ========================================================================== */
.catalog-overview {
  max-width: var(--max-width);
  margin: 40px auto 32px;
  padding: 24px 32px;
  background: var(--soft-cloud);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.catalog-overview h2 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.catalog-overview p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--charcoal);
  max-width: 90ch;
}
.catalog-overview p + p {
  margin-top: 4px;
}

/* ==========================================================================
   CATEGORY DIRECTORY
   ========================================================================== */
.category-directory {
  max-width: var(--max-width);
  margin: 0 auto 40px;
  padding: 0 24px;
}

.category-directory h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.category-directory-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.category-tile {
  min-width: 0;
  opacity: 1 !important;
  transform: none !important;
}

.category-tile a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 10px;
  transition: all 0.2s ease;
  height: 100%;
}
.category-tile a:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
}

.category-tile-photo {
  aspect-ratio: 1 / 1;
  background: var(--soft-cloud);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
}
.category-tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.category-tile a:hover .category-tile-photo img {
  transform: scale(1.08);
}

.category-tile-name {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 4px;
  overflow-wrap: break-word;
  transition: color 0.15s ease;
}
.category-tile a:hover .category-tile-name {
  color: var(--brand-accent);
}

.category-tile-count {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--mute);
  margin-top: auto;
}

.category-directory-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  padding: 10px 18px;
  background: var(--soft-cloud);
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  transition: all 0.15s ease;
}
.category-directory-all:hover {
  background: var(--canvas);
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}

/* ==========================================================================
   CATALOG SECTION & SMART FILTERS
   ========================================================================== */
.catalog-section {
  max-width: var(--max-width);
  margin: 0 auto 56px;
  padding: 40px 24px 0;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin-bottom: 0;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

/* Сайдбар фильтров */
.filter-sidebar {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}

.filter-head-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-reset {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mute);
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.filter-reset:hover {
  color: var(--sale);
  background: var(--sale-bg);
}

.filter-group {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline-soft);
}
.filter-group:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.filter-group-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.12s ease;
}
.filter-option:hover {
  background: var(--soft-cloud);
}

.filter-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--hairline-strong);
  border-radius: 4px;
  background: var(--canvas);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s ease;
}
.filter-option:hover input[type="checkbox"] {
  border-color: var(--ink);
}
.filter-option input[type="checkbox"]:checked {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}
.filter-option input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border-style: solid;
  border-color: #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-option-name {
  flex: 1;
  color: var(--charcoal);
  transition: color 0.15s ease;
}
.filter-option-count {
  font-size: 0.78rem;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
  padding: 1px 6px;
  background: var(--hairline-soft);
  border-radius: var(--radius-pill);
}
.filter-option input:checked ~ .filter-option-name {
  color: var(--brand-accent);
  font-weight: 600;
}

.filter-show-more {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-accent);
  padding: 6px 6px 2px;
  text-align: left;
  display: block;
}
.filter-show-more:hover {
  text-decoration: underline;
}

.filter-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mute);
}
.filter-icon svg {
  width: 14px;
  height: 14px;
}
.filter-option:hover .filter-icon {
  color: var(--ink);
}
.filter-option input:checked ~ .filter-icon {
  color: var(--brand-accent);
}

.filter-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.filter-toggle {
  display: none;
}

/* Сегмент каталога: подарки, мерч, сувениры */
.catalog-segment-bar {
  margin-bottom: 12px;
}
.catalog-segment-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: var(--soft-cloud);
  border: 1px solid var(--hairline);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}

/* Панель сортировки */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.sort-label {
  font-size: 0.84rem;
  color: var(--mute);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sort-btn {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sort-btn:hover {
  border-color: var(--ink);
  background: var(--soft-cloud);
}
.sort-btn.active {
  background: var(--ink);
  color: var(--canvas);
  border-color: var(--ink);
  font-weight: 600;
}
.sort-arrow {
  font-size: 0.85rem;
}

/* ==========================================================================
   PRODUCT CARDS GRID
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  opacity: 1 !important;
  transform: none !important;
}
.product-card:hover {
  border-color: var(--ink);
  transform: translateY(-3px) !important;
  box-shadow: var(--shadow-card);
}

.card-img-link {
  display: block;
  text-decoration: none;
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--soft-cloud);
  overflow: hidden;
  position: relative;
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .card-img-wrap img {
  transform: scale(1.06);
}

.card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-article {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-name {
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.7em;
  transition: color 0.15s ease;
}
.card-name:hover {
  color: var(--brand-accent);
}

.card-prices {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
}

.card-price {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.card-opt-note {
  font-size: 0.74rem;
  color: var(--mute);
  font-weight: 500;
}

.card-qty {
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.card-qty.in-stock {
  color: var(--success);
}
.card-qty.out-stock {
  color: var(--sale);
}

.card-body .add-to-cart-btn {
  margin-top: auto;
}

.add-to-cart-btn {
  width: 100%;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--canvas);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.add-to-cart-btn:hover {
  background: var(--ink);
  color: var(--canvas);
}
.add-to-cart-btn:active {
  transform: scale(0.98);
}
.add-to-cart-btn.added {
  background: var(--success);
  color: var(--canvas);
  border-color: var(--success);
}

.catalog-load-more {
  display: block;
  margin: 36px auto 0;
  padding: 14px 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  background: var(--canvas);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.catalog-load-more:hover {
  border-color: var(--ink);
  background: var(--soft-cloud);
  transform: translateY(-1px);
}

.status-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--mute);
  font-size: 1rem;
}

/* ==========================================================================
   CONTACTS SECTION (Как заказать оптом)
   ========================================================================== */
.contacts-section {
  background: var(--soft-cloud);
  border-top: 1px solid var(--hairline);
  padding: 56px 24px;
}

.contacts-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.contacts-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 400;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.2s ease;
}
.contact-item:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--soft-cloud);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ink);
}
.contact-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact-icon.tg svg, .contact-icon.vk svg {
  fill: currentColor;
  stroke: none;
}
.contact-icon .max-logo {
  width: 22px;
  height: 22px;
}

.contact-label {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mute);
  display: block;
}

.contact-value {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  margin-top: 2px;
}

/* ==========================================================================
   WAREHOUSE SECTION (Склад и самовывоз)
   ========================================================================== */
.warehouse {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  border-top: 1px solid var(--hairline);
}

.warehouse h2 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 400;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.warehouse-address {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.warehouse-hours {
  font-size: 0.94rem;
  color: var(--ash);
  margin-bottom: 20px;
}

.warehouse-map {
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  overflow: hidden;
  margin-top: 16px;
  box-shadow: var(--shadow-subtle);
}
.warehouse-map iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 40px 24px 32px;
  color: var(--mute);
  font-size: 0.85rem;
}

.site-requisites {
  font-style: normal;
  line-height: 1.6;
  color: var(--ash);
  max-width: 900px;
  margin: 0 auto 20px;
  text-align: center;
  font-size: 0.82rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: var(--brand-accent);
}

/* ==========================================================================
   CART DRAWER & CHECKOUT
   ========================================================================== */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 15, 18, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
}
.cart-overlay.open {
  display: block;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--canvas);
  z-index: 301;
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer.open {
  right: 0;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--hairline);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cart-close {
  background: var(--soft-cloud);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease;
}
.cart-close:hover {
  background: var(--cloud-hover);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-empty {
  text-align: center;
  color: var(--mute);
  padding: 60px 0;
  font-size: 0.95rem;
}

.cart-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline-soft);
}

.cart-item-img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  background: var(--soft-cloud);
  border-radius: var(--radius-sm);
  padding: 6px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.cart-item-art {
  font-size: 0.75rem;
  color: var(--mute);
  margin-top: 2px;
}

.cart-item-price {
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 700;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.cart-qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--canvas);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.qty-btn:hover {
  border-color: var(--ink);
  background: var(--soft-cloud);
}

.qty-val {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.cart-remove {
  background: none;
  border: none;
  color: var(--mute);
  cursor: pointer;
  font-size: 1.1rem;
  margin-left: auto;
  padding: 4px;
  transition: color 0.15s ease;
}
.cart-remove:hover {
  color: var(--sale);
}

.cart-footer {
  border-top: 1px solid var(--hairline);
  padding: 20px 24px max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--canvas);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.15rem;
  font-weight: 700;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checkout-form input,
.checkout-form textarea {
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
  background: var(--canvas);
  color: var(--ink);
  width: 100%;
}
.checkout-form input:focus,
.checkout-form textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(13, 15, 18, 0.08);
}
.checkout-form textarea {
  resize: vertical;
  min-height: 64px;
}

.privacy-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--mute);
  cursor: pointer;
}
.privacy-consent input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

.order-btn {
  background: var(--ink);
  color: var(--canvas);
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.order-btn:hover {
  background: var(--ink-soft);
  opacity: 0.9;
}
.order-btn:disabled {
  background: var(--stone);
  cursor: not-allowed;
}

.order-success {
  text-align: center;
  padding: 24px 10px;
  display: none;
}
.order-success h3 {
  font-size: 1.2rem;
  color: var(--success);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.order-success-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

/* ==========================================================================
   VIDEO MODAL
   ========================================================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 15, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 400;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}
.modal-box {
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  box-shadow: var(--shadow-drawer);
}
.modal-box video, .modal-box img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background 0.15s ease;
}
.modal-close:hover {
  background: #ffffff;
}

/* ==========================================================================
   RESPONSIVE DESIGN (390px Mobile Viewport Excellence)
   ========================================================================== */
.filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 15, 18, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
}
.filter-overlay.open {
  display: block;
}
.filter-close {
  display: none;
}

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 36px 20px;
  }
  .category-directory-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 860px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  
  .filter-sidebar {
    position: fixed;
    top: 0;
    left: -340px;
    width: 320px;
    max-width: 88vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    background: var(--canvas);
    z-index: 301;
    overflow-y: auto;
    padding: 20px;
    border-radius: 0;
    box-shadow: 4px 0 24px rgba(13, 15, 18, 0.15);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .filter-sidebar.open {
    left: 0;
  }
  
  .filter-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    background: var(--soft-cloud);
    border: none;
    color: var(--ink);
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;
  }
  
  .filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    min-height: 44px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--hairline-strong);
    background: var(--canvas);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
    transition: all 0.15s ease;
  }
  .filter-toggle:hover {
    border-color: var(--ink);
    background: var(--soft-cloud);
  }
  
  .filter-option {
    padding: 10px 6px;
    min-height: 44px;
  }
  
  .sort-bar {
    position: static;
    background: none;
    padding: 0;
    margin-bottom: 20px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: auto;
  }

  .catalog-section {
    scroll-margin-top: 120px;
    padding-top: 24px;
  }
  
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }
  
  .header-brand-wrap {
    flex: 1;
  }
  
  .header-city-badge {
    display: none;
  }
  
  .header-meta-pill {
    display: none;
  }
  
  .header-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    height: 40px;
  }
  
  .search-kbd {
    display: none;
  }
  
  .cart-btn-label {
    display: none;
  }
  .cart-btn {
    padding: 9px 12px;
  }
  
  .hero-inner {
    padding: 24px 16px 36px;
    gap: 28px;
  }
  
  .hero-copy h1 {
    font-size: 2.3rem;
  }
  
  .hero-stats-ribbon {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .hero-stat-sep {
    display: none;
  }
  
  .hero-contact-sheet {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .category-directory-list {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .card-body {
    padding: 10px 12px 14px;
  }
  .card-name {
    font-size: 0.88rem;
    min-height: 2.6em;
  }
  .card-price {
    font-size: 1.05rem;
  }
  
  .cart-drawer {
    width: 100vw;
  }
}

@media (max-width: 400px) {
  .header-phone {
    display: none;
  }
}
