/* ============================================================
   CUBI STORE — клиентская Mini App
   Палитра F1: ч/б по дизайн-брифу (CUBI_STORE_CLIENT_UI.md)
   Никаких цветных акцентов — только #0A0A0A / #141414 / #222 / #888 / #fff
   ============================================================ */

/* ── Токены ──────────────────────────────────────────────────── */
:root {
  --bg:      #0A0A0A;   /* фон приложения */
  --card:    #141414;   /* карточки / поднятые поверхности */
  --line:    #222222;   /* разделители и бордеры */
  --text:    #FFFFFF;   /* основной текст */
  --muted:   #888888;   /* вторичный текст */
  --danger:  #FF6B5E;   /* только ошибки формы: единственный цветной акцент */

  --radius-card: 16px;
  --radius-chip: 999px;
  --motion-card: 160ms cubic-bezier(0.33, 0, 0.2, 1);

  /* Высоты shell-элементов (без safe-area) */
  --header-h: 56px;
  --tabbar-h: 60px;
}

/* ── Сброс ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  height: 100%;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "SF Pro Display", "Segoe UI", system-ui, -apple-system,
               Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overscroll-behavior: none;
  overflow: hidden;
}

/* ── App shell ───────────────────────────────────────────────── */
.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  /* Ограничиваем ширину и центрируем на широких экранах */
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* ── Шапка ───────────────────────────────────────────────────── */
.header {
  position: relative;
  z-index: 20;
  background: var(--bg);
  /* Линия внутри высоты, без border: иначе контент-бокс 55px и лого садится на полпикселя. */
  box-shadow: inset 0 -1px 0 var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  /* safe-area iOS: шапка под notch */
  padding-top: env(safe-area-inset-top);
  height: calc(var(--header-h) + env(safe-area-inset-top));
  flex-shrink: 0;
}

.header-back {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  width: 40px;
  height: 40px;
  margin-left: -10px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.header-back[hidden] { display: none; }
.header-back:active { opacity: 0.65; }

.header-logo {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.logo-pill {
  background: transparent;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.logo-mascot {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-cubi {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
}

.logo-store {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: lowercase;
  padding-left: 3px;
}

/* Кнопка корзины */
.header-cart {
  position: relative;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.header-cart:active { opacity: 0.65; }

/* Бейдж корзины */
.cart-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-chip);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.cart-badge[hidden] { display: none; }

.cart-badge.is-bounce {
  animation: cartBounce 0.4s ease;
}

/* ── Основной контент ────────────────────────────────────────── */
.stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px;
  overflow-x: hidden;
  /* Отступ снизу чтобы контент не уходил под таббар */
  padding-bottom: calc(20px + var(--tabbar-h) + env(safe-area-inset-bottom));
}

/* ── Нижняя навигация ────────────────────────────────────────── */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 20;
  background: var(--bg);
  border-top: 1px solid var(--line);
  display: flex;
  /* safe-area iOS: таббар над home-indicator */
  padding-bottom: env(safe-area-inset-bottom);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 10px 4px;
  font-size: 11px;
  font-family: inherit;
  transition: color 0.12s;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
}

.tab.active {
  color: var(--text);
}

.tab svg { display: block; flex-shrink: 0; }

.tab > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── Общие состояния: loading / error / empty ────────────────── */
.state-loading,
.state-error,
.state-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  min-height: 160px;
}

/* Спиннер (CSS-only, без внешних зависимостей) */
.state-loading::before {
  content: '';
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.state-error strong {
  color: var(--text);
  font-size: 15px;
}

/* ── Список моделей (Каталог) ────────────────────────────────── */
.models-screen {}

.models-screen h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.model-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.model-item {
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  border: none;
  color: var(--text);
  font-family: inherit;
  width: 100%;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.model-list > :first-child { border-radius: var(--radius-card) var(--radius-card) 0 0; }
.model-list > :last-child  { border-radius: 0 0 var(--radius-card) var(--radius-card); }
.model-list > :only-child  { border-radius: var(--radius-card); }

.model-row {
  display: flex;
  align-items: center;
  background: var(--card);
  overflow: hidden;
}

.model-row .model-item,
.model-row .model-item:first-child,
.model-row .model-item:last-child,
.model-row .model-item:only-child {
  flex: 1;
  width: auto;
  min-width: 0;
  border-radius: 0;
}

.model-name {
  font-size: 16px;
  font-weight: 500;
}

.model-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.model-arrow {
  font-size: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

.models-disclaimer {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ── Оглавление каталога: плитки категорий ───────────────────── */
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.catalog-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-card);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.catalog-tile-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #1c1c1e;
  color: #555;
  overflow: hidden;
}

.catalog-tile-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Корень каталога: широкие плитки. Чёткий край карточки, слева текст,
   справа слот под баннер. Картинка растворяется только у левого края слота,
   поэтому подпись никогда не наезжает на товар. Формат баннера: тёмный фон,
   товар в правой части, левые ~40% свободны. Фон плитки между цветом карточек
   (#141414) и фоном баннеров (#05050A): шов почти не виден, а плитка не
   проваливается темнее страницы; контур держит рамка. */
.catalog-grid--wide { grid-template-columns: 1fr; }
.catalog-grid--wide .catalog-tile {
  flex-direction: row;
  align-items: stretch;
  min-height: 124px;
  border: 1px solid var(--line);
  background: #0e0e11;
}
.catalog-grid--wide .catalog-tile-media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 62%;
  aspect-ratio: auto;
  justify-content: flex-end;
  background: transparent;
}
.catalog-grid--wide .catalog-tile-cover {
  object-position: right center;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 38%);
  mask-image: linear-gradient(to right, transparent 0, #000 38%);
}
.catalog-grid--wide .catalog-tile-mark {
  width: 56px;
  height: 56px;
  margin-right: 36px;
  color: #3a3a3c;
}
.catalog-grid--wide .catalog-tile-label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  /* Текст кончается там, где у картинки кончается маска-градиент: на 320 px не наезжает на товар. */
  max-width: 56%;
  padding: 18px 16px 18px 20px;
  font-size: 20px;
  white-space: normal;
  pointer-events: none;
}
.catalog-tile-hint {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--muted);
}
.catalog-tile-go {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  pointer-events: none;
}
.catalog-tile-mark {
  width: 40px;
  height: 40px;
  display: block;
}

.catalog-tile-label {
  display: block;
  padding: 12px 14px 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.catalog-toolbar h2 {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.search-hit-price {
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

.search-results .pdp-cta,
.models-screen > .pdp-cta {
  margin-top: 16px;
}

/* ── PDP (конфигуратор SKU) ──────────────────────────────────── */
.pdp-screen {}

.pdp-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.pdp-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

/* Фото-слот: edge-to-edge, встык к хедеру, нативный свайп */
.pdp-photo {
  position: relative;
  background: var(--card);
  height: 58vh;
  min-height: 360px;
  max-height: 580px;
  width: calc(100% + 32px);
  margin: -20px -16px 22px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.pdp-photo-scroller {
  height: 100%;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.pdp-photo-scroller::-webkit-scrollbar {
  display: none;
}

.pdp-gallery {
  display: flex;
  height: 100%;
}

.pdp-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.pdp-slide:nth-child(2) { background: #1c1c1c; }
.pdp-slide:nth-child(3) { background: #101010; }
.pdp-slide:nth-child(4) { background: #1a1816; }
.pdp-slide:nth-child(5) { background: #12151a; }

/* Свечение цвета висит на всей области фото (не на слайде): при листании стоит на месте.
   @property с типом <color> нужен, чтобы смена цвета плавно перетекала, а не щёлкала.
   На большой площади свечение слабее, чем в карточке (42/14 против 60/24), иначе цветное пятно. */
@property --glow {
  syntax: '<color>';
  inherits: true;
  initial-value: transparent;
}

.pdp-photo.has-glow {
  background:
    radial-gradient(closest-side at 50% 50%,
      color-mix(in srgb, var(--glow) 42%, transparent) 0%,
      color-mix(in srgb, var(--glow) 14%, transparent) 60%,
      transparent 100%),
    var(--card);
  transition: --glow 0.5s ease;
}

.pdp-photo.has-glow .pdp-slide { background: transparent; }

/* Вырезанный кадр: прозрачный, товар вписан в слайд. Крупный план (is-edge) обрезан рамкой
   самой съёмки и должен совпасть с краями области фото: растягиваем во всю область. */
.pdp-photo.has-glow .pdp-slide.is-cut img { object-fit: contain; }
.pdp-photo.has-glow .pdp-slide.is-cut.is-edge img { object-fit: cover; }

/* Кадр без вырезки (крупный план, интерьер, в руке): как есть, на белой плашке со скруглением. */
.pdp-photo.has-glow .pdp-slide.is-plate {
  box-sizing: border-box;
  padding: 9% 9% 12%;
}

.pdp-photo.has-glow .pdp-slide.is-plate img {
  object-fit: contain;
  background: #fff;
  border-radius: 22px;
}

@media (prefers-reduced-motion: reduce) {
  .pdp-photo.has-glow { transition: none; }
}

.pdp-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.pdp-photo-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  pointer-events: none;
}

.pdp-photo-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.pdp-photo-dot.is-active {
  background: #fff;
}

/* Группа выбора (память / SIM / цвет) */
.selector-group {
  margin-bottom: 20px;
  border-radius: 12px;
  scroll-margin-top: 12px;
}

.selector-group.is-highlight .selector-label {
  color: var(--text);
}

.selector-group.is-highlight .chip:not(.active) {
  border-color: rgba(255, 255, 255, 0.42);
}

.selector-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  transition: color 180ms ease;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-chip);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.chip.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.chip:active:not(.active) { opacity: 0.7; }
.chip:disabled { opacity: 0.35; pointer-events: none; }

/* Цветовой кружок внутри чипа */
.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

/* Цена и статус */
.pdp-price-block {
  margin-bottom: 4px;
}

.pdp-price {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.pdp-price--from {
  font-size: 22px;
  color: var(--muted);
}

.pdp-price.ask {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 16px;
}

.pdp-status {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

/* Подсказка «выберите параметры» */
.pdp-empty {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

/* Главная кнопка CTA */
.pdp-cta {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-card);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  margin-bottom: 20px;
  transition: opacity 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.pdp-cta:active { opacity: 0.8; }
.pdp-cta:disabled { opacity: 0.55; cursor: default; }

.pdp-screen .pdp-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 20px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
  transition: opacity 120ms ease;
}

.pdp-cta-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pdp-cta-face-add {
  color: var(--bg);
  opacity: 1;
}

.pdp-cta-face-added {
  color: var(--text);
  opacity: 0;
}

.pdp-screen .pdp-cta.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pdp-screen .pdp-cta.is-disabled:active {
  opacity: 0.45;
}

/* Сначала гаснет старая подпись, затем фон и новая подпись идут вместе. */
.pdp-screen .pdp-cta.is-added {
  background: var(--bg);
  border-color: rgba(255, 255, 255, 0.55);
  animation: ctaBgIn 640ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.pdp-screen .pdp-cta.is-added .pdp-cta-face-add {
  opacity: 0;
  animation: ctaFadeOut 640ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.pdp-screen .pdp-cta.is-added .pdp-cta-face-added {
  opacity: 1;
  animation: ctaFadeIn 640ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.pdp-screen .pdp-cta.is-reverting {
  animation: ctaBgOut 640ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.pdp-screen .pdp-cta.is-reverting .pdp-cta-face-added {
  animation: ctaFadeOut 640ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.pdp-screen .pdp-cta.is-reverting .pdp-cta-face-add {
  animation: ctaFadeIn 640ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes ctaBgIn {
  0%, 36% { background-color: var(--text); border-color: transparent; }
  100% { background-color: var(--bg); border-color: rgba(255, 255, 255, 0.55); }
}

@keyframes ctaBgOut {
  0%, 36% { background-color: var(--bg); border-color: rgba(255, 255, 255, 0.55); }
  100% { background-color: var(--text); border-color: transparent; }
}

@keyframes ctaFadeOut {
  0% { opacity: 1; }
  34% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes ctaFadeIn {
  0%, 40% { opacity: 0; }
  100% { opacity: 1; }
}

.pdp-cta-hint {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  text-align: center;
  margin: -12px 0 20px;
}

@media (prefers-reduced-motion: reduce) {
  .pdp-screen .pdp-cta,
  .pdp-screen .pdp-cta.is-added,
  .pdp-screen .pdp-cta.is-reverting,
  .pdp-screen .pdp-cta.is-added .pdp-cta-face-add,
  .pdp-screen .pdp-cta.is-added .pdp-cta-face-added,
  .pdp-screen .pdp-cta.is-reverting .pdp-cta-face-add,
  .pdp-screen .pdp-cta.is-reverting .pdp-cta-face-added,
  .selector-label,
  .selector-group .chip {
    animation: none;
    transition: none;
  }
}

@keyframes cartBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ── Теги (pill-бейджи) ──────────────────────────────────────── */
.pdp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-chip);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Разделитель перед аккордеонами ──────────────────────────── */
.pdp-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0 0;
}

/* ── Аккордеон ───────────────────────────────────────────────── */
.pdp-accordion {
  margin-top: 8px;
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.accordion-chevron {
  font-size: 18px;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 0 0 16px;
}

.accordion-item.open .accordion-body {
  display: block;
}

/* Таблица характеристик */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr + tr td {
  border-top: 1px solid var(--line);
}

.specs-table td {
  padding: 10px 0;
  font-size: 13px;
  vertical-align: top;
}

.specs-table .spec-label {
  color: var(--muted);
  width: 42%;
  padding-right: 12px;
}

.specs-table .spec-value {
  color: var(--text);
}

/* Текст в статических аккордеонах */
.accordion-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.disclaimer {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Главная (F4) ────────────────────────────────────────────── */
.home-screen {
  margin-top: -4px;
}

/* ── Баннер-слайдер ──────────────────────────────────────────── */
/* ~40–45% колонки между шапкой и таббаром, не 55–60% всего экрана. */
.home-slider-wrap {
  margin-bottom: 18px;
}

.home-slider {
  border-radius: var(--radius-card);
  overflow: hidden;
  /* 4:3, как нарисованы баннеры: картинка не обрезается. */
  aspect-ratio: 4 / 3;
  position: relative;
  background: var(--card);
}

.slider-track {
  display: flex;
  height: 100%;
  /* CSS transition: 300ms, никаких внешних библиотек */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  text-align: center;
  background: var(--card);
  overflow: hidden;
}

.slider-slide:has(.slider-photo) {
  padding: 0;
}

.slider-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
}

.slider-slide.is-link { cursor: pointer; }

.slider-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.2;
}

.slider-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 280px;
}

/* Точки поверх слайда */
.slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0;
  pointer-events: none;
}

.slider-dot {
  width: 5px;
  height: 5px;
  border-radius: var(--radius-chip);
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s, width 0.2s;
  outline: 8px solid transparent;
  -webkit-tap-highlight-color: transparent;
}

.slider-dot.active {
  width: 14px;
  background: #fff;
}

/* ── Секции каталога и товаров ───────────────────────────────── */
.home-shelf-section {
  margin-bottom: 24px;
}

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.home-section-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.home-cat-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.home-cat-chips::-webkit-scrollbar { display: none; }
.home-cat-chips .chip { flex-shrink: 0; white-space: nowrap; }

.home-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.home-product-grid > .state-empty { grid-column: 1 / -1; }

.home-products-content {
  min-height: 220px;
}

.home-product-card {
  position: relative;
  width: 100%;
  min-width: 0;
  background: var(--card);
  border-radius: var(--radius-card);
}

.home-product-card.is-unavailable {
  opacity: 0.5;
}

/* Карточка снята с продажи: не открывается, но сердце остаётся рабочим. */
.home-product-card.is-unavailable .home-product-card-open {
  pointer-events: none;
}

.home-product-card-open {
  width: 100%;
  padding: 0;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text);
  font-family: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
}

.home-product-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #1c1c1e;
  margin-bottom: 0;
  flex-shrink: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.home-product-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
}

/* Карточка со вырезкой: товар на тёмном, сзади мягкое свечение цвета (--glow из glowColor).
   closest-side: ореол гаснет внутри квадрата, без среза у нижнего края. Тень вшита в файл,
   поэтому filter: drop-shadow не нужен (он тормозит прокрутку в Telegram WebView). */
.home-product-card.is-cut .home-product-card-photo {
  background:
    radial-gradient(closest-side at 50% 52%,
      color-mix(in srgb, var(--glow) 60%, transparent) 0%,
      color-mix(in srgb, var(--glow) 24%, transparent) 55%,
      transparent 100%),
    var(--card);
}

.home-product-card.is-cut .home-product-card-photo img {
  object-fit: contain;
}

.home-product-card.is-cut .color-dot {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.home-product-card.is-cut .favorite-btn--card {
  background: rgba(20, 20, 22, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Запасной вид (вырезки нет или она помечена плохой): без свечения, фото на белой плашке.
   Фон фото Apple белый, поэтому плашка того же цвета и шва нет. */
.home-product-card.is-plate .home-product-card-photo {
  background: var(--card);
  padding: 14% 14% 6%;
  box-sizing: border-box;
}

.home-product-card.is-plate .home-product-card-photo img {
  object-fit: contain;
  padding: 8%;
  box-sizing: border-box;
  background: #fff;
  border-radius: 18px;
}

.home-product-card-meta {
  padding: 12px 14px 16px;
}

/* card-body: бренд (тихий) → модель (главное) → цена (акцент) / слот уточнения */
.home-product-card-brand {
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-product-card-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: #f0f0f0;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Цвет карточки: точка и название, тихим цветом, чтобы цена оставалась главным акцентом */
.home-product-card-color {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -2px 0 6px;
  font-size: 12px;
  line-height: 1.2;
  color: #9a9aa0;
}

.home-product-card-caption {
  margin-top: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #fff;
}

.home-product-card-from {
  font-size: 10px;
  font-weight: 400;
  color: #555;
  margin-right: 2px;
}

.home-product-card-caption.is-ask {
  font-size: 11px;
  font-weight: 400;
  color: #555;
  font-style: italic;
}

.home-product-card-caption.is-unavailable {
  font-size: 11px;
  font-weight: 400;
  color: #555;
}

/* Hover/press только у целиком кликабельных карточек и строк.
   Transform не влияет на раскладку, поэтому соседние элементы не прыгают. */
.home-product-card,
.catalog-tile {
  transform: translateY(0) scale(1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
  transition:
    transform var(--motion-card),
    box-shadow var(--motion-card);
}

/* Возврат с PDP: тот же DOM списка, нажатая карточка не должна «доезжать» до размера. */
.models-screen.is-restoring .home-product-card {
  transition: none;
  transform: none;
  box-shadow: none;
}

.model-row,
.model-list > .model-item {
  transform: scale(1);
  transition:
    transform var(--motion-card),
    background-color var(--motion-card);
}

.model-row .model-item {
  transition: background-color var(--motion-card);
}

@media (hover: hover) and (pointer: fine) {
  .home-product-card:not(.is-unavailable):hover,
  .catalog-tile:hover {
    z-index: 1;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38);
  }

  .model-row:hover,
  .model-row:hover .model-item,
  .model-list > .model-item:hover:not(:disabled) {
    background: #1a1a1a;
  }
}

.home-product-card:not(.is-unavailable):has(.home-product-card-open:active),
.catalog-tile:active {
  z-index: 1;
  transform: scale(0.987);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.model-row:has(.model-item:active),
.model-list > .model-item:active:not(:disabled) {
  transform: scale(0.99);
}

@media (prefers-reduced-motion: reduce) {
  .home-product-card,
  .catalog-tile,
  .slider-track,
  .slider-dot,
  .model-row,
  .model-list > .model-item,
  .model-row .model-item {
    transition: none;
  }

  .home-product-card:not(.is-unavailable):hover,
  .home-product-card:not(.is-unavailable):has(.home-product-card-open:active),
  .catalog-tile:hover,
  .catalog-tile:active,
  .model-row:has(.model-item:active),
  .model-list > .model-item:active:not(:disabled) {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0);
  }
}

.favorite-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.favorite-btn svg { display: block; }

.favorite-btn.is-on svg { fill: currentColor; }

.favorite-btn:active { opacity: 0.7; }

.favorite-btn--card,
.favorite-btn--pdp {
  position: absolute;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.72);
  color: var(--text);
}

.favorite-btn--card {
  top: 8px;
  right: 8px;
}

.favorite-btn--pdp {
  top: 12px;
  right: 12px;
  z-index: 3;
}

.favorite-btn--row {
  width: 48px;
  height: 52px;
  flex-shrink: 0;
  background: none;
  color: var(--text);
}

/* ── Inline-состояния (меньше padding, для полки) ────────────── */
.state-loading--sm,
.state-error--sm,
.state-empty--sm {
  padding: 28px 16px;
  min-height: 100px;
}

.state-loading--sm::before {
  width: 20px;
  height: 20px;
}

/* ── Поиск ───────────────────────────────────────────────────── */
.search-screen {}

.search-input-wrap {
  position: relative;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-chip);
  overflow: hidden;
  background: var(--card);
}

.search-input-wrap:focus-within {
  border-color: var(--text);
}

.search-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: inherit;
  padding: 12px 16px 12px 42px;
  color: var(--text);
  font-size: 16px;
  line-height: 22px;
  font-family: inherit;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.search-input:focus,
.search-input:focus-visible {
  outline: none;
}

/* Нативный хром type=search в WebKit клипит обводку — рисуем её на wrap. */
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
  display: none;
  -webkit-appearance: none;
}

.search-input::placeholder { color: var(--muted); }

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  display: block;
}

.search-input-wrap.has-clear .search-input {
  padding-right: 42px;
}

.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.search-clear[hidden] { display: none; }

.search-clear:active { color: var(--text); }

/* ── Профиль ─────────────────────────────────────────────────── */
.profile-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.profile-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.profile-user-text {
  min-width: 0;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.profile-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.profile-username {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.profile-section-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 28px;
}

.profile-item {
  background: var(--card);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.profile-item:first-child { border-radius: var(--radius-card) var(--radius-card) 0 0; }
.profile-item:last-child  { border-radius: 0 0 var(--radius-card) var(--radius-card); }
.profile-item:active { opacity: 0.7; }

.profile-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--line);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-item-icon svg { display: block; }

.profile-item-label {
  flex: 1;
  min-width: 0;
}

.profile-item-arrow {
  font-size: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

.profile-about {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-about-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-chip);
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.profile-about-btn:active { opacity: 0.7; }

.profile-manager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin-top: 24px;
  margin-bottom: 12px;
  padding: 18px 20px;
  border: none;
  border-radius: var(--radius-chip);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.profile-manager:active { opacity: 0.7; }

.profile-manager svg { display: block; flex-shrink: 0; }

.profile-page h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

/* ── Корзина ─────────────────────────────────────────────────── */
.cart-screen h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cart-heading { margin-bottom: 16px; }

/* Пустая корзина: иконка + текст + кнопка — компактная группа
   в оптическом центре области между заголовком и таббаром. */
.cart-screen--empty {
  display: flex;
  flex-direction: column;
  min-height: calc(
    100dvh
    - var(--header-h)
    - env(safe-area-inset-top, 0px)
    - var(--tabbar-h)
    - env(safe-area-inset-bottom, 0px)
    - 40px
  );
}

.cart-screen--empty .cart-heading {
  flex-shrink: 0;
  margin-bottom: 0;
}

.cart-screen--empty .state-empty {
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px 8px;
  gap: 12px;
}

.cart-empty-icon {
  color: var(--muted);
  display: flex;
  line-height: 0;
}

.cart-empty-icon svg { display: block; }

.cart-empty-cta {
  align-self: center;
  margin: 8px 0 0;
  padding: 10px 28px;
  background: transparent;
  color: var(--text);
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}

@media (hover: hover) and (pointer: fine) {
  .cart-empty-cta:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
  }
}

.cart-empty-cta:active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.cart-count {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.cart-notice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 14px;
}

.cart-banner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.cart-banner .cart-secondary { margin-top: 12px; }

.cart-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 12px;
  min-width: 0;
}

.cart-photo {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* Строка поиска: миниатюра слева, текст, справа стрелка или сердце. */
.search-hit { justify-content: flex-start; padding: 12px 16px 12px 12px; }
.search-hit-info { flex: 1; min-width: 0; }
.search-hit .model-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-thumb {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
}

/* Миниатюра с фото: картинка заполняет рамку целиком (рамки: корзина, оформление, заявки, поиск) */
.cart-photo,
.checkout-sheet-thumb,
.order-thumb,
.search-thumb {
  overflow: hidden;
}

.has-photo {
  background: #f5f5f7;
}

/* Вырезка на тёмной плитке: свечения в миниатюре нет, тень вшита в файл. */
.has-photo.has-cut {
  background: var(--card);
}

.has-photo.has-cut > img {
  object-fit: contain;
}

.has-photo > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.cart-line-body {
  flex: 1;
  min-width: 0;
}

.cart-line-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.cart-line-top .cart-model,
.cart-line-top .cart-model-text {
  width: auto;
  flex: 1;
  min-width: 0;
}

.cart-model,
.cart-model-text {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}

.cart-model { cursor: pointer; }
.cart-model:active { opacity: 0.7; }

.cart-config,
.cart-qty,
.cart-status,
.cart-note,
.cart-hold {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cart-config { margin-top: 4px; }
.cart-qty { margin-top: 4px; }

.cart-price {
  margin-top: 0;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  text-align: right;
}

.cart-price.ask {
  padding-top: 1px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  white-space: nowrap;
}

.cart-status { margin-top: 4px; }

.cart-remove {
  margin-top: 2px;
  padding: 12px 0;
  min-height: 44px;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cart-remove:active { opacity: 0.65; }

.cart-summary {
  margin-top: 18px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
}

.cart-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  min-width: 0;
}

.cart-sum-label,
.cart-sum-value {
  font-size: 15px;
  font-weight: 500;
}

.cart-sum-label { color: var(--muted); }

.cart-sum-value {
  text-align: right;
  overflow-wrap: anywhere;
}

.cart-sum-value.is-pending {
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

.cart-sum-row--strong .cart-sum-value { font-weight: 500; }

.cart-note { margin-top: 4px; }
.cart-hold { margin: 12px 0; }

.cart-feedback {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin: -8px 0 16px;
}

.cart-feedback:empty { display: none; }

.cart-secondary {
  display: block;
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  margin-bottom: 10px;
  -webkit-tap-highlight-color: transparent;
}

.cart-secondary:active { opacity: 0.7; }

.cart-text-action {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px;
  background: none;
  border: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cart-text-action:active { opacity: 0.65; }

.cart-screen .state-error .pdp-cta,
.cart-screen .state-error .cart-secondary {
  align-self: stretch;
}

.cart-screen > .pdp-cta { margin-top: 16px; }

.checkout-form { margin-top: 20px; }

/* Оформление — «воронка»: таббар прячем, кнопка отправки прилипает к низу. */
.app.is-checkout .tabbar { display: none; }
.app.is-checkout .stage { padding-bottom: 0; }

.checkout-section {
  border: 0;
  margin: 0 0 24px;
  padding: 0;
  min-width: 0;
}

.checkout-section-title {
  display: block;
  padding: 0;
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

/* ── Способ получения: карточки-радио ── */
.delivery-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.delivery-option {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: border-color var(--motion-card), background-color var(--motion-card);
}

.delivery-option.is-selected {
  border-color: #3a3a3a;
  background: #171717;
}

.delivery-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.delivery-head:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -2px;
  border-radius: var(--radius-card);
}

.delivery-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  transition: color var(--motion-card), background-color var(--motion-card);
}

.delivery-option.is-selected .delivery-icon {
  background: var(--text);
  color: var(--bg);
}

.delivery-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.delivery-title { font-size: 15px; font-weight: 600; }
.delivery-sub { font-size: 13px; color: var(--muted); line-height: 1.35; }

.delivery-radio {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #444;
  transition: border-color var(--motion-card), border-width var(--motion-card);
}

.delivery-option.is-selected .delivery-radio {
  border: 7px solid var(--text);
}

.delivery-body { padding: 0 14px 14px; }
.delivery-body .checkout-field { margin-bottom: 10px; }
.delivery-body .checkout-field input { background: var(--bg); }

.delivery-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.delivery-map {
  margin-top: 10px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.delivery-map::after { content: " \2197"; }

.checkout-fieldset-error { margin-top: 8px; }

/* ── Плавное раскрытие по высоте (без JS-замеров) ── */
.checkout-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 240ms cubic-bezier(0.33, 0, 0.2, 1), opacity 180ms ease;
}

.checkout-reveal.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.checkout-reveal-inner {
  overflow: hidden;
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .checkout-reveal, .delivery-option, .delivery-icon, .delivery-radio { transition: none; }
}

/* ── Поля ── */
.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.checkout-field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.checkout-field-label label {
  color: var(--muted);
  font-size: 13px;
}

.checkout-field-action {
  padding: 0;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.checkout-field input,
.checkout-field textarea {
  width: 100%;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  font-size: 16px;
  transition: border-color 120ms ease;
}

/* Автозаполнение браузера (телефон, адрес) красит поле в голубой. Фон через inset-тень:
   свойство background WebKit для :autofill не даёт переопределить. */
.checkout-field input:-webkit-autofill,
.checkout-field input:-webkit-autofill:hover,
.checkout-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--card) inset;
  box-shadow: 0 0 0 1000px var(--card) inset;
  /* Жёлто-голубая заливка WebKit уезжает «навсегда». */
  transition: background-color 9999s ease-out 0s, border-color 120ms ease;
}

.delivery-body .checkout-field input:-webkit-autofill,
.delivery-body .checkout-field input:-webkit-autofill:hover,
.delivery-body .checkout-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  box-shadow: 0 0 0 1000px var(--bg) inset;
}

/* Стандартный :autofill отдельным правилом: старый WebView, не знающий его,
   выбросит только это правило, а не префиксное выше. */
.checkout-field input:autofill {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px var(--card) inset;
}

.delivery-body .checkout-field input:autofill {
  box-shadow: 0 0 0 1000px var(--bg) inset;
}

.checkout-field input::placeholder,
.checkout-field textarea::placeholder { color: #555; }

.checkout-field input:focus,
.checkout-field textarea:focus {
  outline: none;
  border-color: #666;
}

.checkout-field input.checkout-field-invalid,
.checkout-field textarea.checkout-field-invalid,
.checkout-field input.checkout-field-invalid:focus,
.checkout-field textarea.checkout-field-invalid:focus {
  border-color: var(--danger);
}

.checkout-delivery.is-invalid .delivery-option { border-color: var(--danger); }

.checkout-error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.35;
}

.checkout-field textarea {
  min-height: 88px;
  resize: none;
}

.checkout-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.checkout-add-comment {
  margin-top: 8px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.checkout-add-comment::before { content: "+ "; }
.checkout-comment .checkout-field { margin-top: 12px; margin-bottom: 0; }

/* ── Нижний док: заметка + кнопка, прилипает к низу экрана ── */
.checkout-dock {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 16px -16px 0;
  padding: 20px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0) 0, var(--bg) 20px);
}

.checkout-submit { margin: 0; }

.checkout-sheet {
  margin-bottom: 0;
  padding: 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.checkout-sheet-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.checkout-sheet-thumb {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
}

.checkout-sheet-meta {
  flex: 1;
  min-width: 0;
}

.checkout-sheet-title {
  font-size: 15px;
  font-weight: 500;
}

.checkout-sheet-count {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.checkout-sheet-sum {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 500;
}

.checkout-sheet-sum.is-pending {
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

.checkout-sheet-chevron {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.checkout-sheet.is-open .checkout-sheet-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.checkout-sheet-body {
  padding: 0 0 8px;
  border-top: 1px solid var(--line);
}

.checkout-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0;
}

.checkout-sheet-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.checkout-sheet-line .checkout-sheet-thumb {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.checkout-sheet-line-body {
  flex: 1;
  min-width: 0;
}

.checkout-sheet-price {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 500;
}

.checkout-sheet-price.is-pending {
  padding-top: 1px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  white-space: nowrap;
}

.checkout-sheet-body .cart-sum-row { margin-bottom: 6px; }
.checkout-sheet-body .cart-sum-row--strong {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.checkout-banner {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.4;
}

.checkout-dev-link {
  display: inline-block;
  margin: -6px 0 14px;
  color: var(--text);
  font-size: 14px;
}

.checkout-line-changed { outline: 1px solid var(--text); }

.checkout-success { text-align: left; }

/* ── Адаптивность: минимальная ширина 360 px ─────────────────── */
@media (max-width: 375px) {
  .tab > span         { font-size: 10px; }
  .chip               { font-size: 13px; padding: 7px 11px; }
  .slider-title       { font-size: 22px; }
  .home-section-title { font-size: 16px; }
  .cart-photo         { width: 64px; height: 64px; }
}


/* ── Скелетоны и «медленная загрузка» ────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #1c1c1e 25%, #28282a 37%, #1c1c1e 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 10px;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.skeleton-card {
  background: var(--card);
  border-radius: var(--radius-card);
  overflow: hidden;
  padding-bottom: 16px;
}

.skeleton-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  margin-bottom: 14px;
}

.skeleton-line {
  height: 14px;
  margin: 0 14px 8px;
}

.skeleton-line--short { width: 38%; height: 10px; }

.skeleton-pdp .skeleton-hero { height: 320px; border-radius: var(--radius-card); margin-bottom: 20px; }
.skeleton-pdp .skeleton-title { height: 28px; width: 60%; margin-bottom: 20px; }
.skeleton-pdp .skeleton-chips { height: 40px; width: 85%; margin-bottom: 16px; border-radius: var(--radius-chip); }
.skeleton-pdp .skeleton-price { height: 32px; width: 40%; margin: 24px 0 16px; }
.skeleton-pdp .skeleton-button { height: 52px; border-radius: var(--radius-card); }

.slow-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
  animation: slow-notice-in 240ms ease both;
}

.slow-notice img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

@keyframes slow-notice-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  .slow-notice { animation: none; }
}

/* ── Куб-маскот в состояниях ─────────────────────────────────── */
.mascot-state {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
  animation: mascot-in 260ms ease both;
}

.mascot-face { display: block; }

@keyframes mascot-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mascot-state { animation: none; }
}

/* ── Условия и политика ──────────────────────────────────────── */
.legal-page { display: flex; flex-direction: column; gap: 32px; margin-top: 8px; }

.legal-heading { font-size: 18px; font-weight: 700; margin-bottom: 4px; }

.legal-date { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

.legal-section { margin-bottom: 18px; }

.legal-section h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }

.legal-section p { font-size: 14px; line-height: 1.5; color: #cfcfcf; margin-bottom: 8px; }

.legal-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.legal-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  max-width: 480px;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
}

.legal-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  box-shadow: inset 0 -1px 0 var(--line);
  flex-shrink: 0;
}

.legal-sheet-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  cursor: pointer;
}

.legal-sheet-body {
  overflow-y: auto;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}

/* Согласие: галочка слева от текста, а не отдельной строкой во всю ширину. */
.checkout-consent label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.checkout-consent input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  padding: 0;
  border: 1.5px solid #555;
  border-radius: 7px;
  background: transparent center / 14px no-repeat;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.checkout-consent input[type="checkbox"]:checked {
  background-color: var(--text);
  border-color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A0A0A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.checkout-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.checkout-consent input.checkout-field-invalid { border-color: var(--danger); }
.checkout-consent .checkout-error { margin-left: 34px; }

/* ── Мои заявки ──────────────────────────────────────────────── */
.orders-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }

.order-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 14px 16px;
}

.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.order-date { font-size: 13px; color: var(--muted); }

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px 4px 8px;
  border-radius: var(--radius-chip);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.order-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.order-status--work { color: #e8b04a; background: rgba(232, 176, 74, 0.12); }
.order-status--done { color: #5fcf80; background: rgba(95, 207, 128, 0.12); }
.order-status--off { color: #6a6a6a; background: rgba(255, 255, 255, 0.05); }

/* Свёрнутая строка: фото слева, сумма справа. Для нескольких позиций это кнопка. */
.order-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}
button.order-head { cursor: pointer; -webkit-tap-highlight-color: transparent; }

.order-thumbs { display: flex; flex: 0 0 auto; }
.order-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.order-thumbs .order-thumb { box-shadow: 0 0 0 2px var(--card); }
.order-thumbs .order-thumb + .order-thumb { margin-left: -14px; }

.order-summary {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.order-summary-main { font-size: 17px; font-weight: 700; white-space: nowrap; }
.order-summary-main.is-pending { font-size: 13px; font-weight: 400; color: var(--muted); }
.order-summary-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; text-align: right; }
.order-summary-left { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.order-summary:has(.order-summary-sub) { display: block; }
.order-summary:has(.order-summary-sub) .order-summary-main { display: block; text-align: right; }

.order-chevron {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin: 0 4px 3px 0;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--motion-card);
}
.is-open .order-chevron { transform: rotate(-135deg); margin-bottom: -3px; }

.order-items { margin-top: 12px; border-top: 1px solid var(--line); }
.order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.order-item + .order-item { border-top: 1px solid var(--line); }
.order-item .order-thumb { width: 44px; height: 44px; flex-basis: 44px; }
.order-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.order-item-name { font-size: 15px; font-weight: 600; line-height: 1.25; }
.order-item-config { font-size: 13px; color: var(--muted); line-height: 1.3; }
.order-item-price { white-space: nowrap; font-size: 15px; font-weight: 600; }
.order-item-price.is-pending { font-size: 13px; font-weight: 400; color: var(--muted); }

.order-foot { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.order-meta { font-size: 13px; color: var(--muted); }
.order-where::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--muted);
  vertical-align: 1px;
}

/* ── Фильтры полки: кнопка справа и шторка снизу (только ч/б) ── */
.filter-btn {
  flex-shrink: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-chip);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.12s, background 0.12s;
}
.filter-btn:active { opacity: 0.7; }
.filter-btn.is-active { border-color: var(--text); }
.filter-btn-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.filter-btn-count[hidden] { display: none; }

.filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background 200ms ease;
}
.filter-overlay.is-open { background: rgba(0, 0, 0, 0.6); }
.filter-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 220ms cubic-bezier(0.33, 0, 0.2, 1);
}
.filter-overlay.is-open .filter-sheet { transform: translateY(0); }
.filter-grab {
  width: 36px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 2px;
  background: #3a3a3a;
}
.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 18px;
}
.filter-reset {
  background: none;
  border: none;
  padding: 8px 0 8px 12px;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.filter-reset[hidden] { display: none; }
.filter-body { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 8px; }
.filter-body .selector-label { margin-top: 4px; }
.filter-body .chips { margin-bottom: 20px; }
.filter-price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.filter-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
}
.filter-field:focus-within { border-color: var(--text); }
.filter-field input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 16px; /* не меньше 16px: иначе iOS приближает экран при фокусе */
}
.filter-field input::placeholder { color: #555; }
.filter-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.filter-swatch {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--swatch, #888);
  box-shadow: inset 0 0 0 3px var(--card);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.filter-swatch.active { border-color: var(--text); }
.filter-swatches[hidden] { display: none; }
.filter-body [hidden] { display: none; }
.filter-note { margin: 8px 0 12px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.filter-apply {
  flex-shrink: 0;
  min-height: 48px;
  border: none;
  border-radius: var(--radius-chip);
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.filter-apply:active { opacity: 0.85; }
.filter-apply.is-empty { background: var(--line); color: var(--muted); cursor: default; }
@media (prefers-reduced-motion: reduce) {
  .filter-overlay, .filter-sheet { transition: none; }
}

/* ── Закреплённая полоса «цена + кнопка» на карточке товара ──── */
.pdp-bar {
  position: sticky;
  /* Липнет к краю области без нижнего отступа .stage (он равен таббару + 20px), поэтому
     смещение постоянное: полоса садится прямо над таббаром и на 4px заходит под него. */
  bottom: -24px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px -16px -20px;
  padding: 12px 16px;
  background: var(--bg);
  box-shadow: inset 0 1px 0 var(--line);
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
}

.pdp-bar.is-visible {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.pdp-bar-price {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  min-width: 0;
}

.pdp-bar-price.is-muted { font-size: 14px; font-weight: 500; color: var(--muted); }

.pdp-bar-cta {
  flex-shrink: 0;
  padding: 13px 22px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-card);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pdp-bar-cta:active { opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  .pdp-bar { transition: none; }
}
