@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #ffffff;
  --bg-soft: #f3f7fc;
  --bg-soft-2: #eaf1fa;
  --accent: #4a5568;
  --accent-dark: #232b36;
  --accent-darker: #12161c;
  --accent-soft: #e6e9ed;
  --accent-gradient: linear-gradient(120deg, #5b6779 0%, #2b3542 45%, #14181e 100%);
  --text: #14181f;
  --text-muted: #6b7480;
  --border: #e7ecf2;
  --brand-red: #e02020;
  --radius-lg: 0px;
  --radius-md: 0px;
  --radius-sm: 0px;
  --shadow: 0 4px 24px rgba(20, 24, 31, 0.06);
  --shadow-hover: 0 10px 32px rgba(20, 24, 31, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.header-top {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}
.header-top .inner { padding: 0 24px; }

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  margin-right: auto;
  margin-left: 32px;
}
.header-phone svg { width: 22px; height: 22px; stroke: var(--brand-red); flex-shrink: 0; }
.header-phone:hover { color: var(--brand-red); }

.header-nav-band {
  background: var(--accent-gradient);
}
.header-nav-band .inner { padding: 0; justify-content: space-between; gap: 24px; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.logo-img { height: 72px; width: auto; display: block; }
.logo-mark {
  font-weight: 900;
  font-style: italic;
  font-size: 25px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  text-shadow: -1px 0 0 rgba(20,24,31,0.15);
}
.logo-slash {
  display: inline-block;
  width: 15px;
  height: 20px;
  margin: 0 1px 0 -2px;
  background: var(--brand-red);
  clip-path: polygon(35% 0, 100% 0, 65% 100%, 0 100%);
  transform: skewX(-6deg);
}
.logo-sub {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  gap: 0;
}

.main-nav a {
  font-weight: 700;
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  transition: background 0.15s, color 0.15s;
  padding: 12px 30px;
  display: inline-block;
  border-right: 1px solid rgba(200,206,214,0.4);
}
.main-nav a:last-child { border-right: none; }
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(255,255,255,0.1); }

/* ---------- Випадаючий каталог марок ---------- */
/* Панель розтягнута на всю ширину смуги меню, тому позиціонується від
   .header-nav-band, а не від самого пункту (у пункті лише живе розмітка). */

.header-nav-band { position: relative; }
.main-nav .nav-item { display: flex; }

.nav-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--accent-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 32px rgba(20, 24, 31, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.14s, transform 0.14s, visibility 0.14s;
  z-index: 60;
}
.nav-has-dropdown.open .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

/* Висота панелі росте з кількістю марок (рядків = марок / 4). До ~40 марок вона
   вміщається в екран, далі — ні, тому обмежуємо висотою вікна і вмикаємо скрол:
   інакше нижні марки колись просто виїхали б за нижній край без доступу до них. */
.nav-dropdown-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px 22px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.nav-brands-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255, 255, 255, 0.10); }
.nav-brands-loading { color: rgba(255, 255, 255, 0.65); font-size: 14px; padding: 8px 0; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--accent-dark);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background 0.13s, color 0.13s;
}
.nav-brand:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav-brand-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Сторінка марки: плитки моделей ---------- */

.brand-title {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 14px 0 24px;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 56px;
}

.model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}
.model-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.model-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--brand-red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 6px 12px;
}

/* Місце під майбутнє зображення моделі. Поки картинок немає — тут назва
   моделі великим приглушеним шрифтом, щоб плитка не виглядала порожньою. */
.model-visual {
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #f7fafd 0%, #e9f0f8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 16px 16px;
}
.model-visual img { width: 100%; height: 100%; object-fit: contain; }
.model-visual-name {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  opacity: 0.55;
  text-align: center;
  line-height: 1.15;
}

.model-caption {
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 11px 12px;
  margin-top: auto;
}

.nav-search {
  display: flex;
  align-items: center;
  margin-right: 24px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.4);
}
.nav-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  width: 220px;
}
.nav-search input::placeholder { color: var(--text-muted); }
.nav-search button {
  background: none;
  border: none;
  padding: 10px 14px;
  display: flex;
  align-items: center;
}
.nav-search button svg { width: 18px; height: 18px; stroke: var(--accent-dark); }

.header-actions { display: flex; align-items: center; gap: 16px; }

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: none;
  transition: background 0.15s;
}
.icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--text);
}
.icon-btn:hover { background: var(--bg-soft-2); }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.burger { display: none; }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  padding: 20px 0 32px;
}

.hero .inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 2.4fr;
  gap: 0;
  align-items: stretch;
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
  box-shadow: var(--shadow);
}
.hero-banner { overflow: hidden; display: block; }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

.search-widget {
  background: #fff;
  overflow: hidden;
  border: 1px solid var(--border);
  border-right: none;
}
.search-widget-head {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 20px;
}
.search-widget-body { padding: 18px; display: flex; flex-direction: column; gap: 11px; }
.search-widget-body select, .search-widget-body input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}
.search-widget-body select:disabled { background: var(--bg-soft); color: var(--text-muted); }
.search-widget-body button {
  background: var(--brand-red);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-weight: 700;
  font-size: 15px;
  transition: filter 0.15s;
}
.search-widget-body button:hover { filter: brightness(1.15); }

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 18px;
}
.hero h1 .accent { color: var(--accent-dark); }

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.search-box {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 22px;
  box-shadow: var(--shadow);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
}
.search-box button {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Feature strip ---------- */

.feature-strip {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  text-align: center;
  padding: 20px 12px;
}
.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--bg-soft-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg { width: 26px; height: 26px; stroke: var(--accent-dark); }
.feature-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.feature-card p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ---------- Section headings ---------- */

.section { padding: 56px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-head a { font-size: 14px; font-weight: 600; color: var(--accent-dark); }

/* ---------- Featured brands (наші фірмові марки) ---------- */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.featured-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft-2);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, transform 0.15s;
}
.featured-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.featured-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-card .overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  background: linear-gradient(180deg, rgba(20,24,31,0) 40%, rgba(20,24,31,0.78) 100%);
  color: #fff;
}
.featured-card .overlay-inner h3 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.featured-card .overlay-inner span {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}

/* ---------- Category boxes (головна) ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.category-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 22px 14px 16px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--accent-dark); }
.category-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
}
.category-icon img { width: 100%; height: 100%; }
.category-card-name { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.category-card-count { display: block; font-size: 12px; color: var(--text-muted); font-weight: 500; margin-top: 4px; }

/* ---------- Brand pills ---------- */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.brand-pill {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 18px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.15s, background 0.15s;
  min-width: 0;
}
.brand-pill:hover { background: var(--accent-soft); transform: translateY(-2px); }
.brand-pill .count { display: block; font-weight: 500; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Product grid & cards ---------- */

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

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.product-photo {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 100%;
  background: var(--bg-soft);
  overflow: hidden;
  min-width: 0;
}
.product-photo img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; min-width: 0; }
.product-photo .no-photo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--text-muted); font-size: 13px; }

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.92);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.product-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-donor { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.product-name { font-size: 15px; font-weight: 600; line-height: 1.3; min-height: 39px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.product-price { font-size: 18px; font-weight: 800; }
.product-price span { font-size: 13px; font-weight: 500; color: var(--text-muted); }

.buy-btn {
  border: none;
  background: var(--brand-red);
  color: #fff;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: filter 0.15s, background 0.15s;
}
.buy-btn:hover { filter: brightness(1.1); }
.buy-btn.added { background: #3f9d5c; }
/* Товар без ціни: не кнопка, а підказка "відкрий картку" — вигляд спокійніший,
   щоб не конкурувати з реальним "Купити" в сусідніх картках. */
.buy-btn.ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px 14px;
  font-weight: 600;
}

/* ---------- Catalog filter bar (горизонтальна смуга під шапкою) ---------- */

.filter-bar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.filter-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.filter-bar select, .filter-bar input {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}
.filter-bar select { min-width: 180px; }
.filter-bar input { flex: 1; min-width: 220px; }
.filter-bar .clear-btn {
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.filter-bar .clear-btn:hover { background: var(--bg-soft-2); }

/* ---------- Каталог: квадратні плитки розділів ---------- */

.cat-title {
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 12px 0 20px;
}

.cat-tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.cat-tile {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  transition: border-color 0.14s, box-shadow 0.14s, transform 0.14s, background 0.14s;
}
.cat-tile:hover { border-color: var(--accent-dark); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-soft-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
/* Кругла світла підкладка — інакше на активній (темній) плитці іконка
   зливалася б із фоном, бо кольори в самих SVG зашиті фіксовано. */
.cat-tile-icon img { width: 22px; height: 22px; }
.cat-tile-name { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.cat-tile-count { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.cat-tile.active { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }
.cat-tile.active .cat-tile-count { color: rgba(255, 255, 255, 0.7); }
.cat-tile.back { background: var(--bg-soft); font-weight: 700; font-size: 13px; }

/* Останній рівень: замість плиток — рядок навігації, щоб екран дістався товару. */
.cat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.13s, background 0.13s, color 0.13s;
}
.cat-chip b { font-weight: 600; font-size: 11.5px; color: var(--text-muted); }
.cat-chip:hover { border-color: var(--accent-dark); }
.cat-chip.active { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }
.cat-chip.active b { color: rgba(255, 255, 255, 0.7); }
.cat-chip.back { background: var(--bg-soft); }
.cat-row-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }

.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.results-count { color: var(--text-muted); font-size: 14px; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; max-width: 100%; }
.pagination .ellipsis { display: flex; align-items: center; padding: 0 4px; color: var(--text-muted); }
.pagination button {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
}
.pagination button.active { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }

.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state h3 { color: var(--text); font-size: 20px; margin-bottom: 8px; }

/* ---------- Product detail page ---------- */
/* Повна назва — на всю ширину зверху, під нею два симетричні блоки:
   зліва галерея, справа характеристики + купівля. */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent-dark); text-decoration: underline; }
.breadcrumbs i { font-style: normal; opacity: 0.45; }
.breadcrumbs span { color: var(--text); }

.pd-title {
  font-size: clamp(21px, 2.3vw, 31px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
  margin: 14px 0 24px;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: start;
  padding-bottom: 56px;
}

/* ---------- Галерея товару ----------
   Головне фото — бокс зі сталим співвідношенням сторін + object-fit:contain,
   тому фото будь-якої орієнтації показується цілком і блок не «стрибає»
   від товару до товару. Стрічка мініатюр прокручується, а не переноситься
   на десяток рядів, як було раніше при 15-27 фото. */

.gallery {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
}
.gallery.single { grid-template-columns: minmax(0, 1fr); }

/* Висоту рядка задає .gallery-stage; мініатюри скроляться всередині неї. */
.gallery-thumbs { position: relative; overflow: hidden; }
.gallery-thumbs-scroll {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.gallery-thumb {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  background: #fff;
  border: 2px solid var(--border);
  overflow: hidden;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb:hover { border-color: var(--accent); }
.gallery-thumb.active { border-color: var(--accent-dark); }

.gallery-stage { aspect-ratio: 4 / 3; }
.gallery-main {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.15s ease-out;
}
.gallery-main.zoomed { cursor: zoom-out; }
.gallery-main.zoomed img { transform: scale(2.4); }

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-arrow.left { left: 10px; }
.gallery-arrow.right { right: 10px; }
.gallery-arrow:hover { background: var(--accent-dark); color: #fff; border-color: var(--accent-dark); }
.gallery-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(20, 24, 31, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
}
.gallery-empty {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------- Характеристики та купівля ---------- */

.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td {
  padding: 9px 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px dashed var(--border);
}
.spec-table th { font-weight: 500; color: var(--text-muted); width: 46%; }
.spec-table td { font-weight: 700; text-align: right; }
.avail-last { color: var(--brand-red); font-weight: 800; }
.avail-ok { color: #3f9d5c; font-weight: 700; }

.donor-panel {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.donor-panel-head {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.donor-panel-car { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.donor-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.donor-chip {
  background: #fff;
  border: 1px solid var(--border);
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.donor-chip b { color: var(--text); font-weight: 700; }

.buy-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.buy-price { font-size: 33px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.buy-price.on-request { font-size: 19px; color: var(--text-muted); }
.btn-buy {
  margin-left: auto;
  background: var(--brand-red);
  color: #fff;
  border: none;
  padding: 16px 32px;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  transition: filter 0.15s;
}
.btn-buy:hover { filter: brightness(1.1); }

.buy-notes {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.buy-notes li { position: relative; padding-left: 22px; }
.buy-notes li::before { content: '✓'; position: absolute; left: 0; color: #3f9d5c; font-weight: 800; }

.btn-primary {
  background: var(--accent-gradient); color: #fff; border: none;
  padding: 16px 32px; border-radius: var(--radius-md); font-weight: 700; font-size: 15px;
  flex: 1;
  transition: filter 0.15s;
}
.btn-primary:hover { filter: brightness(1.15); }
.btn-primary:disabled { opacity: 0.6; filter: none; cursor: default; }

/* ---------- Форма оформлення замовлення ---------- */

.checkout-form { margin-top: 18px; }
.checkout-field { margin-bottom: 12px; }
.checkout-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.checkout-field input, .checkout-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: #fff;
}
.checkout-field input:focus, .checkout-field textarea:focus { outline: none; border-color: var(--accent-dark); }
.checkout-field textarea { resize: vertical; min-height: 64px; }
.checkout-error { color: var(--brand-red); font-size: 13px; margin-top: 10px; }
.checkout-success { text-align: center; padding: 12px 4px 4px; }
.checkout-success h3 { margin: 0 0 6px; }
.checkout-success p { color: var(--text-muted); margin: 0; }
/* Honeypot: приховано від людини стилями (не type=hidden — деякі боти
   саме на цей атрибут і перевіряють), від скрінрідерів — aria-hidden в розмітці. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-soft);
  margin-top: 64px;
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 14px; }
.footer-grid a, .footer-grid p { display: block; font-size: 14px; margin-bottom: 10px; color: var(--text); }
.footer-grid a:hover { color: var(--accent-dark); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ---------- Static content pages ---------- */

.page-content { padding: 56px 0; max-width: 780px; margin: 0 auto; }
.page-content h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 24px; }
.page-content h2 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; }
.page-content p { color: var(--text-muted); line-height: 1.7; margin-bottom: 14px; }

/* ---------- Cart page ---------- */

.cart-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-soft); }
.cart-item .info { flex: 1; }
.cart-item .info .name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.cart-item .info .donor { font-size: 12px; color: var(--text-muted); }
.cart-item .price { font-weight: 700; font-size: 16px; }
.cart-item .remove { background: none; border: none; color: var(--text-muted); font-size: 13px; text-decoration: underline; }
.cart-summary {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
}
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 15px; }
.cart-summary .total { font-size: 20px; font-weight: 800; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .header-nav-band { display: none; }
  .header-phone { font-size: 13px; margin-left: 12px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-tiles { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .filter-bar select { min-width: 140px; }
  .hero-split { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  /* На вузькому екрані мініатюри переїжджають під головне фото у горизонтальну стрічку. */
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery-thumbs { position: static; overflow: visible; order: 2; }
  .gallery-thumbs-scroll {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 4px;
  }
  .gallery-thumb { width: 64px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 48px 0 40px; }
  .footer-grid { grid-template-columns: 1fr; }
}
