/* «Яблоко» — тёмная премиальная тема. */

:root {
  --bg: #08090a;
  --bg-2: #0e0f11;
  --surface: #121316;
  --surface-2: #17181c;
  --line: #24262b;
  --line-soft: #1c1e22;
  --text: #f5f6f7;
  --muted: #9a9da4;
  --accent: #3ddc84;
  --accent-hover: #2fc971;
  --accent-ink: #07130b;
  --danger: #ff6b6b;
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1320px;
  --gutter: 24px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 .55em; line-height: 1.2; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.icon { flex: none; }

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: 600 15px/1 inherit;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 14px/1 inherit;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.chip:hover { color: var(--text); border-color: #3a3d44; }
.chip.is-active { background: rgba(61, 220, 132, .12); border-color: rgba(61, 220, 132, .5); color: var(--accent); }
.chip--reset { color: var(--muted); }
.chip--reset:hover { color: var(--danger); border-color: rgba(255, 107, 107, .5); }
.chip--toggle { margin-left: 6px; }

/* ---------- уведомление ---------- */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  max-width: 340px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  font-size: 15px;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.toast.is-visible { opacity: 1; transform: none; }

.badge {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}
.badge[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .btn:hover { transform: none; }
}

/* ---------- шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 9, 10, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-top { display: flex; align-items: center; gap: 28px; min-height: 78px; }

.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand__logo { color: var(--text); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text b { font-size: 23px; font-weight: 700; letter-spacing: -.02em; }
.brand__text small { color: var(--muted); font-size: 12px; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 220, 132, .12); }
.search input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}
.search input::placeholder { color: #6d7178; }
.search input::-webkit-search-cancel-button { display: none; }
.search__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 46px;
  border: 0;
  border-radius: 0 13px 13px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.search__btn:hover { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.action__icon { position: relative; display: grid; place-items: center; color: var(--muted); transition: color .16s ease; }
.action:hover .action__icon { color: var(--accent); }
.action__label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.action:hover .action__label { color: var(--text); }

.badge.is-bump { animation: bump .45s ease; }
@keyframes bump {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.burger {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.site-nav { border-top: 1px solid var(--line-soft); }
.site-nav__inner { display: flex; align-items: center; gap: 26px; height: 52px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  color: var(--muted);
  font-size: 15px;
  border-bottom: 2px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.is-active { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- секции и заголовки ---------- */

.section { padding: 56px 0; }
.section--tight { padding: 34px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.section-title { font-size: clamp(24px, 2.4vw, 30px); }
.section-link { color: var(--muted); font-size: 15px; }
.section-link:hover { color: var(--accent); }

.page-title { font-size: clamp(28px, 3vw, 38px); margin-bottom: 6px; }
.page-sub { color: var(--muted); margin: 0; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 22px; color: var(--muted); font-size: 14px; }
.crumbs-sep { opacity: .5; }
.crumbs a:hover { color: var(--accent); }

/* ---------- главный баннер ---------- */

.hero {
  position: relative;
  padding: 46px 0 0;
  background:
    radial-gradient(560px 320px at 12% 6%, rgba(58, 122, 255, .14), transparent 60%),
    radial-gradient(620px 340px at 88% 4%, rgba(61, 220, 132, .12), transparent 62%);
}
.hero-slide {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 30px;
  min-height: 380px;
}
.hero-slide[hidden] { display: none; }
.hero-slide.is-active .hero-copy > * { animation: rise .5s ease both; }
.hero-slide.is-active .hero-lead { animation-delay: .06s; }
.hero-slide.is-active .hero-text { animation-delay: .12s; }
.hero-slide.is-active .hero-copy .btn { animation-delay: .18s; }

.hero-title { font-size: clamp(40px, 5vw, 66px); letter-spacing: -.03em; margin-bottom: .1em; }
.hero-lead { font-size: clamp(20px, 2.2vw, 28px); color: #d7dae0; margin: 0 0 12px; }
.hero-text { color: var(--muted); max-width: 46ch; margin: 0 0 26px; }
.hero-art { display: grid; place-items: center; }
.hero-art .hero-art__svg { width: 100%; max-width: 640px; height: auto; }

.hero-dots { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #33363d;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.hero-dot:hover { background: #4a4e56; }
.hero-dot.is-active { background: var(--accent); transform: scale(1.15); }

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 28px 0 34px;
  border-bottom: 1px solid var(--line-soft);
}
.hero-feature { display: flex; align-items: center; gap: 14px; }
.hero-feature-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); flex: none; }
.hero-feature-text { display: flex; flex-direction: column; color: var(--muted); font-size: 14px; }
.hero-feature-text b { color: var(--text); font-size: 15px; font-weight: 600; }

/* ---------- товары ---------- */

.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 18px; }

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { border-color: #3a3e46; transform: translateY(-4px); box-shadow: var(--shadow); }

.product-media {
  position: relative;
  display: grid;
  place-items: center;
  height: 188px;
  padding: 16px;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .05), transparent 70%);
  border-bottom: 1px solid var(--line-soft);
}
.product-media .art { width: 112px; height: 124px; }
/* Фото товара вместо векторной картинки */
.product-photo { width: 100%; height: 100%; object-fit: contain; }

.badge--hit { background: rgba(61, 220, 132, .16); color: var(--accent); }
.badge--new { background: rgba(58, 122, 255, .18); color: #7fb1ff; }
.badge--sale { background: rgba(255, 107, 107, .16); color: #ff9b9b; }
.badge--used { background: rgba(255, 255, 255, .1); color: #d6d8dc; }

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(14, 15, 17, .8);
  color: var(--muted);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease;
}
.fav-btn:hover { color: var(--accent); border-color: rgba(61, 220, 132, .45); }
.fav-btn.is-on, .fav-btn.is-fav { color: var(--accent); border-color: rgba(61, 220, 132, .55); }
.btn-ghost.is-fav { border-color: rgba(61, 220, 132, .55); color: var(--accent); }

.product-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.product-link { display: flex; flex-direction: column; gap: 4px; }
.product-name { font-size: 16px; font-weight: 600; }
.product-spec { color: var(--muted); font-size: 13.5px; }

.price-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.price { font-size: 19px; font-weight: 700; }
.price--big { font-size: 34px; }
.price-old { color: #6f737a; font-size: 14px; text-decoration: line-through; }
.price-off { padding: 3px 8px; border-radius: 8px; background: rgba(255, 107, 107, .14); color: #ff9b9b; font-size: 12px; font-weight: 600; }

.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.btn-buy { padding: 10px 22px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); border: 0; font: 600 15px/1 inherit; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.btn-buy:hover { background: var(--accent-hover); transform: translateY(-1px); }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 64px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.empty-state h2 { font-size: 20px; margin: 6px 0 0; }
.empty-state p { color: var(--muted); margin: 0 0 10px; }

.app.is-entering > * { animation: rise .34s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, .08);
  color: var(--text);
}

/* ---------- плитки категорий ---------- */

.section--tiles { padding-top: 10px; }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.tile:hover { border-color: #3a3e46; transform: translateY(-3px); background: var(--surface-2); }
.tile-art { flex: none; width: 56px; }
.tile-art .art { width: 56px; height: 62px; }
.tile-body { display: flex; flex-direction: column; min-width: 0; }
.tile-title { font-size: 15.5px; font-weight: 600; }
.tile-sub { color: var(--muted); font-size: 12.5px; }
.tile-arrow { margin-left: auto; flex: none; color: var(--accent); }

/* ---------- фильтры ---------- */

.filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filters-row--chips { gap: 10px; }
.filters-label { color: var(--muted); font-size: 13.5px; }

.filters-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
}
.filters-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; outline: none; }

.filters-price, .filters-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13.5px;
}
.filters-price input {
  width: 94px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  outline: none;
}
.filters-sort select {
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  outline: none;
  cursor: pointer;
}
.filters-search:focus-within, .filters-price input:focus, .filters-sort select:focus { border-color: var(--accent); }

/* ---------- блок ремонта на главной ---------- */

.repair-banner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 34px;
  margin: 12px 0 56px;
  padding: 34px;
  background: linear-gradient(120deg, var(--surface) 0%, #101319 60%, #12161c 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.repair-info { display: flex; flex-direction: column; }
.repair-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(24px, 2.6vw, 32px);
  margin-bottom: .4em;
}
.repair-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: rgba(61, 220, 132, .12);
  color: var(--accent);
  flex: none;
}
.repair-text { color: var(--muted); max-width: 52ch; margin: 0 0 24px; }
.repair-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.repair-item { display: flex; align-items: flex-start; gap: 12px; color: var(--muted); font-size: 14.5px; }
.repair-item svg { color: var(--accent); margin-top: 2px; }
.repair-item-text { display: flex; flex-direction: column; }
.repair-item-text b { color: var(--text); font-weight: 600; font-size: 14.5px; }
.repair-logo {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(61, 220, 132, .1);
  border: 1px solid rgba(61, 220, 132, .28);
  color: var(--accent);
  flex: none;
}
.repair-art { display: grid; place-items: center; }
.repair-art .art { width: 100%; max-width: 320px; height: auto; }

/* ---------- страница товара ---------- */

.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; }
.pdp-media {
  position: relative;
  display: grid;
  place-items: center;
  padding: 40px;
  min-height: 420px;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .06), transparent 68%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pdp-media .art { width: 260px; height: 286px; }
.pdp-media .product-photo { max-width: 100%; max-height: 420px; }
.pdp-info { display: flex; flex-direction: column; gap: 14px; }
.pdp-brand { color: var(--muted); font-size: 13.5px; margin: 0; }
.pdp-title { font-size: clamp(26px, 3vw, 36px); margin: 0; }
.pdp-spec { color: var(--muted); margin: 0; }
.pdp-rating { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 14px; }
.pdp-rating span { color: var(--muted); }
.pdp-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 6px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.pdp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pdp-usps { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.pdp-usps li { display: flex; align-items: center; gap: 10px; }
.pdp-usps svg { color: var(--accent); }

.qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.qty button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.qty button:hover { background: var(--surface-2); color: var(--accent); }
.qty span, .qty-input { min-width: 34px; text-align: center; font-size: 15px; }
.qty-input { width: 44px; border: 0; background: transparent; color: var(--text); font: inherit; outline: none; }

.pdp-condition { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.pdp-condition b { color: var(--text); }

/* Вход и регистрация: узкая форма по центру страницы. */
.auth-layout { max-width: 460px; margin: 0 auto; }
.auth-layout .form-card { width: 100%; }

.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--surface); }
.spec-key { color: var(--muted); font-size: 14px; }
.spec-val { font-size: 14.5px; text-align: right; }

/* ---------- корзина ---------- */

.cart-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 26px; align-items: start; }
.cart-lines { display: flex; flex-direction: column; gap: 14px; }
.cart-line {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.cart-line__art .art { width: 92px; height: 92px; }
.cart-line__body { display: flex; flex-direction: column; gap: 6px; }
.cart-line__name { font-weight: 600; }
.cart-line__name:hover { color: var(--accent); }
.cart-line__spec { color: var(--muted); font-size: 13.5px; margin: 0; }
.cart-line__controls { display: flex; align-items: center; gap: 16px; }
.cart-line__price { font-size: 18px; font-weight: 700; white-space: nowrap; }
.cart-remove { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.cart-remove:hover { color: var(--danger); }

.cart-summary {
  position: sticky;
  top: 150px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cart-summary__title { font-size: 20px; margin: 0; }
.cart-summary__note { color: var(--muted); font-size: 13px; margin: 0; }

.promo { display: flex; flex-direction: column; gap: 8px; }
.promo__label { color: var(--muted); font-size: 13.5px; }
.promo__row { display: flex; gap: 8px; }
.promo__row input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  outline: none;
}
.promo__row input:focus { border-color: var(--accent); }
.promo__note { color: var(--muted); font-size: 12.5px; margin: 0; }

.totals { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.totals > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--muted); font-size: 14.5px; }
.totals dd { margin: 0; font-size: 15px; }
.totals__discount dd { color: var(--accent); }
.totals__total { padding-top: 12px; border-top: 1px solid var(--line); }
.totals__total dt { color: var(--text); font-size: 16px; }
.totals__total dd { font-size: 24px; font-weight: 700; }

.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 14px; }
.mini-list b { color: var(--text); white-space: nowrap; }

/* ---------- формы ---------- */

.form-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.form-card__title { font-size: 19px; margin: 0; }
.form-card__note { color: var(--muted); font-size: 14px; margin: -8px 0 0; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { color: var(--muted); font-size: 13.5px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color .16s ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: #6d7178; }

.check { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }

.form-msg { margin: 0; font-size: 14.5px; }
.form-msg.is-ok { color: var(--accent); }
.form-msg.is-error { color: var(--danger); }

.radio-list { display: grid; gap: 10px; }
.radio-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
.radio-card:hover { border-color: #3a3e46; }
.radio-card input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.radio-card__body { display: flex; flex-direction: column; }
.radio-card__body small { color: var(--muted); font-size: 12.5px; }
.radio-card__price { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.radio-card:has(input:checked) { border-color: rgba(61, 220, 132, .55); background: rgba(61, 220, 132, .05); }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 26px; align-items: start; }

/* ---------- ремонт: услуги и заявка ---------- */

.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.service-row__main { display: flex; flex-direction: column; }
.service-row__main b { font-weight: 600; }
.service-row__main span { color: var(--muted); font-size: 13px; }
.service-row__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.service-row__time { color: var(--muted); font-size: 12.5px; }
.service-row__price { color: var(--accent); font-weight: 600; white-space: nowrap; }

.repair-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 26px; align-items: start; }
.repair-side { display: flex; flex-direction: column; gap: 16px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.repair-side h3 { font-size: 18px; margin: 0; }
.repair-steps { display: flex; flex-direction: column; gap: 12px; counter-reset: rs; }
.repair-steps li { position: relative; padding-left: 36px; color: var(--muted); font-size: 14.5px; counter-increment: rs; }
.repair-steps li::before {
  content: counter(rs);
  position: absolute;
  left: 0;
  top: -1px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(61, 220, 132, .12);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
}
.repair-side__contact { margin: 0; color: var(--muted); font-size: 14.5px; }
.repair-side__contact a { color: var(--accent); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.info-card { display: flex; flex-direction: column; gap: 4px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.info-card__icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 11px; background: var(--surface-2); color: var(--accent); }
.info-card__label { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.info-card__value { font-size: 15.5px; }
.info-card__value small { color: var(--muted); font-size: 13px; }

.contact-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-cta p { color: var(--muted); margin: 0; }
.contact-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.success { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 620px; margin: 0 auto; padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.success__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(61, 220, 132, .14); color: var(--accent); }
.success__total { display: flex; align-items: baseline; justify-content: space-between; width: 100%; padding-top: 14px; border-top: 1px solid var(--line); }
.success__total b { font-size: 26px; }
.success__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- панель корзины ---------- */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(4, 5, 6, .66);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.drawer-overlay.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  transition: transform .26s ease;
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 22px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; font-size: 20px; }
.drawer__close { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.drawer__close:hover { color: var(--text); border-color: #3a3e46; }
.drawer__items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px 22px; }
.drawer__foot { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-top: 1px solid var(--line); }
.drawer__total { display: flex; align-items: baseline; justify-content: space-between; }
.drawer__total span { color: var(--muted); }
.drawer__total b { font-size: 22px; }
.drawer-empty { color: var(--muted); font-size: 15px; }

.drawer-item { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 12px; }
.drawer-item__art .art { width: 62px; height: 62px; }
.drawer-item__body { display: flex; flex-direction: column; min-width: 0; }
.drawer-item__body b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-item__body small { color: var(--muted); font-size: 13px; }
.drawer-item__remove { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; }
.drawer-item__remove:hover { color: var(--danger); }

/* ---------- футер ---------- */

.site-footer { margin-top: 40px; border-top: 1px solid var(--line-soft); background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, minmax(0, .8fr)) 1.2fr minmax(0, .8fr); gap: 30px; padding: 46px var(--gutter) 34px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col h3 { font-size: 15px; color: var(--text); margin: 0 0 4px; }
.footer-col a, .footer-col span, .footer-col p { color: var(--muted); font-size: 14px; margin: 0; }
.footer-col a:hover { color: var(--accent); }
.footer-col--brand .brand--footer { margin-bottom: 6px; }
.footer-col--contacts a:first-of-type { color: var(--text); font-size: 16px; font-weight: 600; }
.footer-note { color: var(--muted); font-size: 12px; opacity: .8; }
.socials { display: flex; gap: 10px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); }
.socials a:hover { color: var(--accent); border-color: rgba(61, 220, 132, .45); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gutter) 26px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13.5px; }

/* ---------- адаптив ---------- */

@media (max-width: 1200px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  :root { --gutter: 20px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-top { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; gap: 14px; }
  .hero-slide { grid-template-columns: 1fr; min-height: auto; padding-top: 20px; }
  .hero-art { order: -1; }
  .hero-art .hero-art__svg { max-width: 460px; }
  .pdp { grid-template-columns: 1fr; gap: 26px; }
  .cart-layout, .checkout-layout, .repair-grid { grid-template-columns: minmax(0, 1fr); }
  .cart-summary { position: static; }
  .repair-banner { grid-template-columns: 1fr; }
  .repair-art { order: -1; }
}

@media (max-width: 880px) {
  .burger { display: grid; margin-left: auto; }
  .header-actions { gap: 18px; }
  .action__label { display: none; }
  .site-nav { display: none; }
  .site-header.is-nav-open .site-nav { display: block; }
  .site-nav__inner { flex-direction: column; align-items: stretch; gap: 0; height: auto; padding: 6px 0 14px; }
  .site-nav a { height: auto; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .site-nav a.is-active { border-bottom-color: var(--line-soft); color: var(--accent); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-features { grid-template-columns: 1fr; gap: 14px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .product-media { height: 150px; }
  .product-media .art { width: 92px; height: 102px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .section { padding: 40px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 520px) {
  :root { --gutter: 16px; }
  .brand__text b { font-size: 20px; }
  .brand__text small { display: none; }
  .hero { padding-top: 24px; }
  .hero-dots { justify-content: center; }
  .tiles { grid-template-columns: 1fr; }
  /* Два товара в ряд и по центру — как просил владелец. */
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-media { height: 132px; padding: 10px; }
  .product-media .art { width: 78px; height: 88px; }
  .product-body { padding: 12px 10px 14px; text-align: center; align-items: center; }
  .product-link { align-items: center; }
  .product-name { font-size: 14px; }
  .product-spec { font-size: 12px; }
  .price-row { justify-content: center; }
  .product-actions { justify-content: center; }
  .cart-line { grid-template-columns: 72px 1fr; }
  .cart-line__art .art { width: 72px; height: 72px; }
  .cart-line__price { grid-column: 2; text-align: right; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  .hero-title { font-size: 38px; }
  .pdp-actions .btn-lg { flex: 1 1 100%; }
}

/* ---------- контейнер контента страниц ----------
   Шаблоны страниц (js/views.js) отдают секции прямо в #app, поэтому ограничение
   ширины и боковые отступы заданы здесь: разметка остаётся без лишних обёрток,
   а контент перестаёт упираться в края окна. */

.app > .section,
.app > .crumbs,
.hero-slide,
.hero-dots,
.hero-features {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

