:root {
  --bg: #141518;
  --bg-2: #1a1b1f;
  --card: #23252b;
  --ink: #f5f5f7;
  --muted: #a1a1aa;
  --faint: #a1a1aa;
  --line: rgba(255,255,255,.06);
  --accent: #ff7a2f;
  --accent-2: #ff9a5a;
  --ok: #3dbe7a;
  --danger: #ee5b4d;
  --shadow: 0 18px 40px rgba(0,0,0,.35);
  --radius: 18px;
  --header-h: 64px;
  --bottom: 58px;
  --sticky-buy-h: 120px;
  --max: 1180px;
  --photo: #E9E9EC;
  --photo-hi: #F4F4F7;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  padding-bottom: 0;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, .wordmark, .display { font-family: Unbounded, Inter, sans-serif; letter-spacing: -.03em; font-weight: 700; }
h2, h3, .sec-title { font-weight: 600; }
.wrap { width: min(var(--max), calc(100% - 24px)); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

header.top {
  position: sticky; top: 0; z-index: 80;
  background: rgba(20,21,24,.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex; align-items: center; gap: 12px;
  min-height: var(--header-h);
}
.brand { text-decoration: none; flex: 0 1 auto; min-width: 0; }
.wordmark {
  display: block; font-size: 18px; font-weight: 700; line-height: 1;
  white-space: nowrap;
}
.wordmark span { color: var(--accent); }
.nav-desk { display: none; flex: 1; gap: 4px; flex-wrap: wrap; }
.nav-desk a {
  text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 8px 10px; border-radius: 999px;
}
.nav-desk a:hover, .nav-desk a.active { color: var(--ink); background: rgba(255,255,255,.06); }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); display: grid; place-items: center; cursor: pointer;
  text-decoration: none; position: relative; color: var(--ink);
}
.cart-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}

.drawer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 10px 0 16px;
}
.drawer a {
  display: block; padding: 12px 4px; text-decoration: none;
  border-bottom: 1px solid var(--line); font-weight: 600;
}
.drawer a.drawer-account {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 2px 0 12px;
  padding: 12px;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  text-decoration: none;
}
.drawer a.drawer-account:hover,
.drawer a.drawer-account:focus-visible {
  background: #2c2e35;
}
.drawer-account-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  flex: 0 0 auto;
  display: grid; place-items: center;
  background: rgba(255, 122, 47, .14);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  font-family: Unbounded, Inter, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  position: relative;
}
.drawer-account-avatar svg { width: 22px; height: 22px; }
.drawer-account.is-in .drawer-account-avatar::after {
  content: "";
  position: absolute; right: -1px; bottom: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 2px var(--card);
}
.drawer-account-text { flex: 1; min-width: 0; }
.drawer-account-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.drawer-account-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}
.drawer-account-chevron {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}

.search-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  padding: 12px 0 calc(24px + var(--bottom));
  overflow: auto;
  overflow-x: hidden;
}
.search-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.search-bar input {
  flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--card);
  border-radius: 14px; padding: 12px 14px; outline: none;
}
.search-suggest { display: grid; gap: 8px; }
.suggest-row {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  background: var(--card); border-radius: 14px; padding: 8px; text-decoration: none;
}
.suggest-row .photo-plate { width: 64px; height: 64px; border-radius: 10px; }
.suggest-row img { width: 64px; height: 64px; object-fit: contain; }
.suggest-empty { color: var(--muted); padding: 20px 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #1a0d06; font-weight: 800; text-decoration: none; border: 0;
  border-radius: 999px; padding: 12px 18px; cursor: pointer;
}
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.btn-full { width: 100%; }
.btn-card { width: 100%; padding: 10px 12px; margin-top: 10px; font-size: 14px; }

.hero { padding: 22px 0 8px; display: grid; gap: 18px; }
.hero h1 { font-size: clamp(28px, 8vw, 56px); line-height: 1.05; max-width: 16ch; }
.hero .lead { color: var(--muted); font-size: 16px; max-width: 36ch; margin-top: 10px; }
.hero-visual {
  border-radius: 24px; overflow: hidden; background: var(--card);
  border: 1px solid var(--line); min-height: 220px;
}
.hero-visual img { width: 100%; height: 260px; object-fit: cover; }
.hero-meta { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; align-items: end; }

.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0; }
.perk {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  min-width: 0;
}
.perk strong { display: block; font-size: 14px; }
.perk p { color: var(--muted); font-size: 12px; margin-top: 4px; }

.sec-title { font-size: clamp(22px, 5vw, 34px); margin: 28px 0 14px; }


.picker {
  display: grid; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 16px;
}
.picker-grid { display: grid; gap: 10px; }
.picker label, .filters-body label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.picker select, .picker input, .filters-body input, .filters-body select,
.form input, .form select, .form textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg-2);
  border-radius: 12px; padding: 11px 12px; outline: none;
}
.switch { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 14px; }
.switch input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.switch-block { margin: 4px 0 8px; }
.switch-text { display: grid; gap: 2px; }
.switch-text strong { font-weight: 700; }
.switch-hint { display: block; font-size: 12px; font-weight: 500; color: var(--muted); line-height: 1.35; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column; min-width: 0; height: 100%;
}
.card .pic {
  aspect-ratio: 1 / 1; width: 100%; flex: 0 0 auto;
  display: grid; place-items: center; overflow: hidden;
}
.card .pic img {
  width: 100%; height: 100%; max-height: none; aspect-ratio: 1 / 1;
  object-fit: contain; object-position: center; padding: 10px;
}
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.card-name, .card-name h3, .card a { text-decoration: none; color: inherit; }
.card h3 {
  font-size: 14px; line-height: 1.3; margin: 4px 0 8px; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; height: calc(14px * 1.3 * 3);
}
.card .vendor { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; min-height: 1.2em; }
.card-foot { margin-top: auto; display: flex; flex-direction: column; }
.price, .kit-total { font-family: Unbounded, sans-serif; font-weight: 700; font-size: 16px; color: var(--accent); }
.price-note { color: var(--muted); font-size: 11px; margin-top: 2px; }
.stock { font-size: 12px; color: var(--ok); margin-top: 4px; }
.stock.out { color: var(--danger); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badge { font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 999px; background: rgba(255,122,47,.14); color: var(--accent-2); }
.badge.ok { background: rgba(61,190,122,.14); color: var(--ok); }
.badge.out { background: rgba(238,91,77,.14); color: var(--danger); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.chip.active, .chip.on { background: var(--accent); color: #1a0d06; border-color: var(--accent); }
.chip .x { margin-left: 4px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0 14px; flex-wrap: wrap; }
.toolbar select { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 12px; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 22px 0 8px; }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px;
  display: grid; place-items: center; text-decoration: none;
  border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 14px;
}
.pager a.active { background: var(--accent); border-color: var(--accent); color: #1a0d06; }

.sheet {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(0,0,0,.55); display: grid; align-items: end;
}
.sheet-card {
  background: var(--bg-2); border-radius: 22px 22px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 86vh; overflow: auto; border: 1px solid var(--line);
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.filters-body { display: grid; gap: 16px; }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 14px; }
.checks input { width: auto; }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.kit-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 16px; display: grid; gap: 12px; min-width: 0;
}
.kit-photos { display: flex; gap: 8px; overflow: hidden; }
.kit-benefit { color: var(--muted); font-size: 14px; }
.kit-total { font-family: Unbounded, sans-serif; font-size: 20px; }

.frame-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px; display: grid; gap: 8px; min-width: 0;
}
.frame-card .cars { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.product { display: grid; gap: 16px; }
.gallery .main-shot { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.gallery .main-shot img { width: 100%; max-height: 420px; object-fit: contain; padding: 16px; }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.thumbs button { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; cursor: pointer; }
.thumbs img { height: 58px; width: 100%; object-fit: contain; }
.buy-box h1 { font-size: clamp(22px, 6vw, 36px); margin: 6px 0 8px; overflow-wrap: anywhere; }
.notes { background: rgba(255,122,47,.08); border-radius: 12px; padding: 10px 12px; color: var(--muted); font-size: 14px; margin-top: 8px; }
.tabs { display: flex; gap: 8px; margin: 18px 0 10px; }
.tabs button { border: 0; background: var(--card); color: var(--muted); border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.tabs button.active { background: var(--accent); color: #1a0d06; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.fbt { display: grid; gap: 10px; }
.fbt-row { display: grid; grid-template-columns: 20px 64px 1fr auto; gap: 10px; align-items: center; background: var(--card); border-radius: 14px; padding: 8px; }
.fbt-row .photo-plate { width: 64px; height: 64px; border-radius: 10px; }
.fbt-row img { width: 64px; height: 64px; object-fit: contain; }

.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: var(--bottom);
  z-index: 70; display: flex; gap: 10px; align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #141518;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-top: 1px solid rgba(255,255,255,.10);
}
.sticky-buy .btn { flex: 1; }
body[data-page="product"],
body[data-page="kit"] { padding-bottom: calc(var(--bottom) + var(--sticky-buy-h) + env(safe-area-inset-bottom, 0px)); }
body[data-page="product"] #related {
  padding-bottom: calc(var(--sticky-buy-h) + 28px);
}

.cart-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 10px;
  background: var(--card); border-radius: 16px; padding: 10px; margin-bottom: 10px;
}
#cart-box { display: grid; gap: 12px; min-width: 0; }
.cart-panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.cart-list .cart-item {
  background: transparent;
  border-radius: 0;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.cart-list .cart-item:last-child { border-bottom: 0; }
.cart-totals { padding: 14px 16px; }
.cart-totals .price { margin: 0; }
.cart-item .photo-plate { width: 72px; height: 72px; border-radius: 10px; }
.cart-item img { width: 72px; height: 72px; object-fit: contain; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; }

.form { display: grid; gap: 12px; max-width: 560px; }
.form-error { color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.success { background: rgba(61,190,122,.12); border-radius: 16px; padding: 16px; }
.empty { color: var(--muted); padding: 24px 0; }
.crumbs { color: var(--muted); font-size: 13px; margin: 14px 0; overflow-wrap: anywhere; }
.crumbs a { color: var(--ink); }

footer.site-footer {
  background: var(--bg); color: var(--muted);
  padding: 16px 0 calc(var(--bottom) + env(safe-area-inset-bottom, 0px) + 16px);
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
body[data-page="product"] footer.site-footer,
body[data-page="kit"] footer.site-footer {
  padding-bottom: calc(var(--bottom) + var(--sticky-buy-h) + env(safe-area-inset-bottom, 0px) + 28px);
}
.foot-grid { display: grid; gap: 18px 16px; grid-template-columns: 1fr; }
footer h4 { color: var(--ink); margin-bottom: 8px; font-family: Unbounded, sans-serif; font-size: 13px; font-weight: 600; }
footer p { font-size: 13px; line-height: 1.4; }
footer a { color: var(--ink); text-decoration: none; }
footer a:hover { color: var(--accent); }
.foot-links { display: grid; gap: 8px 16px; }
.foot-links a { display: block; font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.35; padding: 2px 0; overflow-wrap: break-word; word-break: normal; }
#contacts-block p, #contacts-block a { white-space: nowrap; }
@media (max-width: 859px) {
  .foot-grid { grid-template-columns: 1fr; }
  .foot-links { grid-template-columns: 1fr 1fr; gap: 10px 16px; }
}
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 75;
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 2px;
  background: #141518;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-top: 0;
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
  overflow: visible;
}
.bottom-nav::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 24px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(20, 21, 24, 0), #141518);
}
.bottom-nav a {
  text-align: center; text-decoration: none; color: var(--muted);
  font-size: 10px; font-weight: 600; letter-spacing: .01em;
  display: grid; gap: 1px; justify-items: center; align-content: center;
  padding: 5px 4px 4px;
  border-radius: 12px;
  min-height: 44px;
}
.bottom-nav a.active {
  color: var(--accent);
  background: rgba(255, 122, 47, .16);
}
.bottom-nav svg { width: 20px; height: 20px; }
.bottom-nav .nav-ico { position: relative; display: grid; place-items: center; width: 22px; height: 20px; }
.bottom-nav .cart-count {
  top: -7px; right: -9px;
  min-width: 16px; height: 16px; padding: 0 4px;
  font-size: 10px;
}

.catbar { display: none; }
@media (min-width: 860px) {
  body { padding-bottom: 0; }
  body[data-page="product"] { padding-bottom: 0; }
  body[data-page="kit"] { padding-bottom: 0; }
  .bottom-nav, .burger, .sticky-buy, .header-back { display: none !important; }
  .nav-desk { display: none !important; }
  .catbar { display: block; }
  .cat-tiles { gap: 14px; }
  .hero { grid-template-columns: 1.05fr .95fr; align-items: center; padding: 40px 0 10px; }
  .hero-visual img { height: 360px; }
  .perks { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .picker-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .product { grid-template-columns: .9fr 1.1fr; align-items: start; }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  footer.site-footer,
  body[data-page="product"] footer.site-footer,
  body[data-page="kit"] footer.site-footer { padding-bottom: 48px; }
  .sheet { align-items: center; justify-items: center; }
  .sheet-card { width: min(560px, calc(100% - 40px)); border-radius: 22px; }
}

#checkout-form input, #checkout-form select, #checkout-form textarea {
  min-height: 48px; font-size: 16px;
}
#checkout-form { padding-bottom: 32px; }
.suggest-list {
  margin-top: 6px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; max-height: 240px; overflow-y: auto;
}
.suggest-list button {
  display: block; width: 100%; text-align: left; background: transparent;
  border: 0; border-bottom: 1px solid var(--line); padding: 12px; cursor: pointer;
  font-size: 15px;
}
.suggest-list button:last-child { border-bottom: 0; }

[hidden] { display: none !important; }
.picker input[type="checkbox"], .filters-body input[type="checkbox"], .checks input { width: auto; }
label.switch { display: flex !important; flex-direction: row; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 14px; }
label.switch input { width: auto !important; flex: 0 0 auto; min-height: 0 !important; height: auto; padding: 0; margin-top: 3px; border: 0; background: transparent; border-radius: 0; accent-color: var(--accent); }
.form input[type="checkbox"],
#checkout-form input[type="checkbox"] {
  width: auto !important;
  min-height: 0 !important;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}
.btn:disabled, .btn-off {
  background: #2a2d36; color: #a1a1aa; border: 1px solid var(--line);
  cursor: not-allowed; box-shadow: none;
}
.cart-oos { background: rgba(238,91,77,.12); color: #ee5b4d; border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }

.hero-stage { position: relative; overflow: hidden; max-height: none; display: grid; align-items: start; }
.hero-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .85; }
.hero-art svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-content { position: relative; z-index: 1; padding: 10px 0 8px; }
.hero-content h1 { font-size: clamp(20px, 5.4vw, 32px); line-height: 1.1; max-width: 16ch; }
.hero-content .lead { color: var(--muted); font-size: 14px; max-width: 38ch; margin-top: 6px; }
@media (max-width: 859px) {
  body[data-page="home"] .hero-content { padding: 6px 0 2px; }
  body[data-page="home"] .hero-content h1 { font-size: 20px; max-width: 18ch; }
  body[data-page="home"] .hero-content .lead { font-size: 13px; margin-top: 3px; }
  body[data-page="home"] .hero-help { margin-top: 8px; padding: 8px 10px; gap: 6px; border-radius: 12px; }
  body[data-page="home"] .hero-help p { font-size: 12px; }
  body[data-page="home"] .hero-help-actions { gap: 6px; }
  body[data-page="home"] .hero-help-actions .btn { padding: 7px 11px; font-size: 12px; }
}

.hits-sec { margin-top: 4px; }
.home-catalog { margin-top: 4px; margin-bottom: 8px; }
.home-cat-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #e4e4e7;
  margin: 2px 0 8px;
}
.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 4px;
}
.home-cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  padding: 4px 2px 2px;
  border-radius: 12px;
}
.home-cat-tile:active { background: rgba(255,255,255,.05); }
.home-cat-ico,
.home-cat-ico .photo-plate {
  width: 44px; height: 44px;
  border-radius: 12px;
  flex: 0 0 44px;
}
.home-cat-ico img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 4px;
}
.home-cat-name {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: calc(11px * 1.2 * 2);
  width: 100%;
}
.home-cat-count {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}
@media (max-width: 359px) {
  .home-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  .home-catalog { margin-top: 8px; margin-bottom: 16px; }
  .home-cat-title { font-size: 15px; margin: 4px 0 12px; }
  .home-cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 10px; }
  .home-cat-tile { padding: 8px 6px; }
  .home-cat-tile:hover { background: rgba(255,255,255,.04); }
  .home-cat-ico,
  .home-cat-ico .photo-plate { width: 56px; height: 56px; flex-basis: 56px; border-radius: 14px; }
  .home-cat-name { font-size: 12px; max-height: calc(12px * 1.2 * 2); }
  .home-cat-count { font-size: 11px; }
}
.hits-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 0 10px; }
.hits-arrows { display: none; gap: 8px; }
.hits-arrows .icon-btn { font-size: 22px; font-weight: 400; line-height: 1; }
.hits-rail, .product-rail {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; padding-bottom: 4px;
  scrollbar-width: none; -ms-overflow-style: none;
  align-items: stretch;
}
.hits-rail::-webkit-scrollbar, .product-rail::-webkit-scrollbar { display: none; width: 0; height: 0; }
.product-rail > .card, .product-rail > .hit-card, .hits-rail .hit-card {
  flex: 0 0 calc((100% - 13px) / 2.3);
  width: calc((100% - 13px) / 2.3);
  max-width: none;
  scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column; min-width: 0;
  align-self: stretch;
}
.hit-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column; min-width: 0;
}
.hit-card .pic { aspect-ratio: 1 / 1; width: 100%; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; }
.hit-card .pic img { width: 100%; height: 100%; object-fit: contain; }
.hit-card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.card .pic img, .gallery .main-shot img, .thumbs img, .kit-photos img,
.fbt-row img, .cart-item img, .suggest-row img { object-fit: contain; }

.cat-tiles {
  display: grid;
  grid-template-columns: repeat(var(--tile-cols, 3), minmax(0, 1fr));
  gap: 10px;
  justify-content: stretch;
}
.cat-tiles.is-board { display: block; background: none; border: 0; padding: 0; }
.cat-board {
  display: grid;
  grid-template-columns: repeat(var(--tile-cols, 3), minmax(0, 1fr));
  gap: 10px;
}
.ios-group-label { display: none; }
@media (min-width: 641px) {
  .ios-group { display: block; margin-bottom: 22px; }
  .ios-group-label {
    display: block;
    font-size: 15px; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: #e4e4e7;
    margin: 0 0 12px;
  }
  .cat-board { display: block; }
  .cat-board .cat-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
}
.cat-tile {
  position: relative; text-decoration: none;
  display: flex; flex-direction: row; align-items: center;
  gap: 12px; min-width: 0;
  height: 68px; min-height: 68px; max-height: 72px;
  padding: 8px 12px 8px 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s ease, background .15s ease;
}
.cat-tile:hover { border-color: var(--accent); }
.cat-tile .tile-visual {
  display: grid; place-items: center; padding: 0;
  flex: 0 0 48px; width: 48px; height: 48px;
}
.cat-tile .photo-plate {
  width: 48px; height: 48px; max-height: 48px; aspect-ratio: 1 / 1;
  border-radius: 10px;
}
.cat-tile img { width: 100%; height: 100%; object-fit: contain; filter: none; }
.cat-tile .tile-cap {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 2px; padding: 0; min-width: 0; flex: 1;
  font-family: Inter, system-ui, sans-serif; font-size: 14px; font-weight: 600;
}
.cat-tile .tile-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-tile .tile-cap small, .cat-tile .tile-count { color: var(--muted); font-family: Inter, system-ui, sans-serif; font-size: 12px; font-weight: 500; }
.tile-count-num { display: none; }
.tile-chevron { display: none; }

.kit-grid { display: grid; gap: 12px; }
.kit-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; display: grid; gap: 10px; min-width: 0; }
.kit-photos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 8px;
  background: transparent; padding: 0;
}
.kit-photos .photo-plate { width: 100%; aspect-ratio: 1; }
.kit-photos img { width: 100%; height: 100%; object-fit: contain; }
.kit-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.kit-old { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.np-kind { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 8px; }
.np-kind-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 12px; padding: 12px; font-weight: 700; cursor: pointer;
}
.np-kind-btn.active { background: var(--accent); color: #1a0d06; border-color: var(--accent); }

@media (min-width: 860px) {
  .hits-arrows { display: flex; }
  .product-rail > .card, .product-rail > .hit-card, .hits-rail .hit-card {
    flex: 0 0 220px; width: 220px; max-width: 220px;
  }
  .kit-grid { grid-template-columns: repeat(var(--kit-cols, 3), minmax(0, 1fr)); gap: 10px; }
  .hero-stage { align-items: start; max-height: none; }
  .hero-content { padding: 16px 0 12px; }
  .hero-content h1 { font-size: clamp(26px, 3vw, 36px); }
}

.photo-plate, .card .pic, .hit-card .pic, .gallery .main-shot, .thumbs button {
  background: radial-gradient(ellipse at 50% 38%, var(--photo-hi), var(--photo) 72%);
}
.photo-plate {
  display: grid; place-items: center; overflow: hidden; border-radius: 14px;
}
.photo-plate img, .card .pic img, .hit-card .pic img, .gallery .main-shot img,
.thumbs img, .cat-tile img, .kit-photos img, .fbt-row img, .cart-item img, .suggest-row img {
  mix-blend-mode: multiply;
  object-fit: contain;
}
.photo-plate img { width: 100%; height: 100%; padding: 8px; }
.hit-card .pic img { padding: 10px; }
.all-cat-link { margin: 16px 0 8px; }

.header-back { display: none; }
body:not([data-page="home"]) .header-back { display: grid; }
.catbar {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.catbar-inner {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 0 12px;
}
.catbar a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--ink); font-weight: 700; font-size: 13px;
  text-decoration: none;
}
.catbar a svg { width: 16px; height: 16px; max-width: 16px; height: 16px; flex: 0 0 auto; display: block; }
.catbar a:hover, .catbar a.active {
  background: rgba(255,122,47,.22);
  border-color: var(--accent);
  color: #ffb085;
}
.back-row { margin: 12px 0 0; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-weight: 700; font-size: 14px;
  border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
body[data-page="home"] .back-row { display: none; }

#frame-filter-bar { margin: 4px 0 18px; }
#frame-filter-bar .picker { margin: 0; max-width: 100%; }
#frame-filter-bar .picker-grid { min-width: 0; }
#frame-filter-bar select { max-width: 100%; }

.card-name, .card-name h3, .card a, .hit-card a, .hit-card h3 { text-decoration: none; color: inherit; }
.card h3, .hit-card h3 {
  font-size: 14px; line-height: 1.3; margin: 4px 0 8px; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; height: calc(14px * 1.3 * 3);
}
.price-note { min-height: 1.35em; line-height: 1.35; }
.hits-rail, .product-rail { align-items: stretch; }
.hit-card, .product-rail > .card { height: auto; align-self: stretch; }
.hit-card .body, .product-rail .body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.product-rail .card-foot, .hit-card .card-foot { margin-top: auto; }
.product-rail .btn-card, .hit-card .btn-card { width: 100%; }
.kit-grid { align-items: stretch; }
.kit-card {
  display: flex; flex-direction: column; height: 100%;
}
.kit-card h3 {
  font-size: 18px; line-height: 1.3;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; height: calc(18px * 1.3 * 3);
}
.kit-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.kit-card-hit { color: inherit; text-decoration: none; display: grid; gap: 10px; min-width: 0; }
.kit-card-hit:hover h3 { color: var(--accent); }
.kit-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; }
.kit-card-actions .btn { width: 100%; text-align: center; }
.kit-card ul { flex: 1; }

.hero-help {
  margin-top: 10px; padding: 10px 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid; gap: 10px;
  max-width: 720px;
}
.hero-help p { color: var(--muted); font-size: 14px; margin: 0; }
.hero-help-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-help-actions .btn { padding: 10px 14px; font-size: 13px; }
.hero-stage { max-height: none; }
@media (min-width: 860px) {
  .hero-help {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
  }
  .hero-help p { font-size: 15px; flex: 1; }
  .hero-help-actions { flex-shrink: 0; }
}

.kit-badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; background: rgba(255,122,47,.18); color: var(--accent-2);
  border-radius: 999px; padding: 3px 8px; margin-bottom: 6px;
}
.cart-item { align-items: start; }
.cart-del {
  display: inline-block; margin-top: 6px; padding: 0;
  background: none; border: 0; color: var(--muted);
  font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.cart-del:hover { color: var(--danger); }
.kit-compose { margin-top: 8px; }
.kit-compose summary {
  cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600;
  list-style: none;
}
.kit-compose summary::-webkit-details-marker { display: none; }
.kit-compose ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.cart-side { text-align: right; min-width: 0; }
@media (max-width: 430px) {
  .cart-item { grid-template-columns: 64px 1fr auto; gap: 8px; }
  .cart-item .photo-plate, .cart-item img { width: 64px; height: 64px; }
  .cart-item .price { font-size: 14px; }
  .brand { flex: 0 0 auto; min-width: max-content; }
  .wordmark { font-size: 16px; }
  .top-inner { gap: 8px; }
  .top-actions { gap: 6px; }
  .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
}

.np-kind {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; width: 100%; min-width: 0; margin: 4px 0 8px;
}
.np-kind-btn { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-combo { position: relative; min-width: 0; }
.form, .form label, .form input, .form select, .form textarea { max-width: 100%; min-width: 0; }
.form label { display: grid; gap: 6px; }

.suggest-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px;
}
.suggest-group { display: grid; gap: 6px; margin: 0 0 14px; min-width: 0; }
.suggest-group h3 { font-size: 13px; color: var(--muted); font-weight: 700; }
.suggest-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 8px; min-width: 0;
}
.suggest-row .photo-plate, .suggest-row img { width: 48px; height: 48px; }
.suggest-row > div { min-width: 0; }
.suggest-row strong {
  font-size: 13px; line-height: 1.3;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.suggest-row .price { white-space: nowrap; font-size: 13px; }
.suggest-row.is-oos { opacity: .55; }
.suggest-row.is-oos .price { color: var(--muted); }
.suggest-more, .suggest-all {
  display: inline-flex; text-decoration: none; font-weight: 700; font-size: 13px;
  color: var(--accent-2); margin-top: 4px;
}
.suggest-empty-tiles {
  display: grid;
  grid-template-columns: repeat(var(--tile-cols, 3), minmax(0, 1fr));
  gap: 10px; margin: 8px 0 16px;
}
.search-overlay .wrap { width: min(1200px, calc(100% - 24px)); }
.suggest-hits, .suggest-recent { display: grid; gap: 6px; margin: 0 0 16px; }
.suggest-pops { display: flex; flex-wrap: wrap; gap: 6px; }
.search-overlay { overflow-x: hidden; }

.catalog-layout { display: block; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chips .chip { cursor: pointer; }
.filter-chips .chip input { position: absolute; opacity: 0; pointer-events: none; }
.range-dual {
  position: relative;
  height: 28px;
  margin-top: 10px;
}
.range-dual::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 99px;
  background: linear-gradient(to right,
    var(--line) 0, var(--line) var(--a, 0%),
    var(--accent) var(--a, 0%), var(--accent) var(--b, 100%),
    var(--line) var(--b, 100%), var(--line) 100%);
}
.range-dual input[type="range"] {
  position: absolute; inset: 0; width: 100%; margin: 0;
  background: none; pointer-events: none; appearance: none; -webkit-appearance: none;
}
.range-dual input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; background: transparent;
}
.range-dual input[type="range"]::-moz-range-track {
  height: 4px; background: transparent; border: 0;
}
.range-dual input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto; -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid #1a0d06; margin-top: -7px;
}
.range-dual input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid #1a0d06;
}
#cat-tiles:not([hidden]) { margin-bottom: 12px; }
body[data-page="catalog"] .catalog-layout.is-empty { display: none; }
.filters-aside { margin: 0; }
@media (min-width: 860px) {
  .catalog-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .filters-aside {
    position: sticky;
    top: calc(var(--header-h) + 58px);
    align-self: start;
    margin: 0;
    z-index: 1;
  }
  #filter-sheet.sheet,
  #filter-sheet,
  #filter-sheet[hidden] {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    background: none !important;
    display: block !important;
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
    align-items: stretch;
    justify-items: stretch;
  }
  #filter-sheet .sheet-card {
    width: 100%;
    max-width: none;
    max-height: none;
    border-radius: 18px;
    padding: 16px;
    overflow: visible;
    margin: 0;
  }
  #filters-close, #filters-btn { display: none !important; }
}

@media (min-width: 900px) {
  .search-overlay { padding: 20px 0 40px; }
  .search-overlay .wrap { width: min(1200px, calc(100% - 48px)); max-width: 1200px; }
}
@media (max-width: 640px) {
  body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  }
  body[data-page="catalog"] #cat-title {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
    font-size: 34px; font-weight: 700; letter-spacing: -.4px; line-height: 1.15;
  }
  body[data-page="catalog"] main.wrap {
    padding-bottom: 8px;
  }
  .ios-group { display: block; margin-bottom: 18px; }
  .ios-group-label {
    display: block;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px; font-weight: 600; letter-spacing: .1em;
    text-transform: uppercase; color: #e4e4e7;
    margin: 8px 4px 8px;
  }
  .cat-tiles, .suggest-empty-tiles, .cat-board {
    display: flex; flex-direction: column; gap: 0;
    background: var(--card); border-radius: 14px; overflow: hidden;
    border: none;
  }
  .cat-tiles.is-board, .cat-board {
    background: none; overflow: visible; border-radius: 0; gap: 0;
  }
  .cat-board .cat-tiles { background: var(--card); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
  .cat-tile {
    height: 60px; min-height: 60px; max-height: 60px;
    padding: 0 12px 0 10px; gap: 12px;
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
  }
  .cat-tile + .cat-tile::before {
    content: ""; position: absolute; left: 66px; right: 0; top: 0;
    height: 0.5px; background: rgba(255,255,255,.12);
  }
  .cat-tile:active { background: rgba(255,255,255,.08); }
  .cat-tile:hover { border-color: transparent; box-shadow: none; }
  .cat-tile .tile-visual, .cat-tile .photo-plate {
    width: 44px; height: 44px; max-height: 44px; flex: 0 0 44px;
    aspect-ratio: 1 / 1; border-radius: 10px;
  }
  .cat-tile .tile-cap {
    flex-direction: row; align-items: center; justify-content: space-between;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 17px; font-weight: 500; letter-spacing: 0;
  }
  .cat-tile .tile-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tile-count-full { display: none; }
  .tile-count-num { display: inline; color: var(--muted); font-size: 15px; font-weight: 400; }
  .tile-chevron {
    display: inline-block; color: var(--faint); font-size: 22px; line-height: 1;
    font-weight: 400; padding-left: 4px;
  }
}

.kit-note { color: var(--muted); font-size: 13px; margin: 4px 0 0; }


.kit-page { padding-bottom: 16px; min-width: 0; }
.kit-page h1 { font-size: 24px; line-height: 1.25; margin: 8px 0 16px; }
.kit-hero-photos {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 20px;
}
.kit-hero-photos .photo-plate {
  position: relative; aspect-ratio: 1; width: 100%; margin: 0;
}
.kit-cut {
  position: absolute; left: 6px; right: 6px; bottom: 6px; z-index: 1;
  font-size: 10px; font-weight: 700; text-align: center;
  background: rgba(24,27,34,.78); color: #fff; border-radius: 8px; padding: 3px 6px;
}
.kit-why p { color: var(--muted); line-height: 1.45; margin: 0 0 16px; white-space: pre-wrap; }
.kit-positions { display: grid; gap: 10px; margin: 0 0 20px; }
.kit-pos {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 10px;
  align-items: start; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 10px;
}
.kit-pos .photo-plate, .kit-pos img { width: 72px; height: 72px; border-radius: 10px; }
.kit-pos-body { min-width: 0; }
.kit-pos-body a { color: inherit; text-decoration: none; }
.kit-pos-body a:hover strong { color: var(--accent); }
.kit-pos-specs { margin: 8px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; }
.kit-pos-specs li { display: flex; gap: 8px; justify-content: space-between; }
.kit-pos-specs span { color: var(--muted); flex: 0 1 46%; }
.kit-pos-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; }
.kit-totals {
  display: grid; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px; margin: 0 0 16px;
}
.kit-totals strong { float: right; }
@media (max-width: 430px) {
  .kit-hero-photos { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .kit-pos { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 8px; }
  .kit-pos .photo-plate, .kit-pos img { width: 56px; height: 56px; }
  .kit-pos .price { font-size: 14px; white-space: nowrap; }
  .kit-page h1 { font-size: 20px; }
}
@media (min-width: 860px) {
  .kit-hero-photos { grid-template-columns: repeat(6, 1fr); }
  .kit-page h1 { font-size: 28px; }
}


/* desktop compact product grids */
@media (min-width: 1024px) {
  :root { --max: 1200px; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
  .catalog-layout .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  :root { --max: 1360px; }
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .catalog-layout .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .product-rail > .card, .product-rail > .hit-card, .hits-rail .hit-card {
    flex: 0 0 220px; width: 220px; max-width: 220px;
  }
}
@media (min-width: 860px) {
  .card .body, .hit-card .body { padding: 8px 8px 10px; }
  .card h3, .hit-card h3 {
    font-size: 13px; line-height: 1.3; margin: 2px 0 6px;
    -webkit-line-clamp: 2;
    height: calc(13px * 1.3 * 2);
  }
  .card .price, .hit-card .price, .card-foot .price { font-size: 16px; }
  .btn-card {
    height: 34px; min-height: 34px; padding: 0 10px;
    margin-top: 8px; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .card .pic, .hit-card .pic { aspect-ratio: 1 / 1; }
  .card .pic img, .hit-card .pic img { padding: 8px; }
  .card, .hit-card { border-radius: 14px; }
}

.kit-install { margin: 0; font-size: 13px; color: var(--muted); }
.kit-install summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; }
.kit-install summary::-webkit-details-marker { display: none; }
.kit-install ul { margin: 8px 0 0; padding-left: 18px; }
.kit-benefit {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.4;
}

@media (min-width: 860px) {
  .catalog-main .cat-tiles, .catalog-layout .cat-tiles, #cat-tiles.cat-tiles {
    width: 100%; min-width: 0;
    grid-template-columns: repeat(var(--tile-cols, 4), minmax(0, 1fr));
  }
}
.ship-badge {
  display: inline-block; margin-top: 6px; margin-left: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .03em;
  text-transform: uppercase; background: rgba(61,190,122,.16); color: var(--ok);
  border-radius: 999px; padding: 4px 8px; vertical-align: middle;
}
.kit-total .ship-badge { display: block; margin-left: 0; width: max-content; }
.ship-bar {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin: 0 0 14px; font-weight: 700;
}
.ship-bar.is-ok { border-color: rgba(61,190,122,.45); color: var(--ok); }
.kit-builder { margin: 28px 0 20px; }
.kit-build-list { display: grid; gap: 10px; margin: 12px 0 14px; }
.kit-build-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px;
}
.kit-build-row .photo-plate, .kit-build-row img { width: 64px; height: 64px; border-radius: 10px; }
.kit-build-body { min-width: 0; display: grid; gap: 8px; }
.kit-build-qty { display: flex; align-items: center; gap: 10px; }
.kit-qty-btn {
  width: 44px; height: 44px; min-width: 44px; padding: 0; font-size: 22px; line-height: 1;
}
.kit-build-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kit-build-actions .btn { min-height: 44px; }
.kit-picker {
  position: fixed; inset: 0; z-index: 220;
  background: rgba(0,0,0,.62);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.kit-picker-card {
  width: 100%;
  height: 90vh;
  max-height: 90vh;
  background: var(--bg);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0 0 env(safe-area-inset-bottom, 0);
}
.kit-picker-handle {
  width: 48px; height: 5px; border-radius: 99px;
  background: rgba(255,255,255,.5);
  margin: 10px auto 4px;
  flex: none;
}
.kit-picker-head {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 8px 16px 10px; flex: none;
}
.kit-picker-head strong { font-size: 17px; }
.kit-picker-x {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--card); color: var(--ink); font-size: 24px; line-height: 1;
  cursor: pointer;
}
.kit-picker-search {
  position: relative; margin: 0 16px 10px; flex: none;
}
.kit-picker-search-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); display: grid; place-items: center; pointer-events: none;
}
.kit-picker-search input {
  width: 100%; border: 1px solid var(--line); background: var(--card);
  border-radius: 14px; padding: 12px 40px 12px 40px; outline: none;
}
.kit-picker-search input:focus { border-color: rgba(255,122,47,.55); }
.kit-picker-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.kit-picker-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.08); color: var(--ink); font-size: 20px;
  line-height: 1; cursor: pointer;
}
.kit-picker-rail {
  display: flex; flex-wrap: nowrap; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  padding: 0 16px 10px;
  flex: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.kit-picker-rail::-webkit-scrollbar { display: none; }
.kit-picker-rail .chip {
  flex: none; white-space: nowrap; cursor: pointer;
}
.kit-picker-subs { padding-top: 0; }
.kit-picker-list {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 0 10px 8px;
  display: block;
}
.kit-pick-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.kit-pick-row .photo-plate,
.kit-pick-row .photo-plate img {
  width: 48px; height: 48px; border-radius: 10px;
}
.kit-pick-row .photo-plate img { padding: 4px; }
.kit-pick-meta { min-width: 0; }
.kit-pick-meta strong {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; font-size: 14px; line-height: 1.3; font-weight: 650;
  text-align: left;
}
.kit-pick-vendor {
  color: var(--muted); font-size: 12px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kit-pick-price {
  text-align: right; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.kit-pick-delta { font-size: 12px; font-weight: 700; margin-top: 2px; color: var(--muted); }
.kit-pick-delta.is-up { color: var(--accent-2); }
.kit-pick-delta.is-down { color: var(--ok); }
.kit-pick-plus {
  width: 36px; height: 36px; min-width: 36px; padding: 0;
  border: 0; border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #1a0d06; font-size: 22px; font-weight: 800; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  justify-self: end;
}
.kit-pick-plus.is-added {
  width: auto; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; gap: 4px;
}
.kit-pick-plus.is-added span { font-size: 11px; font-weight: 800; }
.kit-picker-empty {
  display: grid; gap: 10px; place-items: start;
  padding: 28px 16px; text-align: left;
}
.kit-picker-empty .btn { margin-top: 6px; }
.kit-picker-foot {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.kit-picker-foot-stat { font-weight: 700; font-size: 14px; }
.kit-picker-foot .btn { flex: none; min-width: 120px; }
@media (min-width: 860px) {
  .kit-picker { align-items: center; padding: 24px; }
  .kit-picker-card {
    width: min(720px, 100%);
    height: min(82vh, 800px);
    max-height: min(82vh, 800px);
    border-radius: 20px;
    border-bottom: 1px solid var(--line);
  }
  .kit-picker-handle { display: none; }
}

.trust-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 2px;
  padding: 0;
}
.trust-pills li {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}
.tg-float { display: none; }
@media (min-width: 860px) {
  body[data-page="home"] .tg-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 68;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    background: #2AABEE;
    color: #fff;
    display: grid;
    place-items: center;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .32);
    overflow: hidden;
    line-height: 0;
  }
  body[data-page="home"] .tg-float svg {
    width: 28px;
    height: 28px;
    display: block;
    margin: 0 0 1px 1px;
  }
}


/* Trust / legal pages */
.legal { max-width: 760px; padding: 8px 0 32px; }
.legal h1.sec-title { margin: 0 0 16px; }
.legal h2 {
  font-family: Unbounded, Inter, sans-serif;
  font-size: 18px;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 28px 0 10px;
}
.legal p { color: var(--muted); margin: 0 0 10px; }
.legal ul, .legal ol {
  margin: 0 0 14px;
  padding-left: 1.2em;
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.legal li { padding-left: 2px; }
.legal a { color: var(--ink); text-underline-offset: 3px; }
.legal a:hover { color: var(--accent); }
.reqs-hint {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.reqs-label.is-copied { color: var(--ok); }
.reqs {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  margin: 8px 0 16px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.reqs > div { display: grid; gap: 2px; min-width: 0; }
.reqs-label {
  font-size: 12px;
  color: var(--faint);
  font-weight: 600;
}
.reqs span:not(.reqs-label) {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.iban {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  letter-spacing: 0;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  font-size: clamp(10.5px, 3.05vw, 15px);
  max-width: 100%;
  display: block;
}
.reqs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  box-sizing: border-box;
}
.reqs-row:hover, .reqs-row:focus-visible { background: rgba(255,255,255,.04); }
.reqs-row:active { background: rgba(255,255,255,.07); }
.reqs-row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.reqs-val { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.reqs-copy { display: none !important; }
.reqs-copy-all {
  margin-top: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  justify-self: stretch;
  text-align: center;
}
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom) + 16px);
  transform: translateX(-50%);
  z-index: 220;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow);
  pointer-events: none;
}
#order-ok .reqs { margin-top: 16px; }
.legal-note { font-size: 14px; }
.also-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 24px auto 8px;
  text-align: center;
  max-width: 100%;
}
.also-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  line-height: 1.2;
}
.also-links a:hover, .also-links a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
body[data-page="legal"] .tg-float { display: none !important; }
@media (min-width: 860px) {
  .legal { padding-top: 12px; padding-bottom: 48px; }
  .legal h1.sec-title { font-size: 32px; }
}


/* Auth, cabinet, favorites */
.account-link { position: relative; }
.account-link.is-in::after { content: none; }
.fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: rgba(20,21,24,.86); color: var(--ink);
  display: grid; place-items: center;
  padding: 0;
  overflow: visible;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.fav-btn svg,
.fav-inline svg {
  width: 18px;
  height: 18px;
  display: block;
  overflow: visible;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
  transform: none;
}
.fav-btn.is-on,
.fav-inline.is-on { color: #ee5b4d; }
.fav-btn.is-on svg,
.fav-inline.is-on svg {
  fill: currentColor;
  stroke: currentColor;
}
.fav-btn:hover { background: rgba(20,21,24,.96); }
.card { position: relative; }
.fav-inline {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; background: none; border: 0; color: var(--muted);
  cursor: pointer; font: inherit; font-weight: 600;
  overflow: visible;
}

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; background: var(--bg-2); border-radius: 14px;
  padding: 4px; margin: 0 0 18px; max-width: 560px;
}
.auth-tab {
  border: 0; background: transparent; color: var(--muted);
  border-radius: 12px; padding: 10px 12px; cursor: pointer;
  font: inherit; font-weight: 700;
}
.auth-tab.is-on { background: var(--card); color: var(--ink); }
.auth-form, .account-sec .form { max-width: 560px; }
.account-sec { margin-top: 32px; }
.account-sec h2 {
  font-family: Unbounded, Inter, sans-serif;
  font-size: 18px; letter-spacing: -.02em; margin: 0 0 12px;
}
.order-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px; margin-bottom: 10px;
}
.order-card .order-head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.order-card ul { margin: 0 0 10px; padding-left: 1.15em; color: var(--muted); display: grid; gap: 4px; }
input[readonly] { opacity: .85; }

#guest-account-box { margin: 4px 0 8px; }
#create-account-pass { margin-top: 10px; }

.stats-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px; margin: 18px 0 24px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px;
}
.stat-card .num {
  font-family: Unbounded, Inter, sans-serif;
  font-size: 22px; letter-spacing: -.03em;
}
.stat-card .lbl { color: var(--faint); font-size: 12px; font-weight: 600; margin-top: 4px; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats-table th, .stats-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.stats-table th { color: var(--faint); font-size: 12px; font-weight: 700; }
@media (min-width: 860px) {
  .stats-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

body[data-page="account"] .tg-float,


/* ===== v17: compact chrome, kits, search, auth drawer ===== */
@media (min-width: 860px) {
  .wrap { width: min(var(--max), calc(100% - 48px)); }
}
.top-inner { overflow: visible; }
.header-search {
  display: none;
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
}
.header-search-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  width: 18px;
  height: 18px;
}
#header-search-q {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  padding: 0 16px 0 42px;
  outline: none;
}
#header-search-q:focus {
  border-color: rgba(255,122,47,.55);
  box-shadow: 0 0 0 3px rgba(255,122,47,.14);
}
.search-panel {
  position: fixed;
  top: 120px;
  left: 0;
  width: 720px;
  max-width: min(720px, calc(100vw - 32px));
  max-height: min(70vh, 640px);
  overflow: auto;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  padding: 10px;
  z-index: 90;
}
.account-link, .cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 14px;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}
.account-link-ico, .cart-link-ico {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  display: grid;
  place-items: center;
  color: var(--ink);
  flex: 0 0 auto;
}
.account-link-ico svg, .cart-link-ico svg { width: 20px; height: 20px; display: block; }
.account-link-label, .cart-link-label { display: none; }
.account-link.is-in .account-link-ico::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg-2);
}
.cart-link-ico .cart-count { top: -5px; right: -5px; }
@media (min-width: 860px) {
  .header-search { display: flex; }
  .search-open-mobile { display: none !important; }
  .account-link-label, .cart-link-label { display: inline; }
  .top-actions { margin-left: 0; gap: 10px; }
  .top-inner { gap: 16px; }
  .catbar-inner {
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 0 10px;
    overflow-x: auto;
  }
  .catbar a {
    padding: 6px 10px;
    font-size: 12.5px;
    gap: 6px;
    white-space: nowrap;
    flex: 0 0 auto;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  }
  .catbar a:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,.22);
  }
  .kit-card { padding: 10px; border-radius: 16px; gap: 6px; }
  .kit-card h3 {
    font-size: 13px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    height: calc(13px * 1.3 * 2);
  }
  .kit-photos {
    grid-template-columns: repeat(auto-fill, 56px);
    justify-content: start;
    gap: 4px;
  }
  .kit-photos .photo-plate { width: 56px; height: 56px; max-height: 56px; aspect-ratio: 1; }
  .kit-card ul, .kit-card .kit-install { display: none; }
  .kit-benefit {
    font-size: 12px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0;
  }
  .kit-card-hit { gap: 6px; }
  .kit-card-actions { gap: 6px; }
  .kit-card-actions .btn { padding: 7px 8px; font-size: 12px; min-height: 34px; }
  .kit-total, .kit-card .price { font-size: 16px; }
  .kit-foot { gap: 8px; }
}
@media (min-width: 1280px) {
  .kit-grid { grid-template-columns: repeat(var(--kit-cols, 3), minmax(0, 1fr)); }
}

.hero-help {
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  max-width: 760px;
}
.hero-help p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  flex: 1 1 220px;
}
.hero-help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
}
.hero-help-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.hero-help-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255,122,47,.45);
  box-shadow: 0 6px 14px rgba(0,0,0,.22);
}
.hero-help-link svg { width: 16px; height: 16px; display: block; flex: 0 0 auto; }
.hero-help-link[href^="https://t.me"] { color: #7dd3fc; }
@media (max-width: 859px) {
  body[data-page="home"] .hero-help { margin-top: 8px; padding: 8px 10px; }
  body[data-page="home"] .hero-help p { font-size: 12px; }
}

@media (min-width: 641px) {
  .cat-board .cat-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .cat-board .cat-tile,
  .catalog-layout .cat-tiles:not(.suggest-empty-tiles) .cat-tile {
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 6px 16px rgba(0,0,0,.16);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
  }
  .cat-board .cat-tile:hover,
  .catalog-layout .cat-tiles:not(.suggest-empty-tiles) .cat-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(255,122,47,.5);
    box-shadow: 0 10px 24px rgba(0,0,0,.3);
  }
  .cat-board .tile-chevron,
  .catalog-layout .cat-tiles:not(.suggest-empty-tiles) .tile-chevron {
    display: inline-block !important;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    font-weight: 400;
    padding-left: 4px;
  }
}
@media (min-width: 641px) and (max-width: 1023px) {
  .cat-board .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

.btn, .chip, .cat-tile, .home-cat-tile, .np-kind-btn, .back-btn, .auth-tab, .catbar a {
  cursor: pointer;
}
.btn { transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.btn:not(:disabled):hover, .chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
}
.home-cat-tile {
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
@media (min-width: 860px) {
  .home-cat-tile:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.05);
  }
}

/* search results */
.suggest-hints {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 0 0 8px;
}
.suggest-hints .chip {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px;
  padding: 6px 10px;
}
.search-suggest { display: grid; gap: 4px; }
.suggest-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}
.suggest-row:hover, .suggest-row.is-on {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
}
.suggest-row .photo-plate, .suggest-row img { width: 48px; height: 48px; border-radius: 10px; }
.suggest-row strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggest-row mark {
  background: rgba(255,122,47,.28);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.suggest-row .kit-badge { margin-right: 6px; vertical-align: middle; }
.suggest-row .price { white-space: nowrap; font-size: 14px; font-weight: 800; color: var(--accent-2); }
.suggest-all {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  width: 100%;
}
.suggest-all.is-on { border-color: var(--accent); }
.suggest-empty { color: var(--muted); padding: 16px 8px; }
.suggest-pops { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }

/* auth drawer */
.auth-drawer-root { position: relative; z-index: 220; }
.auth-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
}
.auth-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 40px rgba(0,0,0,.4);
  padding: 14px 18px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 221;
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
}
.auth-drawer::-webkit-scrollbar { width: 0; height: 0; }
@media (max-width: 859px) {
  .auth-drawer {
    width: 100%;
    border-left: 0;
  }
}
.auth-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.auth-drawer-head h2 {
  font-size: 20px;
  margin: 0;
}
.auth-drawer .auth-tabs, .auth-drawer .auth-form { max-width: none; }
html.auth-drawer-open,
body.auth-drawer-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  height: 100%;
}

/* guest /account standalone — not when html.has-auth (cached session) */
html.no-auth body[data-page="account"] .catbar,
html:not(.has-auth) body[data-page="account"].is-auth-pending .catbar,
body[data-page="account"].is-auth-guest .catbar,
html.no-auth body[data-page="account"] .header-search,
html:not(.has-auth) body[data-page="account"].is-auth-pending .header-search,
body[data-page="account"].is-auth-guest .header-search,
html.no-auth body[data-page="account"] #search-open,
html:not(.has-auth) body[data-page="account"].is-auth-pending #search-open,
body[data-page="account"].is-auth-guest #search-open,
html.no-auth body[data-page="account"] .account-link,
html:not(.has-auth) body[data-page="account"].is-auth-pending .account-link,
body[data-page="account"].is-auth-guest .account-link,
html.no-auth body[data-page="account"] .cart-link,
html:not(.has-auth) body[data-page="account"].is-auth-pending .cart-link,
body[data-page="account"].is-auth-guest .cart-link,
html.no-auth body[data-page="account"] .burger,
html:not(.has-auth) body[data-page="account"].is-auth-pending .burger,
body[data-page="account"].is-auth-guest .burger,
html.no-auth body[data-page="account"] .crumbs,
html:not(.has-auth) body[data-page="account"].is-auth-pending .crumbs,
body[data-page="account"].is-auth-guest .crumbs,
html.no-auth body[data-page="account"] .back-row,
html:not(.has-auth) body[data-page="account"].is-auth-pending .back-row,
body[data-page="account"].is-auth-guest .back-row {
  display: none !important;
}
html.no-auth body[data-page="account"] .header-back,
html:not(.has-auth) body[data-page="account"].is-auth-pending .header-back,
body[data-page="account"].is-auth-guest .header-back {
  display: grid !important;
}
html.no-auth body[data-page="account"] main.wrap,
html:not(.has-auth) body[data-page="account"].is-auth-pending main.wrap,
body[data-page="account"].is-auth-guest main.wrap {
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 36px;
  padding-bottom: 48px;
}
html.no-auth body[data-page="account"] #auth-panel,
html:not(.has-auth) body[data-page="account"].is-auth-pending #auth-panel,
body[data-page="account"].is-auth-guest #auth-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 18px 22px;
  box-shadow: 0 16px 36px rgba(0,0,0,.28);
}
html.no-auth body[data-page="account"] #account-title,
html:not(.has-auth) body[data-page="account"].is-auth-pending #account-title,
body[data-page="account"].is-auth-guest #account-title {
  text-align: center;
  margin-bottom: 16px;
}
html.no-auth body[data-page="account"] .auth-tabs,
html:not(.has-auth) body[data-page="account"].is-auth-pending .auth-tabs,
body[data-page="account"].is-auth-guest .auth-tabs,
html.no-auth body[data-page="account"] .auth-form,
html:not(.has-auth) body[data-page="account"].is-auth-pending .auth-form,
body[data-page="account"].is-auth-guest .auth-form { max-width: none; }


/* ===== v18: mega catalog + compact auth drawer ===== */
.catalog-menu-btn {
  display: none;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px 0 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1;
}
.catalog-menu-btn svg { width: 18px; height: 18px; display: block; flex: 0 0 auto; }
.catalog-menu-caret { width: 14px !important; height: 14px !important; opacity: .7; transition: transform .15s ease; }
.catalog-menu-btn.is-open .catalog-menu-caret,
.catalog-menu-btn[aria-expanded="true"] .catalog-menu-caret { transform: rotate(180deg); }
.catalog-menu-btn:hover {
  border-color: rgba(255,122,47,.45);
  box-shadow: 0 6px 14px rgba(0,0,0,.22);
}
.catalog-menu-btn.is-open,
.catalog-menu-btn[aria-expanded="true"] {
  border-color: var(--accent);
  background: rgba(255,122,47,.16);
  color: #ffb085;
}
@media (min-width: 860px) {
  .catalog-menu-btn { display: inline-flex; }
}
html.no-auth body[data-page="account"] .catalog-menu-btn,
html:not(.has-auth) body[data-page="account"].is-auth-pending .catalog-menu-btn,
body[data-page="account"].is-auth-guest .catalog-menu-btn { display: none !important; }

.catalog-mega {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 86;
  padding: 8px 0 12px;
  pointer-events: none;
}
.catalog-mega.is-open,
.catalog-mega:not([hidden]) { display: block; }
.catalog-mega[hidden] { display: none !important; }
.catalog-mega-inner {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: var(--card);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(0,0,0,.5);
  min-height: 380px;
  max-height: min(70vh, 560px);
  overflow: hidden;
}
.mega-cats {
  list-style: none;
  margin: 0;
  padding: 8px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  scrollbar-width: thin;
  background: var(--bg-2);
}
.mega-cat {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  border: 1px solid transparent;
}
.mega-cat:hover, .mega-cat.is-on, .mega-cat:focus-visible {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.06);
}
.mega-cat.is-on {
  background: rgba(255,122,47,.16);
  border-color: rgba(255,122,47,.35);
  color: #ffb085;
}
.mega-cat-ico { width: 22px; height: 22px; display: grid; place-items: center; color: inherit; }
.mega-cat-ico svg { width: 18px; height: 18px; display: block; }
.mega-cat-name { font-weight: 650; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mega-cat-count { color: var(--muted); font-size: 12px; font-weight: 600; }
.mega-cat.is-on .mega-cat-count { color: #ffb085; }
.mega-cat-chevron { color: var(--muted); font-size: 16px; line-height: 1; }
.mega-cats-foot {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px;
}
.mega-cats-foot a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
}
.mega-cats-foot a:hover { color: var(--ink); background: rgba(255,255,255,.05); }

.mega-pane {
  padding: 16px 18px 18px;
  overflow: auto;
  scrollbar-width: thin;
  min-width: 0;
}
.mega-pane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.mega-pane-head h3 {
  font-size: 18px;
  margin: 0;
  letter-spacing: -.02em;
}
.mega-all {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.mega-all:hover { text-decoration: underline; }
.mega-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px 24px;
  align-items: start;
}
.mega-col h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
.mega-col a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
}
.mega-col a:hover, .mega-col a:focus-visible {
  background: rgba(255,255,255,.06);
}
.mega-col a span { color: var(--muted); font-size: 12px; font-weight: 600; }
.mega-empty { color: var(--muted); font-size: 14px; }

@media (max-width: 859px) {
  .catalog-mega { display: none !important; }
}

/* compact auth drawer so register fits ~650px tall laptops */
@media (min-width: 860px) {
  .auth-drawer-head { margin-bottom: 8px; }
  .auth-drawer-head h2 { font-size: 18px; }
  .auth-drawer-head .icon-btn { width: 36px; height: 36px; }
  .auth-drawer .auth-tabs { margin: 0 0 10px; padding: 3px; }
  .auth-drawer .auth-tab { padding: 7px 10px; font-size: 14px; }
  .auth-drawer .form { gap: 7px; }
  .auth-drawer .form label { gap: 3px; font-size: 12.5px; }
  .auth-drawer .form input[type="text"],
  .auth-drawer .form input[type="tel"],
  .auth-drawer .form input[type="password"] {
    min-height: 40px;
    height: 40px;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 10px;
  }
  .auth-drawer .btn { padding: 8px 14px; min-height: 40px; }
  .auth-drawer .legal-note { font-size: 12px; line-height: 1.35; margin: 0; }
  .auth-drawer .switch { font-size: 12.5px; gap: 8px; line-height: 1.3; }
  .auth-drawer .form-error { font-size: 12.5px; margin: 0; }
}


@media (max-width: 859px) {
  html, body {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}


/* v18: mobile drawer overlay + empty cart */
@media (max-width: 859px) {
  .drawer {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    bottom: var(--bottom);
    z-index: 76;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 16px 16px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .drawer::-webkit-scrollbar { display: none; width: 0; height: 0; }
  html.drawer-open,
  body.drawer-open {
    overflow: hidden !important;
  }
}
.drawer-nav { display: grid; gap: 0; }
.drawer-nav-extra {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.drawer a.drawer-link {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  font-weight: 650;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.drawer-nav-extra a.drawer-link { font-weight: 600; color: var(--ink); }
.drawer-link-ico {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--muted);
}
.drawer-link-ico svg { width: 20px; height: 20px; display: block; }
.drawer-link-name { min-width: 0; }
.drawer-link-chevron { color: var(--muted); font-size: 18px; line-height: 1; text-align: right; }
.drawer a.drawer-account { margin-bottom: 8px; }
.drawer-account-sub { font-size: 12px; }

.cart-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 48px 16px 36px;
  min-height: 260px;
  align-content: center;
}
.cart-empty-ico {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  margin-bottom: 4px;
}
.cart-empty-ico svg { width: 32px; height: 32px; display: block; }
.cart-empty h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.03em;
}
.cart-empty p { margin: 0; max-width: 28ch; }
.cart-empty .btn { margin-top: 8px; min-width: 180px; }

.kit-grid { align-items: stretch; }
.kit-card { height: 100%; }
.kit-card-hit { flex: 1 1 auto; min-height: 0; }
.kit-foot { margin-top: auto; }



/* desktop hero: compact band, help on the right, no promo */
@media (min-width: 1024px) {
  body[data-page="home"] .hero-stage {
    max-height: none;
  }
  body[data-page="home"] .hero-art {
    opacity: 1;
  }
  body[data-page="home"] .hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 16px 28px;
    align-items: center;
    padding: 16px 0 12px;
  }
  body[data-page="home"] .hero-copy {
    min-width: 0;
  }
  body[data-page="home"] .hero-content h1 {
    font-size: clamp(26px, 2.5vw, 32px);
    margin: 0;
    max-width: 16ch;
  }
  body[data-page="home"] .hero-content .lead {
    margin-top: 6px;
    font-size: 14px;
  }
  body[data-page="home"] .hero-help {
    margin: 0;
    max-width: none;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,.035);
  }
  body[data-page="home"] .hero-help p {
    flex: 0 1 auto;
    font-size: 13px;
    line-height: 1.4;
  }
  body[data-page="home"] .hero-help-links {
    flex-wrap: wrap;
  }
}


/* ===== Catalog v19: compact head, sticky filters, no sub-tiles ===== */
body[data-page="catalog"] .cat-head {
  margin: 8px 0 10px;
}
body[data-page="catalog"] .cat-head .crumbs {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.3;
}
body[data-page="catalog"] .cat-title,
body[data-page="catalog"] #cat-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.4px;
}
body[data-page="catalog"].is-listing #cat-tiles { display: none !important; }
body[data-page="catalog"].is-listing .catalog-layout.is-empty { display: revert; }

.sub-rail {
  display: none;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 0 10px;
  padding: 0 0 2px;
  -webkit-overflow-scrolling: touch;
}
.sub-rail::-webkit-scrollbar { display: none; }
.sub-rail a, .sub-rail button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.sub-rail a small, .sub-rail button small {
  color: var(--muted);
  font-weight: 550;
  font-size: 11px;
}
.sub-rail a.is-on, .sub-rail button.is-on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.sub-rail a.is-on small, .sub-rail button.is-on small { color: inherit; opacity: .7; }

.cat-toolbar {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  min-height: 40px;
}
.cat-count {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
}
.cat-toolbar #active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.cat-toolbar #active-filters .chip {
  height: 30px;
  padding: 0 8px 0 10px;
  font-size: 12.5px;
}
.cat-toolbar #active-filters .chip .x {
  margin-left: 4px;
  opacity: .7;
}
.cat-reset {
  appearance: none;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.cat-reset:hover { color: var(--accent); }
.cat-toolbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.cat-sort-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.cat-sort select,
.cat-toolbar select {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 11px;
  padding: 8px 28px 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 38px;
}

/* Filter column */
.filter-block { display: grid; gap: 2px; }
.filter-block-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.filter-section.is-long {
  max-height: 248px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding-right: 4px;
  margin-bottom: 4px;
}
.filter-section.is-long::-webkit-scrollbar { width: 4px; }
.filter-section.is-long::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 99px; }
.filter-radio,
a.filter-radio,
a.filter-radio:hover,
a.filter-radio:visited,
a.filter-radio:focus {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 0 8px;
  margin: 0 -8px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
}
.filter-radio input {
  appearance: none;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1.5px solid var(--line-2, #5a5d66);
  border-radius: 50%;
  background: transparent;
  margin: 0;
  position: relative;
}
.filter-radio input:checked {
  border-color: var(--accent);
  background: radial-gradient(circle at center, var(--accent) 0 5px, transparent 6px);
}
.filter-radio .nm, .filter-radio span { text-decoration: none !important; }
.filter-radio .nm { margin-left: 0; flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--ink); }
.filter-radio > span:last-child { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 550; }
.filter-radio:hover { background: rgba(255,255,255,.04); }
.filter-radio.is-on { background: rgba(255,255,255,.05); }

.filter-acc {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.filter-acc > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  user-select: none;
}
.filter-acc > summary::-webkit-details-marker { display: none; }
.filter-acc > summary::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .15s ease;
  margin-left: 8px;
}
.filter-acc[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.filter-acc-body { padding: 0 0 12px; display: grid; gap: 10px; }

.filters-body .filter-check,
.filter-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 6px;
  margin: 0 -6px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}
.filters-body .filter-check input[type="checkbox"],
.filter-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px !important;
  height: 18px !important;
  min-height: 0 !important;
  flex: 0 0 18px;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid #8b8e97 !important;
  border-radius: 4px !important;
  background: #1a1c20 !important;
  box-shadow: none !important;
  accent-color: var(--accent);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.filters-body .filter-check input[type="checkbox"]:checked,
.filter-check input[type="checkbox"]:checked {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%231a0d06' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2l3 3 6-6'/></svg>") !important;
  background-size: 12px 12px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
.filter-check .n { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 550; }
.filter-check:hover { background: rgba(255,255,255,.04); }
.filter-check.is-off,
.filter-chip.is-off {
  opacity: .4;
  pointer-events: none;
}
.filter-more {
  appearance: none;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 4px 0 0;
  text-align: left;
  cursor: pointer;
}
.filter-checks[data-collapsed="1"] .filter-check:nth-child(n+7) { display: none; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip,
.filter-chips .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
.filter-chip input { position: absolute; opacity: 0; pointer-events: none; }
.filter-chip.is-on,
.filter-chips .chip.active,
.filter-chips .chip.is-on {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.filter-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
}
.filter-switch input {
  appearance: none;
  width: 44px;
  height: 24px;
  flex: 0 0 44px;
  border-radius: 999px;
  background: #3a3d45;
  position: relative;
  border: 0;
  margin: 0;
  cursor: pointer;
  transition: background .15s ease;
}
.filter-switch input::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
.filter-switch input:checked { background: var(--accent); }
.filter-switch input:checked::after { transform: translateX(20px); }

.price-row input,
.filters-body .price-row input {
  min-height: 40px;
  font-size: 14px;
  appearance: textfield;
  -moz-appearance: textfield;
}
.price-row input::-webkit-outer-spin-button,
.price-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.price-hint {
  margin: 0;
  font-size: 11.5px;
  font-weight: 550;
  color: var(--muted);
}
.range-dual,
#price-dual.range-dual {
  position: relative;
  height: 36px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  --thumb: 26px;
}
.range-dual::before {
  content: "";
  position: absolute;
  left: calc(var(--thumb) / 2);
  right: calc(var(--thumb) / 2);
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 99px;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(to right,
    var(--line) 0, var(--line) var(--a, 0%),
    var(--accent) var(--a, 0%), var(--accent) var(--b, 100%),
    var(--line) var(--b, 100%), var(--line) 100%);
}
.filters-body .range-dual input[type="range"],
.range-dual input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  min-height: 0 !important;
  outline: none;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
  z-index: 1;
}
.range-dual input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; background: transparent; border: 0;
}
.range-dual input[type="range"]::-moz-range-track {
  height: 4px; background: transparent; border: 0;
}
.range-dual input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  width: var(--thumb);
  height: var(--thumb);
  margin-top: -11px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #1a0d06;
  box-shadow: 0 1px 6px rgba(0,0,0,.4);
  cursor: pointer;
}
.range-dual input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: var(--thumb);
  height: var(--thumb);
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #1a0d06;
  box-shadow: 0 1px 6px rgba(0,0,0,.4);
  cursor: pointer;
}

.sheet-foot {
  display: none;
  gap: 8px;
  padding-top: 12px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--bg-2) 70%, transparent);
}

@media (min-width: 860px) {
  body[data-page="catalog"] .cat-head .back-row { display: none; }
  body[data-page="catalog"] .cat-title,
  body[data-page="catalog"] #cat-title { font-size: 28px; }
  body[data-page="catalog"].is-listing .sub-rail { display: none !important; }
  .filters-aside {
    width: 260px;
    max-height: calc(100dvh - var(--header-h) - 64px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    overscroll-behavior: contain;
  }
  .filters-aside::-webkit-scrollbar { display: none; width: 0; }
  #filter-sheet .sheet-card {
    padding: 4px 2px 12px;
    background: none;
    border: 0;
    border-radius: 0;
  }
  #filter-sheet .sheet-head,
  #filter-sheet .sheet-foot,
  #filters-close, #filters-btn { display: none !important; }
  .cat-sort-label { display: none; }
  .catalog-layout .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .catalog-layout .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .catalog-layout .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 859px) {
  body[data-page="catalog"] .cat-title,
  body[data-page="catalog"] #cat-title {
    font-size: 24px !important;
    font-weight: 700;
  }
  body[data-page="catalog"].is-listing .sub-rail:not([hidden]) {
    display: flex;
    margin: 0 -12px 10px;
    padding: 0 12px 4px;
  }
  body[data-page="catalog"].is-listing .cat-toolbar {
    position: sticky;
    top: var(--header-h, 56px);
    z-index: 40;
    margin: 0 -12px 12px;
    padding: 8px 12px;
    background: rgba(20, 21, 24, .94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  body[data-page="catalog"].is-listing .cat-count { font-size: 13px; color: var(--muted); font-weight: 600; grid-column: 1 / -1; order: 3; }
  body[data-page="catalog"].is-listing #active-filters { display: none; }
  body[data-page="catalog"].is-listing #filters-reset-top { display: none !important; }
  body[data-page="catalog"].is-listing .cat-toolbar-end {
    margin: 0;
    width: 100%;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  body[data-page="catalog"].is-listing #filters-btn {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    margin: 0;
  }
  body[data-page="catalog"].is-listing .cat-sort {
    display: flex;
    margin: 0;
  }
  body[data-page="catalog"].is-listing .cat-sort-label { display: none; }
  body[data-page="catalog"].is-listing .cat-sort select { width: 100%; }
  /* hide desktop-only section switcher inside the sheet */
  #filter-sheet .filter-section { display: none; }
  #filter-sheet .sheet-card {
    display: flex;
    flex-direction: column;
    max-height: min(86vh, 720px);
    padding: 14px 16px calc(12px + env(safe-area-inset-bottom));
  }
  #filter-sheet .filters-body {
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
    scrollbar-width: none;
  }
  #filter-sheet .filters-body::-webkit-scrollbar { display: none; }
  #filter-sheet .sheet-foot {
    display: grid;
    padding-top: 10px;
  }
  html.sheet-open, body.sheet-open {
    overflow: hidden !important;
    overscroll-behavior: none;
  }
}

/* ===== v22: compact hero band, category panel, quieter catbar ===== */
.hero-points { display: none; }
.hero-band { display: contents; }

@media (min-width: 1024px) {
  body[data-page="home"] .hero-content {
    display: block;
    padding: 12px 0 10px;
  }
  body[data-page="home"] .hero-band {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) auto minmax(260px, .72fr);
    gap: 0 20px;
    align-items: center;
    width: 100%;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 14px 18px;
  }
  body[data-page="home"] .hero-copy { min-width: 0; }
  body[data-page="home"] .hero-content h1 {
    font-size: clamp(24px, 2.2vw, 30px);
    margin: 0;
    max-width: none;
    line-height: 1.15;
  }
  body[data-page="home"] .hero-content .lead {
    margin-top: 4px;
    font-size: 13.5px;
    max-width: none;
  }
  body[data-page="home"] .hero-points {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 2px 18px;
    border-left: 1px solid rgba(255,255,255,.10);
    border-right: 1px solid rgba(255,255,255,.10);
  }
  body[data-page="home"] .hero-points li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    font-weight: 550;
    line-height: 1.25;
    color: var(--muted);
    white-space: nowrap;
  }
  body[data-page="home"] .hero-points svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    color: var(--accent);
    opacity: .9;
    max-width: none;
  }
  body[data-page="home"] .hero-help {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
    align-self: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
  }
  body[data-page="home"] .hero-help p {
    flex: 0 1 auto;
    font-size: 13px;
    line-height: 1.4;
  }
  body[data-page="home"] .hero-help-links { flex-wrap: wrap; }
}

@media (min-width: 1280px) {
  body[data-page="home"] .hero-content h1 {
    white-space: nowrap;
    font-size: clamp(24px, 2vw, 28px);
  }
}

.home-cat-panel {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 8px;
}
.home-cat-grid {
  align-items: stretch;
}
.home-cat-tile {
  height: 100%;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 2px 8px rgba(0,0,0,.16);
  border-radius: 14px;
  padding: 8px 6px 6px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.home-cat-tile .home-cat-name {
  min-height: calc(11px * 1.2 * 2);
  transition: color .2s ease;
}
.home-cat-tile .home-cat-count {
  margin-top: auto;
}
@media (min-width: 860px) {
  .home-cat-panel { padding: 12px; }
  .home-cat-tile { padding: 10px 8px 8px; }
  .home-cat-tile .home-cat-name { min-height: calc(12px * 1.2 * 2); }
  .home-cat-tile:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: rgba(255,255,255,.05);
    box-shadow: 0 6px 16px rgba(0,0,0,.22);
  }
  .home-cat-tile:hover .home-cat-name { color: var(--accent); }
}

.catbar a {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.18);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.catbar a:hover,
.catbar a.active {
  background: rgba(255,122,47,.10);
  border-color: var(--accent);
  color: var(--accent);
  transform: none;
  box-shadow: none;
}
@media (min-width: 1280px) {
  .catbar a:hover {
    transform: none;
    box-shadow: none;
  }
}


/* cached session: hide login, show cabinet skeleton */
html.has-auth body[data-page="account"] #auth-panel { display: none !important; }
html.has-auth body[data-page="account"].is-auth-pending #cabinet-panel { display: none !important; }
#cabinet-skel { display: none; }
html.has-auth body[data-page="account"].is-auth-pending #cabinet-skel {
  display: grid !important;
  gap: 16px;
  margin-top: 8px;
}
.acc-skel-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
}
.acc-skel-line {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.12), rgba(255,255,255,.06));
  background-size: 200% 100%;
  animation: acc-skel 1.2s ease-in-out infinite;
}
.acc-skel-lg { height: 20px; width: 40%; }
.acc-skel-sm { width: 55%; }
@keyframes acc-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Added to cart dialog */
#added-root[hidden] { display: none !important; }
#added-root {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 20px;
}
.added-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.added-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 18px 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
}
.added-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.added-card h2 {
  font-size: 18px;
  margin: 0 36px 14px 0;
  letter-spacing: -.02em;
}
.added-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.added-pic {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--photo);
}
.added-pic img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.added-name {
  font-weight: 650;
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.added-price {
  margin-top: 4px;
  font-family: Unbounded, Inter, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}
.added-note { margin-top: 2px; font-size: 12px; color: var(--muted); }
.added-sum { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.added-ship { margin: 0 0 14px; }
.added-ship-text { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.added-ship-track {
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}
.added-ship-track span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  width: 0;
}
.added-ship.is-ok .added-ship-text { color: var(--ok); }
.added-ship.is-ok .added-ship-track span { background: var(--ok); }
.added-actions { display: grid; gap: 8px; }
.added-actions .btn { width: 100%; text-align: center; }
html.added-open, body.added-open { overflow: hidden; }

@media (max-width: 859px) {
  #added-root {
    place-items: end center;
    padding: 0;
    align-items: end;
  }
  .added-card {
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  }
}

/* Destination text lives on .back-btn; header arrow stays a compact icon (aria-label is set in JS). */
.header-back-label { display: none; }
