/* ======================================================================
   ООО «ГМТ СЕРВИС» — дизайн-система сайта
   Mobile-first. Единый стиль для всех страниц.
   ====================================================================== */

/* ---------- 1. Токены ---------- */
:root {
  color-scheme: light;

  /* Поверхности */
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f6;

  /* Текст */
  --ink: #0e1319;
  --text: #1b2530;
  --muted: #5b6875;
  --faint: #8b98a5;

  /* Линии */
  --line: #e2e8ef;
  --line-strong: #cdd6e0;

  /* Бренд — «строительный» янтарь */
  --brand: #f97316;
  --brand-600: #ea580c;
  --brand-700: #c2410c;
  --brand-tint: #fff3e8;

  /* Статусы */
  --ok: #15803d;
  --ok-tint: #eefaf1;
  --danger: #b91c1c;
  --danger-tint: #fdf0f0;
  --star: #f59e0b;

  /* Геометрия */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --container: 1180px;
  --header-h: 64px;

  /* Тени */
  --sh-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --sh: 0 2px 4px rgba(15, 23, 42, .04), 0 6px 16px rgba(15, 23, 42, .07);
  --sh-lg: 0 12px 32px rgba(15, 23, 42, .14);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- 2. Сброс и база ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(26px, 5.2vw, 46px); }
h2 { font-size: clamp(22px, 3.6vw, 34px); }
h3 { font-size: clamp(18px, 2.4vw, 22px); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Атрибут hidden должен побеждать любой display из классов
   (иначе .btn { display: inline-flex } показывает скрытые кнопки) */
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 768px) { .container { padding-inline: 24px; } }

main { flex: 1 0 auto; }

/* ---------- 3. Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
              transform .12s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

.btn-primary { background: var(--brand-700); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: #9a3412; }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #232c37; }

.btn-ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-tint); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #991b1b; }

.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 15px 30px; font-size: 17px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- 4. Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(14, 19, 25, .96);
  backdrop-filter: saturate(140%) blur(8px);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { text-decoration: none; color: #fff; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-700) 100%);
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(249, 115, 22, .35);
}
.brand-mark svg { width: 20px; height: 20px; color: #fff; }
.brand-text small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #9aa8b6;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.main-nav { display: none; }
.main-nav a, .main-nav button {
  color: #d6dde4;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: color .16s, background .16s;
}
.main-nav a:hover, .main-nav button:hover { color: #fff; background: rgba(255, 255, 255, .09); text-decoration: none; }
.main-nav a.is-active { color: var(--brand); }
.main-nav .is-soon { color: #7d8894; cursor: default; }
.main-nav .is-soon:hover { background: none; color: #7d8894; }

.header-phone {
  display: none;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 14px;
  border: 1.5px solid rgba(255, 255, 255, .22);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: border-color .16s, background .16s;
}
.header-phone:hover { border-color: var(--brand); background: rgba(249, 115, 22, .14); color: #fff; text-decoration: none; }
.header-phone svg { width: 17px; height: 17px; color: var(--brand); }

.icon-btn {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: #fff;
  background: rgba(255, 255, 255, .08);
  transition: background .16s;
  position: relative;
  flex: none;
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn svg { width: 22px; height: 22px; }

.cart-count {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid; place-items: center;
  border: 2px solid var(--ink);
}
.cart-count:empty, .cart-count[data-empty="1"] { display: none; }

/* Мобильное меню (off-canvas) */
.nav-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(320px, 86vw);
  background: var(--ink);
  color: #fff;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer .drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.nav-drawer a, .nav-drawer button {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 12px;
  border-radius: var(--r-sm);
  color: #d6dde4;
  font-size: 16px; font-weight: 600;
  text-align: left;
  text-decoration: none;
}
.nav-drawer a:hover, .nav-drawer button:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.nav-drawer a.is-active { color: var(--brand); background: rgba(249, 115, 22, .12); }
.nav-drawer .is-soon { color: #6f7b87; }
.nav-drawer hr { border: none; border-top: 1px solid rgba(255, 255, 255, .1); margin: 10px 0; }
.nav-drawer .btn { margin-top: 6px; }

@media (min-width: 900px) {
  .main-nav { display: flex; align-items: center; gap: 4px; }
  .header-phone { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* ---------- 5. Оверлей ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 19, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
  z-index: 80;
  backdrop-filter: blur(2px);
}
.overlay.is-open { opacity: 1; visibility: visible; }

/* ---------- 6. Секции ---------- */
.section { padding: 44px 0; }
.section-tight { padding: 30px 0; }
@media (min-width: 768px) { .section { padding: 68px 0; } }

.section-alt { background: var(--surface); }

.section-head { margin-bottom: 26px; }
.section-head.is-center { text-align: center; max-width: 680px; margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-tint);
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.section-sub { color: var(--muted); font-size: clamp(15px, 2vw, 17px); margin-top: 10px; }

/* ---------- 7. Главный экран ---------- */
.hero {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  isolation: isolate;
}
.hero-slider { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, rgba(9, 13, 18, .94) 0%, rgba(9, 13, 18, .78) 45%, rgba(9, 13, 18, .35) 100%),
    linear-gradient(to top, rgba(9, 13, 18, .8), transparent 45%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 52px 0 56px;
  max-width: 680px;
  color: #fff;
}
@media (min-width: 768px) { .hero-inner { padding: 92px 0 96px; } }
.hero h1 { color: #fff; }
.hero-lead {
  margin-top: 16px;
  font-size: clamp(15px, 2.2vw, 19px);
  color: #cfd8e1;
  max-width: 52ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
/* Модели техники в шапке главной */
.hero-models { margin-top: 28px; }
.hero-models-label {
  display: block;
  font-size: 12px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: #9fb0c0;
  margin-bottom: 10px;
}
.hero-models-list { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-models-list span {
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(249, 115, 22, .16);
  border: 1px solid rgba(249, 115, 22, .4);
  color: #fdba74;
  font-weight: 800;
  font-size: clamp(14px, 2vw, 16px);
  letter-spacing: .02em;
}

.hero-facts {
  display: flex; flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.hero-fact strong { display: block; color: #fff; font-size: clamp(19px, 3vw, 26px); font-weight: 800; }
.hero-fact span { font-size: 13px; color: #a9b6c3; }

.hero-nav {
  position: absolute;
  z-index: 3;
  bottom: 16px; right: 16px;
  display: flex; gap: 8px;
}
.hero-nav button {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  display: grid; place-items: center;
  transition: background .16s;
}
.hero-nav button:hover { background: rgba(255, 255, 255, .28); }
.hero-nav svg { width: 18px; height: 18px; }

/* ---------- 8. Сетки и карточки ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .grid { gap: 20px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--sh-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--line-strong); }

.icon-chip {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-tint);
  color: var(--brand-700);
  margin-bottom: 14px;
}
.icon-chip svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* Преимущества */
.feature-list { display: grid; gap: 14px; }
.feature {
  display: flex; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--r);
  padding: 18px 20px;
}
.feature-check {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  background: var(--ok-tint);
  color: var(--ok);
  display: grid; place-items: center;
  margin-top: 2px;
}
.feature-check svg { width: 15px; height: 15px; }
.feature h3 { font-size: 17px; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 15px; }

/* Текстовый блок */
.prose { max-width: 78ch; color: var(--muted); }
.prose p + p { margin-top: 12px; }
.prose strong { color: var(--text); }

/* ---------- 9. Контакты ---------- */
.contact-layout { display: grid; gap: 20px; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: 380px 1fr; align-items: start; } }

.contact-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: none; }
.contact-label {
  font-size: 12px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
}
.contact-value { font-size: 18px; font-weight: 700; color: var(--ink); }
.contact-value a { color: var(--ink); }
.contact-value a:hover { color: var(--brand-700); }

.map-frame {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  background: var(--surface-3);
  min-height: 300px;
}
.map-frame iframe { width: 100%; height: 100%; min-height: 300px; border: 0; }
@media (min-width: 900px) { .map-frame, .map-frame iframe { min-height: 420px; } }

/* ---------- 10. Подвал ---------- */
.site-footer {
  background: var(--ink);
  color: #9fadba;
  padding: 40px 0 28px;
  margin-top: auto;
  font-size: 14px;
}
.footer-grid { display: grid; gap: 26px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.site-footer a { color: #c3ced9; }
.site-footer a:hover { color: var(--brand); }
.footer-links { display: grid; gap: 8px; }
.footer-bottom {
  margin-top: 28px; padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-size: 13px; color: #7f8c99;
}

/* ---------- 11. Каталог ---------- */
.catalog-layout { display: grid; gap: 20px; align-items: start; }
@media (min-width: 960px) { .catalog-layout { grid-template-columns: 264px 1fr; } }

.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--sh-sm);
}
@media (min-width: 960px) { .filters { position: sticky; top: calc(var(--header-h) + 16px); } }
/* На телефоне фильтры скрыты, пока не нажали кнопку «Фильтры» */
@media (max-width: 959px) {
  .filters { display: none; }
  .filters.is-mobile-open { display: block; }
}
.filter-group + .filter-group { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.filter-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 10px; }
.radio-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; cursor: pointer; font-size: 15px; }
.radio-row input { width: 18px; height: 18px; accent-color: var(--brand-700); flex: none; }
.price-row { display: flex; align-items: center; gap: 8px; }
.price-row span { color: var(--faint); }

.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 15px;
  transition: border-color .16s, box-shadow .16s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .16);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input.has-error, .textarea.has-error { border-color: var(--danger); }
.textarea { min-height: 108px; resize: vertical; padding-top: 12px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6875' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }

.field { display: grid; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--text); }
.field-error { font-size: 13px; color: var(--danger); display: none; }
.field.is-invalid .field-error { display: block; }

.catalog-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
@media (min-width: 640px) { .catalog-toolbar { grid-template-columns: 1fr auto; align-items: center; } }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.search-wrap .input { padding-left: 42px; }
.result-count { font-size: 14px; color: var(--muted); }

.product-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--sh); border-color: var(--line-strong); }
.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, var(--surface-3), #e4eaf1);
  display: grid; place-items: center;
  font-size: 46px;
  overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--ok-tint); color: var(--ok);
  border: 1px solid rgba(21, 128, 61, .2);
}
.badge.is-used { background: #fff7e6; color: #a16207; border-color: rgba(161, 98, 7, .2); }
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-name { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.product-desc {
  font-size: 14px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.price { font-size: 19px; font-weight: 800; color: var(--ink); white-space: nowrap; }

.qty-control { display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.qty-control button { width: 36px; height: 38px; display: grid; place-items: center; color: var(--text); font-size: 18px; font-weight: 700; transition: background .14s; }
.qty-control button:hover { background: var(--surface-3); }
.qty-control span { min-width: 34px; text-align: center; font-weight: 700; font-size: 15px; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
}
.empty-state svg { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--faint); }

.load-more { display: flex; justify-content: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* Скелетоны загрузки */
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, #e8edf3 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r); }
.skeleton-card { height: 300px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 12. Корзина ---------- */
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--surface);
  z-index: 90;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  box-shadow: var(--sh-lg);
}
.drawer.is-open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.drawer-header h2 { font-size: 19px; }
.drawer-close { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); }
.drawer-close:hover { background: var(--surface-3); color: var(--ink); }
.drawer-close svg { width: 20px; height: 20px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 18px; -webkit-overflow-scrolling: touch; }
.drawer-foot {
  flex: none;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: none; }
.cart-thumb {
  width: 58px; height: 58px; flex: none;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  display: grid; place-items: center;
  font-size: 26px;
  overflow: hidden;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 0; }
.cart-name { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.cart-price { font-size: 14px; color: var(--muted); }
.cart-line-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.link-danger { color: var(--danger); font-size: 13px; font-weight: 600; }
.link-danger:hover { text-decoration: underline; }

.total-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
  font-size: 15px; color: var(--muted);
}
.total-row b { font-size: 24px; font-weight: 800; color: var(--ink); }
.checkout-fields { display: grid; gap: 10px; margin-bottom: 14px; }
@media (min-width: 380px) { .checkout-fields .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } }

/* Мобильная нижняя панель */
.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  display: flex;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, .08);
}
.mobile-bar .btn { flex: 1; }
@media (min-width: 960px) { .mobile-bar { display: none; } }
body.has-mobile-bar { padding-bottom: 76px; }
@media (min-width: 960px) { body.has-mobile-bar { padding-bottom: 0; } }

/* ---------- 13. Отзывы ---------- */
.reviews-layout { display: grid; gap: 22px; align-items: start; }
@media (min-width: 960px) { .reviews-layout { grid-template-columns: 380px 1fr; } }

.rating-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--sh-sm);
}
.rating-score { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.rating-score b { font-size: 42px; font-weight: 800; color: var(--ink); line-height: 1; }
.stars { color: var(--star); font-size: 18px; letter-spacing: 2px; white-space: nowrap; }
.stars .off { color: #d7dde4; }

.review-form { display: grid; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.star-picker { display: flex; gap: 4px; }
.star-picker button { font-size: 28px; line-height: 1; color: #d7dde4; transition: transform .12s, color .16s; padding: 2px; }
.star-picker button.on { color: var(--star); }
.star-picker button:hover { transform: scale(1.15); }

.upload-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: border-color .16s, color .16s;
}
.upload-label:hover { border-color: var(--brand); color: var(--brand-700); }
.upload-label svg { width: 18px; height: 18px; }
.upload-row { display: flex; flex-wrap: wrap; gap: 10px; }
.preview-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.preview-item { position: relative; width: 74px; height: 74px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-strong); }
.preview-item img, .preview-item video { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute; top: 3px; right: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(15, 20, 25, .8);
  color: #fff;
  display: grid; place-items: center;
  font-size: 14px; line-height: 1;
}

.review-list { display: grid; gap: 14px; }
.review-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--sh-sm);
}
.review-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.avatar {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  background: linear-gradient(140deg, #334155, #0f172a);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
}
.review-name { font-weight: 700; color: var(--ink); }
.review-date { font-size: 13px; color: var(--faint); }
.review-text { color: var(--text); white-space: pre-wrap; word-break: break-word; }
.review-media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.review-thumb { width: 88px; height: 88px; object-fit: cover; border-radius: var(--r-sm); cursor: zoom-in; border: 1px solid var(--line); }
.review-video { margin-top: 12px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); max-width: 420px; }
.admin-reply {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--brand-tint);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 14px;
}
.admin-reply b { color: var(--brand-700); }
.admin-reply .review-date { margin-top: 4px; }

/* ---------- 14. Модальные окна ---------- */
.modal {
  position: fixed; inset: 0;
  z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(10, 14, 19, .6);
  backdrop-filter: blur(3px);
}
.modal.is-open { display: flex; }
.modal-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 26px 22px;
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--sh-lg);
  animation: pop .22s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card h2 { margin-bottom: 6px; }
.modal-card .section-sub { margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; }

.model-list { display: grid; gap: 10px; }
.model-link {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
  transition: border-color .16s, background .16s, transform .16s;
}
.model-link:hover { border-color: var(--brand); background: var(--brand-tint); transform: translateX(3px); text-decoration: none; }
.model-link .arrow { margin-left: auto; color: var(--brand); }

/* Успешная отправка */
.success-icon {
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--ok-tint);
  color: var(--ok);
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.success-icon svg { width: 32px; height: 32px; }

/* ---------- 15. Лайтбокс ---------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 110;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(6, 9, 12, .93);
  padding: 20px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 84vh; object-fit: contain; border-radius: var(--r-sm); }
.lightbox-btn {
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .25);
}
.lightbox-btn:hover { background: rgba(255, 255, 255, .28); }
.lightbox-btn svg { width: 22px; height: 22px; }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- 16. Уведомления ---------- */
.toast-host {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  z-index: 120;
  display: grid; gap: 8px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  padding: 13px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--sh-lg);
  animation: toastIn .2s ease;
  display: flex; align-items: center; gap: 10px;
}
.toast.is-error { background: var(--danger); }
.toast.is-ok { background: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 17. Служебные страницы ---------- */
.center-page {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}
.center-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 40px 28px;
  text-align: center;
  width: min(480px, 100%);
}
.center-card .icon-chip { margin-inline: auto; }
.center-card p { color: var(--muted); margin: 10px 0 22px; }

.breadcrumbs { font-size: 14px; color: var(--faint); margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); }

/* ---------- 18. Доступность ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .mobile-bar, .drawer, .overlay { display: none !important; }
}
