/* ═══ ТЕМА РЕДИЗАЙНА (по Figma Frame 32) поверх style.css ═══
   Механики (app.js, классы js-*, data-*) не трогаем — только внешний вид. */

:root {
  /* красный акцент старого сайта → чёрный */
  --clay: #1c1a17;
  --red: #1c1a17;
  --clay-deep: #000000;
  --clay-tint: #f0f0f0;
  /* кремовые фоны → нейтральные серые из макета */
  --cream: #f7f7f7;
  --cream-2: #f0f0f0;
  --sand: #e9e9e9;
  --line: #e3e3e3;
  --wa-green: #35da67;
}

/* ── типографика: крупные строчные заголовки как в макете ── */
h1, h2 {
  font-weight: 700;
  letter-spacing: -0.05em;
  text-transform: lowercase;
  line-height: 0.92;
}
h3 { font-weight: 600; letter-spacing: -0.03em; text-transform: lowercase; }
.eyebrow { color: #979797; letter-spacing: .08em; }

/* ── кнопки: прямоугольники → чёрные пилюли (lowercase) ── */
.btn {
  border-radius: 999px;
  text-transform: lowercase;
  letter-spacing: 0;
  font-size: 15px;
  min-height: 46px;
  padding: 10px 24px;
}
.btn-clay, .btn-primary { background: #3c3c3c; color: #fff; border-color: #3c3c3c; }
.btn-clay:hover, .btn-primary:hover { background: #2a2a2a; }
.btn-line { border-color: #d0d0d0; background: #d0d0d0; color: #4a4a4a; }
.btn-line:hover { background: #c2c2c2; border-color: #c2c2c2; color: #1c1a17; }
.btn-wa, .btn[href*="wa.me"] { background: var(--wa-green); border-color: var(--wa-green); color: #fff; }
.arrow { text-transform: lowercase; letter-spacing: 0; border-bottom-width: 2px; }

/* ── хедер: белая плавающая таблетка ── */
.site-header, header.header {
  position: sticky; top: 14px; z-index: 90;
  margin: 14px auto 0; width: min(1162px, calc(100% - 36px));
  background: rgba(255,255,255,.97);
  border: none; border-radius: 999px;
  box-shadow: 0 4px 57px rgba(0,0,0,.15);
  padding: 6px 10px 6px 26px;
}
.site-header .container, header.header .container { padding: 0; max-width: none; }
.nav a { text-transform: lowercase; letter-spacing: 0; font-size: 14px; font-weight: 500; }

/* ── карточки товаров: скругления и мягкий фон из макета ── */
.prod {
  background: #fff; border: none; border-radius: 30px; overflow: hidden;
  box-shadow: 0 4px 40px rgba(0,0,0,.08);
}
.prod-photo img { border-radius: 20px; }
.prod-badge {
  border-radius: 999px; background: #fff; color: #212121;
  font-weight: 600; text-transform: lowercase; letter-spacing: 0;
}
.prod-badge.gift { background: #fff; color: #212121; }
.prod-title { text-transform: lowercase; letter-spacing: -0.03em; }
.prod-kaspi { color: var(--muted); }

/* ── секции-подложки: серые скруглённые карточки ── */
.section.cream, .section.sand { background: var(--cream); }
.card, .tile, .feature { border-radius: 30px; }

/* ── фильтры каталога: пилюли ── */
.tabs button, .cat-tabs button, [data-filter] {
  border-radius: 999px !important; text-transform: lowercase; letter-spacing: 0;
}
[aria-pressed="true"] { background: #3c3c3c !important; color: #fff !important; border-color: #3c3c3c !important; }

/* ── конфигуратор товара ── */
.cfg-tile { border-radius: 18px; }
/* слайдер размера: тонкий серый трек с тёмной ручкой вместо сплошной чёрной полосы */
.cfg-range { -webkit-appearance: none; appearance: none; background: transparent; }
.cfg-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: #e3e3e3; }
.cfg-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px;
  border-radius: 50%; background: #3c3c3c; border: none; }
.cfg-range::-moz-range-track { height: 4px; border-radius: 2px; background: #e3e3e3; }
.cfg-range::-moz-range-progress { height: 4px; border-radius: 2px; background: #3c3c3c; }
.cfg-range::-moz-range-thumb { width: 18px; height: 18px; border: none; border-radius: 50%; background: #3c3c3c; }
.qv-sw-row .csw { border-radius: 10px; }

/* ── формы ── */
input, select, textarea { border-radius: 14px !important; }

/* ── футер: тёмный из макета ── */
footer, .site-footer, .footer {
  background: #212121 !important; color: #8a8783 !important;
}
footer a, .site-footer a, .footer a { color: #8a8783; }
footer a:hover, .site-footer a:hover, .footer a:hover { color: #fff; }
footer h4, footer h5, .footer h4, .footer h5,
.site-footer h4, .site-footer h5 { color: #fff; text-transform: lowercase; letter-spacing: 0; }

/* ── промо-бар и модалки ── */
.promo-bar { background: #000; color: #fff; }
.modal, .qv, .lb { border-radius: 24px; }

/* декор старого стиля: рукописные подчёркивания — в новом дизайне их нет */
.scribble svg { display: none; }

/* ── хедер-таблетка 1-в-1 с главной (внутренние страницы) ──
   Размеры в тех же --u-единицах, что таблетка героя (styles.css),
   иначе на экранах уже 1647px внутренняя шапка крупнее главной. */
:root { --u: calc(min(100vw, 1647px) / 1647); }
.header.pill2 {
  position: sticky; top: 14px; z-index: 90;
  /* в покое — на той же высоте, что таблетка героя главной (60*--u); при скролле прилипает на 14px */
  margin: calc(var(--u)*60) auto 0; width: min(calc(var(--u)*1162), calc(100% - 36px));
  height: calc(var(--u)*50); background: rgba(255,255,255,.97); border-radius: 999px;
  box-shadow: 0 4px 57px rgba(0,0,0,.15);
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px calc(var(--u)*8) 4px calc(var(--u)*46);
}
.pill2 .logo { display: flex; gap: calc(var(--u)*5.57); align-items: center; flex-shrink: 0; text-decoration: none; }
.pill2-mark { width: calc(var(--u)*22.28); height: calc(var(--u)*26.77); }
.pill2-word { font-weight: 800; text-transform: uppercase; color: #131313;
  font-size: calc(var(--u)*14.482); line-height: calc(var(--u)*12.165); letter-spacing: calc(var(--u)*0.0724); }
.pill2-nav { display: flex; gap: calc(var(--u)*4); padding: 0 calc(var(--u)*40); }
.pill2-nav a { padding: calc(var(--u)*8.24) calc(var(--u)*16.47); font-weight: 500; font-size: calc(var(--u)*14); line-height: calc(var(--u)*22); color: #000; text-decoration: none; }
.pill2-cta { height: calc(var(--u)*42); padding: 0 calc(var(--u)*20.59); border: 0; border-radius: 999px;
  background: #000; color: #fff; font-family: inherit; font-weight: 600; font-size: calc(var(--u)*14.413);
  cursor: pointer; flex-shrink: 0; }
.pill2 .burger { display: none; }
@media (max-width: 860px) {
  .header.pill2 { top: 10px; margin: 10px auto 0; width: calc(100% - 20px); height: 46px; padding: 4px 6px 4px 16px; }
  .pill2-nav { display: none; }
  .pill2-word { font-size: 11px; line-height: 9.5px; }
  .pill2-mark { width: 18px; height: 22px; }
  /* CTA в мобильной шапке скрыт как на главной: снизу sticky-планка, заявка есть в меню */
  .pill2-cta { display: none; }
  .pill2 .burger { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: 10px; cursor: pointer; }
  .pill2 .burger span { width: 20px; height: 2px; background: #131313; display: block; }
}

/* ── фильтр-бар каталога: при скролле — единая белая поверхность с шапкой ──
   Таблетка (top 14 + h 50*--u + зазор 12) плавает над белой подложкой ::before,
   которая появляется только в прилипшем состоянии (.stuck из app.js). */
.filterbar { top: calc(26px + var(--u)*50); transition: box-shadow .2s; }
.filterbar::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: calc(26px + var(--u)*50);
  background: var(--paper); opacity: 0; transition: opacity .2s; pointer-events: none;
}
.filterbar.stuck::before { opacity: 1; }
.filterbar.stuck { box-shadow: 0 14px 24px -20px rgba(0,0,0,.18); }
@media (max-width: 860px) {
  /* мобильная таблетка: top 10 + h 46 = 56 */
  .filterbar { top: 66px; }
  .filterbar::before { height: 66px; }
  /* фильтры — одна листаемая строка, а не 4 ряда на пол-экрана */
  .filterbar .container { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .filterbar .container::-webkit-scrollbar { display: none; }
  .filter-tabs { flex-wrap: nowrap; }
  .filter-tab, .filter-sep, .sortsel { flex-shrink: 0; white-space: nowrap; }
}

/* хлебные крошки: тише, не спорят с заголовком */
.crumbs { font-size: 12px; color: #b3b3b3; padding: 36px 0 26px; text-transform: lowercase; }
.crumbs a { color: #b3b3b3; }
.crumbs a:hover { color: #1c1a17; }
/* на мобиле убираем большой зазор над крошками (иначе ~120px пустоты сверху) */
@media (max-width: 860px) { .crumbs { padding: 12px 0 8px; } }

/* ── единый футер в стиле главной (внутренние страницы) ── */
.nf { background: #212121 !important; color: #8a8783; font-size: 16px; line-height: 1.62;
  padding: clamp(48px, 6vw, 82px) 0 28px; margin-top: 64px; }
/* если страница заканчивается тёмным CTA — без белой щели, тёмное сливается с футером */
main:has(.section--dark:last-of-type) + .nf { margin-top: 0; }
/* плашка-ярлык на тёмном фоне: --red в теме почти чёрный, без этого её не видно */
.section--dark .tag-chip { color: var(--on-dark-muted); }
/* тёмный CTA — тот же тон, что футер (#212121), чтобы сливались без шва */
.section--dark { background: #212121; }
.nf a { color: #8a8783; text-decoration: none; }
.nf a:hover { color: #fff; }
.nf-in { max-width: 1490px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 56px);
  display: grid; grid-template-columns: 1.15fr .75fr 1.5fr; gap: clamp(24px, 4vw, 72px); }
.nf-logo { display: flex; gap: 8px; align-items: center; }
.nf-logo img { width: 34px; height: 41px; filter: invert(1); }
.nf-logo b { color: #fff; font-weight: 800; text-transform: uppercase; font-size: 17px; line-height: 15px; }
.nf-desc { margin: 22px 0 40px; max-width: 400px; }
.nf-desc a { color: #fff; }
.nf-bigaddr { color: #fff; font-weight: 600; text-transform: lowercase;
  font-size: clamp(26px, 2.6vw, 38px); line-height: 1.02; letter-spacing: -.03em; max-width: 420px; }
.nf-map a:first-child { display: block; width: 100%; max-width: 316px; height: 419px;
  border-radius: 8px; overflow: hidden; }
.nf-map img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nf-openmap { display: inline-block; margin-top: 16px; color: #fff !important;
  font-weight: 600; font-size: 22px; text-decoration: underline !important; text-transform: lowercase; }
.nf-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-content: start; }
.nf-col h5 { color: #fff; font-weight: 600; font-size: 14px; text-transform: lowercase;
  letter-spacing: 0; margin: 0 0 26px; }
.nf-col a { display: block; font-size: 15px; margin-bottom: 15px; }
.nf-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border-top: 1px solid rgba(255,255,255,.12); margin-top: clamp(32px, 4vw, 56px);
  padding-top: 26px; font-size: 14px; }
@media (max-width: 960px) {
  .nf-in { grid-template-columns: 1fr; gap: 28px; }
  .nf-map a:first-child { height: 220px; max-width: none; border-radius: 14px; }
  .nf-cols { grid-template-columns: 1fr; gap: 20px; }
  .nf-bottom { flex-direction: column; align-items: flex-start; }
}
