/* ═══════════════════════════════════════════════════════════════
   EXTRAIT HOUSE by Khann — дизайн-система
   Mobile-first · Luxury · Navy / Gold / Ivory
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Палитра бренда */
  --navy:        #001951;
  --navy-deep:   #001038;
  --navy-soft:   #1a3268;
  --gold:        #B48500;
  --gold-light:  #d4a520;
  --gold-soft:   rgba(180, 133, 0, .12);
  --ivory:       #F9F7F4;
  --white:       #FFFFFF;
  --ink:         #10141f;
  --muted:       #6b7180;
  --line:        rgba(0, 25, 81, .08);

  /* Типографика */
  --font-serif: "Lora", Georgia, serif;
  --font-sans:  "Manrope", system-ui, -apple-system, sans-serif;

  /* Геометрия */
  --radius-s:  12px;
  --radius-m:  18px;
  --radius-l:  26px;
  --shadow-card:  0 2px 10px rgba(0, 25, 81, .05), 0 12px 32px rgba(0, 25, 81, .07);
  --shadow-float: 0 8px 24px rgba(0, 25, 81, .16), 0 24px 64px rgba(0, 25, 81, .18);

  /* Ритм и зоны нажатия */
  --tap: 48px;              /* минимальная зона нажатия */
  --gutter: 16px;           /* боковые поля на мобильном */
  --header-h: 60px;

  /* Анимации */
  --ease: cubic-bezier(.22, .8, .3, 1);
  --t-fast: .18s;
  --t-med:  .32s;
  --t-slow: .55s;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input { font: inherit; }
::selection { background: var(--gold-soft); }

body.no-scroll { overflow: hidden; }

/* Атрибут hidden всегда сильнее любых display-правил компонентов */
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ═══════════════════════════════════════════════════════════════
   КНОПКИ
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 0 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease), background var(--t-med), opacity var(--t-med);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.965); }

.btn--gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
  box-shadow: 0 6px 20px rgba(180, 133, 0, .35);
}
.btn--gold:hover { box-shadow: 0 10px 28px rgba(180, 133, 0, .45); }

.btn--navy {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 25, 81, .25);
}
.btn--navy:hover { background: var(--navy-soft); }

.btn--wa {
  background: #23a55b;
  color: #fff;
  box-shadow: 0 6px 20px rgba(35, 165, 91, .3);
}

.btn--outline {
  border: 1.5px solid var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn--outline:hover { background: var(--navy); color: #fff; }

.btn--lg { min-height: 56px; padding: 0 34px; font-size: 16px; }
.btn--block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ═══════════════════════════════════════════════════════════════
   ШАПКА
   ═══════════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  color: var(--ivory);
  transition: background var(--t-med), box-shadow var(--t-med), color var(--t-med);
}
.header.is-scrolled {
  background: rgba(0, 16, 56, .82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.header--light { color: var(--navy); }
.header--light.is-scrolled {
  background: rgba(249, 247, 244, .85);
  box-shadow: 0 1px 0 var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--header-h);
  padding: 0 var(--gutter);
  max-width: 1200px;
  margin: 0 auto;
}

.header__brand { display: flex; align-items: center; gap: 10px; min-height: var(--tap); }
.header__brand--center { position: absolute; left: 50%; transform: translateX(-50%); }
.header__logo { border-radius: 50%; }

.header__name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}
.header__name em {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
}

.header__back,
.header__cart {
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  border-radius: 50%;
  position: relative;
  transition: background var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.header__back:active, .header__cart:active { background: rgba(128, 128, 128, .14); }
.header__back svg, .header__cart svg { width: 24px; height: 24px; }
.header__cart { margin-left: auto; }

.header__cart-badge {
  position: absolute;
  top: 5px;
  right: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 100px;
  transition: transform var(--t-fast) var(--ease);
}
.header__cart-badge.bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.45); } }

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 40px) 28px 72px;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--navy-soft) 0%, var(--navy) 46%, var(--navy-deep) 100%);
  color: var(--ivory);
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  width: 130vw;
  aspect-ratio: 1;
  bottom: -85vw;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(180, 133, 0, .22), transparent 70%);
  pointer-events: none;
}

.hero__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 22px;
}
.hero__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 9.4vw, 58px);
  line-height: 1.14;
  letter-spacing: .005em;
  max-width: 14ch;
}
.hero__title span {
  font-style: italic;
  background: linear-gradient(100deg, var(--gold-light), #e8c05a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  margin-top: 18px;
  max-width: 34ch;
  font-size: 15px;
  color: rgba(249, 247, 244, .72);
}
.hero__cta { margin-top: 34px; }

.hero__stats {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 52px;
}
.hero__stats div { display: flex; flex-direction: column; gap: 2px; }
.hero__stats b {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: #fff;
}
.hero__stats span {
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(249, 247, 244, .55);
}
.hero__stats i { width: 1px; height: 30px; background: rgba(249, 247, 244, .18); }

.hero__scrollhint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid rgba(249, 247, 244, .3);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.hero__scrollhint span {
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--gold-light);
  animation: scrollhint 1.8s var(--ease) infinite;
}
@keyframes scrollhint {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}

/* Появление элементов hero */
.reveal { animation: rise .8s var(--ease) both; }
.reveal:nth-child(2) { animation-delay: .08s; }
.reveal:nth-child(3) { animation-delay: .16s; }
.reveal:nth-child(4) { animation-delay: .24s; }
.reveal:nth-child(5) { animation-delay: .32s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════
   ПАНЕЛЬ ПОИСКА И ФИЛЬТРОВ
   ═══════════════════════════════════════════════════════════════ */
.catalog {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px var(--gutter) 60px;
}

.toolbar {
  position: sticky;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px) - 1px);
  z-index: 40;
  margin: 0 calc(var(--gutter) * -1);
  padding: 12px var(--gutter) 12px;
  background: rgba(249, 247, 244, .88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: box-shadow var(--t-med);
}
.toolbar.is-stuck { box-shadow: 0 10px 24px rgba(0, 25, 81, .06); }

.toolbar__search {
  position: relative;
  display: flex;
  align-items: center;
}
.toolbar__search > svg {
  position: absolute;
  left: 18px;
  width: 19px;
  height: 19px;
  color: var(--muted);
  pointer-events: none;
}
.toolbar__search input {
  width: 100%;
  height: 52px;
  padding: 0 52px;
  border: 1.5px solid transparent;
  border-radius: 100px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  font-size: 15px;
  color: var(--ink);
  transition: border-color var(--t-med), box-shadow var(--t-med);
  -webkit-appearance: none;
  appearance: none;
}
.toolbar__search input::placeholder { color: var(--muted); }
.toolbar__search input:focus { outline: none; border-color: var(--gold); }
.toolbar__search input::-webkit-search-cancel-button { display: none; }

.toolbar__clear {
  position: absolute;
  right: 6px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
}
.toolbar__clear svg { width: 16px; height: 16px; }

.toolbar__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  padding: 2px var(--gutter);
}
.toolbar__row::-webkit-scrollbar { display: none; }

/* Сегментированный контрол пола */
.seg {
  display: flex;
  flex: none;
  background: var(--white);
  border-radius: 100px;
  padding: 4px;
  box-shadow: var(--shadow-card);
}
.seg__btn {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: background var(--t-med), color var(--t-med);
  -webkit-tap-highlight-color: transparent;
}
.seg__btn.is-active { background: var(--navy); color: #fff; }

/* Оригинал / аналог: сегментированный контрол во всю ширину под поиском */
.seg--type {
  width: 100%;
  margin-top: 10px;
}
.seg--type .seg__btn {
  flex: 1;
  text-align: center;
  padding: 0 8px;
}

.toolbar__actions { display: flex; gap: 10px; flex: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 100px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  transition: background var(--t-med), color var(--t-med), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.chip:active { transform: scale(.96); }
.chip svg { width: 17px; height: 17px; color: var(--gold); transition: color var(--t-med); }
.chip.is-active { background: var(--navy); color: #fff; }
.chip.is-active svg { color: var(--gold-light); }

.catalog__count {
  margin: 16px 2px 14px;
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════
   СЕТКА И КАРТОЧКИ
   ═══════════════════════════════════════════════════════════════ */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translateY(16px);
}
.card.in { opacity: 1; transform: none; transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease), box-shadow var(--t-med); }
.card:active { transform: scale(.975); }

.card__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

/* ── Премиальный placeholder (когда нет фото) ── */
.ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ph--0 { background: linear-gradient(155deg, #f6f1e7, #ece2cd); }
.ph--1 { background: linear-gradient(155deg, #edf0f7, #d9dfec); }
.ph--2 { background: linear-gradient(155deg, #f7f3ec, #e5dcc8); }
.ph--3 { background: linear-gradient(155deg, #eef1f4, #dde3e9); }
.ph--4 { background: linear-gradient(155deg, #f5efe4, #e9ddc6); }

.ph::after {                       /* мягкий световой блик */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 65% at 50% 0%, rgba(255, 255, 255, .55), transparent 60%);
}
.ph svg {                          /* силуэт флакона */
  width: 34%;
  height: auto;
  color: var(--navy);
  opacity: .5;
  z-index: 1;
}
.ph b {                            /* монограмма */
  z-index: 1;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Тег пола на фото */
.card__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 14px 14px;
}
.card__brand {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__name {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(15.5px * 1.3 * 2);   /* одинаковая высота карточек */
}
.card__footer {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card__price { display: flex; flex-direction: column; line-height: 1.2; }
.card__price small { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.card__price b { font-size: 15px; font-weight: 700; color: var(--navy); white-space: nowrap; }

.card__add {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 25, 81, .25);
  transition: transform var(--t-fast) var(--ease), background var(--t-med);
  -webkit-tap-highlight-color: transparent;
}
.card__add:active { transform: scale(.86); }
.card__add svg { width: 19px; height: 19px; }
.card__add.is-added { background: var(--gold); animation: bump .4s var(--ease); }

@media (hover: hover) {
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); }
  .card:hover .card__media img { transform: scale(1.05); }
  .card__add:hover { background: var(--gold); }
}

/* Скелетоны карточек */
.sk {
  position: relative;
  overflow: hidden;
  background: rgba(0, 25, 81, .06);
  border-radius: var(--radius-s);
}
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.sk-card { border-radius: var(--radius-m); overflow: hidden; background: var(--white); box-shadow: var(--shadow-card); }
.sk-card .sk--media { aspect-ratio: 1; border-radius: 0; }
.sk-card .sk-body { padding: 12px 14px 16px; display: grid; gap: 8px; }
.sk--line { height: 12px; }
.sk--title { height: 18px; }

/* Пустой результат */
.empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}
.empty__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-card);
  color: var(--gold);
}
.empty__icon svg { width: 28px; height: 28px; }
.empty h3 { font-family: var(--font-serif); font-size: 20px; color: var(--ink); margin-bottom: 6px; }
.empty p { margin-bottom: 22px; }

#sentinel { height: 2px; }

/* ═══════════════════════════════════════════════════════════════
   BOTTOM SHEET (бренды, сортировка)
   ═══════════════════════════════════════════════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 16, 56, .45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med);
}
.overlay.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  max-height: 78svh;
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  box-shadow: var(--shadow-float);
  transform: translateY(105%);
  transition: transform var(--t-med) var(--ease);
  padding-bottom: var(--safe-bottom);
}
.sheet.is-open { transform: none; }

.sheet__grip {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 25, 81, .16);
  margin: 10px auto 2px;
  flex: none;
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 12px;
  flex: none;
}
.sheet__title { font-family: var(--font-serif); font-size: 19px; font-weight: 600; color: var(--navy); }
.sheet__close {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-card);
  color: var(--navy);
}
.sheet__close svg { width: 16px; height: 16px; }

.sheet__search { padding: 0 20px 12px; flex: none; }
.sheet__search input {
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 100px;
  background: var(--white);
  font-size: 14.5px;
  -webkit-appearance: none;
  appearance: none;
}
.sheet__search input:focus { outline: none; border-color: var(--gold); }

.sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 16px; }

.opt {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: var(--radius-s);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: background var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.opt:active { background: var(--gold-soft); }
.opt.is-active { color: var(--navy); font-weight: 700; }
.opt.is-active::after {
  content: "";
  width: 20px; height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--gold) center / 11px no-repeat
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.4" stroke-linecap="round" stroke-linejoin="round"><path d="m4.5 12.5 5 5 10-11"/></svg>');
}
.opt small { color: var(--muted); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════
   КОРЗИНА (drawer)
   ═══════════════════════════════════════════════════════════════ */
.cart {
  position: fixed;
  z-index: 90;
  inset: auto 0 0 0;
  max-height: 88svh;
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  box-shadow: var(--shadow-float);
  transform: translateY(105%);
  transition: transform var(--t-med) var(--ease);
}
.cart.is-open { transform: none; }

.cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 6px;
  flex: none;
}
.cart__title { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--navy); }
.cart__title small { font-family: var(--font-sans); font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 8px; }

.cart__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 20px;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 13px 0;
  animation: rise .35s var(--ease) both;
}
.cart-item + .cart-item { border-top: 1px solid var(--line); }

.cart-item__thumb {
  width: 64px; height: 64px;
  border-radius: var(--radius-s);
  overflow: hidden;
  position: relative;
  flex: none;
}
.cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__thumb .ph svg { width: 42%; }
.cart-item__thumb .ph b { display: none; }

.cart-item__info { min-width: 0; }
.cart-item__brand {
  font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item__name {
  font-family: var(--font-serif);
  font-size: 15px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item__meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cart-item__meta b { color: var(--navy); font-weight: 700; }

.cart-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.qty {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 100px;
  box-shadow: var(--shadow-card);
}
.qty button {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--navy);
  font-size: 20px;
  font-weight: 600;
  transition: transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.qty button:active { transform: scale(.85); }
.qty span { min-width: 24px; text-align: center; font-weight: 700; font-size: 14.5px; }

.cart-item__remove {
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
  padding: 4px;
}

.cart__empty { text-align: center; padding: 46px 20px 56px; color: var(--muted); }
.cart__empty svg { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--gold); opacity: .8; }
.cart__empty h3 { font-family: var(--font-serif); font-size: 19px; color: var(--ink); margin-bottom: 4px; }

.cart__foot {
  flex: none;
  padding: 14px 20px calc(16px + var(--safe-bottom));
  background: var(--white);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  box-shadow: 0 -8px 30px rgba(0, 25, 81, .08);
}
.cart__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 13px;
}
.cart__total span { font-size: 14px; color: var(--muted); }
.cart__total b { font-family: var(--font-serif); font-size: 24px; color: var(--navy); }
.cart__note { margin-top: 10px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  z-index: 120;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 420px);
  padding: 13px 22px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 100px;
  box-shadow: var(--shadow-float);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t-med) var(--ease), opacity var(--t-med);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; color: var(--gold-light); flex: none; }

/* ═══════════════════════════════════════════════════════════════
   СТРАНИЦА ТОВАРА
   ═══════════════════════════════════════════════════════════════ */
.page-product { background: var(--ivory); }

.product {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 12px) var(--gutter) 40px;
}

.product__skeleton { display: grid; gap: 14px; padding-top: 6px; }
.sk--media { aspect-ratio: 1; border-radius: var(--radius-l); }
.sk--pills { height: 52px; border-radius: 100px; }
.sk--btn { height: 56px; border-radius: 100px; }

.pmedia {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: var(--shadow-card);
  background: var(--white);
}
.pmedia__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.pmedia__track::-webkit-scrollbar { display: none; }
.pmedia__slide {
  flex: none;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  position: relative;
}
.pmedia__slide img { width: 100%; height: 100%; object-fit: cover; }
.pmedia__slide .ph b { font-size: 16px; }
.pmedia__dots {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.pmedia__dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(0, 25, 81, .22);
  transition: background var(--t-med), transform var(--t-med);
}
.pmedia__dots i.is-active { background: var(--gold); transform: scale(1.3); }

.pinfo { padding: 22px 4px 0; }
.pinfo__brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}
.pinfo__name {
  font-family: var(--font-serif);
  font-size: clamp(27px, 7.4vw, 40px);
  font-weight: 500;
  line-height: 1.16;
  margin-top: 6px;
  color: var(--ink);
}
.pinfo__inspired { margin-top: 8px; font-size: 14px; color: var(--muted); }
.pinfo__inspired em { font-style: italic; color: var(--navy); font-weight: 600; }

.pinfo__tags { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tag {
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
}
.tag--gold { color: var(--gold); }

/* Выбор объёма */
.pvol { margin-top: 26px; }
.pvol__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.pvol__label b { color: var(--navy); }
.pvol__row {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 8px;
}
.pvol__row::-webkit-scrollbar { display: none; }

.vol-pill {
  flex: none;
  min-width: 76px;
  min-height: 62px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-radius: var(--radius-m);
  background: var(--white);
  box-shadow: var(--shadow-card);
  border: 1.5px solid transparent;
  transition: border-color var(--t-med), background var(--t-med), transform var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.vol-pill:active { transform: scale(.94); }
.vol-pill b { font-size: 16px; font-weight: 700; color: var(--ink); }
.vol-pill small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.vol-pill.is-active { border-color: var(--gold); background: #fffdf7; }
.vol-pill.is-active b { color: var(--navy); }
.vol-pill.is-active small { color: var(--gold); font-weight: 700; }

/* Цена */
.pprice {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 20px;
}
.pprice b {
  font-family: var(--font-serif);
  font-size: 33px;
  font-weight: 600;
  color: var(--navy);
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.pprice b.swap { opacity: 0; transform: translateY(6px); }
.pprice span { font-size: 13.5px; color: var(--muted); }

/* Кнопки действий */
.pactions { display: grid; gap: 11px; margin-top: 22px; }

/* Аккордеоны: описание, пирамида */
.pextra { margin-top: 34px; display: grid; gap: 12px; }
.pblock {
  background: var(--white);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  padding: 20px;
}
.pblock h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
}
.pblock p { color: var(--muted); font-size: 14.5px; }

.pyramid { display: grid; gap: 14px; }
.pyramid__row { display: grid; gap: 5px; }
.pyramid__row b {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.pyramid__row span { font-size: 14.5px; color: var(--ink); }

/* Похожие */
.similar { margin-top: 44px; }
.similar__title {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  padding: 0 4px;
}
.similar__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 18px;
}
.similar__track::-webkit-scrollbar { display: none; }
.similar__track .card {
  flex: none;
  width: min(46vw, 210px);
  scroll-snap-align: start;
  opacity: 1;
  transform: none;
}

/* Закреплённая панель заказа */
.buybar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px var(--gutter) calc(12px + var(--safe-bottom));
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 -8px 30px rgba(0, 25, 81, .1);
  transform: translateY(110%);
  transition: transform var(--t-med) var(--ease);
}
.buybar.is-show { transform: none; }
.buybar__info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.buybar__vol { font-size: 12px; font-weight: 600; color: var(--muted); }
.buybar__price {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}
.buybar__btn { flex: 1; min-height: 52px; }

body.has-buybar { padding-bottom: calc(88px + var(--safe-bottom)); }

/* ═══════════════════════════════════════════════════════════════
   ПОДВАЛ · WhatsApp FAB
   ═══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--navy-deep);
  color: rgba(249, 247, 244, .65);
  text-align: center;
  padding: 52px 24px calc(40px + var(--safe-bottom));
}
.footer__logo { margin: 0 auto 14px; border-radius: 50%; }
.footer__brand {
  font-family: var(--font-serif);
  font-size: 21px;
  color: var(--ivory);
}
.footer__brand em {
  display: block;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 5px;
}
.footer__tag { font-size: 13px; margin-top: 12px; }
.footer__contacts {
  display: grid;
  gap: 6px;
  margin: 26px auto;
  font-size: 14px;
  max-width: 320px;
}
.footer__contacts a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  transition: color var(--t-fast);
}
.footer__contacts a:hover { color: var(--gold-light); }
.footer__copy { font-size: 12px; opacity: .55; margin-top: 22px; }

.wa-fab {
  position: fixed;
  right: 16px;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 50;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #23a55b;
  color: #fff;
  box-shadow: 0 8px 24px rgba(35, 165, 91, .4);
  transition: transform var(--t-fast) var(--ease);
}
.wa-fab:active { transform: scale(.9); }
.wa-fab svg { width: 28px; height: 28px; }

/* ═══════════════════════════════════════════════════════════════
   DESKTOP (вторично, но аккуратно)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}

@media (min-width: 960px) {
  :root { --gutter: 32px; }
  body { font-size: 16px; }

  .grid { grid-template-columns: repeat(4, 1fr); gap: 22px; }

  /* Корзина справа */
  .cart {
    inset: 0 0 0 auto;
    width: 430px;
    max-height: none;
    border-radius: 0;
    transform: translateX(105%);
  }
  .cart.is-open { transform: none; }
  .cart__foot { border-radius: 0; }

  /* Sheets по центру как модалки */
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: 460px;
    max-height: 70vh;
    border-radius: var(--radius-l);
    transform: translate(-50%, -46%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--t-med) var(--ease), opacity var(--t-med);
  }
  .sheet.is-open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; }
  .sheet__grip { display: none; }

  /* Товар: две колонки */
  .product__content { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .pmedia { position: sticky; top: calc(var(--header-h) + 24px); }
  .pinfo { padding-top: 0; }
  .buybar { display: none; }
  body.has-buybar { padding-bottom: 0; }
  .product__skeleton { grid-template-columns: 1fr 1fr; gap: 48px; }

  .similar__track .card { width: 230px; }
}

/* ── Скидки: бейдж на карточке и старая цена на странице товара ── */
.card__discount {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 100px;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 3px 10px rgba(180, 133, 0, .3);
}

/* Пометка «Оригинал» в карточке (аналоги не помечаем — их большинство) */
.card__type {
  display: inline-block;
  align-self: flex-start;
  margin-top: 5px;
  padding: 2px 9px;
  border-radius: 100px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pprice__old {
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.pprice__badge {
  align-self: center;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
}

/* ── Доступность: отключение анимаций ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}
