:root {
  --bg: var(--tg-theme-bg-color, #f5f5f7);
  --surface: var(--tg-theme-secondary-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #1c1c1e);
  --hint: var(--tg-theme-hint-color, #8e8e93);
  --accent: var(--tg-theme-button-color, #0a84ff);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --border: rgba(0, 0, 0, 0.06);
  --photo-bg: #f5f5f7;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 10px;
  background: var(--bg);
  backdrop-filter: blur(16px);
}

.back-btn[hidden] { display: none; }

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-left: -5px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.topbar h1 {
  font-family: "Unbounded", sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0;
  flex: 1;
}

.topbar h1.model-title {
  font-size: 16px;
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-right: -5px;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
}

/* Баланс "Луников" — виден на любой странице, не только в самом разделе
   (как значок баллов в шапке у Ozon и похожих приложений). */
.luniki-badge-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 11px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

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

.cart-btn svg { width: 24px; height: 24px; }

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-badge.bump { animation: cart-badge-bump 0.45s cubic-bezier(0.3, 0.8, 0.4, 1.4); }

/* Бейдж LS Coins бампает тем же движением, что и корзина — только когда
   баланс реально вырос (см. updateLunikiBadge). */
.luniki-badge-btn.bump { animation: cart-badge-bump 0.45s cubic-bezier(0.3, 0.8, 0.4, 1.4); }

@keyframes cart-badge-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

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

#view {
  flex: 1;
  padding: 4px 18px calc(40px + 66px + env(safe-area-inset-bottom, 0px));
}

/* Нижняя панель навигации — постоянно видна поверх всех страниц */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  background: var(--bg);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  padding: 8px 6px calc(6px + env(safe-area-inset-bottom, 0px));
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 2px;
  border: none;
  background: none;
  color: var(--hint);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.nav-item svg { width: 22px; height: 22px; }

.nav-item.active { color: var(--accent); }

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 22px 2px 10px;
}

.section-title:first-child { margin-top: 6px; }

.search-bar { position: relative; margin: 6px 0 4px; }
.search-bar .form-input {
  padding: 12px 40px 12px 42px;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.04);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--hint);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--border);
  color: var(--hint);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Большой баннер акций на главном экране — вместо простого заголовка
   "Акции" над мелкими карточками, крупная тёмная карточка с бейджем и
   заголовком, а сами товары по акции — тем же рядом карточек внутри неё. */
.promo-hero {
  position: relative;
  background: linear-gradient(160deg, #0d0d0d 0%, #10182e 55%, #142138 100%);
  border-radius: var(--radius-xl);
  padding: 20px 18px 18px;
  margin: 6px 0 22px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(47, 125, 255, 0.25);
}

.promo-hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 125, 255, 0.35) 0%, rgba(47, 125, 255, 0) 70%);
  pointer-events: none;
}

.promo-hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #5b9dff, #2f7dff);
  color: #0a1f42;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.promo-hero-title {
  font-family: "Unbounded", sans-serif;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.promo-hero-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  margin: 0 0 16px;
  line-height: 1.4;
}

.promo-hero .promo-row { position: relative; z-index: 1; }
.promo-hero .promo-card { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
.promo-hero .promo-card .name { color: #fff; }
.promo-hero .promo-card .thumb { background: rgba(255, 255, 255, 0.9); }

.promo-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.promo-row::-webkit-scrollbar { display: none; }

.promo-card {
  position: relative;
  flex: 0 0 150px;
  background: linear-gradient(165deg, var(--surface) 60%, rgba(47, 125, 255, 0.10) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(47, 125, 255, 0.12);
}

.promo-card .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--photo-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.promo-card .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.promo-card .info { padding: 8px 10px 12px; }
.promo-card .name { font-weight: 600; font-size: 13px; margin-bottom: 4px; line-height: 1.25; }

.promo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: linear-gradient(135deg, #5b9dff, #2f7dff);
  color: #0a1f42;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(47, 125, 255, 0.35);
}

/* Блок "Новинка" / предзаказ — та же структура рядов, что у "Акции недели"
   (.promo-row/.promo-card переиспользуются), но в тёплой гамме, чтобы не
   путать с распродажей, и без цены — вместо неё дата ожидания. */
.new-hero {
  position: relative;
  background: linear-gradient(160deg, #1c0a0f 0%, #2b0f18 55%, #3a1420 100%);
  border-radius: var(--radius-xl);
  padding: 20px 18px 18px;
  margin: 6px 0 22px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(139, 47, 74, 0.28);
}

.new-hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 59, 94, 0.4) 0%, rgba(184, 59, 94, 0) 70%);
  pointer-events: none;
}

.new-hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #b83b5e, #7a2540);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.new-hero-title {
  font-family: "Unbounded", sans-serif;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.new-hero-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  margin: 0 0 16px;
  line-height: 1.4;
}

.new-hero .promo-row { position: relative; z-index: 1; }
.new-hero .promo-card { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
.new-hero .promo-card .name { color: #fff; }
.new-hero .promo-card .thumb { background: rgba(255, 255, 255, 0.9); }
.new-hero .promo-badge.new-badge { background: linear-gradient(135deg, #b83b5e, #7a2540); color: #fff; box-shadow: 0 3px 8px rgba(184, 59, 94, 0.35); }
.new-hero-eta { font-size: 11px; color: rgba(255, 255, 255, 0.75); font-weight: 600; margin-top: 3px; }

/* Плашка "Новинка" на обычной карточке товара (каталог) */
.card-new-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 2;
  background: linear-gradient(135deg, #b83b5e, #7a2540);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(184, 59, 94, 0.35);
}

/* Плашка "Новинка" + срок ожидания на карточке товара */
.detail-new-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.detail-new-badge {
  display: inline-block;
  background: linear-gradient(135deg, #b83b5e, #7a2540);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}
.detail-new-eta { font-size: 12px; color: var(--hint); font-weight: 600; }

.promo-prices { display: flex; flex-direction: column; gap: 1px; }
.promo-old { font-size: 12px; color: var(--hint); text-decoration: line-through; }
.promo-sale { font-size: 14px; font-weight: 700; color: #2f7dff; }
.promo-date { font-size: 11px; color: var(--hint); margin-top: 3px; }
.promo-date--last { color: #2f7dff; font-weight: 700; }

/* Home: brand photo cards */
.brand-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-card {
  position: relative;
  height: 132px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease;
}

.brand-card:active { transform: scale(0.98); }

.brand-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.75) 100%);
}

.brand-card .brand-card-body {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  z-index: 1;
  color: #fff;
}

.brand-card .brand-card-name {
  font-family: "Unbounded", sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 2px;
}

.brand-card .brand-card-tagline {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
  margin: 0;
}

/* Раздел "Меню" */

/* Карточка "Подарок" — большой эмодзи справа, текст+кнопка слева, в стиле
   промо-карточки конкурента. Синяя гамма — та же, что и у .promo-hero и
   "Пригласить друга" (единый акцент вместо золота), различаются
   подписью/эмодзи, а не цветом. */
.gift-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(160deg, #0d0d0d 0%, #10182e 55%, #142138 100%);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  margin-bottom: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(47, 125, 255, 0.25);
}

.gift-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gift-hero::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 125, 255, 0.35) 0%, rgba(47, 125, 255, 0) 70%);
  pointer-events: none;
}

.gift-hero-text { position: relative; z-index: 1; flex: 1; min-width: 0; }

.gift-hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #5b9dff, #2f7dff);
  color: #0a1f42;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.gift-hero-title {
  font-family: "Unbounded", sans-serif;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 5px;
  letter-spacing: -0.01em;
}

.gift-hero-desc {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.4;
}

.gift-hero-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5b9dff, #2f7dff);
  color: #0a1f42;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 999px;
  width: 100%;
}

.gift-hero-emoji {
  position: relative;
  z-index: 1;
  font-size: 52px;
  flex-shrink: 0;
  line-height: 1;
  animation: referral-gift-float 3.2s ease-in-out infinite;
}

/* "Пригласить друга" — праздничный хиро-блок с парящей подарочной коробкой
   и мерцающими искрами, синий градиент (в тон --accent, не золото). */
.referral-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(165deg, #0a2a6e 0%, #1655d6 55%, #2f7dff 100%);
  border-radius: var(--radius-xl);
  padding: 32px 22px 26px;
  margin: 6px 0 20px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(22, 85, 214, 0.35);
}

.referral-hero::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.referral-hero-stars { position: absolute; inset: 0; pointer-events: none; }

.referral-hero-stars span {
  position: absolute;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  animation: referral-star-twinkle 2.6s ease-in-out infinite;
}

.referral-hero-stars span:nth-child(1) { top: 18%; left: 20%; animation-delay: 0s; font-size: 12px; }
.referral-hero-stars span:nth-child(2) { top: 30%; right: 18%; animation-delay: 0.5s; font-size: 16px; }
.referral-hero-stars span:nth-child(3) { top: 55%; left: 12%; animation-delay: 1s; font-size: 10px; }
.referral-hero-stars span:nth-child(4) { top: 15%; right: 30%; animation-delay: 1.5s; font-size: 11px; }
.referral-hero-stars span:nth-child(5) { top: 48%; right: 10%; animation-delay: 0.8s; font-size: 13px; }
.referral-hero-stars span:nth-child(6) { top: 8%; left: 42%; animation-delay: 2s; font-size: 10px; }

@keyframes referral-star-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.1); }
}

.referral-hero-gift {
  position: relative;
  z-index: 1;
  font-size: 54px;
  line-height: 1;
  margin-bottom: 14px;
  animation: referral-gift-float 3.2s ease-in-out infinite;
}

@keyframes referral-gift-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

.referral-hero-title {
  position: relative;
  z-index: 1;
  font-family: "Unbounded", sans-serif;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.referral-hero-desc {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.45;
  max-width: 280px;
  margin: 0 0 20px;
}

.referral-hero-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #fff;
  color: #1655d6;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.referral-hero-btn:active { transform: scale(0.98); }

/* "Как это работает" — пронумерованные шаги под хиро-блоком */
.referral-steps { margin-bottom: 18px; }

.referral-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.referral-step:last-child { border-bottom: none; }

.referral-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--hint);
}

.referral-step--reward .referral-step-num {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: transparent;
  font-size: 15px;
}

.referral-step-text { font-size: 14px; line-height: 1.45; padding-top: 3px; }
.referral-step-text strong { font-weight: 700; }

/* Страница "Подарок к покупке" — тот же приём хиро-блока, что и у
   "Пригласить друга" (парящий эмодзи + мерцающие звёзды), в той же синей
   гамме, как и тизер-карточка этого раздела в Меню. */
.gift-detail-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(160deg, #0d0d0d 0%, #10182e 55%, #142138 100%);
  border-radius: var(--radius-xl);
  padding: 32px 22px 26px;
  margin: 6px 0 20px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(47, 125, 255, 0.25);
}

.gift-detail-hero::before {
  content: "";
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 125, 255, 0.35) 0%, rgba(47, 125, 255, 0) 70%);
  pointer-events: none;
}

.gift-detail-stars { position: absolute; inset: 0; pointer-events: none; }

.gift-detail-stars span {
  position: absolute;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  animation: referral-star-twinkle 2.6s ease-in-out infinite;
}

.gift-detail-stars span:nth-child(1) { top: 18%; left: 20%; animation-delay: 0s; font-size: 12px; }
.gift-detail-stars span:nth-child(2) { top: 30%; right: 18%; animation-delay: 0.5s; font-size: 16px; }
.gift-detail-stars span:nth-child(3) { top: 55%; left: 12%; animation-delay: 1s; font-size: 10px; }
.gift-detail-stars span:nth-child(4) { top: 15%; right: 30%; animation-delay: 1.5s; font-size: 11px; }
.gift-detail-stars span:nth-child(5) { top: 48%; right: 10%; animation-delay: 0.8s; font-size: 13px; }
.gift-detail-stars span:nth-child(6) { top: 8%; left: 42%; animation-delay: 2s; font-size: 10px; }

.gift-detail-emoji {
  position: relative;
  z-index: 1;
  font-size: 54px;
  line-height: 1;
  margin-bottom: 14px;
  animation: referral-gift-float 3.2s ease-in-out infinite;
}

.gift-detail-title {
  position: relative;
  z-index: 1;
  font-family: "Unbounded", sans-serif;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.gift-detail-desc {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.45;
  max-width: 280px;
  margin: 0;
}

/* Карточки "что дарим" — иконка + название + категории, вместо списка
   строк с эмодзи-маркерами. */
.gift-item-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.gift-item-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(47, 125, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.gift-item-title { font-weight: 700; font-size: 15px; }
.gift-item-categories { font-size: 13px; color: var(--hint); margin-top: 2px; }

.menu-perks-secondary {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.menu-perk-badge {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.menu-perk-badge .menu-perk-icon { font-size: 17px; flex-shrink: 0; }

/* "Товар недели" — самый доступный товар в категории */
.category-highlight {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  margin: 4px 0 14px;
  overflow: hidden;
  cursor: pointer;
  animation: category-highlight-glow 2.8s ease-in-out infinite;
}

@keyframes category-highlight-glow {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent); }
}

.category-highlight-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.category-highlight-name { font-family: "Unbounded", sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.category-highlight-price { font-size: 14px; font-weight: 700; color: var(--accent); }

.category-highlight-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--photo-bg);
  flex-shrink: 0;
  overflow: hidden;
}

.category-highlight-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* "Похожие товары" на странице товара — горизонтальный ряд, переиспользует
   .product-card целиком (та же вёрстка, что в сетке категории), только
   ширина карточки фиксированная вместо grid-колонки. */
.related-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  margin-bottom: 8px;
}

.related-row::-webkit-scrollbar { display: none; }
.related-row .product-card { flex: 0 0 140px; }

/* Панель сортировки/фильтра над списком товаров категории */
.price-disclaimer { font-size: 12px; color: var(--hint); opacity: 0.8; margin: 4px 0 10px; }

.category-toolbar {
  margin: 0 0 16px;
}

.sort-select {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M6 9l6 6 6-6" stroke="%238e8e93" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Баннер "подпишись на канал" внутри списка товаров категории — синий тон
   берётся из общего --accent (color-mix), а не отдельного хардкод-цвета,
   чтобы не плодить второй, чуть другой оттенок синего в интерфейсе. */
.category-sub-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin: 4px 0 16px;
  cursor: pointer;
}

.category-sub-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.category-sub-icon img { width: 100%; height: 100%; object-fit: cover; }

.category-sub-text { flex: 1; font-size: 13px; font-weight: 600; line-height: 1.35; }

.category-sub-chevron { color: var(--hint); flex-shrink: 0; }

.menu-legal-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--hint);
  text-align: center;
  padding: 18px 12px 4px;
}

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

.menu-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease;
}

.menu-list-item:active { transform: scale(0.98); }

.menu-list-item .menu-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.menu-list-item .menu-item-icon img { width: 100%; height: 100%; object-fit: cover; }

.menu-list-item .menu-item-body { flex: 1; min-width: 0; }
.menu-list-item .menu-item-title { font-weight: 700; font-size: 15px; }
.menu-list-item .menu-item-subtitle { font-size: 13px; color: var(--hint); margin-top: 2px; }
.menu-list-item .menu-item-chevron { color: var(--hint); flex-shrink: 0; }

.menu-page-text {
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-line;
}

.menu-page-text strong { font-weight: 700; }

.menu-map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

/* Category list */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border);
  cursor: pointer;
}

.category-row img { width: 28px; height: 28px; flex-shrink: 0; }

.category-row .meta { display: flex; flex-direction: column; gap: 2px; }
.category-row .meta .label { font-weight: 600; font-size: 15px; }
.category-row .meta .count { font-size: 13px; color: var(--hint); }

.category-row .chevron { margin-left: auto; color: var(--hint); }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}

.product-card:active { transform: scale(0.97); }

.product-card .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--photo-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fav-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  padding: 0;
}

.fav-btn svg { width: 17px; height: 17px; fill: none; stroke: #ffffff; stroke-width: 2; }
.fav-btn.active svg { fill: #e0405f; stroke: #e0405f; }

.fav-btn.pop { animation: fav-btn-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes fav-btn-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.detail-gallery { position: relative; }
.detail-gallery .fav-btn { top: 12px; right: 12px; width: 44px; height: 44px; }
.detail-gallery .fav-btn svg { width: 21px; height: 21px; }

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.product-card .info { padding: 10px 12px 14px; }
.product-card .name { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 13px; margin-bottom: 4px; line-height: 1.3; }
.product-card .price { font-size: 14px; color: var(--accent); font-weight: 700; }
.product-card .price.on-request { color: var(--hint); font-weight: 600; }
.card-trust-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Product detail: photo gallery */
.detail-gallery { margin-top: 8px; }

.gallery-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: var(--radius-xl);
  background: var(--photo-bg);
}

.gallery-scroll::-webkit-scrollbar { display: none; }

.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-slide img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }

.gallery-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }

.gallery-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.15s ease, transform 0.15s ease;
}

.gallery-dots .dot.active { background: var(--accent); transform: scale(1.3); }

.detail-title { font-family: "Unbounded", sans-serif; font-size: 20px; font-weight: 700; letter-spacing: 0; margin: 20px 0 8px; line-height: 1.3; }

.detail-price { font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 14px; }
.promo-old-inline { font-size: 16px; font-weight: 500; color: var(--hint); text-decoration: line-through; }
.promo-sale-inline { color: #2f7dff; }
.detail-price.on-request { color: var(--hint); }

.detail-description { font-size: 15px; line-height: 1.5; color: var(--text); opacity: 0.85; margin-bottom: 18px; }

/* Подарок ("🎁 Х в подарок") — отдельной строкой, а не приклеен к концу
   описания через пробел: раньше эмодзи иногда оставался в конце строки
   при переносе, а текст подарка съезжал на новую строку сам по себе. */
.detail-gift-note {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #1655d6;
  background: rgba(47, 125, 255, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
  margin: -8px 0 18px;
}

/* Обязательное по закону предупреждение (например, про RuStore у iPhone) —
   намеренно НЕ похоже на "плюс"-плашки (подарок/новинка): приглушённый серый
   цвет и текст мельче, чтобы не выглядело как маркетинговая фишка. */
.detail-legal-note {
  font-size: 12px;
  color: var(--hint);
  line-height: 1.4;
  margin: -8px 0 18px;
}

/* Комплектация ("что в коробке") на карточке товара */
.box-contents {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.box-contents-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}
.box-contents-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.box-contents-list li { font-size: 14px; line-height: 1.4; color: var(--text); padding-left: 22px; position: relative; }
.box-contents-list li::before { content: '✅'; position: absolute; left: 0; top: 0; font-size: 11px; }

/* "Обзор" — развёрнутый текст про фишки товара (только у топовых моделей) */
.detail-overview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 18px;
}
.detail-overview-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}
.detail-overview-text { font-size: 14px; line-height: 1.5; color: var(--text); white-space: pre-line; }
.detail-overview-section { margin-bottom: 12px; }
.detail-overview-section:last-child { margin-bottom: 0; }
.detail-overview-subtitle { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 3px; }

/* Подсказка "подходящий аксессуар" (например, Apple Pencil к этому iPad) */
.accessory-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 18px;
  cursor: pointer;
}

.accessory-hint-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--photo-bg);
  flex-shrink: 0;
  overflow: hidden;
}

.accessory-hint-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.accessory-hint-text { flex: 1; min-width: 0; }
.accessory-hint-label { font-size: 12px; color: var(--hint); font-weight: 600; margin-bottom: 2px; }
.accessory-hint-name { font-size: 14px; font-weight: 700; }
.accessory-hint svg { color: var(--hint); flex-shrink: 0; }

.accessory-hint-add {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.accessory-hint-add:active { transform: scale(0.92); }

.option-group { margin-bottom: 16px; }
.option-group .option-label { font-size: 13px; font-weight: 600; color: var(--hint); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 8px; }

.warranty-hint { font-size: 13px; line-height: 1.5; color: var(--hint); margin: 0 0 10px; }

.memory-warning {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md, 10px);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  font-size: 13px;
  line-height: 1.4;
}

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

/* Память: у части товаров (iPhone Air/17/17e и т.д.) один и тот же объём
   встречается дважды — под eSIM и под физическую SIM. В таблице эти строки
   всегда идут парами подряд (сначала eSIM, потом 1 SIM), поэтому сетка в
   2 колонки сама укладывает один объём на одну строку — эстетичнее, чем
   произвольный перенос через flex-wrap, и не требует менять формат данных. */
.chip-row[data-dim="memory"] { display: grid; grid-template-columns: 1fr 1fr; }
.chip-row[data-dim="memory"] .chip { text-align: center; }

.chip {
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}

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

.chip.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.order-btn {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-text);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 28%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.order-btn:active { transform: scale(0.98); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 22%, transparent); }

.order-btn.disabled {
  background: var(--surface);
  color: var(--hint);
  pointer-events: none;
  box-shadow: none;
}

.notify-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  margin-top: 10px;
}

.notify-btn:disabled { opacity: 0.6; pointer-events: none; }

/* Reviews */
.reviews-section { margin-top: 24px; }

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.reviews-stars { color: #f5a623; font-size: 15px; letter-spacing: 1px; }
.reviews-avg { font-weight: 700; font-size: 15px; }
.reviews-count { color: var(--hint); font-size: 13px; }

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

.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.review-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.review-card-name { font-weight: 600; font-size: 14px; }
.review-card-stars { color: #f5a623; font-size: 12px; letter-spacing: 1px; }
.review-card-text { font-size: 14px; line-height: 1.45; opacity: 0.9; white-space: pre-wrap; }

/* Quantity stepper */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  width: fit-content;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-value { font-size: 16px; font-weight: 700; min-width: 20px; text-align: center; }

@keyframes qty-pop {
  0% { transform: scale(0.85); opacity: 0.6; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* Статус "В корзине" на карточке товара — заменяет кнопку "В корзину" один
   раз товар уже добавлен: слева статус, справа живой счётчик количества. */
.cart-status-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
  animation: qty-pop 0.25s ease;
}

.cart-status-label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #34c759;
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(52, 199, 89, 0.32);
}

.qty-stepper--cart {
  width: auto;
  padding: 6px 14px;
}

.qty-stepper--cart .qty-btn { width: 38px; height: 38px; font-size: 20px; }

/* Компактный счётчик в подсказке аксессуара — заменяет "+" собой же,
   становясь живым отражением количества этого аксессуара в корзине. */
.qty-stepper--compact {
  width: auto;
  padding: 0;
  gap: 8px;
  border: none;
  background: none;
  animation: qty-pop 0.25s ease;
}

.qty-stepper--compact .qty-btn { width: 32px; height: 32px; font-size: 16px; background: var(--bg); }
.qty-stepper--compact .qty-value { font-size: 14px; min-width: 14px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  z-index: 200;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  animation: toast-in-out 2s ease forwards;
}

@keyframes toast-in-out {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 10px); }
}

/* Cart */
.cart-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.cart-item {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
}

.cart-item .cart-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--photo-bg);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-item .cart-item-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.cart-item .cart-item-body { flex: 1; min-width: 0; }
.cart-item .cart-item-name { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.cart-item .cart-item-price { font-size: 13px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }

.cart-item .cart-item-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.cart-item .qty-stepper { padding: 4px 10px; gap: 10px; }
.cart-item .qty-btn { width: 28px; height: 28px; font-size: 15px; }

.cart-item-remove {
  background: none;
  border: none;
  color: var(--hint);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  font-size: 17px;
  font-weight: 800;
}

.cart-total .cart-total-value { color: var(--accent); }

/* Checkout / order form */
.order-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin: 8px 0 20px;
}

.order-summary-label { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.order-summary-price { font-size: 14px; color: var(--accent); font-weight: 700; }

.delivery-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.delivery-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}

.delivery-option.active { border-color: var(--accent); }

.delivery-option-label { font-weight: 700; font-size: 15px; }
.delivery-option-hint { font-size: 13px; color: var(--hint); margin-top: 2px; }

.delivery-cost-hint { font-size: 13px; line-height: 1.5; color: var(--hint); margin: 10px 0 0; }

.delivery-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

.delivery-option.active .delivery-radio { border-color: var(--accent); }
.delivery-option.active .delivery-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.form-field { margin-bottom: 10px; }

.form-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.form-input::placeholder { color: var(--hint); }
.form-input:focus { outline: none; border-color: var(--accent); }

textarea.form-input { resize: vertical; min-height: 60px; }

.form-error {
  color: #ff3b30;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.pm-notice {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 16px;
}

.pm-notice-btn {
  display: block;
  margin-top: 8px;
  padding: 9px 16px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* Fullscreen success overlay */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  animation: success-fade-in 0.25s ease;
  overflow: hidden;
}

.success-overlay > * { position: relative; z-index: 1; }

.confetti-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -12px;
  width: 9px;
  height: 14px;
  opacity: 0.9;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(0.4, 0.1, 0.6, 0.9);
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  transform: rotate(var(--rotate-start, 0deg));
}

@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(var(--rotate-start, 0deg)); opacity: 1; }
  100% { transform: translate(var(--drift, 0px), 115vh) rotate(calc(var(--rotate-start, 0deg) + 540deg)); opacity: 0.9; }
}

@keyframes success-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.success-check {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #34c759;
  color: #fff;
  font-size: 40px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  animation: success-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes success-pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success-title { font-family: "Unbounded", sans-serif; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.success-text { font-size: 15px; color: var(--hint); margin-bottom: 32px; max-width: 280px; }
.success-overlay .order-btn { max-width: 280px; }

/* News */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.news-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 16px 18px;
  transition: transform 0.15s ease;
}

.news-card .news-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.news-card .news-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.news-card .news-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  opacity: 0.8;
  margin: 0;
  /* Текст от ИИ приходит с переносами строк (заголовок, пустая строка,
     пункты со стрелочками) — без этого браузер схлопывает их в один абзац. */
  white-space: pre-line;
}

.news-card--link {
  cursor: pointer;
}

.news-card--link:active { transform: scale(0.98); }

.news-card--link .news-open {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin: 8px 0 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  color: var(--hint);
  padding: 60px 24px;
  font-size: 15px;
  line-height: 1.5;
}

.empty-state p { margin: 0; max-width: 280px; }

.empty-icon {
  font-size: 44px;
  line-height: 1;
  opacity: 0.5;
  animation: empty-icon-float 3.6s ease-in-out infinite;
}

@keyframes empty-icon-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

.empty-cta {
  margin-top: 4px;
  padding: 12px 26px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* "Мои заказы" */
.orders-list { display: flex; flex-direction: column; gap: 12px; }

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

.order-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.order-card-number { font-size: 13px; font-weight: 700; color: var(--hint); }
.order-card-date { font-size: 13px; color: var(--hint); }
.order-card-product { font-size: 14px; font-weight: 600; line-height: 1.4; white-space: pre-wrap; margin-bottom: 10px; }
.order-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-card-price { font-size: 15px; font-weight: 700; color: var(--accent); }
.order-card-delivery { font-size: 13px; color: var(--hint); }

.order-progress { margin-top: 14px; }
.order-progress-track {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin: 12px 8px 8px;
}
.order-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}
.order-progress-icon {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: left 0.5s ease;
}
.order-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--hint);
}

.order-progress-labels-multi span { flex: 1; text-align: center; }
.order-progress-labels-multi span:first-child { text-align: left; }
.order-progress-labels-multi span:last-child { text-align: right; }
.order-progress-labels-multi span.reached { color: var(--accent); font-weight: 600; }

.order-progress-cancelled {
  margin-top: 14px;
  font-size: 13px;
  color: #e5484d;
  background: rgba(229, 72, 77, 0.1);
  border: 1px solid rgba(229, 72, 77, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

/* "Пригласить друга" */
.referral-code-box {
  margin: 16px 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}
.referral-code-label { font-size: 13px; color: var(--hint); margin-bottom: 6px; }
.referral-code-value { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: var(--accent); }

.referral-link-box { margin: 0 0 16px; }
.referral-link-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.order-btn + .order-btn { margin-top: 10px; }
.order-btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

/* Сравнение моделей */
.compare-toggle-btn {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.compare-toggle-btn.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

.product-card.compare-selectable { cursor: pointer; }
.product-card.compare-selected { outline: 2px solid var(--accent); border-radius: var(--radius-md); }

.compare-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-bar {
  position: sticky;
  bottom: 76px;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--hint);
}
.compare-bar-btn {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.compare-bar-btn:disabled { opacity: 0.4; cursor: default; }

.compare-wrap { overflow-x: auto; margin-top: 8px; }
.compare-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
}
.compare-table th, .compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}
.compare-table tbody th {
  color: var(--hint);
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: var(--bg);
}
.compare-table td { color: var(--text); font-weight: 600; }
.compare-col-head {
  text-align: center;
  cursor: pointer;
  min-width: 130px;
}
.compare-col-head img { width: 64px; height: 64px; object-fit: contain; }
.compare-name { font-size: 13px; font-weight: 700; margin-top: 4px; }

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 36px 0 28px;
}

.loading-text {
  display: flex;
}

.loading-text-words {
  display: inline-block;
  font-family: "Unbounded", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  animation: loading-blur 1.5s linear infinite alternate;
}

.loading-text-words.loading-space { width: 8px; }

.loading-text-words:nth-child(1) { animation-delay: 0s; }
.loading-text-words:nth-child(2) { animation-delay: 0.2s; }
.loading-text-words:nth-child(3) { animation-delay: 0.4s; }
.loading-text-words:nth-child(4) { animation-delay: 0.6s; }
.loading-text-words:nth-child(5) { animation-delay: 0.8s; }
.loading-text-words:nth-child(6) { animation-delay: 1s; }
.loading-text-words:nth-child(7) { animation-delay: 1.2s; }
.loading-text-words:nth-child(8) { animation-delay: 1.4s; }
.loading-text-words:nth-child(9) { animation-delay: 1.6s; }
.loading-text-words:nth-child(10) { animation-delay: 1.8s; }

@keyframes loading-blur {
  0% { filter: blur(0px); }
  100% { filter: blur(4px); }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 37%, var(--surface) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-md);
}

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

/* Error page: shown when the initial catalog load fails completely */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 4px 40px;
  min-height: 65vh;
}

.error-panel {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 260px;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, #1c1c22 0%, #2b2b33 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: error-panel-in 0.6s cubic-bezier(0.3, 0.8, 1, 1.05) both;
}

@keyframes error-panel-in {
  0% { opacity: 0; transform: scale(0.92); }
}

.error-glow {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.55) 0%, rgba(10, 132, 255, 0) 70%);
  filter: blur(6px);
  animation: error-glow-pulse 3s ease-in-out infinite;
}

@keyframes error-glow-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
}

.error-particles { position: absolute; inset: 0; }

.error-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0a84ff;
  box-shadow: 0 0 6px 1px rgba(10, 132, 255, 0.8);
  opacity: 0;
  animation: error-particle-float 4.5s ease-in infinite;
}

.error-particles span:nth-child(1) { left: 22%; top: 78%; animation-delay: 0s; }
.error-particles span:nth-child(2) { left: 68%; top: 82%; background: #7c5cff; box-shadow: 0 0 6px 1px rgba(124, 92, 255, 0.8); animation-delay: 0.7s; }
.error-particles span:nth-child(3) { left: 80%; top: 70%; animation-delay: 1.4s; }
.error-particles span:nth-child(4) { left: 15%; top: 65%; background: #7c5cff; box-shadow: 0 0 6px 1px rgba(124, 92, 255, 0.8); animation-delay: 2.1s; }
.error-particles span:nth-child(5) { left: 50%; top: 85%; animation-delay: 2.8s; }
.error-particles span:nth-child(6) { left: 40%; top: 72%; background: #7c5cff; box-shadow: 0 0 6px 1px rgba(124, 92, 255, 0.8); animation-delay: 3.5s; }

@keyframes error-particle-float {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  15% { opacity: 0.9; }
  85% { opacity: 0.5; }
  100% { transform: translateY(-130px) scale(1); opacity: 0; }
}

.error-phone {
  position: relative;
  z-index: 2;
  width: 108px;
  height: 190px;
  border-radius: 22px;
  background: linear-gradient(160deg, #45454f 0%, #202027 100%);
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 14px 26px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: error-phone-glitch 4.5s ease-in-out infinite;
}

@keyframes error-phone-glitch {
  0%, 91%, 100% { transform: translateX(0); }
  92% { transform: translateX(-2px); }
  94% { transform: translateX(2px); }
  96% { transform: translateX(-1px); }
  98% { transform: translateX(0); }
}

.error-phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.5);
}

.error-phone-home {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
}

.error-phone-screen {
  position: relative;
  width: 88px;
  height: 160px;
  border-radius: 14px;
  background: #0c0c10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.error-phone-screen svg { width: 30px; height: 30px; stroke: #0a84ff; }

.error-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 18px;
  background: linear-gradient(180deg, rgba(10, 132, 255, 0) 0%, rgba(10, 132, 255, 0.35) 50%, rgba(10, 132, 255, 0) 100%);
  animation: error-scanline-move 2.6s ease-in-out infinite;
}

@keyframes error-scanline-move {
  0% { transform: translateY(-20px); }
  100% { transform: translateY(180px); }
}

.error-title {
  font-family: "Unbounded", sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 6px;
}

.error-text {
  max-width: 280px;
  color: var(--hint);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.error-retry-btn {
  padding: 13px 28px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 28%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.error-retry-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 22%, transparent);
}
