/* =========================================================
   Fiorito Eleganza — мини-приложение Telegram и сайт
   Тёмный лесной зелёный, слоновая кость и тёплое золото.
   Золото — только для цен, активных состояний и главной кнопки;
   всё остальное держится на воздухе и тонких линиях.
   ========================================================= */

* { box-sizing: border-box; }

/* Шрифты — со своего сервера (webapp/fonts, лицензия OFL): без двух лишних
   соединений с Google при открытии и без зависимости от его доступности. */
@font-face { font-family: "Prata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/prata-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Prata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/prata-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/manrope-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --ink: #14231C;            /* фон страницы */
  --ink-raised: #182A21;     /* приподнятые поверхности на фоне */
  --surface: #1B2F25;        /* выезжающие окна */
  --surface-2: #233A2E;      /* заглушки фото, поля */
  --field: rgba(8, 16, 12, 0.32);
  --line: rgba(var(--tint-rgb), 0.08);
  --line-strong: rgba(var(--tint-rgb), 0.14);
  --line-gold: rgba(201, 161, 90, 0.34);
  --ivory: #F5EEE6;
  --ivory-dim: #BAC0B7;
  --muted: #8D978E;
  --gold: #C9A15A;
  --gold-light: #E3C68D;
  --rose: #C9A15A;           /* исторически — цвет главной кнопки */
  --sage: #93AA84;
  --danger: #E3907F;
  --heart: #EE8A9F;
  /* Для обеих тем: что меняется, а что всегда одинаково */
  --bg-rgb: 20, 35, 28;          /* фон в rgb — для растушёвки фото в фон */
  --tint-rgb: 246, 236, 228;     /* цвет текста в rgb — для тонких подложек и линий */
  --glow: var(--glow);               /* мягкое свечение за картой сертификата */
  --on-photo: #F5EEE6;           /* текст поверх фото — светлый в любой теме */
  --on-photo-gold: #E3C68D;
  --on-gold: #14231C;            /* текст на золотой подложке */
  --btn-bg: var(--gold);
  --btn-fg: #14231C;
  --btn-shadow: 0 10px 24px rgba(201, 161, 90, 0.18);
  --glass: rgba(27, 47, 37, 0.9);
  --backdrop: rgba(6, 12, 9, 0.6);
  --backdrop-strong: rgba(8, 14, 11, 0.84);
  --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.4);
  --shadow-sheet: 0 -12px 40px rgba(0, 0, 0, 0.35);
  --card-shadow: none;
  --warn: #E8A87C;
  --serif: 'Prata', Georgia, 'Times New Roman', serif;   /* антиква с кириллицей: у Fraunces её нет */
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --gutter: 20px;
}

/* ---------- Тема «Жемчужная» ----------
   Светлая пара к изумрудной: жемчужный фон с пудровым отсветом, текст —
   глубокий изумруд, золото темнее (чтобы читалось на светлом), главная
   кнопка — изумрудная. Включается сама, если в Telegram (или на телефоне)
   светлая тема, или кнопкой в шапке; выбор запоминается (app.js, applyTheme). */
html[data-theme="pearl"] {
  color-scheme: light;
  --ink: #F6F0E8;
  --ink-raised: #FFFCF8;
  --surface: #FBF6F0;
  --surface-2: #EDE3D6;
  --field: rgba(255, 255, 255, 0.82);
  --bg-rgb: 246, 240, 232;
  --tint-rgb: 31, 52, 41;
  --line: rgba(31, 52, 41, 0.1);
  --line-strong: rgba(31, 52, 41, 0.17);
  --line-gold: rgba(160, 122, 56, 0.42);
  --ivory: #1C3027;
  --ivory-dim: #4D5D53;
  --muted: #7C857C;
  --gold: #A9843F;
  --gold-light: #8C6A2C;
  --sage: #557049;
  --danger: #B4513C;
  --heart: #D35C78;
  --glow: #FFFFFF;
  --btn-bg: #1F3A2D;
  --btn-fg: #F5EEE6;
  --btn-shadow: 0 10px 24px rgba(31, 58, 45, 0.22);
  --glass: rgba(255, 252, 248, 0.9);
  --backdrop: rgba(28, 38, 32, 0.38);
  --backdrop-strong: rgba(28, 38, 32, 0.6);
  --shadow-sm: 0 6px 14px rgba(92, 66, 44, 0.2);
  --shadow-md: 0 8px 20px rgba(92, 66, 44, 0.22);
  --shadow-lg: 0 16px 36px rgba(92, 66, 44, 0.16);
  --shadow-sheet: 0 -12px 40px rgba(92, 66, 44, 0.14);
  --card-shadow: 0 10px 26px rgba(92, 66, 44, 0.1);
  --warn: #B4602E;
}
/* Пудровый отсвет сверху и шалфейный сбоку — как свет в цветочной мастерской */
html[data-theme="pearl"] body {
  background:
    radial-gradient(760px 460px at 112% -6%, rgba(236, 196, 200, 0.42), transparent 62%),
    radial-gradient(620px 520px at -22% 34%, rgba(198, 214, 196, 0.3), transparent 62%),
    var(--ink);
}
html[data-theme="pearl"] .hero { background: transparent; }
html[data-theme="pearl"] .hero-title { text-shadow: none; }
html[data-theme="pearl"] .hero-eyebrow,
html[data-theme="pearl"] .hero-rating { color: var(--gold-light); }
html[data-theme="pearl"] .review-card,
html[data-theme="pearl"] .co-card,
html[data-theme="pearl"] .order-row,
html[data-theme="pearl"] .filter-panel { border-color: transparent; box-shadow: var(--card-shadow); }
html[data-theme="pearl"] .product-photo.has-photo,
html[data-theme="pearl"] .hit-photo,
html[data-theme="pearl"] .collection-card,
html[data-theme="pearl"] .tile,
html[data-theme="pearl"] .category-head { box-shadow: var(--card-shadow); }
html[data-theme="pearl"] .search-input { border-color: transparent; box-shadow: var(--card-shadow); }
html[data-theme="pearl"] .switch-track::after { box-shadow: 0 1px 3px rgba(92, 66, 44, 0.3); }
html[data-theme="pearl"] .sheet-handle { background: rgba(31, 52, 41, 0.18); }
html[data-theme="pearl"] .sheet-product .sheet-handle { background: rgba(255, 255, 255, 0.7); }

/* Кнопка темы — в углу первого экрана, поверх фото */
.theme-toggle {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(245, 238, 230, 0.22);
  background: rgba(12, 22, 17, 0.38);
  color: var(--on-photo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.theme-toggle:active { transform: scale(0.92); }
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease !important;
}

html { font-synthesis: none; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { padding-bottom: 104px; }

::selection { background: var(--gold); color: var(--on-gold); }

button { font-family: var(--sans); }

/* ---------- Первый экран ---------- */

.hero { position: relative; background: var(--ink); }

.hero-media {
  position: relative;
  height: min(64vh, 480px);
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  display: block;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), 0) 38%, rgba(var(--bg-rgb), 0.62) 66%, var(--ink) 98%);
}

.hero-content {
  position: relative;
  margin-top: -158px;
  padding: 0 var(--gutter) 4px;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 46px;
  line-height: 0.96;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  color: var(--ivory);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ivory-dim);
  margin: 0;
  max-width: 32ch;
}

.hero-meta { margin-top: 14px; }
.hero-meta:empty { display: none; }
.hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold-light);
}

.hero-tier {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.hero-tier:empty { display: none; }

.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 100px;
  border: 1px solid var(--line-gold);
  color: var(--gold-light);
  font-size: 12.5px;
  font-weight: 700;
}

.tier-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: rgba(var(--tint-rgb), 0.04);
  color: var(--ivory);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.tier-link:active { border-color: var(--gold); color: var(--gold-light); }

/* ---------- Поиск ---------- */

.search-row { padding: 22px var(--gutter) 0; }

.search-wrap { position: relative; }

.search-input {
  width: 100%;
  padding: 13px 42px 13px 44px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--ink-raised);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease;
}
.search-input:focus { outline: none; border-color: var(--line-gold); }
.search-input::placeholder { color: var(--muted); }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* Своя кнопка очистки: системный крестик у type="search" в Telegram-вебвью
   то есть, то нет, и на него нельзя положить сброс фильтра. */
.search-clear {
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(var(--tint-rgb), 0.1);
  color: var(--ivory);
  cursor: pointer;
}
.search-clear.visible { display: inline-flex; }

.search-empty { padding: 30px 8px; text-align: center; }
.search-empty-title {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ivory);
  margin: 0 0 8px;
}
.search-empty-hint {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ivory-dim);
  margin: 0 auto 18px;
  max-width: 34ch;
}

/* ---------- Заголовки разделов ---------- */

.section-head { padding: 0 var(--gutter); margin: 38px 0 14px; }
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 23px;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
  color: var(--ivory);
}
.section-sub { margin: 5px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.catalog-head { margin-top: 44px; }

/* ---------- Коллекции (разделы с обложками) ---------- */

.collections-strip,
.hits-strip,
.reviews-strip {
  display: flex;
  gap: 12px;
  padding: 0 var(--gutter) 4px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  -webkit-overflow-scrolling: touch;
}
.collections-strip::-webkit-scrollbar,
.hits-strip::-webkit-scrollbar,
.reviews-strip::-webkit-scrollbar { display: none; }

.collection-card {
  position: relative;
  flex: 0 0 136px;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2) center 38% / cover no-repeat;
  scroll-snap-align: start;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.35s ease;
}
.collection-card:not(.loaded) { opacity: 0.6; }
.collection-card:active { transform: scale(0.98); }
.collection-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 22, 17, 0) 40%, rgba(12, 22, 17, 0.88) 100%);
}
.collection-name {
  position: absolute;
  left: 12px;
  right: 8px;
  bottom: 29px;
  z-index: 1;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.1;
  color: var(--on-photo);
}
/* Сертификаты: сама карта сертификата небольшой «открыткой» над названием */
.collection-card-cert {
  background: radial-gradient(120% 90% at 50% 32%, var(--glow) 0%, var(--ink-raised) 72%);
  box-shadow: inset 0 0 0 1px var(--line-gold);
}
.collection-card-cert::after { display: none; }
.collection-cert-img {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 76px;
  height: 76px;
  margin-left: -38px;
  border-radius: 5px;
  background: center / cover no-repeat;
  box-shadow: var(--shadow-md);
  transform: rotate(5deg);
  transition: opacity 0.35s ease;
}
.collection-cert-img:not(.loaded) { opacity: 0; }
.collection-price {
  position: absolute;
  left: 12px;
  right: 10px;
  bottom: 12px;
  z-index: 1;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--on-photo-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collection-card-cert .collection-name { color: var(--ivory); }
.collection-card-cert .collection-price { color: var(--gold-light); }

/* ---------- Хиты продаж ---------- */

.hit-card {
  flex: 0 0 150px;
  scroll-snap-align: start;
  cursor: pointer;
}
.hit-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2) center/cover no-repeat;
  transition: opacity 0.35s ease;
}
.hit-photo:not(.loaded) { opacity: 0.6; }
.hit-info { padding: 9px 2px 0; }
.hit-name {
  margin: 0 0 3px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ivory);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hit-price { font-family: var(--serif); font-size: 15px; color: var(--gold); }

/* ---------- Соберите свой букет ---------- */

/* Розы — большой плиткой слева, пионовидные и гортензии — двумя справа. */
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(2, 132px);
  gap: 10px;
  padding: 0 var(--gutter);
}
.tiles .tile:first-child { grid-row: span 2; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  padding: 13px;
  border: none;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(12, 22, 17, 0) 35%, rgba(12, 22, 17, 0.9) 100%),
    var(--tile-bg) center 35% / cover no-repeat,
    var(--surface-2);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease;
}
.tile:active { transform: scale(0.98); }
.tile-title {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.12;
  color: var(--on-photo);
}
.tiles .tile:first-child .tile-title { font-size: 22px; }
.tile-sub { font-size: 11.5px; font-weight: 600; color: var(--on-photo-gold); }

/* ---------- Отзывы ---------- */

/* Карточки одной высоты: подпись всегда внизу, у отзывов без фото —
   кавычка и больше строк текста, чтобы карточка не зияла пустотой.
   Фото клиентов разных пропорций (скриншоты, вертикальные и горизонтальные
   снимки) — показываем целиком, не обрезая букет: кадр 4:5, само фото
   вписано, а поля заполнены его же размытой копией. */
.review-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  width: 256px;
  min-height: 300px;
  border-radius: 18px;
  background: var(--ink-raised);
  border: 1px solid var(--line);
  overflow: hidden;
  scroll-snap-align: start;
}
.review-photo {
  position: relative;
  flex: none;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface-2) center/cover no-repeat;
  cursor: zoom-in;
  transition: opacity 0.35s ease;
}
.review-photo::before,
.review-photo::after {
  content: "";
  position: absolute;
  background: inherit;
  background-repeat: no-repeat;
  background-position: center;
}
.review-photo::before {
  inset: -24px;
  background-size: cover;
  filter: blur(18px) brightness(0.6) saturate(1.1);
}
.review-photo::after { inset: 0; background-color: transparent; background-size: contain; }
.review-photo:not(.loaded) { opacity: 0.6; }
.review-body { flex: 1; display: flex; flex-direction: column; padding: 14px 16px 15px; }
/* Отзыв без фото — «цитата»: текст по центру карточки, подпись внизу
   (три auto-отступа делят свободное место). */
.review-card:not(.has-photo) .review-body { padding: 18px 20px 15px; }
.review-card:not(.has-photo) .review-body::before {
  content: "“";
  display: block;
  height: 34px;
  margin: auto 0 4px -2px;
  font-family: var(--serif);
  font-size: 60px;
  line-height: 1;
  color: var(--gold);
  opacity: 0.55;
}
.review-stars {
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.review-stars-off { color: rgba(201, 161, 90, 0.25); }
.review-comment {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ivory);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-card:not(.has-photo) .review-comment {
  -webkit-line-clamp: 11;
  margin-bottom: auto;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
}
.review-product {
  margin-top: auto;
  padding-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Пригласить друга ---------- */

.referral-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 30px var(--gutter) 0;
  padding: 16px 16px 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line-gold);
  background: linear-gradient(120deg, rgba(201, 161, 90, 0.12), rgba(201, 161, 90, 0.02));
}
.referral-promo-text { display: flex; flex-direction: column; gap: 4px; }
.referral-promo-title { font-family: var(--serif); font-size: 17px; color: var(--ivory); }
.referral-promo-sub { font-size: 12.5px; color: var(--ivory-dim); line-height: 1.4; }
.referral-promo-btn {
  flex: none;
  padding: 10px 15px;
  border-radius: 100px;
  border: none;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Каталог: поводы, фильтры, сортировка ---------- */

.filters { padding: 0 var(--gutter); }

.occasion-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 2px;
}
.occasion-tabs::-webkit-scrollbar { display: none; }
.occasion-tab {
  flex: none;
  padding: 8px 15px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory-dim);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.occasion-tab.active {
  color: var(--ink);
  background: var(--ivory);
  border-color: var(--ivory);
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 2px;
}
.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.toolbar-btn.open { border-color: var(--gold); color: var(--gold-light); }
.toolbar-icon { display: inline-flex; color: var(--gold); }
.toolbar-heart svg { width: 15px; height: 15px; color: var(--heart); }
.toolbar-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 100px;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sort-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}
.sort-wrap::after {
  content: "";
  position: absolute;
  right: 2px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--ivory-dim);
  border-bottom: 1.5px solid var(--ivory-dim);
  transform: translateY(-2px) rotate(45deg);
  pointer-events: none;
}
.sort-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  padding: 8px 16px 8px 0;
  color: var(--ivory-dim);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  cursor: pointer;
}
.sort-select option { color: var(--ink); background: var(--ivory); }

.filter-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 10px 0 4px;
  padding: 16px;
  border-radius: 16px;
  background: var(--ink-raised);
  border: 1px solid var(--line);
  animation: panel-in 0.2s ease;
}
@keyframes panel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.filter-group-label {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  padding: 7px 13px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-chip.active { color: var(--on-gold); background: var(--gold); border-color: var(--gold); }
.filter-reset {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  color: var(--gold-light);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.filter-found { color: var(--muted); font-size: 13px; margin: 6px 0 0; }

.wish-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 14px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(201, 161, 90, 0.16), rgba(201, 161, 90, 0.04));
  border: 1px solid var(--line-gold);
}
.wish-banner strong { display: block; font-size: 15px; }
.wish-banner span { color: var(--ivory-dim); font-size: 13px; }

/* ---------- Каталог ---------- */

.catalog { padding: 4px var(--gutter) 8px; }

.loading {
  padding: 60px 0;
  text-align: center;
  color: var(--ivory-dim);
  font-size: 14px;
}

.category-block { padding-top: 26px; }

/* Заставка раздела: обложка под название, затемнение слева под текст. */
.category-head {
  position: relative;
  height: 136px;
  margin-bottom: 18px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
}
.category-cover {
  position: absolute;
  inset: 0;
  background: center 42% / cover no-repeat;
  transition: opacity 0.4s ease;
}
.category-cover:not(.loaded) { opacity: 0; }
.category-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 22, 17, 0.9) 0%, rgba(12, 22, 17, 0.55) 52%, rgba(12, 22, 17, 0.08) 100%);
}
.category-head-text {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
}
.category-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0 0 5px;
  color: var(--on-photo);
}
.category-sub { font-size: 12.5px; font-weight: 600; color: var(--on-photo-gold); }
.category-head-cert .category-title { color: var(--ivory); }
.category-head-cert .category-sub { color: var(--gold-light); }

/* Сертификаты: сама карта сертификата справа, название слева — цифры на
   карте не спорят с заголовком. */
.category-head-cert {
  border: 1px solid var(--line-gold);
  background: radial-gradient(120% 150% at 88% 50%, var(--glow) 0%, var(--ink-raised) 62%);
}
.category-head-cert::after { display: none; }
.category-head-cert .category-cover {
  inset: auto;
  top: 50%;
  right: 20px;
  width: 88px;
  height: 88px;
  border-radius: 6px;
  background-position: center;
  box-shadow: var(--shadow-md);
  transform: translateY(-50%) rotate(5deg);
}
.category-head-cert .category-head-text { right: 120px; }

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 12px;
}

/* Карточки в ряду одной высоты, цена прижата к низу: в соседних карточках
   цены стоят на одной линии, даже если название в одну строку, а рядом в две. */
.product-card,
.cert-custom-card { cursor: pointer; min-width: 0; display: flex; flex-direction: column; }

.product-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
/* Приглушение — только для заглушки, когда фото у композиции ещё нет */
.product-photo:not(.has-photo) { opacity: 0.55; }
/* Фото проявляется, когда догрузилось (ленивая загрузка). */
.product-photo.has-photo { transition: opacity 0.35s ease; }
.product-photo.has-photo:not(.loaded) { opacity: 0.55; }

.product-info { flex: 1; display: flex; flex-direction: column; padding: 10px 2px 0; }

.product-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 5px;
  color: var(--ivory);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.product-price {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--gold);
  white-space: nowrap;
}
.product-price-old {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 4px;
}
.product-number {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Метки поверх фото */
.product-badges {
  position: absolute;
  left: 8px;
  top: 8px;
  right: 46px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.new-badge,
.popular-badge,
.video-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 100px;
  white-space: nowrap;
}
.new-badge { color: var(--ink); background: var(--ivory); }
.popular-badge,
.video-badge {
  color: var(--on-photo);
  background: rgba(12, 22, 17, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.sheet-desc .popular-badge {
  color: var(--gold-light);
  background: rgba(201, 161, 90, 0.12);
  margin-right: 6px;
}

/* «В избранное» и «в корзину» на фото */
.fav-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(12, 22, 17, 0.42);
  color: var(--on-photo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.fav-btn svg { width: 16px; height: 16px; }
.fav-btn.active { color: var(--heart); background: rgba(245, 238, 230, 0.94); }

.quick-add {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--btn-bg);
  color: var(--btn-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.quick-add:active { transform: scale(0.9); }
.quick-add.added { background: var(--ivory); color: var(--ink); }

/* Сертификат на свою сумму — карточкой в разделе сертификатов */
.cert-custom-photo {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  border: 1px solid var(--line-gold);
  background:
    radial-gradient(circle at 70% 25%, rgba(201, 161, 90, 0.3), transparent 60%),
    linear-gradient(150deg, var(--surface-2), var(--ink-raised));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--gold);
}
.cert-custom-photo span {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ivory);
}

/* ---------- Для особых случаев ---------- */

.services { padding-bottom: 8px; }
.service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: calc(100% - 2 * var(--gutter));
  margin: 0 var(--gutter);
  padding: 16px 0;
  border: none;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ivory);
  text-align: left;
  cursor: pointer;
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-text { display: flex; flex-direction: column; gap: 4px; }
.service-title { font-family: var(--serif); font-size: 17px; color: var(--ivory); }
.service-sub { font-size: 12.5px; color: var(--muted); }
.service-arrow { flex: none; color: var(--gold); }

/* ---------- Подвал ---------- */

.site-footer { padding: 34px var(--gutter) 22px; text-align: center; }
.footer-brand {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ivory);
  letter-spacing: 0.01em;
}
.footer-sub {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Ссылки на страницы сайта (в браузере; внутри Telegram скрыты) */
.web-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: center;
  padding: 0 0 26px;
  font-size: 13px;
}
.web-links a { color: var(--ivory-dim); text-decoration: none; }
.web-links a:hover { color: var(--gold-light); }
.in-telegram .web-links { display: none; }

/* ---------- Выезжающие окна ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 20;
}
.sheet-backdrop.visible { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(.32, .72, 0, 1);
  z-index: 30;
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: var(--shadow-sheet);
}
.sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 38px; height: 4px;
  background: rgba(var(--tint-rgb), 0.22);
  border-radius: 4px;
  margin: 10px auto 6px;
}

.sheet-body { position: relative; padding: 18px var(--gutter) 30px; }

.sheet-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(var(--tint-rgb), 0.05);
  color: var(--ivory);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.sheet-name {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 46px 10px 0;
}

.sheet-desc {
  font-size: 14.5px;
  color: var(--ivory-dim);
  line-height: 1.6;
  margin: 0 0 18px;
}
.sheet-meta {
  color: var(--muted);
  font-size: 12.5px;
  margin: -4px 0 12px;
  letter-spacing: 0.03em;
}

.sheet-price {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--gold);
}
.sheet-price .product-price-old { font-size: 14px; }

/* ---------- Карточка товара ---------- */

.sheet-product .sheet-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  background: rgba(255, 255, 255, 0.6);
}

/* В карточке товара кнопка закрытия лежит поверх фото. */
.sheet-close-over-photo {
  top: 16px;
  right: 16px;
  border: none;
  color: var(--on-photo);
  background: rgba(12, 22, 17, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 58vh;
  background: var(--ink-raised);
  cursor: zoom-in;
  overflow: hidden;
}
.sheet-gallery {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sheet-gallery::-webkit-scrollbar { display: none; }
.sheet-slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  background: center 30% / cover no-repeat;
}
.sheet-slide-video { background: #000; display: flex; align-items: center; justify-content: center; }
.sheet-slide-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.sheet-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.sheet-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245, 238, 230, 0.5);
  transition: width 0.2s, background 0.2s;
}
.sheet-dots span.active { width: 18px; border-radius: 3px; background: var(--on-photo); }

.sheet-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.sheet-name-row .sheet-name { flex: 1; min-width: 0; margin-right: 0; }
.sheet-icons { display: flex; gap: 8px; flex: none; }
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sheet-fav-btn.active { color: var(--heart); border-color: rgba(238, 138, 159, 0.45); }

.sheet-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 16px;
}

.qty-row {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 3px;
}
.qty-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ivory);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.qty-btn:active { background: rgba(var(--tint-rgb), 0.08); }
.qty-value {
  font-size: 16px;
  font-weight: 700;
  min-width: 26px;
  text-align: center;
}

.sheet-in-cart {
  margin: -6px 0 12px;
  font-size: 13px;
  color: var(--sage);
}

.btn {
  display: block;
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--btn-shadow);
}

/* «Намекнуть» — тихой ссылкой под главной кнопкой */
.btn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: none;
  background: none;
  color: var(--ivory-dim);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-link svg { color: var(--gold); }

.similar-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.similar-title {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ivory);
  margin-bottom: 12px;
}
.similar-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.similar-row::-webkit-scrollbar { display: none; }
.similar-card {
  flex: 0 0 120px;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
}
.similar-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  background: var(--surface-2) center/cover no-repeat;
  margin-bottom: 7px;
}
.similar-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0.55;
}
.similar-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ivory);
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.similar-price { font-family: var(--serif); font-size: 13.5px; color: var(--gold); }

/* ---------- Фото во весь экран ---------- */

.photo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 8, 0.96);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}
.photo-lightbox.open { display: flex; }
.photo-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.photo-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(245, 238, 230, 0.14);
  background: rgba(20, 35, 28, 0.7);
  color: var(--on-photo);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}
.photo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(245, 238, 230, 0.14);
  background: rgba(20, 35, 28, 0.7);
  color: var(--on-photo);
  font-size: 26px;
  line-height: 1;
  z-index: 2;
}
.photo-lightbox-nav.prev { left: 12px; }
.photo-lightbox-nav.next { right: 12px; }
.photo-lightbox-count {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(245, 238, 230, 0.7);
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* ---------- Поля форм ---------- */

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ivory-dim);
  margin: 14px 0 7px;
}

.field-input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 15px;
  transition: border-color 0.2s ease;
}
.field-input:focus { outline: none; border-color: var(--line-gold); }
.field-input::placeholder { color: var(--muted); }
.field-input:disabled { opacity: 0.4; }
/* Без ручки изменения размера (в WebKit — серый уголок в поле) */
textarea.field-input { resize: none; font-family: inherit; line-height: 1.45; }
/* Кнопка отправки формы сразу после поля — с воздухом, а не впритык */
.sheet-body > .field-input + .btn,
.sheet-body > .date-field + .btn { margin-top: 22px; }

/* Дата без системного «мм/дд/гггг»: своя подпись, календарь — прозрачным полем поверх */
.date-field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}
.date-field-text { color: var(--muted); }
.date-field.filled .date-field-text { color: var(--ivory); }
.date-field svg { flex: none; color: var(--ivory-dim); }
.date-field input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
select.field-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ivory-dim) 50%), linear-gradient(135deg, var(--ivory-dim) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
select.field-input option { background: var(--ink); color: var(--ivory); }

.promo-status {
  font-size: 12.5px;
  line-height: 1.45;
  margin: 7px 2px 0;
  color: var(--ivory-dim);
}
.promo-status-ok { color: var(--gold-light); }
.promo-status-error { color: var(--danger); }

/* ---------- Корзина и оформление заказа ---------- */

.sheet-checkout .sheet-body { padding-bottom: 24px; }

/* Блоки оформления — карточками с одинаковыми отступами */
.co-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--ink-raised);
  border: 1px solid var(--line);
}
.co-card + .co-card { margin-top: 12px; }
.co-card > .field-label:first-child { margin-top: 0; }
/* Поля контактов: часть групп бывает скрыта (имя — только на сайте, получатель —
   не для сертификата), поэтому отступ сверху даёт сама первая видимая подпись. */
.co-fields { padding-top: 2px; }
.field-note { margin: 8px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--ivory-dim); }
.field-note[hidden] { display: none; }
/* Ошибка в поле оформления: рамка, подсказка под полем */
.field-input.field-invalid, .field-input.field-invalid:focus { border-color: var(--danger); }
.field-error { margin: 7px 2px 0; font-size: 13px; line-height: 1.4; color: var(--danger); font-weight: 600; }
.checkout-total { flex-wrap: wrap; }
.min-order-note { flex-basis: 100%; margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: var(--danger); font-weight: 600; text-align: right; }
.co-label {
  margin: 24px 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.co-note { margin: 10px 4px 0; font-size: 12.5px; line-height: 1.5; color: var(--ivory-dim); }

/* Позиции */
.cart-lines { margin-top: 4px; padding: 4px 14px; }
.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 7px 0;
  color: var(--ivory-dim);
}
.cart-line-item { align-items: center; gap: 14px; padding: 14px 0; }
.cart-line-item + .cart-line-item { border-top: 1px solid var(--line); }
.cart-line-thumb {
  flex: 0 0 68px;
  height: 68px;
  border-radius: 14px;
  background: var(--surface-2) center 30% / cover no-repeat;
}
.cart-line-info { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cart-line-name { color: var(--ivory); font-size: 14.5px; font-weight: 600; line-height: 1.3; }
/* Цена слева, количество справа — одной строкой под названием */
.cart-line-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cart-line-sum { font-family: var(--serif); font-size: 17px; color: var(--gold); white-space: nowrap; }

.cart-line-controls {
  flex: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 2px;
}
.cart-qty-btn,
.cart-remove-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ivory);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cart-qty-btn:disabled { opacity: 0.3; cursor: default; }
.cart-qty-remove,
.cart-remove-btn { color: var(--ivory-dim); }
.cart-qty-value {
  min-width: 22px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ivory);
}

/* Кнопка в пустых состояниях (поиск, фильтры, избранное) */
.cart-action-btn {
  padding: 11px 18px;
  border-radius: 100px;
  border: 1px solid var(--line-gold);
  background: none;
  color: var(--ivory);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.cart-lines .cart-empty { padding: 26px 6px 12px; text-align: center; }
.cart-empty-title { font-family: var(--serif); font-size: 20px; color: var(--ivory); margin: 0 0 8px; }
.cart-empty-text { font-size: 14px; color: var(--ivory-dim); line-height: 1.5; margin: 0 0 18px; }

/* Подпись поля с действием справа: «Адрес … Самовывоз» */
.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 7px;
}
.co-card > .field-label-row:first-child { margin-top: 0; }
.field-label-row .field-label { margin: 0; }
.label-action {
  /* поле касания больше самой надписи, разметку не сдвигает */
  padding: 8px 0 8px 14px;
  margin: -8px 0;
  border: none;
  background: none;
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
/* Адрес — растёт по тексту (высоту ставит скрипт), без ручки изменения размера */
textarea.field-address { resize: none; overflow: hidden; line-height: 1.35; min-height: 0; }

/* Доставка: строка с суммой под адресом */
.delivery-status { display: flex; flex-direction: column; gap: 3px; margin: 10px 2px 2px; }
.delivery-status[hidden] { display: none; }
.ds-main { font-size: 13.5px; font-weight: 600; color: var(--gold-light); }
.ds-sub { font-size: 12.5px; line-height: 1.4; color: var(--muted); }

/* Дата: одна полоса из трёх частей — во всю ширину, без переносов */
.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--field);
}
/* Части равные, пока надписи помещаются; длинной («Другая дата») — по тексту */
.seg {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 6px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--ivory-dim);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.seg.active { background: var(--ivory); color: var(--ink); }

/* Время: ровная сетка, «Как можно скорее» — на две ячейки */
.slot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 42px;
  padding: 0 4px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.slot-wide { grid-column: span 2; }
.slot.active { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }
.slot:disabled { opacity: 0.32; cursor: default; }
/* «Другая дата»: прозрачное поле даты поверх кнопки открывает системный календарь */
.seg-date input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  opacity: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

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

/* «Нет номера» — внутри поля справа: поле не сужается и номер не обрезается */
.field-with-action { position: relative; }
.field-with-action .field-input { padding-right: 112px; }
.field-action {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--ink-raised);
  color: var(--ivory-dim);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.field-action.active { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }

/* Переключатели (открытка, тайный поклонник). Ползунок — отдельный элемент:
   на iPhone (WebKit) у самого поля ввода псевдоэлементы не рисуются. */
.co-options { padding-top: 6px; padding-bottom: 6px; }
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  cursor: pointer;
}
.switch-row + #postcardTextWrap,
.switch-row + .switch-row,
#postcardTextWrap + .switch-row { border-top: 1px solid var(--line); }
#postcardTextWrap { padding: 2px 0 12px; border-top: none !important; }
#postcardText { resize: none; min-height: 72px; line-height: 1.45; }
.switch-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.switch-title { font-size: 15px; font-weight: 600; color: var(--ivory); }
.switch-sub { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.switch { position: relative; flex: none; width: 50px; height: 30px; }
.switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: rgba(var(--tint-rgb), 0.14);
  transition: background 0.2s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(.32, .72, 0, 1);
}
.switch input:checked + .switch-track { background: var(--gold); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.secret-hint { margin: 0 0 12px; }

/* Комментарий и промокод — свёрнуты, пока не нужны */
.co-more { border-top: 1px solid var(--line); }
.co-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
  list-style: none;
  color: var(--ivory);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.co-more summary::-webkit-details-marker { display: none; }
.co-more summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-right: 1.5px solid var(--ivory-dim);
  border-bottom: 1.5px solid var(--ivory-dim);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.co-more[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.co-options-solo .co-more { border-top: none; }
.co-options-solo .co-more summary { padding: 10px 0; }
.co-more[open] { padding-bottom: 10px; }
.co-more .field-label:first-of-type { margin-top: 6px; }

/* Сводка и итог — прямо над кнопкой оформления */
.co-summary-card { margin-top: 24px; }
.co-summary .cart-line { padding: 5px 0; }
.co-summary .cart-line span:last-child { white-space: nowrap; color: var(--ivory); }
/* «Доставка» и под ней мелко: откуда и сколько км */
.cart-line-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.cart-line-discount span:last-child { color: var(--sage) !important; }
.checkout-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.total-label { font-size: 15px; font-weight: 700; color: var(--ivory); }
.total-amount { font-family: var(--serif); font-size: 24px; color: var(--ivory); text-align: right; }
.total-amount small { font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.btn-checkout { margin-top: 14px; padding: 17px; font-size: 16px; }

/* ---------- Панель корзины внизу ---------- */

.cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-gold);
  border-radius: 20px;
  padding: 10px 10px 10px 18px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 15;
}
.cart-bar.visible { display: flex; }
.cart-bar-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  /* Это кнопка (открывает корзину) — снимаем оформление кнопки по умолчанию. */
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.cart-bar-count { font-size: 12px; color: var(--ivory-dim); }
.cart-bar-total { font-family: var(--serif); font-size: 19px; color: var(--ivory); }
.btn-cart {
  width: auto;
  padding: 13px 20px;
  border-radius: 14px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: none;
}

/* ---------- Статус клиента и мои заказы ---------- */

.status-spent { font-size: 15px; color: var(--ivory); margin: 0 0 8px; }
.status-next { font-size: 13.5px; color: var(--ivory-dim); line-height: 1.5; margin: 0 0 12px; }
.status-progress-wrap {
  margin: 0 0 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.status-progress {
  width: 100%;
  height: 6px;
  border-radius: 6px;
  background: rgba(var(--tint-rgb), 0.08);
  overflow: hidden;
}
.status-progress-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.4s ease;
}
.status-tiers { display: flex; flex-direction: column; gap: 12px; }
.status-tier-row { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); }
.status-tier-row.current { border-color: var(--line-gold); background: rgba(201, 161, 90, 0.06); }
.status-tier-name { font-family: var(--serif); font-size: 16px; color: var(--gold-light); margin-bottom: 4px; }
.status-tier-desc { font-size: 13px; color: var(--ivory-dim); line-height: 1.45; }

.orders-list { display: flex; flex-direction: column; gap: 12px; }
.orders-empty { color: var(--ivory-dim); font-size: 14px; padding: 12px 0; }
.order-row { padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--ink-raised); }
/* Шапка заказа: фото, номер и статус, дата и сумма */
.order-row-head { display: flex; align-items: center; gap: 12px; }
.order-row-thumb {
  flex: 0 0 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--surface-2) center 30% / cover no-repeat;
}
.order-row-main { flex: 1; min-width: 0; }
.order-row-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.order-row-id { font-family: var(--serif); font-size: 17px; color: var(--ivory); white-space: nowrap; }
.order-row-status {
  flex: none;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ivory-dim);
  white-space: nowrap;
}
.order-row-status.active { border-color: var(--line-gold); color: var(--gold-light); }
.order-row-meta { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.order-row-total { font-family: var(--serif); font-size: 14.5px; color: var(--gold); }
/* Состав и «Повторить» — одной строкой внизу */
.order-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.order-row-items { min-width: 0; font-size: 13px; color: var(--ivory-dim); line-height: 1.45; }
.order-repeat-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 100px;
  border: 1px solid var(--line-gold);
  background: transparent;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.order-repeat-btn svg { color: var(--gold); }
.order-repeat-btn:disabled { opacity: 0.6; }

.order-tracker { display: flex; margin: 14px 0 0; overflow: hidden; }
.order-tracker-step {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--muted);
}
.order-tracker-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(var(--tint-rgb), 0.1);
}
.order-tracker-step.done:not(:last-child)::after { background: var(--gold); }
.order-tracker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(var(--tint-rgb), 0.14);
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.order-tracker-step.done .order-tracker-dot,
.order-tracker-step.current .order-tracker-dot { background: var(--gold); }
.order-tracker-step.current .order-tracker-dot { box-shadow: 0 0 0 4px rgba(201, 161, 90, 0.22); }
.order-tracker-label { font-size: 10px; text-align: center; line-height: 1.25; }
.order-tracker-step.current .order-tracker-label { color: var(--gold-light); font-weight: 700; }

.order-review { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.order-review-label { font-size: 12.5px; color: var(--ivory-dim); margin-bottom: 4px; }
.order-review-stars { font-size: 16px; letter-spacing: 3px; margin-bottom: 4px; color: var(--gold); }
.order-review-stars-off { color: rgba(201, 161, 90, 0.25); }
.order-review-text { font-size: 13.5px; color: var(--ivory); line-height: 1.45; }
.order-review-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--line-gold);
  border-radius: 100px;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
}
.order-review-toggle svg { color: var(--gold); }
.order-review-form { flex-direction: column; gap: 10px; }
.order-review-picker { display: flex; gap: 6px; }
.order-review-star {
  display: inline-flex;
  background: none;
  border: none;
  color: rgba(201, 161, 90, 0.45);
  cursor: pointer;
  padding: 3px;
}
.order-review-star.filled { color: var(--gold); }
.order-review-textarea { min-height: 60px; }
.order-review-submit {
  align-self: flex-start;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: none;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
}
.order-review-submit:disabled { opacity: 0.6; cursor: default; }

.referral-nudge {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(201, 161, 90, 0.07);
  border: 1px solid var(--line-gold);
  font-size: 13px;
  color: var(--ivory-dim);
  line-height: 1.45;
}
.referral-nudge-btn {
  display: block;
  margin-top: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Конструкторы: розы, пионовидные, гортензии ---------- */

.roses-toggle {
  display: flex;
  gap: 4px;
  margin: 4px 0 18px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(var(--tint-rgb), 0.05);
}
.roses-toggle-btn {
  flex: 1;
  padding: 10px;
  border-radius: 11px;
  border: none;
  background: transparent;
  color: var(--ivory-dim);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.roses-toggle-btn.active { background: var(--ivory); color: var(--ink); }

#rosesSheet .sheet-price,
#peonySheet .sheet-price,
#hydrangeaSheet .sheet-price,
#certSheet .sheet-price { margin: 14px 0 16px; }
#rosesSheet .sheet-price,
#peonySheet .sheet-price,
#hydrangeaSheet .sheet-price { margin: 16px 0 2px; transition: opacity 0.2s ease; }
.sheet-price.is-empty { opacity: 0.45; }
.sheet-price-note {
  min-height: 18px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.color-mix { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(var(--tint-rgb), 0.02);
  transition: border-color 0.15s;
}
.color-row.active { border-color: var(--line-gold); }
.color-swatch {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.color-name { flex: 1; font-size: 14.5px; color: var(--ivory); }
.color-custom-name {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--line-gold);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 14.5px;
  padding: 4px 0;
}
.color-custom-name::placeholder { color: var(--muted); }
.color-stepper { display: flex; align-items: center; gap: 6px; }
.color-step {
  width: 34px;
  height: 34px;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.color-qty {
  -webkit-appearance: none;
  appearance: none;
  width: 58px;
  text-align: center;
  padding: 7px 4px;
  font-variant-numeric: tabular-nums;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 14.5px;
  -moz-appearance: textfield;
}
.color-qty:focus { outline: none; border-color: var(--gold); }
html[data-theme="pearl"] .color-swatch { border-color: rgba(31, 52, 41, 0.2); }
.color-qty::-webkit-outer-spin-button,
.color-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.color-mix-total { font-size: 13.5px; color: var(--sage); margin: 2px 0 10px; }
.color-mix-total.warn { color: var(--warn); }
.color-mix-total.ok { color: var(--gold-light); }

/* ---------- «Повторять доставку» и регулярные доставки ---------- */

.repeat-section { padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.repeat-section .switch-text { margin-bottom: 10px; }
.repeat-seg .seg { height: 38px; font-size: 13.5px; }
.repeat-note { margin: 10px 2px 0; }

.subs-block { margin: 2px 0 22px; }
.subs-block[hidden] { display: none; }
.subs-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.sub-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line-gold);
  background: linear-gradient(135deg, rgba(201, 161, 90, 0.08), rgba(201, 161, 90, 0.01)), var(--ink-raised);
}
.sub-card + .sub-card { margin-top: 10px; }
.sub-card.paused { border-color: var(--line); opacity: 0.85; }
.sub-head { display: flex; align-items: center; gap: 12px; }
.sub-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sub-title { font-family: var(--serif); font-size: 16px; color: var(--ivory); line-height: 1.25; }
.sub-period { font-size: 12.5px; color: var(--gold-light); font-weight: 600; }
.sub-next { font-size: 12.5px; color: var(--ivory-dim); }
.sub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sub-btn {
  padding: 8px 12px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.sub-btn.sub-cancel { border-color: transparent; color: var(--muted); }

/* ---------- «Скинуться на букет» ---------- */

.gg-eyebrow {
  margin: 2px 46px 8px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.gg-product {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 16px;
  padding: 10px;
  border-radius: 16px;
  background: var(--ink-raised);
  border: 1px solid var(--line);
}
.gg-product:empty { display: none; }
.gg-thumb {
  flex: 0 0 64px;
  height: 80px;
  border-radius: 12px;
  background: var(--surface-2) center 30% / cover no-repeat;
}
.gg-product-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gg-product-name { font-family: var(--serif); font-size: 17px; line-height: 1.2; color: var(--ivory); }
.gg-product-meta { font-size: 13px; color: var(--muted); }
.gg-create-btn { margin-top: 22px; }

.gg-progress {
  height: 10px;
  border-radius: 10px;
  background: rgba(var(--tint-rgb), 0.08);
  overflow: hidden;
}
.gg-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.6s cubic-bezier(.32, .72, 0, 1);
}
.gg-progress.done .gg-progress-fill { background: linear-gradient(90deg, var(--sage), var(--gold)); }
.gg-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 9px 0 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}
.gg-stats span + span { color: var(--muted); font-weight: 500; text-align: right; }
.gg-progress.done + .gg-stats span + span { color: var(--sage); font-weight: 700; }

.gg-people { margin-bottom: 18px; }
.gg-people-title {
  margin-bottom: 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.gg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gg-chip {
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--ivory);
}
.gg-chip.me { border-color: var(--line-gold); color: var(--gold-light); }
.gg-person {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ivory);
}
.gg-person span:last-child { font-family: var(--serif); color: var(--gold); white-space: nowrap; }
.gg-empty { margin: 0; font-size: 13.5px; color: var(--muted); }

.gg-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.gg-amount {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.gg-amount.active { background: var(--ivory); border-color: var(--ivory); color: var(--ink); }
.gg-pledge-btn { margin-top: 14px; }
#groupOrganizer { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.gg-secondary-btn {
  background: transparent;
  color: var(--ivory);
  border: 1px solid var(--line-gold);
  box-shadow: none;
}
.gg-join-organizer { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.gg-order-ready { box-shadow: 0 0 0 3px rgba(201, 161, 90, 0.25), var(--btn-shadow); }
.gg-close-link { color: var(--muted); font-weight: 500; font-size: 13px; }
.gg-note { margin: 16px 2px 0; }

/* ---------- Подтверждение заказа с сайта (без Telegram) ---------- */

.guest-success {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--backdrop-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.guest-success-card {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-gold);
  border-radius: 22px;
  padding: 30px 22px 22px;
  text-align: center;
  color: var(--ivory);
}
.guest-success-icon { display: flex; justify-content: center; margin-bottom: 14px; color: var(--gold); }
.guest-success-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ivory);
}
/* Детали заказа и реквизиты — как чек: слева, на подложке */
.guest-success-body {
  margin: 0 0 22px;
  padding: 4px 16px;
  border-radius: 14px;
  background: var(--ink-raised);
  border: 1px solid var(--line);
  text-align: left;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ivory-dim);
}
.guest-success-body p { margin: 0; padding: 10px 0; }
.guest-success-body p + p { border-top: 1px solid var(--line); }
.guest-success-btn,
.guest-success-close {
  display: block;
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
/* Главное действие — оплата; чек и возврат в каталог — тише */
.guest-success-btn { background: var(--btn-bg); color: var(--btn-fg); border: none; margin-bottom: 10px; }
.guest-success-btn.secondary { background: transparent; color: var(--ivory); border: 1px solid var(--line-gold); }
.guest-success-close {
  background: transparent;
  color: var(--ivory-dim);
  border: none;
  margin-top: 4px;
  font-weight: 600;
}
.guest-success-link { display: inline-block; margin-top: 6px; color: var(--gold-light); font-size: 13px; text-decoration: none; }
.guest-receipt-label { cursor: pointer; }
.guest-receipt-status { font-size: 13.5px; line-height: 1.45; color: var(--ivory-dim); margin: 0 0 12px; }
.guest-receipt-status:empty { display: none; }

/* ---------- Заглушки при загрузке ---------- */

.skeleton-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 12px;
  padding: 26px 0 0;
}
.skeleton-card {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background: linear-gradient(100deg, var(--ink-raised) 30%, var(--surface-2) 50%, var(--ink-raised) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Пока идёт поиск, промо-блоки не мешают: результаты сразу под строкой поиска. */
body.searching .hide-when-searching { display: none !important; }

/* ---------- Узкие экраны (iPhone SE и т.п.) ---------- */

@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .hero-title { font-size: 40px; }
  .collection-card { flex-basis: 128px; }
  .collection-name { font-size: 15px; }
  /* «Как можно скорее» — отдельной строкой, остальные интервалы по три */
  .slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slot-wide { grid-column: 1 / -1; }
  .seg { font-size: 13.5px; }
  .cart-line-thumb { flex-basis: 60px; height: 60px; }
  /* «Пионовидные» не помещалось в узкую плитку */
  .tile-title { font-size: 15px; }
}

/* Заставка сертификатов до 374px: карта поменьше, чтобы название не наезжало */
@media (max-width: 374px) {
  .category-head-cert .category-cover { width: 72px; height: 72px; right: 14px; }
  .category-head-cert .category-head-text { right: 96px; }
  .category-head-cert .category-title { font-size: 23px; }
}

/* ---------- Широкие экраны (сайт в браузере) ---------- */

@media (min-width: 720px) {
  body { max-width: 720px; margin: 0 auto; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .tiles { gap: 14px; }
  .sheet { left: 50%; right: auto; width: 720px; transform: translate(-50%, 105%); }
  .sheet.open { transform: translate(-50%, 0); }
  .cart-bar { left: 50%; right: auto; width: 696px; transform: translateX(-50%); }
}

/* ---------- «Подарок по ссылке» ---------- */

/* Главная: подарок без адреса */
.gift-promo {
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(100% - 2 * var(--gutter));
  margin: 26px var(--gutter) 0;
  padding: 16px 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid var(--line-gold);
  background: linear-gradient(120deg, rgba(201, 161, 90, 0.16), rgba(201, 161, 90, 0.03));
  color: var(--ivory);
  text-align: left;
  font-family: var(--sans);
  cursor: pointer;
}
.gift-promo[hidden] { display: none; }
.gift-promo-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.gift-promo-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gift-promo-title { font-family: var(--serif); font-size: 17px; color: var(--ivory); }
.gift-promo-sub { font-size: 12.5px; line-height: 1.4; color: var(--ivory-dim); }

/* Как это работает */
.gift-how { list-style: none; counter-reset: gift-how; margin: 18px 0 6px; padding: 0; }
.gift-how li {
  counter-increment: gift-how;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 0 16px 44px;
}
.gift-how li::before {
  content: counter(gift-how);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold-light);
}
.gift-how b { font-size: 15px; font-weight: 600; color: var(--ivory); }
.gift-how span { font-size: 13px; line-height: 1.45; color: var(--ivory-dim); }
.gift-how-note { margin: 0 2px 18px; }

/* Оформление: «Знаю адрес / Не знаю адрес» */
.delivery-mode { margin-bottom: 14px; }
.delivery-mode[hidden] { display: none; }
#giftBlock .field-label:first-of-type { margin-top: 12px; }
.gift-explain { margin: 0 2px 4px; }
.gift-explain b { color: var(--gold-light); font-weight: 700; white-space: nowrap; }
.field-optional { font-weight: 500; color: var(--muted); }
.gift-message-input { resize: none; min-height: 64px; line-height: 1.45; }
.gift-reveal-row { margin-top: 8px; padding-bottom: 0; border-top: 1px solid var(--line); }

/* Заказ-подарок оформлен: отправить ссылку получателю */
.gift-ready-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  animation: giftReadyPop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.gift-ready-text { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--ivory-dim); }
.gift-ready-block { margin: 0 0 14px; text-align: left; }
.gift-ready-label { margin: 0 2px 7px; font-size: 12.5px; font-weight: 600; color: var(--ivory-dim); }
.gift-ready-link { display: flex; gap: 8px; margin-bottom: 10px; }
.gift-ready-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 13.5px;
}
.gift-copy-btn {
  flex: none;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-gold);
  background: transparent;
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.gift-ready-note { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
@keyframes giftReadyPop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* «Мои заказы»: статус подарка по ссылке */
.order-gift {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line-gold);
  background: rgba(201, 161, 90, 0.07);
}
.order-gift-status { display: flex; align-items: flex-start; gap: 10px; color: var(--ivory-dim); font-size: 13px; line-height: 1.45; }
.order-gift-status svg { flex: none; margin-top: 1px; color: var(--gold); }
.order-gift-status b { display: block; color: var(--ivory); font-weight: 600; }
.order-gift-actions { display: flex; gap: 8px; margin-top: 10px; }
.order-gift-btn {
  flex: 1;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 100px;
  border: 1px solid var(--line-gold);
  background: transparent;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.order-gift-btn:first-child { background: var(--btn-bg); border-color: transparent; color: var(--btn-fg); }
