/* ============================================================
   avito.ink — дизайн-система в духе Авито
   Синий #00AAFF, белые карточки, Manrope, крупные цены.
   ============================================================ */

:root {
  --blue: #00aaff;
  --blue-600: #0091db;
  --blue-700: #0079b8;
  --blue-050: #e9f6ff;
  --green: #04c15e;
  --green-050: #e6f9ef;
  --red: #f5372b;
  --purple: #7b61ff;
  --orange: #ff8a00;

  --text: #141414;
  --text-2: #5c5c5c;
  --muted: #8c8c8c;
  --line: #e9e9e9;
  --line-2: #f2f2f2;
  --bg: #ffffff;
  --soft: #f7f7f8;
  --soft-2: #f2f3f5;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-xl: 22px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .05);
  --sh-2: 0 4px 16px rgba(0, 0, 0, .08);
  --sh-3: 0 12px 32px rgba(0, 0, 0, .12);

  --hdr-h: 64px;
  --tab-h: 0px;
  --tg-bottom: 0px;
  --wrap: 1240px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ───────────────────────── шапка ───────────────────────── */

.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.hdr-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--hdr-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -.03em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 2px;
}
.logo b { color: var(--text); font-weight: 800; }
.logo span { color: var(--blue); }
.logo em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-left: 8px;
  padding-top: 8px;
  display: none;
}

.search {
  flex: 1;
  display: flex;
  min-width: 0;
  max-width: 660px;
}
.search input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--r-s) 0 0 var(--r-s);
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  background: var(--bg);
  transition: border-color .15s;
}
.search input:focus { border-color: var(--blue); }
.search button {
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 0 var(--r-s) var(--r-s) 0;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.search button:hover { background: var(--blue-600); }

.hdr-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.hdr-nav a.nav-link {
  padding: 9px 12px;
  border-radius: var(--r-s);
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.hdr-nav a.nav-link:hover { background: var(--soft); color: var(--text); }
.hdr-nav a.nav-link.on { color: var(--blue); }

.cart-link { position: relative; }
.cart-badge {
  position: absolute;
  top: 1px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.cart-badge:empty, .cart-badge[data-n="0"] { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-s);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .08s, box-shadow .15s;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); }
.btn-ghost { background: var(--soft-2); color: var(--text); }
.btn-ghost:hover { background: #e8eaee; }
.btn-line { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-line:hover { box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #04ac54; }
.btn-lg { height: 52px; font-size: 16px; padding: 0 26px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.burger { display: none; }

/* ───────────────────────── лента категорий ───────────────────────── */

.catbar { border-bottom: 1px solid var(--line); background: #fff; }
.catbar-in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.catbar-in::-webkit-scrollbar { display: none; }
.catbar a {
  padding: 12px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.catbar a:hover { color: var(--text); }
.catbar a.on { color: var(--blue); border-bottom-color: var(--blue); }

/* ───────────────────────── общие блоки ───────────────────────── */

main { min-height: 60vh; padding-bottom: 40px; }

.sec { margin-top: 40px; }
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.sec-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.sec-head a { color: var(--blue); font-weight: 700; font-size: 14px; }

h1.page-h {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 24px 0 6px;
}
.page-sub { color: var(--muted); margin: 0 0 20px; }

.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }

/* ───────────────────────── герой ───────────────────────── */

.hero {
  margin-top: 24px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(900px 380px at 88% -20%, rgba(0, 170, 255, .28), transparent 60%),
    radial-gradient(700px 420px at 8% 120%, rgba(4, 193, 94, .20), transparent 55%),
    linear-gradient(135deg, #0b1220 0%, #12233a 60%, #0d1a2b 100%);
  color: #fff;
  padding: 46px 44px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 70% at 70% 20%, #000, transparent);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  margin: 0 0 14px;
  font-size: 42px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.03em;
  max-width: 720px;
}
.hero h1 u { text-decoration: none; color: #6fd0ff; }
.hero p {
  margin: 0 0 26px;
  font-size: 17px;
  color: rgba(255, 255, 255, .78);
  max-width: 620px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.hero-stats div b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.hero-stats div span { font-size: 13px; color: rgba(255, 255, 255, .6); }

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

.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.cat-tile {
  position: relative;
  border-radius: var(--r-l);
  padding: 20px;
  min-height: 156px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: var(--soft);
  transition: transform .16s, box-shadow .16s;
  isolation: isolate;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.cat-tile .cat-ico {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: var(--sh-1);
}
.cat-tile .cat-ico svg { width: 24px; height: 24px; }
.cat-tile b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; display: block; }
.cat-tile small { color: var(--text-2); font-size: 13px; display: block; margin-top: 3px; }
.cat-tile i {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 8px;
  display: block;
}
.cat-tile::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--tint, rgba(0, 170, 255, .14));
  z-index: -1;
}

/* ───────────────────────── карточки товаров ───────────────────────── */

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

.card {
  background: #fff;
  border-radius: var(--r-m);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .16s, transform .16s;
}
.card:hover { box-shadow: var(--sh-2), inset 0 0 0 1px transparent; transform: translateY(-2px); }
.card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--soft);
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
/* Скриншоты профилей вертикальные — показываем верх, где имя и рейтинг */
.card-img img.shot, .row-img img.shot { object-position: top center; }
.card-img .ribbon {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(20, 20, 20, .82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.card-img .ribbon.hit { background: var(--red); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-price { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.card-price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.card-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.card-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.card-actions { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; }
.card-actions .btn { flex: 1; height: 38px; font-size: 14px; padding: 0 10px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: var(--soft-2);
  color: var(--text-2);
}
.chip.green { background: var(--green-050); color: #08874a; }
.chip.blue { background: var(--blue-050); color: var(--blue-700); }

/* ───────────── список объявлений (каталог, десктоп) ───────────── */

.list { display: flex; flex-direction: column; gap: 12px; }
.row {
  display: grid;
  grid-template-columns: 232px 1fr 220px;
  gap: 18px;
  padding: 14px;
  border-radius: var(--r-m);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .16s;
}
.row:hover { box-shadow: var(--sh-2), inset 0 0 0 1px transparent; }
.row-img {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-s);
  overflow: hidden;
  background: var(--soft);
  position: relative;
}
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-main { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.row-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.row-title:hover { color: var(--blue); }
.row-desc {
  color: var(--text-2);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-bul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.row-side { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.row-price { font-size: 24px; font-weight: 800; letter-spacing: -.025em; }
.row-price small { font-size: 13px; font-weight: 600; color: var(--muted); display: block; margin-top: 2px; }

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

.cat-layout { display: grid; grid-template-columns: 244px 1fr; gap: 26px; align-items: start; margin-top: 18px; }
.side {
  position: sticky;
  top: calc(var(--hdr-h) + 14px);
  border-radius: var(--r-m);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 8px;
  background: #fff;
}
.side a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-s);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  transition: background .14s, color .14s;
}
.side a:hover { background: var(--soft); color: var(--text); }
.side a.on { background: var(--blue-050); color: var(--blue-700); }
.side a span { color: var(--muted); font-weight: 600; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 8px 4px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .count { color: var(--muted); font-size: 14px; margin-right: auto; }
.sortsel {
  height: 38px;
  border-radius: var(--r-s);
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

/* ───────────────────────── карточка услуги ───────────────────────── */

.pd { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 30px; align-items: start; margin-top: 18px; }
.pd-gal { border-radius: var(--r-m); overflow: hidden; background: var(--soft); }
.pd-gal .main {
  aspect-ratio: 4 / 3;
  max-height: 480px;
  background: var(--soft);
  display: grid;
  place-items: center;
  cursor: zoom-in;
  overflow: hidden;
}
.pd-gal .main img { width: 100%; height: 100%; object-fit: contain; background: #0e1116; }
.pd-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.pd-thumbs img {
  width: 74px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
  opacity: .65;
  transition: opacity .15s, box-shadow .15s;
}
.pd-thumbs img.on, .pd-thumbs img:hover { opacity: 1; box-shadow: inset 0 0 0 2px var(--blue); }

.pd h1 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 8px; }
.pd .lead { color: var(--text-2); font-size: 15.5px; margin: 0 0 18px; }

.specs { width: 100%; border-collapse: collapse; margin-top: 6px; }
.specs td { padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; vertical-align: top; }
.specs td:first-child { color: var(--muted); width: 46%; }
.specs td:last-child { font-weight: 600; }

.bul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 9px; }
.bul li { position: relative; padding-left: 27px; font-size: 14.5px; }
.bul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-050) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304c15e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}

.steps { counter-reset: s; display: grid; gap: 12px; margin-top: 8px; }
.steps li {
  counter-increment: s;
  list-style: none;
  position: relative;
  padding: 14px 16px 14px 54px;
  border-radius: var(--r-m);
  background: var(--soft);
  font-size: 14.5px;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 14px;
  top: 13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
}

.buybox {
  position: sticky;
  top: calc(var(--hdr-h) + 14px);
  border-radius: var(--r-m);
  box-shadow: 0 0 0 1px var(--line), var(--sh-1);
  padding: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.buybox .price { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.buybox .price small { font-size: 14px; font-weight: 600; color: var(--muted); }
.buybox .note { font-size: 13px; color: var(--muted); }
.qty { display: flex; align-items: center; gap: 0; border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.qty button { width: 42px; height: 42px; border: 0; background: #fff; font-size: 20px; cursor: pointer; color: var(--text-2); }
.qty button:hover { background: var(--soft); color: var(--text); }
.qty input { flex: 1; border: 0; text-align: center; font-weight: 700; font-size: 16px; outline: none; min-width: 0; }

.seller {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: var(--r-m);
  background: var(--soft);
  margin-top: 14px;
}
.seller .av {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex: none;
}
.seller b { display: block; font-size: 15px; }
.seller span { font-size: 13px; color: var(--muted); }

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

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 352px; gap: 26px; align-items: start; margin-top: 18px; }
.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r-m);
  box-shadow: inset 0 0 0 1px var(--line);
  align-items: center;
}
.cart-item + .cart-item { margin-top: 10px; }
.cart-item img { width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-s); }
.cart-item .nm { font-weight: 700; font-size: 15px; }
.cart-item .sub { font-size: 13px; color: var(--muted); }
.cart-item .rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 0; text-align: left; }
.cart-item .rm:hover { color: var(--red); }
.cart-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-sum { font-weight: 800; font-size: 17px; white-space: nowrap; }

.summary {
  position: sticky;
  top: calc(var(--hdr-h) + 14px);
  padding: 20px;
  border-radius: var(--r-m);
  box-shadow: 0 0 0 1px var(--line), var(--sh-1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.summary .line { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--text-2); }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; font-size: 22px; font-weight: 800; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field input, .field textarea {
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 12px 14px;
  font: inherit;
  outline: none;
  background: #fff;
  transition: border-color .15s;
  width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--blue); }
.field textarea { min-height: 84px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted); }
.form-grid { display: grid; gap: 14px; }

.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}
.empty .ico { font-size: 46px; margin-bottom: 10px; }
.empty b { display: block; color: var(--text); font-size: 19px; margin-bottom: 6px; }

/* ───────────────────────── отзывы ───────────────────────── */

.rev-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.rev-filters button {
  border: 0;
  background: var(--soft-2);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.rev-filters button:hover { background: #e8eaee; }
.rev-filters button.on { background: var(--blue); color: #fff; }

.rev-grid { columns: 3; column-gap: 16px; }
.rev-card {
  break-inside: avoid;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--r-m);
  box-shadow: inset 0 0 0 1px var(--line);
  background: #fff;
}
.rev-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.rev-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  flex: none;
}
.rev-head b { font-size: 14.5px; display: block; }
.rev-head span { font-size: 12.5px; color: var(--muted); }
.rev-text { font-size: 14.5px; color: var(--text); }
.rev-text.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rev-more { background: none; border: 0; color: var(--blue); font-weight: 700; font-size: 13.5px; cursor: pointer; padding: 6px 0 0; }
.rev-tag { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--blue-700); background: var(--blue-050); padding: 3px 9px; border-radius: 20px; }
.rev-photo { margin-top: 10px; border-radius: var(--r-s); overflow: hidden; cursor: zoom-in; }
.rev-photo img { width: 100%; max-height: 260px; object-fit: cover; }

/* ───────────────────────── кейсы ───────────────────────── */

.cases { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cases figure {
  margin: 0;
  border-radius: var(--r-m);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #0e1116;
  cursor: zoom-in;
  box-shadow: inset 0 0 0 1px var(--line);
}
.cases img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.cases figure:hover img { transform: scale(1.04); }

/* ───────────────────────── как это работает / FAQ ───────────────────────── */

.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.how-card {
  padding: 20px;
  border-radius: var(--r-m);
  background: var(--soft);
  position: relative;
}
.how-card b { display: block; font-size: 16px; margin: 10px 0 6px; }
.how-card p { margin: 0; color: var(--text-2); font-size: 14px; }
.how-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  border-radius: var(--r-m);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 15px 18px;
  background: #fff;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--blue); font-size: 22px; font-weight: 700; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 10px 0 0; color: var(--text-2); font-size: 14.5px; }

.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.trust div {
  padding: 18px;
  border-radius: var(--r-m);
  box-shadow: inset 0 0 0 1px var(--line);
}
.trust b { display: block; font-size: 15.5px; margin-bottom: 5px; }
.trust span { color: var(--text-2); font-size: 14px; }

/* ───────────────────────── подвал ───────────────────────── */

footer {
  margin-top: 54px;
  border-top: 1px solid var(--line);
  background: var(--soft);
  padding: 32px 0 calc(28px + var(--tab-h) + var(--tg-bottom));
}
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; }
.foot h4 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.foot a { display: block; padding: 4px 0; color: var(--text-2); font-size: 14px; }
.foot a:hover { color: var(--blue); }
.foot p { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.disclaimer {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ───────────────────────── нижнее меню (мобилка) ───────────────────────── */

.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--tg-bottom);
  z-index: 70;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-in { display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 2px 8px;
  min-height: 56px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: var(--blue); }
.tabbar .tb-badge {
  position: absolute;
  top: 5px;
  left: 50%;
  margin-left: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

/* ───────────────────────── лайтбокс / тост ───────────────────────── */

.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 10, 14, .94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lb.on { display: flex; }
.lb img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 10px; }
.lb-x {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 66px;
  border: 0;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  border-radius: 8px;
}
.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  bottom: calc(24px + var(--tab-h) + var(--tg-bottom));
  z-index: 300;
  background: #141414;
  color: #fff;
  padding: 12px 20px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  box-shadow: var(--sh-3);
  max-width: 90vw;
  text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.to-top {
  position: fixed;
  right: 18px;
  bottom: calc(22px + var(--tab-h) + var(--tg-bottom));
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  box-shadow: var(--sh-2);
  cursor: pointer;
  display: none;
  place-items: center;
  z-index: 65;
  color: var(--text-2);
}
.to-top.on { display: grid; }

.skeleton {
  background: linear-gradient(90deg, #f2f3f5 25%, #e9eaed 37%, #f2f3f5 63%);
  background-size: 400% 100%;
  animation: sk 1.2s ease infinite;
  border-radius: var(--r-m);
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

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

@media (max-width: 1100px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cases { grid-template-columns: repeat(4, 1fr); }
  .rev-grid { columns: 2; }
  .how { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .pd { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 900px) {
  .cat-layout { grid-template-columns: 1fr; }
  .side { display: none; }
  .pd { grid-template-columns: 1fr; }
  .buybox { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .row { grid-template-columns: 168px 1fr; }
  .row-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .row-side .btn { flex: 1; max-width: 220px; }
}

@media (max-width: 760px) {
  :root { --hdr-h: 56px; --tab-h: 60px; }

  body { padding-bottom: calc(var(--tab-h) + var(--tg-bottom)); }
  .wrap { padding: 0 14px; }
  .hdr-in { padding: 0 14px; gap: 10px; }
  .hdr-nav { display: none; }
  .logo { font-size: 21px; }
  .search input { height: 40px; font-size: 14px; padding: 0 13px; }
  .search button { height: 40px; padding: 0 15px; font-size: 14px; }
  .tabbar { display: block; }
  .catbar { display: none; }

  .hero { padding: 28px 20px; border-radius: var(--r-l); margin-top: 14px; }
  .hero h1 { font-size: 27px; }
  .hero p { font-size: 15px; }
  .hero-stats { gap: 20px; margin-top: 24px; }
  .hero-stats div b { font-size: 21px; }
  .hero-cta .btn { flex: 1; }

  .sec { margin-top: 30px; }
  .sec-head h2 { font-size: 21px; }
  h1.page-h { font-size: 23px; }

  .cats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile { min-height: 132px; padding: 15px; }
  .cat-tile b { font-size: 15px; }
  .cat-tile small { display: none; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 10px 11px 12px; }
  .card-price { font-size: 17px; }
  .card-title { font-size: 13px; }

  .row { grid-template-columns: 116px 1fr; gap: 12px; padding: 11px; }
  .row-title { font-size: 15px; }
  .row-desc { -webkit-line-clamp: 3; font-size: 13px; }
  .row-price { font-size: 20px; }

  .rev-grid { columns: 1; }
  .cases { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .how { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr; gap: 18px; }
  .cart-item { grid-template-columns: 74px 1fr; }
  .cart-item img { width: 74px; height: 58px; }
  .cart-right { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .pd h1 { font-size: 22px; }
  .buybox .price { font-size: 28px; }
  /* в узкой ленте оставляем только категорию и одну кнопку */
  .row-bul .chip:not(.blue) { display: none; }
  .row-side .btn-line { display: none; }
  .pd-gal .main { max-height: 62vh; }
}

@media (min-width: 761px) {
  .logo em { display: block; }
}
