/* Luxmarket — mobile first. Breakpoints: 640px (large phones), 768px (tablet), 1024px (desktop). */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 140px; }

body {
  margin: 0;
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }
a { color: var(--accent-text); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--ink-text); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding-left: 12px; padding-right: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, filter .2s;
}
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.06); }
.btn-ink { background: var(--ink); color: var(--ink-text); }
.btn-ink:hover { filter: brightness(1.15); }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-soft:hover { background: var(--ink); color: var(--ink-text); }
.btn-surface { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-surface:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-light { background: #ffffff; color: #16181d; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn-xl { min-height: 58px; padding: 0 22px; border-radius: 18px; font-size: 16px; font-weight: 700; }

.link-btn {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 4px; border: 0; background: none;
  color: var(--accent-text); font-size: 14px; font-weight: 600; text-decoration: none;
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text);
}

.badge-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700;
}

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

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  padding: 8px 0;
}
.header-row {
  display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "logo lang contacts" "search search search";
  align-items: center; gap: 8px;
}
.header-row > * { min-width: 0; }

.logo { grid-area: logo; display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 16px;
}

.search {
  grid-area: search; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px;
  border-radius: 999px; background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line);
}
.search:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--faint); }

.lang { grid-area: lang; display: flex; padding: 3px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.lang a {
  min-width: 40px; height: 36px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none;
}
.lang a[aria-current="true"] { background: var(--ink); color: var(--ink-text); }

.header-contacts { grid-area: contacts; display: flex; align-items: center; gap: 6px; }
.header-phone {
  display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; color: var(--text); text-decoration: none;
}
.header-phone-icon {
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
}
.header-phone-text { display: none; }
.header-tg {
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-size: 14px; font-weight: 600;
}
.header-tg span { display: none; }

/* ---------- Catalog head & categories ---------- */

.page-head { padding: 14px 4px 12px; }
.page-head h1 { font-size: 28px; line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
.page-head p { margin-top: 6px; font-size: 13px; color: var(--muted); }

.cats {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  margin: 0 -12px; padding: 0 12px 4px;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 108px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 10px;
  border-radius: 18px; background: var(--surface); color: var(--text); text-decoration: none;
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .2s, transform .2s;
}
.cat.is-active { box-shadow: inset 0 0 0 2px var(--accent); }
.cat-img { height: 64px; border-radius: 12px; background: var(--well); display: flex; align-items: center; justify-content: center; padding: 6px; }
.cat-img img { width: 100%; height: 100%; object-fit: contain; }
.cat-img-all { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 5px; }
.cat-img-all img { min-height: 0; }
.cat-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.cat-name-full { display: none; }
.cat-count { font-size: 12px; color: var(--muted); }

/* ---------- Filters: bottom sheet on phones, sidebar on desktop ---------- */

.catalog-body { margin-top: 12px; }

.filters { position: fixed; inset: 0; z-index: 60; visibility: hidden; pointer-events: none; }
.filters-open .filters { visibility: visible; pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .25s; }
.filters-open .sheet-backdrop { opacity: 1; }
.filters-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: min(92dvh, 760px);
  display: flex; flex-direction: column; background: var(--surface); border-radius: 26px 26px 0 0;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.filters-open .filters-panel { transform: none; }
.filters-open { overflow: hidden; }

.filters-head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 6px 18px; }
.filters-head::before {
  content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line-strong);
}
.filters-head h2 { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 20px; letter-spacing: -.02em; }
.filters-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 18px; }
.filters-foot {
  display: flex; gap: 8px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface);
}
.filters-foot .btn { min-height: 52px; }
.filters-submit { flex: 1; }

.fsec { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.fsec:last-child { border-bottom: 0; }
.fsec-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; float: left; width: 100%; }
.fsec-title + * { clear: both; }
.fsec-hint { margin: 8px 2px 10px; font-size: 12px; color: var(--muted); }

.price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-input {
  display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 14px; border-radius: 14px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px transparent;
}
.price-input:focus-within { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.price-input span { font-size: 13px; color: var(--muted); }
.price-input input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.price-input input::placeholder { color: var(--faint); font-weight: 500; }

.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.preset, .pill-check {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 500; text-align: left; white-space: nowrap; cursor: pointer;
}
.preset[aria-pressed="true"], .pill-check:has(input:checked) {
  background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--text); font-weight: 600;
}
.pill-check:has(input:focus-visible), .check-row:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill-check input, .check-row input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pill-group { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-check { position: relative; flex: 1 1 auto; }
.check-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.cnt { font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.is-zero { color: var(--faint); }
.is-zero .cnt { color: var(--faint); }

.check-row {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 4px;
  border-radius: 12px; font-size: 15px; cursor: pointer;
}
.check-row .check-label { flex: 1; white-space: normal; line-height: 1.3; }
.box {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--accent-ink);
}
.box svg { opacity: 0; }
.check-row:has(input:checked) .box { background: var(--accent); border-color: var(--accent); }
.check-row:has(input:checked) .box svg { opacity: 1; }
.check-row:has(input:checked) .check-label { font-weight: 600; }
.check-row.is-zero .box { border-color: var(--line); }

/* ---------- Toolbar, summary ---------- */

.toolbar { display: flex; gap: 8px; }
.filters-btn { flex: 1; min-height: 46px; }
.filters-btn .badge-count { background: var(--accent); color: var(--accent-ink); }
.sort {
  flex: 1; min-width: 0; position: relative; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px;
  border-radius: 999px; background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line);
}
.sort select { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; font-weight: 600; color: var(--text); appearance: none; cursor: pointer; }
.sort:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }

.summary {
  display: flex; align-items: center; gap: 6px; padding: 12px 4px; overflow-x: auto; scrollbar-width: none;
}
.summary::-webkit-scrollbar { display: none; }
.summary-count { font-size: 14px; font-weight: 600; white-space: nowrap; margin-right: 4px; }
.chip-x {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.summary .link-btn { white-space: nowrap; }

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

[data-results] { transition: opacity .2s; }
.is-loading [data-results] { opacity: .5; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.card {
  display: flex; flex-direction: column; min-width: 0; padding: 8px; border-radius: 20px; background: var(--surface);
  transition: box-shadow .25s;
}

.carousel { position: relative; border-radius: 14px; background: var(--well); overflow: hidden; aspect-ratio: 1 / 1; }
.carousel-track {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center; padding: 22% 14% 18%;
}
.carousel-slide img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.badge {
  position: absolute; top: 8px; left: 8px; max-width: calc(100% - 16px); padding: 4px 9px; border-radius: 999px;
  background: var(--surface); color: var(--accent-text); font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.carousel-arrow {
  position: absolute; top: 50%; margin-top: -18px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  display: none; align-items: center; justify-content: center; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm);
}
.carousel-arrow.prev { left: 8px; }
.carousel-arrow.next { right: 8px; }
.carousel-arrow:hover { background: var(--accent); color: var(--accent-ink); }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; }
.dot { border: 0; background: none; padding: 8px 4px; }
.dot span { display: block; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in oklab, var(--text) 25%, transparent); transition: transform .2s, background .2s; }
.dot[aria-current="true"] span { background: var(--accent); transform: scale(1.35); }

.card-body { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 8px 4px 2px; }
.card-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.card-title a { color: inherit; text-decoration: none; }
.card-line { font-size: 12px; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-specs { display: none; }
.card-price { margin-top: auto; padding-top: 6px; font-size: 17px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.card-price span, .product-price span { font-size: .7em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.card-more { margin-top: 8px; min-height: 40px; font-size: 13px; padding: 0 10px; }

.more { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 0 8px; font-size: 12px; color: var(--muted); }
.more .btn { width: 100%; }

.empty { padding: 48px 20px; border-radius: 22px; background: var(--surface); text-align: center; color: var(--muted); }
.empty-title { margin-bottom: 6px; font-size: 20px; font-weight: 700; color: var(--text); }
.empty .btn { margin-top: 16px; }
.empty-page { padding-top: 24px; }

/* ---------- Help block & footer ---------- */

.help {
  margin-top: 28px; padding-top: 24px; padding-bottom: 20px; border-radius: 24px;
  background: var(--help-bg); color: var(--help-text); width: calc(100% - 24px); max-width: 1392px;
}
.help h2 { font-size: 22px; letter-spacing: -.03em; line-height: 1.15; }
.help p { margin-top: 6px; color: var(--help-muted); font-size: 14px; }
.help-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.help-actions .btn { width: 100%; }

.site-footer {
  display: flex; flex-direction: column; gap: 18px; margin-top: 12px; margin-bottom: 20px; padding-top: 18px; padding-bottom: 18px;
  border-radius: 20px; background: var(--surface); width: calc(100% - 24px); max-width: 1392px;
}
.footer-info { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.footer-phone { color: var(--text); font-weight: 700; font-size: 16px; text-decoration: none; }
.theme-picker { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.theme-picker-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.select-wrap select {
  width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; font-weight: 600;
}
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.segmented button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 600;
}
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- Product page ---------- */

.crumbs { display: none; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; color: var(--text);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.product-top { display: flex; flex-direction: column; gap: 8px; }
.panel { padding: 20px 18px; border-radius: 22px; background: var(--surface); }
.panel h2 { font-size: 20px; letter-spacing: -.02em; }

.gallery { padding: 8px; border-radius: 22px; background: var(--surface); }
.gallery .carousel { border-radius: 16px; }
.gallery .carousel-slide { padding: 12% 10%; }
.gallery .badge { top: 12px; left: 12px; font-size: 12px; padding: 6px 11px; }
.thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
  flex: 0 0 64px; width: 64px; height: 64px; padding: 6px; border: 0; border-radius: 14px; background: var(--well);
  box-shadow: inset 0 0 0 2px transparent;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--accent); }

.product-side { display: flex; flex-direction: column; gap: 8px; }
.product-meta { font-size: 13px; color: var(--muted); }
.product-info h1 { margin-top: 6px; font-size: 30px; line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
.product-sku { margin-top: 8px; font-size: 12px; color: var(--muted); }
.product-sku span { color: var(--text); font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; }

.variants { margin-top: 18px; }
.variants-label { font-size: 14px; margin-bottom: 8px; }
.variants-label span { color: var(--muted); }
.variant-list { display: flex; gap: 8px; flex-wrap: wrap; }
.variant {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 14px; background: var(--surface-2);
  color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none; box-shadow: inset 0 0 0 2px transparent;
}
.variant img { width: 40px; height: 40px; padding: 3px; border-radius: 10px; background: var(--well); object-fit: contain; }
.variant.is-active { box-shadow: inset 0 0 0 2px var(--accent); font-weight: 600; }

.feature-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding: 0; list-style: none; }
.feature-pills li { padding: 6px 11px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 500; }

.buy { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.product-price { font-size: 32px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.buy > .muted { margin-top: 6px; }
.buy-actions { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 10px; }
.btn-stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.btn-sub { font-size: 13px; font-weight: 500; opacity: .85; }
.nowrap { white-space: nowrap; }

.dots-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.dots-list div { display: flex; align-items: baseline; gap: 10px; font-size: 15px; }
.dots-list div::before { content: ""; order: 1; flex: 1; min-width: 12px; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); }
.dots-list dt { color: var(--muted); white-space: nowrap; }
.dots-list dd { order: 2; font-weight: 600; text-align: right; }

.product-details { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.description { margin-top: 10px; font-size: 15px; line-height: 1.6; }
.specs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 24px; }
.specs { margin-top: 6px; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 600; text-align: right; }

.how ol { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; padding: 0; list-style: none; }
.how li { display: flex; gap: 12px; font-size: 15px; line-height: 1.45; }
.how li span {
  flex: 0 0 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 14px;
}

.similar { margin-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px 12px; }
.section-head h2 { font-size: 22px; letter-spacing: -.03em; }
.section-head a { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.grid-scroll {
  display: flex; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 0 -12px; padding: 0 12px;
}
.grid-scroll::-webkit-scrollbar { display: none; }
.grid-scroll .card { flex: 0 0 172px; scroll-snap-align: start; }

.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.action-bar .btn { flex: 1; min-height: 52px; font-size: 16px; }
.has-action-bar { padding-bottom: 80px; }

/* ---------- ≥ 640px ---------- */

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .help-actions { flex-direction: row; }
  .help-actions .btn { width: auto; }
}

/* ---------- ≥ 768px: tablet ---------- */

@media (min-width: 768px) {
  body { font-size: 16px; }
  .wrap { padding-left: 24px; padding-right: 24px; }
  .site-header { padding: 14px 0; }
  .header-row { grid-template-columns: auto 1fr auto auto; grid-template-areas: "logo search lang contacts"; gap: 14px; }
  .search { max-width: 560px; width: 100%; justify-self: center; }
  .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 28px 8px 20px; }
  .page-head h1 { font-size: clamp(34px, 4.4vw, 52px); }
  .page-head p { margin: 0; font-size: 14px; }
  .cats { margin: 0 -24px; padding: 0 24px 4px; }
  .cat { flex-basis: 150px; padding: 12px 12px 14px; border-radius: 22px; }
  .cat-img { height: 88px; border-radius: 14px; }
  .cat-name { font-size: 14px; }
  .cat-name-short { display: none; }
  .cat-name-full { display: inline; }
  .card { padding: 12px; border-radius: 26px; }
  .carousel { border-radius: 18px; }
  .card-body { padding: 10px 8px 4px; gap: 4px; }
  .card-meta { font-size: 13px; }
  .card-title { font-size: 18px; margin-bottom: 8px; }
  .card-line { display: none; }
  .card-specs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; }
  .card-specs div { display: flex; align-items: baseline; gap: 8px; }
  .card-specs div::before { content: ""; order: 1; flex: 1; min-width: 12px; border-bottom: 1px dotted var(--line-strong); transform: translateY(-3px); }
  .card-specs dt { color: var(--muted); white-space: nowrap; }
  .card-specs dd { order: 2; text-align: right; font-weight: 500; }
  .card-price { font-size: 22px; }
  .card-more { min-height: 44px; font-size: 14px; }
  .more .btn { width: auto; padding: 0 32px; }
  .help { margin-top: 48px; padding: 36px 40px; border-radius: 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; width: calc(100% - 48px); }
  .help h2 { font-size: 30px; }
  .help p { font-size: 15px; max-width: 520px; }
  .help-actions { margin-top: 0; }
  .site-footer { flex-direction: row; align-items: flex-start; justify-content: space-between; margin-top: 16px; padding: 24px 26px; border-radius: 24px; width: calc(100% - 48px); }
  .theme-picker { width: 320px; }
  .panel { padding: 28px 30px; border-radius: 28px; }
  .gallery { padding: 14px; border-radius: 28px; }
  .thumb { flex-basis: 84px; width: 84px; height: 84px; }
  .product-info h1 { font-size: 40px; }
  .product-price { font-size: 40px; }
  .grid-scroll .card { flex-basis: 240px; }
}

/* ---------- ≥ 1024px: desktop ---------- */

@media (min-width: 1024px) {
  .header-phone-text { display: flex; flex-direction: column; line-height: 1.15; }
  .header-phone-text small { font-size: 12px; color: var(--muted); }
  .header-phone-text b { font-size: 16px; white-space: nowrap; letter-spacing: -.01em; }
  .header-phone { padding-right: 10px; }
  .header-phone:hover .header-phone-icon { background: var(--accent-soft); }
  .header-phone-icon { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
  .header-tg { width: auto; height: 46px; padding: 0 18px; border-radius: 999px; }
  .header-tg span { display: inline; }

  .cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 0; padding: 0; overflow: visible; }
  .cat:hover { transform: translateY(-2px); }

  .catalog-body { display: flex; align-items: flex-start; gap: 16px; margin-top: 16px; }

  /* sidebar */
  .filters { position: static; visibility: visible; pointer-events: auto; flex: 0 0 280px; }
  .sheet-backdrop, .sheet-close, .filters-head::before { display: none; }
  .filters-panel { position: static; transform: none; max-height: none; border-radius: 24px; transition: none; }
  .filters-head { padding: 20px 20px 4px; }
  .filters-head h2 { font-size: 18px; }
  .filters-scroll { overflow: visible; padding: 0 20px 6px; }
  .filters-foot { padding: 12px 20px 20px; border-top: 0; }
  .js .filters-foot { display: none; }
  .presets .preset, .pill-check { min-height: 40px; font-size: 13px; }
  .price-input { height: 44px; }
  .check-row { min-height: 40px; font-size: 14px; }
  .check-row:hover { background: var(--surface-2); }

  .results { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; align-items: start; }
  .results > .toolbar { grid-column: 2; grid-row: 1; display: flex; }
  .results > .summary { grid-column: 1; grid-row: 1; padding-top: 6px; }
  .results > [data-results] { grid-column: 1 / -1; }
  .filters-btn { display: none; }
  .sort { min-width: 220px; }
  .summary { flex-wrap: wrap; overflow: visible; padding: 4px 8px 16px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
  .card:hover { box-shadow: var(--shadow); }

  .crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 26px 8px 18px; font-size: 14px; color: var(--faint); }
  .crumbs a { color: var(--muted); text-decoration: none; }
  .crumbs a:hover { color: var(--text); }
  .crumbs [aria-current] { color: var(--text); font-weight: 600; }
  .back-link { display: none; }
  .product-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); gap: 16px; align-items: start; }
  .product-side { gap: 16px; }
  .product-info h1 { font-size: 44px; }
  .product-price { font-size: 42px; }
  .gallery .carousel-slide { padding: 9% 8%; }
  .product-details { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
  .specs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .similar { margin-top: 44px; }
  .section-head h2 { font-size: 30px; }
  .grid-scroll { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; gap: 16px; }
  .action-bar { display: none; }
  .has-action-bar { padding-bottom: 0; }
}

@media (hover: hover) and (pointer: fine) {
  .carousel:hover .carousel-arrow { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
