/* ==========================================================================
   cve.by — дизайн-система «Цветы и подарки» (23.11.2026)
   Подключается ПОСЛЕ style.css во всех layouts. Старые классы style.css не удаляются:
   кабинеты продавца/админа продолжают работать на них, витрина — на компонентах ниже.
   Префиксы: ui-* — общие компоненты, sh-* — шапка, sf-* — подвал, pc-* — карточка товара,
   pp-* — страница товара, co-* — оформление заказа, cat-* — каталог, home-* — главная.
   ========================================================================== */

:root {
  /* цвет */
  --c-primary: #D63484;
  --c-primary-hover: #B82A70;
  --c-primary-tint: #FCE8F1;
  --c-primary-tint-2: #F8D3E4;
  --c-text: #1F1F22;
  --c-text-2: #5F6166;          /* вторичный: контраст 6.1:1 на белом, 5.7:1 на фоне */
  --c-text-3: #6E7076;          /* подписи/плейсхолдеры: 4.9:1 на белом */
  --c-bg: #F6F6F8;
  --c-surface: #FFFFFF;
  --c-surface-2: #F1F1F4;
  --c-border: #E4E5E6;
  --c-border-strong: #CFD1D4;
  --c-success: #1E9E6A;
  --c-success-tint: #E3F5EC;
  --c-error: #D93025;
  --c-error-tint: #FCE9E7;
  --c-warning: #F2A100;
  --c-warning-tint: #FFF4DB;
  --c-dark: #1F1F22;
  --c-focus: #D63484;

  /* типографика */
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fs-12: 12px; --fs-14: 14px; --fs-16: 16px; --fs-20: 20px; --fs-24: 24px; --fs-32: 32px; --fs-40: 40px;
  --lh-tight: 1.2; --lh: 1.45; --lh-loose: 1.6;

  /* радиусы */
  --r-8: 8px; --r-12: 12px; --r-20: 20px; --r-pill: 999px;

  /* отступы, шаг 4 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* тени */
  --sh-1: 0 1px 2px rgba(20, 20, 30, .04), 0 2px 8px rgba(20, 20, 30, .05);
  --sh-2: 0 2px 4px rgba(20, 20, 30, .04), 0 8px 24px rgba(20, 20, 30, .08);
  --sh-3: 0 12px 40px rgba(20, 20, 30, .16);

  /* раскладка */
  --container: 1280px;
  --gutter: 16px;
  --header-h: 64px;
  --tap: 44px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1200px) { :root { --gutter: 32px; --header-h: 72px; } }

/* ---------------------------------------------------------------- база */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  font-family: var(--font);
  font-size: var(--fs-16);
  line-height: var(--lh);
  letter-spacing: 0;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
/* старые правила style.css задают Open Sans почти каждому классу — переопределяем единым шрифтом */
body *:not(svg):not(svg *) { font-family: var(--font) !important; }
body.is-locked { overflow: hidden; }
.wrapper { flex: 1 0 auto; min-height: 0 !important; min-width: 0 !important; width: 100%; }
h1, .ui-h1 { font-size: clamp(26px, 3.2vw, var(--fs-40)); line-height: var(--lh-tight); font-weight: 800; letter-spacing: -.01em; color: var(--c-text); }
h2, .ui-h2 { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.25; font-weight: 800; letter-spacing: -.005em; color: var(--c-text); }
h3, .ui-h3 { font-size: var(--fs-20); line-height: 1.3; font-weight: 700; color: var(--c-text); }
a { color: inherit; }
img { height: auto; }
.ui-link { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ui-link:hover { color: var(--c-primary-hover); }
.ui-muted { color: var(--c-text-2); }
.ui-small { font-size: var(--fs-14); }
.ui-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ui-hidden { display: none !important; }

/* Фокус-кольцо: только с клавиатуры (style.css гасил outline у всего) */
:focus { outline: none; }
:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--c-focus) !important;
  outline-offset: 2px !important;
  border-radius: var(--r-8);
}
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--c-dark); color: #fff; padding: 10px 16px; border-radius: var(--r-8); }
.skip-link:focus { top: 8px; }

/* иконки из спрайта /assets/img/ui.svg */
.ui-i { width: 24px; height: 24px; flex: none; display: inline-block; vertical-align: middle; fill: none; }
.ui-i--16 { width: 16px; height: 16px; }
.ui-i--20 { width: 20px; height: 20px; }
.ui-i--32 { width: 32px; height: 32px; }

/* контейнер */
.ui-container,
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  min-width: 0 !important;
}
.ui-section { margin-top: var(--s-12); }
.ui-section:first-child { margin-top: var(--s-6); }
.ui-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.ui-section__head h2 { margin: 0; }
.ui-section__more { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: var(--fs-14); color: var(--c-primary); white-space: nowrap; min-height: var(--tap); }
.ui-section__more:hover { color: var(--c-primary-hover); }
.ui-surface { background: var(--c-surface); border-radius: var(--r-20); box-shadow: var(--sh-1); padding: var(--s-6); }
@media (max-width: 767px) { .ui-surface { padding: var(--s-4); border-radius: var(--r-12); } .ui-section { margin-top: var(--s-10); } }

/* ---------------------------------------------------------------- кнопки */
.ui-btn {
  --btn-bg: var(--c-surface);
  --btn-fg: var(--c-text);
  --btn-bd: var(--c-border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border: 1px solid var(--btn-bd); border-radius: var(--r-12);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 700 var(--fs-16)/1.2 var(--font); letter-spacing: 0;
  text-align: center; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease), transform .1s;
}
.ui-btn:hover { --btn-bd: var(--c-text-3); }
.ui-btn:active { transform: translateY(1px); }
.ui-btn[disabled], .ui-btn.is-disabled { opacity: .5; pointer-events: none; }
.ui-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.ui-btn.is-loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--btn-fg) transparent var(--btn-fg) transparent; animation: ui-spin .7s linear infinite; }
.ui-btn--primary { --btn-bg: var(--c-primary); --btn-fg: #fff; --btn-bd: var(--c-primary); }
.ui-btn--primary:hover { --btn-bg: var(--c-primary-hover); --btn-bd: var(--c-primary-hover); }
.ui-btn--secondary { --btn-bg: var(--c-primary-tint); --btn-fg: var(--c-primary-hover); --btn-bd: var(--c-primary-tint); }
.ui-btn--secondary:hover { --btn-bg: var(--c-primary-tint-2); --btn-bd: var(--c-primary-tint-2); }
.ui-btn--ghost { --btn-bg: transparent; --btn-bd: transparent; }
.ui-btn--ghost:hover { --btn-bg: var(--c-surface-2); --btn-bd: var(--c-surface-2); }
.ui-btn--dark { --btn-bg: var(--c-dark); --btn-fg: #fff; --btn-bd: var(--c-dark); }
.ui-btn--sm { min-height: 40px; padding: 0 var(--s-4); font-size: var(--fs-14); border-radius: var(--r-8); }
.ui-btn--lg { min-height: 56px; padding: 0 var(--s-6); font-size: 17px; }
.ui-btn--block { display: flex; width: 100%; }
.ui-btn--icon { width: var(--tap); min-height: var(--tap); padding: 0; border-radius: var(--r-pill); }
@media (min-width: 1024px) { .ui-btn { min-height: 46px; } }
@keyframes ui-spin { to { transform: rotate(360deg); } }

/* иконка-кнопка в шапке */
.ui-iconbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border-radius: var(--r-pill);
  background: transparent; border: 0; color: var(--c-text); cursor: pointer;
  transition: background-color .15s;
}
.ui-iconbtn:hover { background: var(--c-surface-2); }
.ui-count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--c-primary); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--c-surface);
}
.ui-count:empty, .ui-count[data-count="0"] { display: none; }

/* ---------------------------------------------------------------- чипы */
.ui-chips { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 0 6px; margin: 0; list-style: none; scroll-snap-type: x proximity; }
.ui-chips::-webkit-scrollbar { display: none; }
.ui-chips--wrap { flex-wrap: wrap; overflow: visible; }
.ui-chips > li { flex: none; list-style: none; scroll-snap-align: start; }
.ui-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 var(--s-4);
  border: 1px solid var(--c-border); border-radius: var(--r-pill);
  background: var(--c-surface); color: var(--c-text);
  font-size: var(--fs-14); font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.ui-chip:hover { border-color: var(--c-text-3); }
.ui-chip.is-active, .ui-chip[aria-current="page"], .ui-chip[aria-pressed="true"] { background: var(--c-dark); border-color: var(--c-dark); color: #fff; }
.ui-chip__count { color: var(--c-text-3); font-weight: 600; }
.ui-chip.is-active .ui-chip__count { color: rgba(255,255,255,.7); }
@media (pointer: coarse) { .ui-chip { min-height: var(--tap); } }

/* ---------------------------------------------------------------- поля */
.ui-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); min-width: 0; }
.ui-field:last-child { margin-bottom: 0; }
.ui-label { font-size: var(--fs-14); font-weight: 700; color: var(--c-text); }
.ui-label .req { color: var(--c-primary); }
.ui-input, .ui-select, .ui-textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--c-border-strong); border-radius: var(--r-12);
  background: var(--c-surface); color: var(--c-text);
  font: 500 var(--fs-16)/1.4 var(--font);
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.ui-input::placeholder, .ui-textarea::placeholder { color: var(--c-text-3); opacity: 1; }
.ui-input:hover, .ui-select:hover, .ui-textarea:hover { border-color: var(--c-text-3); }
.ui-input:focus, .ui-select:focus, .ui-textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-tint); outline: none; }
.ui-input[readonly] { background: var(--c-surface-2); }
.ui-textarea { min-height: 96px; resize: vertical; }
.ui-select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235F6166' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.ui-hint { font-size: var(--fs-12); color: var(--c-text-2); }
.ui-counter { font-size: var(--fs-12); color: var(--c-text-2); text-align: right; }
.ui-field.has-error .ui-input, .ui-field.has-error .ui-textarea, .ui-input.error { border-color: var(--c-error); box-shadow: 0 0 0 3px var(--c-error-tint); }
.ui-error, .ui-field div.error { font-size: var(--fs-12); color: var(--c-error); font-weight: 600; }
.ui-row { display: grid; gap: var(--s-3); grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.ui-row > .ui-field { margin-bottom: 0; }
.ui-row + .ui-field, .ui-field + .ui-row, .ui-row + .ui-row { margin-top: var(--s-4); }
@media (max-width: 480px) { .ui-row--stack { grid-template-columns: 1fr; } }
.ui-input-group { display: flex; gap: var(--s-2); }
.ui-input-group .ui-input { flex: 1; min-width: 0; }
.ui-input-group .ui-btn { flex: none; }
@media (max-width: 420px) { .ui-input-group { flex-direction: column; } }

/* чекбокс / радио */
.ui-check { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--tap); padding: 10px 0; cursor: pointer; font-size: var(--fs-16); line-height: 1.4; }
.ui-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ui-check__box { flex: none; width: 22px; height: 22px; margin-top: 0; border: 2px solid var(--c-border-strong); border-radius: 6px; background: var(--c-surface); display: grid; place-items: center; transition: background-color .15s, border-color .15s; }
.ui-check__box svg { width: 14px; height: 14px; color: #fff; opacity: 0; }
.ui-check input:checked + .ui-check__box { background: var(--c-primary); border-color: var(--c-primary); }
.ui-check input:checked + .ui-check__box svg { opacity: 1; }
.ui-check input:focus-visible + .ui-check__box { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.ui-check__text small { display: block; color: var(--c-text-2); font-size: var(--fs-14); }

/* сегмент (переключатель из 2–3 вариантов) */
.ui-segment { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: var(--r-12); background: var(--c-surface-2); width: 100%; }
.ui-segment label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 var(--s-3); border-radius: var(--r-8); font-size: var(--fs-14); font-weight: 700; color: var(--c-text-2); cursor: pointer; text-align: center; }
.ui-segment input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ui-segment label:has(input:checked), .ui-segment label.is-active { background: var(--c-surface); color: var(--c-text); box-shadow: var(--sh-1); }
.ui-segment label:has(input:focus-visible) { outline: 3px solid var(--c-focus); outline-offset: 1px; }

/* карточка-вариант (способ оплаты) */
.ui-option { position: relative; display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border: 1.5px solid var(--c-border); border-radius: var(--r-12); background: var(--c-surface); cursor: pointer; transition: border-color .15s, background-color .15s; }
.ui-option + .ui-option { margin-top: var(--s-2); }
.ui-option input { position: absolute; opacity: 0; }
.ui-option__radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--c-border-strong); margin-top: 1px; display: grid; place-items: center; }
.ui-option__radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-primary); transform: scale(0); transition: transform .15s; }
.ui-option:has(input:checked) { border-color: var(--c-primary); background: #FFFBFD; }
.ui-option:has(input:checked) .ui-option__radio { border-color: var(--c-primary); }
.ui-option:has(input:checked) .ui-option__radio::after { transform: scale(1); }
.ui-option:has(input:focus-visible) { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.ui-option__title { font-weight: 700; }
.ui-option__desc { font-size: var(--fs-14); color: var(--c-text-2); margin-top: 2px; }
.ui-option .ui-i { color: var(--c-text-2); margin-left: auto; }

/* количество */
.ui-qty { display: inline-flex; align-items: center; border: 1px solid var(--c-border-strong); border-radius: var(--r-12); background: var(--c-surface); height: 48px; }
.ui-qty button { width: 44px; height: 100%; border: 0; background: transparent; color: var(--c-text); display: grid; place-items: center; cursor: pointer; border-radius: var(--r-12); }
.ui-qty button:hover { background: var(--c-surface-2); }
.ui-qty input { width: 40px; height: 100%; border: 0; background: transparent; text-align: center; font: 700 var(--fs-16) var(--font); color: var(--c-text); -moz-appearance: textfield; }
.ui-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ui-qty--sm { height: 36px; border-radius: var(--r-8); }
.ui-qty--sm button { width: 36px; }
.ui-qty--sm input { width: 28px; font-size: var(--fs-14); }

/* ---------------------------------------------------------------- бейджи */
.ui-badge { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 800; letter-spacing: .01em; white-space: nowrap; background: var(--c-surface); color: var(--c-text); }
.ui-badge--today { background: var(--c-success); color: #fff; }
.ui-badge--sale { background: var(--c-primary); color: #fff; }
.ui-badge--muted { background: var(--c-surface-2); color: var(--c-text-2); }
.ui-badge--outline { background: rgba(255,255,255,.92); color: var(--c-text); box-shadow: var(--sh-1); }
.ui-badge .ui-i { width: 14px; height: 14px; }

/* рейтинг */
.ui-rating { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-14); font-weight: 700; color: var(--c-text); }
.ui-rating .ui-i { width: 16px; height: 16px; color: #F2A100; }
.ui-rating span { color: var(--c-text-2); font-weight: 500; }

/* цена */
.ui-price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.ui-price__now { font-size: var(--fs-20); font-weight: 800; color: var(--c-text); letter-spacing: -.01em; }
.ui-price__now.is-sale { color: var(--c-primary); }
.ui-price__old { font-size: var(--fs-14); color: var(--c-text-2); text-decoration: line-through; }

/* ---------------------------------------------------------------- сетка товаров и карточка */
.ui-grid { display: grid; gap: var(--s-6) var(--s-5); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ui-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .ui-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-3); } }

.pc { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--c-surface); border-radius: var(--r-20); box-shadow: var(--sh-1); overflow: hidden; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.pc:hover { box-shadow: var(--sh-2); }
.pc__media { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--c-surface-2); overflow: hidden; }
.pc__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s var(--ease), transform .5s var(--ease); }
.pc__media img.pc__img2 { opacity: 0; }
@media (hover: hover) {
  .pc:hover .pc__media img.pc__img2 { opacity: 1; }
  .pc:hover .pc__media img:only-of-type { transform: scale(1.03); }
}
.pc__badges { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 1; pointer-events: none; }
.pc__fav { position: absolute; right: 6px; top: 6px; z-index: 2; width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--c-text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh-1); transition: color .15s, transform .15s; }
.pc__fav:hover { color: var(--c-primary); }
.pc__fav .ui-i { width: 22px; height: 22px; }
.pc__fav.in-collection { color: var(--c-primary); }
.pc__fav.in-collection .ui-i, .in-collection .ui-i { fill: currentColor; }
.pc__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.pc__price { margin-bottom: 2px; }
.pc__name { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--c-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pc__name:hover { color: var(--c-primary); }
.pc__name::after { content: ""; position: absolute; inset: 0; z-index: 0; } /* вся карточка кликабельна */
.pc__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-14); color: var(--c-text-2); min-width: 0; }
.pc__shop { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pc__delivery { display: flex; align-items: center; gap: 6px; font-size: var(--fs-14); color: var(--c-text-2); }
.pc__delivery .ui-i { width: 16px; height: 16px; color: var(--c-success); }
.pc__buy { position: relative; z-index: 1; margin-top: auto; padding-top: 8px; }
.pc__buy .ui-btn { width: 100%; min-height: 44px; font-size: var(--fs-14); }
.pc__buy .ui-btn.is-added { --btn-bg: var(--c-success-tint); --btn-fg: var(--c-success); --btn-bd: var(--c-success-tint); }
@media (max-width: 767px) {
  .pc { border-radius: var(--r-12); }
  .pc__body { padding: 10px 10px 12px; gap: 4px; }
  .pc__name { font-size: 14px; }
  .ui-price__now { font-size: 17px; }
  .pc__badges { left: 8px; top: 8px; }
  .pc__badges .ui-badge { height: 22px; padding: 0 8px; font-size: 11px; }
  .pc__delivery { font-size: var(--fs-12); }
  .pc__meta { font-size: var(--fs-12); }
}

/* горизонтальная лента (карусель на scroll-snap, без библиотек) */
.ui-rail { position: relative; }
.ui-rail__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - var(--s-5) * 3) / 4); gap: var(--s-5); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 12px; margin: -4px -2px -12px; overscroll-behavior-x: contain; }
.ui-rail__track::-webkit-scrollbar { display: none; }
.ui-rail__track > * { scroll-snap-align: start; }
@media (max-width: 1100px) { .ui-rail__track { grid-auto-columns: calc((100% - var(--s-5) * 2) / 3); } }
@media (max-width: 767px) { .ui-rail__track { grid-auto-columns: 46%; gap: var(--s-3); } }
.ui-rail__nav { position: absolute; top: 38%; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--c-surface); box-shadow: var(--sh-2); display: grid; place-items: center; cursor: pointer; color: var(--c-text); }
.ui-rail__nav--prev { left: -18px; }
.ui-rail__nav--next { right: -18px; }
.ui-rail__nav[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 1023px), (hover: none) { .ui-rail__nav { display: none; } }

/* плитки категорий */
.ui-tiles { display: grid; gap: var(--s-4); grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ui-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) { .ui-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); } }
.ui-tile { display: flex; flex-direction: column; gap: 8px; text-align: center; color: var(--c-text); }
.ui-tile__img { position: relative; aspect-ratio: 1; border-radius: var(--r-20); overflow: hidden; background: linear-gradient(160deg, var(--c-primary-tint), #fff); display: grid; place-items: center; transition: transform .2s var(--ease), box-shadow .2s; }
.ui-tile__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ui-tile__img .ui-i { width: 40px; height: 40px; color: var(--c-primary); }
.ui-tile:hover .ui-tile__img { box-shadow: var(--sh-2); transform: translateY(-2px); }
.ui-tile__name { font-size: var(--fs-14); font-weight: 700; line-height: 1.3; }
@media (max-width: 767px) { .ui-tile__img { border-radius: var(--r-12); } .ui-tile__name { font-size: 13px; } }

/* ---------------------------------------------------------------- модалка / bottom-sheet */
.ui-overlay { position: fixed; inset: 0; z-index: 900; background: rgba(20, 20, 30, .48); opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s; }
.ui-overlay.is-open { opacity: 1; visibility: visible; }
.ui-sheet {
  position: fixed; z-index: 901; left: 50%; top: 50%;
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column;
  background: var(--c-surface); border-radius: var(--r-20); box-shadow: var(--sh-3);
  transform: translate(-50%, -46%); opacity: 0; visibility: hidden;
  transition: transform .25s var(--ease), opacity .2s, visibility .25s;
}
.ui-sheet.is-open { transform: translate(-50%, -50%); opacity: 1; visibility: visible; }
.ui-sheet--wide { width: min(820px, calc(100vw - 32px)); }
.ui-sheet--right { left: auto; right: 0; top: 0; bottom: 0; height: 100%; max-height: none; width: min(440px, 100vw); border-radius: var(--r-20) 0 0 var(--r-20); transform: translateX(100%); }
.ui-sheet--right.is-open { transform: none; }
.ui-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-5) var(--s-6) var(--s-3); }
.ui-sheet__title { font-size: var(--fs-20); font-weight: 800; line-height: 1.3; }
.ui-sheet__body { padding: 0 var(--s-6) var(--s-6); overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; }
.ui-sheet__foot { padding: var(--s-4) var(--s-6) var(--s-5); border-top: 1px solid var(--c-border); background: var(--c-surface); border-radius: 0 0 var(--r-20) var(--r-20); }
.ui-sheet__grip { display: none; }
@media (max-width: 640px) {
  .ui-sheet:not(.ui-sheet--right) {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 92vh; max-height: 92dvh;
    border-radius: var(--r-20) var(--r-20) 0 0; transform: translateY(100%);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .ui-sheet:not(.ui-sheet--right).is-open { transform: none; }
  .ui-sheet__grip { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--c-border-strong); margin: 8px auto 0; }
  .ui-sheet__head { padding: var(--s-3) var(--s-4) var(--s-2); }
  .ui-sheet__body { padding: 0 var(--s-4) var(--s-5); }
  .ui-sheet__foot { padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom)); border-radius: 0; }
  .ui-sheet--right { width: 100vw; border-radius: 0; }
}

/* старая модалка из main.js popup() — приводим к виду ui-sheet */
.popup { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 20, 30, .48); opacity: 0; transition: opacity .2s var(--ease); }
.popup.show { opacity: 1; }
.popup__wrap, .popup.show .popup__wrap {
  position: relative; margin: 0; width: min(560px, calc(100vw - 32px)); min-width: 0 !important; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--c-surface); border-radius: var(--r-20); box-shadow: var(--sh-3); padding: var(--s-6);
  transform: translateY(12px); transition: transform .25s var(--ease);
}
.popup.show .popup__wrap { transform: none; }
.popup--wide .popup__wrap { width: min(820px, calc(100vw - 32px)); }
.popup__close { position: absolute; top: 12px; right: 12px; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: var(--c-surface-2); color: var(--c-text); font-size: 0; transform: none; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.popup__close::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center/contain no-repeat; }
.popup__title { font-size: var(--fs-20); font-weight: 800; line-height: 1.3; margin: 0 52px var(--s-4) 0; }
.popup__content { font-size: var(--fs-16); line-height: var(--lh); color: var(--c-text); }
.popup__content .container { padding: 0; }
@media (max-width: 640px) {
  .popup { align-items: flex-end; padding: 0; }
  .popup__wrap, .popup.show .popup__wrap { width: 100%; max-width: 100%; border-radius: var(--r-20) var(--r-20) 0 0; padding: var(--s-5) var(--s-4) calc(var(--s-5) + env(safe-area-inset-bottom)); max-height: 92vh; max-height: 92dvh; transform: translateY(100%); }
  .popup.show .popup__wrap { transform: none; }
}

/* ---------------------------------------------------------------- тосты */
.ui-toasts { position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.ui-toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s-3); padding: 14px 16px; border-radius: var(--r-12); background: var(--c-dark); color: #fff; box-shadow: var(--sh-3); font-size: var(--fs-14); font-weight: 600; line-height: 1.4; animation: ui-toast-in .25s var(--ease); }
.ui-toast.is-hiding { animation: ui-toast-out .2s var(--ease) forwards; }
.ui-toast .ui-i { width: 20px; height: 20px; flex: none; }
.ui-toast--success .ui-i { color: #6FE0AE; }
.ui-toast--error { background: #8E1F18; }
.ui-toast__text { flex: 1; }
.ui-toast__action { flex: none; color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 8px 4px; background: none; border: 0; cursor: pointer; font-size: var(--fs-14); }
.ui-toast__close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ui-toast__close .ui-i { width: 16px; height: 16px; }
@keyframes ui-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes ui-toast-out { to { opacity: 0; transform: translateY(12px); } }
@media (max-width: 767px) { .ui-toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } }
/* старый popupMess больше не используется (mess()/error() → тосты), но на всякий случай прячем */
.popupMess { display: none !important; }

/* ---------------------------------------------------------------- пустые состояния, алерты */
.ui-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-3); padding: var(--s-12) var(--s-6); background: var(--c-surface); border-radius: var(--r-20); box-shadow: var(--sh-1); }
.ui-empty__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--c-primary-tint); color: var(--c-primary); display: grid; place-items: center; }
.ui-empty__icon .ui-i { width: 36px; height: 36px; }
.ui-empty__title { font-size: var(--fs-20); font-weight: 800; }
.ui-empty__text { color: var(--c-text-2); max-width: 460px; }
.ui-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-2); }
.ui-empty--plain { box-shadow: none; padding: var(--s-8) var(--s-4); }
.ui-alert { display: flex; gap: var(--s-3); align-items: flex-start; padding: 14px 16px; border-radius: var(--r-12); font-size: var(--fs-14); line-height: 1.45; background: var(--c-surface-2); }
.ui-alert .ui-i { width: 20px; height: 20px; flex: none; }
.ui-alert--success { background: var(--c-success-tint); color: #0E5E3D; }
.ui-alert--error { background: var(--c-error-tint); color: #8E1F18; }
.ui-alert--warning { background: var(--c-warning-tint); color: #6B4700; }
.ui-alert--info { background: var(--c-primary-tint); color: #7A1A4A; }
.ui-alert ul { margin: 0; padding-left: 18px; }

/* ---------------------------------------------------------------- скелетоны */
.ui-skel { position: relative; overflow: hidden; background: var(--c-surface-2); border-radius: var(--r-8); }
.ui-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: ui-shimmer 1.3s infinite; }
.ui-skel--text { height: 14px; margin: 6px 0; }
.ui-skel--title { height: 22px; width: 60%; }
.ui-skel--media { aspect-ratio: 4 / 5; border-radius: 0; }
@keyframes ui-shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------------------------------------------------------- хлебные крошки, текст */
.ui-crumbs, .breadcrumbs { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; padding: 0; margin: 0; font-size: var(--fs-14); color: var(--c-text-2); }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before { content: ""; width: 16px; height: 16px; margin: 0 6px; background: currentColor; opacity: .6; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat; }
.breadcrumbs li a { color: var(--c-text-2); }
.breadcrumbs li a:hover { color: var(--c-primary); }
.breadcrumbs li:last-child { color: var(--c-text); }
.ui-crumbs-wrap { padding-top: var(--s-5); }
.ui-prose { font-size: var(--fs-16); line-height: var(--lh-loose); color: var(--c-text); max-width: 860px; }
.ui-prose p, .ui-prose ul, .ui-prose ol { margin: 0 0 var(--s-3); }
.ui-prose ul, .ui-prose ol { padding-left: 22px; }
.ui-prose h2 { margin: var(--s-8) 0 var(--s-3); font-size: var(--fs-24); }
.ui-prose h3 { margin: var(--s-6) 0 var(--s-2); }
.ui-prose a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.ui-prose.is-collapsed { max-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }

/* старые утилиты в витринных шаблонах */
.title h1 { margin: 0; }

/* ---------------------------------------------------------------- пагинация (bootstrap-4 view) */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: var(--s-8) 0 0; justify-content: center; }
.pagination .page-link, .pagination li > span { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); height: var(--tap); padding: 0 12px; border-radius: var(--r-12); background: var(--c-surface); border: 1px solid var(--c-border); font-weight: 700; color: var(--c-text); }
.pagination .active .page-link, .pagination .active > span { background: var(--c-dark); border-color: var(--c-dark); color: #fff; }
.pagination .disabled .page-link, .pagination .disabled > span { opacity: .45; }
.ui-pager { display: block; width: 100%; clear: both; }
.ui-pager .pagination li { height: auto; padding: 0; }
.ui-pager__gap--m { display: none; }
.ui-pager .ui-pager__gap--d > span, .ui-pager .ui-pager__gap--m > span { background: transparent; border-color: transparent; min-width: 24px; padding: 0 4px; opacity: 1; color: var(--c-text-2); }
@media (max-width: 600px) {
  .ui-pager .pagination { gap: 4px; }
  .ui-pager .is-far, .ui-pager__gap--d { display: none; }
  .ui-pager__gap--m { display: list-item; list-style: none; }
}

/* ==========================================================================
   Шапка
   ========================================================================== */
.sh { position: sticky; top: 0; z-index: 800; background: var(--c-surface); box-shadow: 0 1px 0 var(--c-border); height: auto !important; }
.sh__row { display: flex; align-items: center; gap: var(--s-4); height: var(--header-h); }
.sh__logo { display: flex; align-items: center; gap: 10px; flex: none; color: var(--c-text); min-height: var(--tap); }
.sh__logo img { width: 40px; height: 40px; }
.sh__brand { display: flex; flex-direction: column; line-height: 1.1; }
.sh__brand b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.sh__brand small { font-size: 12px; color: var(--c-text-2); font-weight: 600; }
.sh__city { position: relative; flex: none; }
.sh__city-btn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 12px; border-radius: var(--r-pill); border: 0; background: var(--c-surface-2); color: var(--c-text); font-weight: 700; font-size: var(--fs-14); cursor: pointer; white-space: nowrap; }
.sh__city-btn .ui-i { width: 18px; height: 18px; }
.sh__city-btn .ui-i:first-child { color: var(--c-primary); }
.sh__city-btn:hover { background: #E9E9ED; }
.sh__search { flex: 1; min-width: 0; max-width: 560px; position: relative; }
.sh__search form { position: relative; }
.sh__search .ui-input { min-height: 44px; padding-left: 44px; border-radius: var(--r-pill); background: var(--c-surface-2); border-color: transparent; }
.sh__search .ui-input:focus { background: var(--c-surface); border-color: var(--c-primary); }
.sh__search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--c-text-2); pointer-events: none; }
.sh__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.sh__login { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px 0 10px; border-radius: var(--r-pill); font-weight: 700; font-size: var(--fs-14); border: 0; background: transparent; cursor: pointer; color: var(--c-text); }
.sh__login:hover { background: var(--c-surface-2); }
.sh__burger { display: none; }
.sh__mobile-only { display: none !important; }
.sh__opts { display: flex; align-items: center; gap: 2px; }
.sh-dd { position: relative; }
.sh-dd__btn { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0 10px; border-radius: var(--r-pill); border: 0; background: transparent; font-weight: 700; font-size: var(--fs-14); color: var(--c-text); cursor: pointer; }
.sh-dd__btn:hover { background: var(--c-surface-2); }
.sh-dd__btn .ui-i { width: 16px; height: 16px; }
.sh-dd__menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 200px; padding: 8px; list-style: none; margin: 0; background: var(--c-surface); border-radius: var(--r-12); box-shadow: var(--sh-3); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 10; }
.sh-dd--left .sh-dd__menu { right: auto; left: 0; }
.sh-dd:hover > .sh-dd__menu, .sh-dd:focus-within > .sh-dd__menu, .sh-dd.is-open > .sh-dd__menu { opacity: 1; visibility: visible; transform: none; }
.sh-dd__menu a, .sh-dd__menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 0 12px; border-radius: var(--r-8); font-size: var(--fs-14); font-weight: 600; color: var(--c-text); background: none; border: 0; cursor: pointer; text-align: left; }
.sh-dd__menu a:hover, .sh-dd__menu button:hover, .sh-dd__menu a.is-active { background: var(--c-surface-2); color: var(--c-primary); }
.sh-dd__menu hr { border: 0; border-top: 1px solid var(--c-border); margin: 6px 0; }
.sh-dd__title { padding: 6px 12px; font-size: var(--fs-12); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--c-text-2); }

/* выпадающий список городов */
.sh-cities { width: min(620px, calc(100vw - 32px)); right: auto; left: 0; padding: var(--s-4); }
.sh-cities__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 8px; list-style: none; padding: 0; margin: 0; }
.sh-cities__grid a { min-height: 40px; }
.sh-cities__addr { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--c-border); }

/* второй ряд: меню каталога (мега-меню) */
.catnav { background: var(--c-surface) !important; border-top: 1px solid var(--c-border) !important; z-index: auto !important; }
.catnav__row { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.catnav__item { position: static; }
.catnav__link, .catnav__link:link { display: inline-flex !important; align-items: center; gap: 4px; min-height: 48px; padding: 0 14px !important; font-size: 15px !important; font-weight: 700 !important; color: var(--c-text) !important; border-radius: var(--r-8); white-space: nowrap; }
.catnav__item:first-child .catnav__link { padding-left: 0 !important; }
.catnav__link:hover, .catnav__item:focus-within > .catnav__link { color: var(--c-primary) !important; }
.catnav__link--city::before { content: none !important; }
.catnav__item > span.catnav__link::after, .catnav__item > .catnav__link.has-drop::after { content: "" !important; width: 14px; height: 14px; margin-left: 2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat; }
.catnav__drop { left: 50% !important; right: auto !important; transform: translateX(-50%); width: min(var(--container), calc(100vw - 2 * var(--gutter))); top: 100% !important; padding: var(--s-6) var(--s-8) !important; border-radius: 0 0 var(--r-20) var(--r-20) !important; box-shadow: var(--sh-3) !important; gap: var(--s-6) 0; }
.catnav__mega .catnav__col { width: 20%; min-width: 180px; padding-right: var(--s-5) !important; margin-bottom: 0 !important; }
.catnav__title, a.catnav__title { font-size: var(--fs-12) !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: .05em; color: var(--c-text-2) !important; margin-bottom: var(--s-2) !important; }
a.catnav__title { color: var(--c-text) !important; }
.catnav__drop li a { display: flex !important; align-items: center; min-height: 34px; font-size: 15px !important; line-height: 1.3 !important; color: var(--c-text) !important; }
.catnav__drop li a:hover { color: var(--c-primary) !important; }
.catnav__all { margin-top: var(--s-2); font-weight: 700; color: var(--c-primary) !important; }
.catnav__spacer { flex: 1; }
.catnav__aside { font-size: var(--fs-14); color: var(--c-text-2); display: inline-flex; align-items: center; gap: 6px; }
.catnav__aside .ui-i { width: 18px; height: 18px; color: var(--c-success); }

/* подсказки поиска */
.ui-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--c-surface); border-radius: var(--r-12); box-shadow: var(--sh-3); padding: 6px; list-style: none; margin: 0; max-height: min(480px, 70vh); overflow-y: auto; }
.ui-suggest[hidden] { display: none; }
.ui-suggest a { display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 6px 10px; border-radius: var(--r-8); color: var(--c-text); }
.ui-suggest a:hover, .ui-suggest a.is-active, .ui-suggest a[aria-selected="true"] { background: var(--c-surface-2); }
.ui-suggest__img { width: 40px; height: 48px; flex: none; border-radius: 6px; object-fit: cover; background: var(--c-surface-2); display: grid; place-items: center; color: var(--c-text-2); }
.ui-suggest__img .ui-i { width: 20px; height: 20px; }
.ui-suggest__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ui-suggest__name { font-size: var(--fs-14); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-suggest__type { font-size: var(--fs-12); color: var(--c-text-2); }
.ui-suggest__price { font-size: var(--fs-14); font-weight: 800; white-space: nowrap; }
.ui-suggest__all { justify-content: center; font-weight: 700; color: var(--c-primary) !important; font-size: var(--fs-14); }
.ui-suggest__empty { padding: 14px; font-size: var(--fs-14); color: var(--c-text-2); }


/* кабинет продавца/админа: меню в шапке */
.sh-cabnav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sh-cabnav form { display: contents; }
.sh-cabnav__link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 12px; border-radius: var(--r-pill); font-size: var(--fs-14); font-weight: 700; color: var(--c-text); white-space: nowrap; background: none; border: 0; cursor: pointer; }
.sh-cabnav__link:hover { background: var(--c-surface-2); }
.sh-cabnav__link.is-active { background: var(--c-dark); color: #fff; }
.sh-cabnav__link .ui-i { width: 18px; height: 18px; }
.sh-cities__addr .select_address { display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--tap); padding: 0 12px; border: 0; border-radius: var(--r-8); background: var(--c-primary-tint); color: var(--c-primary-hover); font-weight: 700; font-size: var(--fs-14); cursor: pointer; text-align: left; }
.sh-cities__addr .select_address span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-drawer a.ui-chip { justify-content: center; border-radius: var(--r-pill); min-height: 44px; font-size: var(--fs-14); }
.sh-drawer a.ui-chip.is-active { color: #fff; }
.sh-drawer form { margin: 0; }
.sh-dd__menu form { margin: 0; }

/* мобильная шапка */
@media (max-width: 1023px) {
  :root { --header-h: 60px; }
  .sh__row { gap: 4px; }
  .sh__brand small { display: none; }
  .sh__brand b { font-size: 15px; }
  .sh__logo img { width: 34px; height: 34px; }
  .sh__search, .sh__opts, .sh__login-text, .sh__desktop-only { display: none !important; }
  .sh__mobile-only { display: inline-flex !important; }
  .sh__burger { display: inline-flex; }
  .sh__city { margin-left: 4px; min-width: 0; flex: 0 1 auto; }
  .sh__city-btn { padding: 0 10px; max-width: 150px; overflow: hidden; }
  .sh__city-btn span { overflow: hidden; text-overflow: ellipsis; }
  .sh__city-btn .ui-i:last-child { display: none; }
  .catnav { display: none; }
  .sh-cities { position: fixed; left: 16px; right: 16px; top: calc(var(--header-h) + 4px); width: auto; max-height: 70vh; overflow-y: auto; }
  .sh-cities__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh__login { padding: 0; width: var(--tap); justify-content: center; }
}
@media (max-width: 460px) {
  .sh__row .sh__brand { display: none; }
  .sh__city-btn { max-width: 170px; }
}
/* мобильная строка поиска (раскрывается по иконке) */
.sh-msearch { display: none; padding: 0 0 12px; }
.sh-msearch.is-open { display: block; }
.sh-msearch form { position: relative; }
.sh-msearch .ui-input { padding-left: 44px; border-radius: var(--r-pill); }
@media (min-width: 1024px) { .sh-msearch { display: none !important; } }

/* выдвижное меню (бургер) */
.sh-drawer { position: fixed; z-index: 901; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); background: var(--c-surface); box-shadow: var(--sh-3); transform: translateX(-102%); transition: transform .25s var(--ease), visibility .25s; visibility: hidden; display: flex; flex-direction: column; }
.sh-drawer.is-open { transform: none; visibility: visible; }
.sh-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--c-border); }
.sh-drawer__body { flex: 1; overflow-y: auto; padding: 8px 8px 24px; }
.sh-drawer__group { padding: 8px 0; border-bottom: 1px solid var(--c-border); }
.sh-drawer__group:last-child { border-bottom: 0; }
.sh-drawer__title { padding: 8px 12px 4px; font-size: var(--fs-12); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--c-text-2); }
.sh-drawer__body a, .sh-drawer summary, .sh-drawer button.sh-drawer__link { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: var(--r-8); font-size: var(--fs-16); font-weight: 600; color: var(--c-text); width: 100%; background: none; border: 0; text-align: left; cursor: pointer; }
.sh-drawer__body a:hover, .sh-drawer summary:hover { background: var(--c-surface-2); }
.sh-drawer__body a.is-active { color: var(--c-primary); }
.sh-drawer__head .sh__logo { flex: 1 1 auto; min-width: 0; width: auto; }
.sh-drawer__head .js-drawer-close { flex: none; }
.sh-drawer summary { list-style: none; justify-content: space-between; }
.sh-drawer summary::-webkit-details-marker { display: none; }
.sh-drawer details[open] summary .ui-i { transform: rotate(180deg); }
.sh-drawer details ul { list-style: none; margin: 0 0 6px; padding: 0 0 0 12px; }
.sh-drawer details a { min-height: 42px; font-size: 15px; font-weight: 500; }
.sh-drawer__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px; }
.sh-drawer__opts .ui-segment label { min-height: 40px; }

/* ==========================================================================
   Подвал
   ========================================================================== */
.sf, .footer.sf { flex: none; height: auto !important; margin-top: var(--s-16) !important; padding: var(--s-12) 0 var(--s-6); background: var(--c-dark) !important; color: #C9CACD; min-width: 0 !important; }
.sf__grid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: var(--s-8); }
.sf__brand { display: flex; flex-direction: column; gap: var(--s-3); }
.sf__brand .sh__logo { color: #fff; }
.sf__brand .sh__brand small { color: #A8AAAF; }
.sf__about { font-size: var(--fs-14); color: #A8AAAF; max-width: 280px; }
.sf__title { font-size: var(--fs-14); font-weight: 800; color: #fff; margin-bottom: var(--s-3); }
.sf__list { list-style: none; padding: 0; margin: 0; }
.sf__list a, .sf__list span { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: var(--fs-14); color: #C9CACD; }
.sf__list a:hover { color: #fff; }
.sf__list .ui-i { width: 18px; height: 18px; }
.sf__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-10); padding-top: var(--s-5); border-top: 1px solid rgba(255,255,255,.12); font-size: var(--fs-12); color: #A8AAAF; }
.sf__bottom a { color: #C9CACD; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1023px) { .sf__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sf__brand { grid-column: 1 / -1; } }
@media (max-width: 767px) { .sf, .footer.sf { padding-bottom: calc(var(--s-6) + 76px); } }
@media (max-width: 480px) { .sf__grid { gap: var(--s-6) var(--s-4); } }

/* ==========================================================================
   Корзина (выдвижная панель .cartp)
   ========================================================================== */
.cartp { position: fixed !important; top: 0 !important; bottom: 0 !important; right: 0 !important; left: auto !important; z-index: 902 !important; width: min(440px, 100vw); min-width: 0 !important; padding: 0 !important; border-radius: var(--r-20) 0 0 var(--r-20) !important; box-shadow: var(--sh-3) !important; display: flex; flex-direction: column; opacity: 1 !important; transform: translateX(105%); visibility: hidden; transition: transform .25s var(--ease), visibility .25s !important; background: var(--c-surface); }
.cartp.cartp_show { transform: none; visibility: visible; }
.cartp__top { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 10px 24px; margin: 0 !important; border-bottom: 1px solid var(--c-border); }
.cartp__title { font-size: var(--fs-20) !important; font-weight: 800 !important; }
.cartp__close { width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 50%; background: none; border: 0; cursor: pointer; color: var(--c-text); }
.cartp__close:hover { background: var(--c-surface-2); }
.cartp__scroll { flex: 1; overflow-y: auto !important; height: auto !important; padding: 16px 24px !important; }
.cartp__shopname { display: flex; align-items: center; gap: 8px; font-weight: 800 !important; font-size: var(--fs-16) !important; }
.cartp__shopname .ui-i { width: 18px; height: 18px; color: var(--c-text-2); }
.cartp__timedelivery { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin: 10px 0 4px; min-height: var(--tap); padding: 0 12px; border-radius: var(--r-12); background: var(--c-surface-2); color: var(--c-text) !important; font-size: var(--fs-14) !important; cursor: pointer; border: 0; text-align: left; }
.cartp__timedelivery b { font-weight: 700; }
.cartp__timedelivery .ui-i { width: 18px; height: 18px; color: var(--c-text-2); }
.cartp__item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--c-border); margin: 0 !important; }
.cartp__item:last-child { border-bottom: 0; }
.cartp__img { flex: none; width: 72px !important; height: 90px !important; border-radius: var(--r-8) !important; overflow: hidden; background: var(--c-surface-2); }
.cartp__img img { width: 100%; height: 100%; object-fit: cover; }
.cartp__data { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cartp__itemname { font-size: var(--fs-14) !important; font-weight: 600 !important; line-height: 1.35 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cartp__colandprice { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; }
.cartp__price { font-weight: 800 !important; font-size: var(--fs-16) !important; white-space: nowrap; text-align: right; }
.cartp__price span { display: block; font-weight: 500; font-size: var(--fs-12); color: var(--c-text-2); text-decoration: line-through; }
.cartp__price span.is-same { display: none; }
.cartp__bottom { position: static !important; padding: 16px 24px calc(16px + env(safe-area-inset-bottom)) !important; border-top: 1px solid var(--c-border); background: var(--c-surface); width: auto !important; }
.cartp__result { display: flex !important; justify-content: space-between; gap: 8px; font-size: var(--fs-14); color: var(--c-text-2); margin-bottom: 4px; }
.cartp__result b { color: var(--c-text); }
.cartp__order { margin-top: 12px; }
.cartp .ui-empty { box-shadow: none; padding: var(--s-10) var(--s-2); }
/* количество в корзине: старые классы .col (обработчики main.js) */
.cartp .col, .order__items_list .col, .co-cart .col { display: inline-flex !important; align-items: center; height: 36px; border: 1px solid var(--c-border-strong); border-radius: var(--r-8); background: var(--c-surface); width: auto !important; padding: 0 !important; margin: 0 !important; }
.cartp .col > div, .co-cart .col > div { width: 34px !important; height: 34px !important; display: grid !important; place-items: center; cursor: pointer; font-size: 18px; font-weight: 700; color: var(--c-text); border-radius: var(--r-8); background: none !important; margin: 0 !important; }
.cartp .col > div:hover, .co-cart .col > div:hover { background: var(--c-surface-2) !important; }
.cartp .col input, .co-cart .col input { width: 30px !important; height: 34px; border: 0 !important; text-align: center; font-weight: 700; font-size: var(--fs-14); background: transparent; padding: 0 !important; }
.cartp .col .col__del, .co-cart .col .col__del { display: none !important; }
.cartp .col.del .col__minus, .co-cart .col.del .col__minus { display: none !important; }
.cartp .col.del .col__del, .co-cart .col.del .col__del { display: grid !important; color: var(--c-text-2); }
.cartp .col .col__del::before, .co-cart .col .col__del::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ==========================================================================
   Главная
   ========================================================================== */
.home-hero { position: relative; margin-top: var(--s-6); border-radius: 28px; overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, #FFD6E8 0%, #FCE8F1 38%, #FFF6FA 70%, #FFFFFF 100%); box-shadow: var(--sh-1); }
.home-hero__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s-8); align-items: center; padding: var(--s-12) var(--s-12); }
.home-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--s-4); padding: 6px 12px; border-radius: var(--r-pill); background: rgba(255,255,255,.8); font-size: var(--fs-14); font-weight: 700; color: var(--c-primary-hover); }
.home-hero__eyebrow .ui-i { width: 18px; height: 18px; }
.home-hero h1 { font-size: clamp(30px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -.02em; max-width: 14ch; }
.home-hero__sub { margin-top: var(--s-4); font-size: 18px; line-height: 1.5; color: var(--c-text-2); max-width: 46ch; }
.home-hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.home-hero__usp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-8); list-style: none; padding: 0; }
.home-hero__usp li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-14); line-height: 1.4; color: var(--c-text); font-weight: 600; }
.home-hero__usp .ui-i { flex: none; width: 36px; height: 36px; padding: 8px; border-radius: 50%; background: var(--c-surface); color: var(--c-primary); box-shadow: var(--sh-1); }
.home-hero__media { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.home-hero__media a, .home-hero__media .home-hero__ph { display: block; aspect-ratio: 4 / 5; border-radius: var(--r-20); overflow: hidden; background: rgba(255,255,255,.6); box-shadow: var(--sh-2); }
.home-hero__media a:nth-child(2), .home-hero__media .home-hero__ph:nth-child(2) { transform: translateY(32px); }
.home-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.home-hero__ph { display: grid !important; place-items: center; color: var(--c-primary); }
.home-hero__ph .ui-i { width: 56px; height: 56px; opacity: .6; }
@media (max-width: 1023px) {
  .home-hero__inner { grid-template-columns: 1fr; padding: var(--s-8) var(--s-6); }
  .home-hero__media { display: none; }
}
@media (max-width: 640px) {
  .home-hero { border-radius: var(--r-20); margin-top: var(--s-4); }
  .home-hero__inner { padding: var(--s-6) var(--s-4) var(--s-5); }
  .home-hero__sub { font-size: var(--fs-16); }
  .home-hero__cta .ui-btn { width: 100%; }
  .home-hero__usp { grid-template-columns: 1fr; gap: var(--s-2); margin-top: var(--s-5); }
  .home-hero__usp li { align-items: center; }
}
.home-shops { display: grid; gap: var(--s-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1023px) { .home-shops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .home-shops { grid-template-columns: 1fr; gap: var(--s-3); } }
.shop-card { position: relative; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-20); background: var(--c-surface); box-shadow: var(--sh-1); color: var(--c-text); transition: box-shadow .2s; min-width: 0; }
.shop-card:hover { box-shadow: var(--sh-2); }
.shop-card__logo { flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--c-surface-2); }
.shop-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.shop-card__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-card__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-card__name a::after { content: ""; position: absolute; inset: 0; }
.shop-card__meta { font-size: var(--fs-14); color: var(--c-text-2); }
.home-reviews { display: grid; gap: var(--s-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023px) { .home-reviews { grid-template-columns: 1fr; } }
.rv { padding: var(--s-5); border-radius: var(--r-20); background: var(--c-surface); box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: var(--s-3); }
.rv__head { display: flex; align-items: center; gap: var(--s-3); }
.rv__ava { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary-tint); color: var(--c-primary-hover); display: grid; place-items: center; font-weight: 800; }
.rv__name { font-weight: 700; }
.rv__date { font-size: var(--fs-12); color: var(--c-text-2); }
.rv__stars { display: inline-flex; gap: 2px; color: #F2A100; margin-left: auto; }
.rv__stars .ui-i { width: 16px; height: 16px; }
.rv__stars .is-off { color: var(--c-border-strong); }
.rv__text { font-size: var(--fs-14); line-height: 1.55; color: var(--c-text); }
.rv__answer { margin-top: 4px; padding: 10px 12px; border-radius: var(--r-12); background: var(--c-surface-2); font-size: var(--fs-14); color: var(--c-text-2); }
.home-faq details { border-bottom: 1px solid var(--c-border); }
.home-faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 56px; padding: var(--s-3) 0; font-weight: 700; cursor: pointer; list-style: none; }
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary .ui-i { transition: transform .2s; color: var(--c-text-2); }
.home-faq details[open] summary .ui-i { transform: rotate(180deg); }
.home-faq details > div { padding: 0 0 var(--s-4); color: var(--c-text-2); }
.ui-links { columns: 3; column-gap: var(--s-8); list-style: none; padding: 0; margin: 0; }
.ui-links a { display: inline-flex; min-height: 36px; align-items: center; font-size: var(--fs-14); color: var(--c-text-2); }
.ui-links a:hover { color: var(--c-primary); }
@media (max-width: 767px) { .ui-links { columns: 2; column-gap: var(--s-4); } }

/* ==========================================================================
   Каталог
   ========================================================================== */
.cat-head { padding-top: var(--s-3); }
.cat-head__row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px var(--s-3); }
.cat-head__count { color: var(--c-text-2); font-size: var(--fs-16); font-weight: 600; }
.cat-sub { margin-top: var(--s-4); }
.cat-bar { position: sticky; top: var(--header-h); z-index: 50; margin-top: var(--s-4); padding: 10px 0; background: var(--c-bg); }
.cat-bar__row { display: flex; align-items: center; gap: var(--s-2); }
.cat-bar__filters { display: flex; align-items: center; gap: var(--s-2); flex: 1; min-width: 0; flex-wrap: wrap; }
.cat-bar .ui-select { min-height: 40px; width: auto; padding: 6px 36px 6px 14px; border-radius: var(--r-pill); font-size: var(--fs-14); font-weight: 600; }
.cat-bar__price { display: inline-flex; align-items: center; gap: 6px; }
.cat-bar__cur { font-size: var(--fs-14); font-weight: 600; color: var(--c-text-2); white-space: nowrap; }
.cat-bar__price .ui-input { width: 88px; min-height: 40px; padding: 6px 12px; border-radius: var(--r-pill); font-size: var(--fs-14); }
.cat-bar__sort { margin-left: auto; }
.cat-bar__btn { display: none; }
.cat-bar__reset { font-size: var(--fs-14); font-weight: 700; color: var(--c-primary); min-height: 40px; display: inline-flex; align-items: center; padding: 0 6px; }
@media (max-width: 1023px) {
  .cat-bar { top: var(--header-h); }
  .cat-bar__filters { display: none; }
  .cat-bar__btn { display: inline-flex; }
  .cat-bar__sort { margin-left: auto; }
  .cat-bar__sort .ui-select { max-width: 200px; }
}
.cat-grid { margin-top: var(--s-3); }
.cat-sheet .ui-field { margin-bottom: var(--s-5); }
.cat-sheet .ui-chips { flex-wrap: wrap; overflow: visible; }
.cat-sheet__actions { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s-2); }
.cat-seo { margin-top: var(--s-12); }

/* ==========================================================================
   Страница товара
   ========================================================================== */
.pp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--s-10); align-items: start; margin-top: var(--s-4); }
.pp__gallery { position: sticky; top: calc(var(--header-h) + 64px); min-width: 0; }
.pp-gal { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: var(--s-3); }
.pp-gal__main { position: relative; grid-column: 2; aspect-ratio: 4 / 5; border-radius: var(--r-20); overflow: hidden; background: var(--c-surface-2); }
.pp-gal__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pp-gal__track::-webkit-scrollbar { display: none; }
.pp-gal__slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.pp-gal__slide img { width: 100%; height: 100%; object-fit: cover; }
.pp-gal__thumbs { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 8px; list-style: none; padding: 0; margin: 0; max-height: 100%; overflow-y: auto; scrollbar-width: none; }
.pp-gal__thumbs button { display: block; width: 76px; aspect-ratio: 4 / 5; padding: 0; border: 2px solid transparent; border-radius: var(--r-12); overflow: hidden; background: var(--c-surface-2); cursor: pointer; }
.pp-gal__thumbs button[aria-current="true"] { border-color: var(--c-primary); }
.pp-gal__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pp-gal__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); box-shadow: var(--sh-2); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.pp-gal__nav--prev { left: 12px; } .pp-gal__nav--next { right: 12px; }
.pp-gal__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: none; justify-content: center; gap: 6px; }
.pp-gal__dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); }
.pp-gal__dots span.is-active { background: #fff; width: 18px; border-radius: 4px; }
.pp-gal--single { grid-template-columns: 1fr; }
.pp-gal--single .pp-gal__main { grid-column: 1; }
.pp-gal__badges { position: absolute; left: 14px; top: 14px; z-index: 2; display: flex; gap: 6px; }
.pp__info { min-width: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.pp__title { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; }
.pp__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: var(--fs-14); color: var(--c-text-2); }
.pp__sub a { color: var(--c-text-2); text-decoration: underline; text-underline-offset: 3px; }
.pp__buy { padding: var(--s-5); border-radius: var(--r-20); background: var(--c-surface); box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: var(--s-4); }
.pp__price .ui-price__now { font-size: 32px; }
.pp__price .ui-price__old { font-size: var(--fs-16); }
.pp__actions { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: center; }
.pp__actions .ui-btn--lg { width: 100%; }
.pp__oneclick { width: 100%; }
.pp__tools { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.pp__tools .ui-btn { min-height: 40px; font-size: var(--fs-14); }
.pp__tools .in-collection { color: var(--c-primary); }
.pp__tools .in-collection .ui-i { fill: currentColor; }
.pp-deliv { display: grid; gap: 10px; }
.pp-deliv__row { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-14); line-height: 1.45; }
.pp-deliv__row .ui-i { flex: none; width: 22px; height: 22px; color: var(--c-success); }
.pp-deliv__row b { display: block; font-size: var(--fs-16); }
.pp-deliv__addr { display: inline; padding: 0; border: 0; background: none; font: inherit; color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pp-shop { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-20); background: var(--c-surface); box-shadow: var(--sh-1); }
.pp-shop__logo { flex: none; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--c-surface-2); }
.pp-shop__logo img { width: 100%; height: 100%; object-fit: cover; }
.pp-shop__body { flex: 1; min-width: 0; }
.pp-shop__name { font-weight: 800; }
.pp-shop__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-14); color: var(--c-text-2); }
.pp-specs { display: grid; gap: 0; }
.pp-specs__row { display: flex; justify-content: space-between; gap: var(--s-4); padding: 10px 0; border-bottom: 1px dashed var(--c-border); font-size: var(--fs-14); }
.pp-specs__row span:first-child { color: var(--c-text-2); }
.pp-specs__row span:last-child { text-align: right; font-weight: 600; }
.pp-specs__row a { color: var(--c-primary); }
.pp-block h2 { font-size: var(--fs-20); margin-bottom: var(--s-3); }
.pp-guar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.pp-guar__item { display: flex; flex-direction: column; gap: 8px; padding: var(--s-5); border-radius: var(--r-20); background: var(--c-surface); box-shadow: var(--sh-1); }
.pp-guar__item .ui-i { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--c-primary-tint); color: var(--c-primary); }
.pp-guar__item b { font-size: var(--fs-16); }
.pp-guar__item p { margin: 0; font-size: var(--fs-14); color: var(--c-text-2); line-height: 1.5; }
.pp-sticky { display: none; }
@media (max-width: 1023px) {
  .pp { grid-template-columns: 1fr; gap: var(--s-5); }
  .pp__gallery { position: static; margin: 0 calc(var(--gutter) * -1); }
  .pp-gal { grid-template-columns: 1fr; }
  .pp-gal__main { grid-column: 1; border-radius: 0; }
  .pp-gal__thumbs, .pp-gal__nav { display: none; }
  .pp-gal__dots { display: flex; }
  .pp-guar { grid-template-columns: 1fr; }
  .pp-sticky { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 700; align-items: center; gap: var(--s-3); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--c-surface); box-shadow: 0 -4px 20px rgba(20,20,30,.1); transform: translateY(110%); transition: transform .2s var(--ease); }
  .pp-sticky.is-visible { transform: none; }
  .pp-sticky__price { display: flex; flex-direction: column; line-height: 1.15; }
  .pp-sticky__price b { font-size: var(--fs-20); font-weight: 800; }
  .pp-sticky__price s { font-size: var(--fs-12); color: var(--c-text-2); }
  .pp-sticky .ui-btn { flex: 1; }
}

/* ==========================================================================
   Оформление заказа
   ========================================================================== */
.co { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-8); align-items: start; margin-top: var(--s-5); }
.co__main { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.co-step { padding: var(--s-6); border-radius: var(--r-20); background: var(--c-surface); box-shadow: var(--sh-1); }
.co-step__head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.co-step__num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--c-primary-tint); color: var(--c-primary-hover); display: grid; place-items: center; font-weight: 800; font-size: var(--fs-14); }
.co-step__head h2 { font-size: var(--fs-20); margin: 0; }
.co-step__done { margin-left: auto; color: var(--c-success); display: none; }
.co-step.is-done .co-step__done { display: inline-flex; }
.co-addr { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: 10px 14px; border-radius: var(--r-12); border: 1px dashed var(--c-border-strong); background: var(--c-surface); text-align: left; cursor: pointer; font-size: var(--fs-16); color: var(--c-text); }
.co-addr:hover { border-color: var(--c-primary); }
.co-addr .ui-i:first-child { color: var(--c-primary); }
.co-addr__text { flex: 1; min-width: 0; }
.co-addr__text small { display: block; font-size: var(--fs-12); color: var(--c-text-2); }
.co-addr.is-filled { border-style: solid; }
.co-addr__change { font-size: var(--fs-14); font-weight: 700; color: var(--c-primary); }
.co-cart { position: sticky; top: calc(var(--header-h) + 16px); padding: var(--s-5); border-radius: var(--r-20); background: var(--c-surface); box-shadow: var(--sh-1); }
.co-cart__shop { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: var(--s-2); }
.co-cart__shop small { font-weight: 500; color: var(--c-text-2); }
.co-cart .cartp__item { padding: 12px 0; }
.co-cart .cartp__img { width: 56px !important; height: 70px !important; }
.co-total { display: grid; gap: 8px; margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--c-border); }
.co-total__row { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-14); color: var(--c-text-2); }
.co-total__row > :last-child { color: var(--c-text); font-weight: 600; text-align: right; }
.co-total__row--sum { font-size: var(--fs-20); color: var(--c-text); font-weight: 800; margin-top: 4px; }
.co-total__row--sum > :last-child { font-weight: 800; }
.co-submit { margin-top: var(--s-4); }
.co-legal { margin-top: var(--s-3); font-size: var(--fs-12); color: var(--c-text-2); line-height: 1.5; }
.co-legal a { color: var(--c-text-2); text-decoration: underline; }
.co-verified { display: inline-flex; align-items: center; gap: 6px; color: var(--c-success); font-weight: 700; font-size: var(--fs-14); }
.co-mobile-bar { display: none; }
.co-addr-grid { --cols: 4; }
@media (max-width: 640px) { .co-addr-grid { --cols: 2; } }
.co-step[data-auth] .ui-input-group { max-width: 520px; }
@media (max-width: 1023px) {
  .co { grid-template-columns: 1fr; gap: var(--s-4); }
  .co-cart { position: static; order: -1; }
  .co-step { padding: var(--s-4); border-radius: var(--r-12); }
}

/* выбор даты и времени */
.tp { display: flex; flex-direction: column; gap: var(--s-4); }
.tp__days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.tp__days::-webkit-scrollbar { display: none; }
.tp__day { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 76px; min-height: 64px; padding: 8px 10px; border-radius: var(--r-12); border: 1.5px solid var(--c-border); background: var(--c-surface); cursor: pointer; color: var(--c-text); font: inherit; }
.tp__day small { font-size: var(--fs-12); color: var(--c-text-2); font-weight: 600; }
.tp__day b { font-size: var(--fs-16); font-weight: 800; }
.tp__day:hover { border-color: var(--c-text-3); }
.tp__day.is-active, .tp__day[aria-pressed="true"] { border-color: var(--c-primary); background: var(--c-primary-tint); }
.tp__day.is-active small { color: var(--c-primary-hover); }
.tp__slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .tp__slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tp__slot { min-height: 48px; border-radius: var(--r-12); border: 1.5px solid var(--c-border); background: var(--c-surface); font: 700 var(--fs-14) var(--font); color: var(--c-text); cursor: pointer; }
.tp__slot:hover { border-color: var(--c-text-3); }
.tp__slot.is-active, .tp__slot[aria-pressed="true"] { border-color: var(--c-primary); background: var(--c-primary); color: #fff; }
.tp__slot[disabled] { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.tp__alt { display: flex; flex-wrap: wrap; gap: 8px; }
.tp__note { font-size: var(--fs-14); color: var(--c-text-2); }
.tp__current { display: flex; align-items: center; gap: 8px; font-size: var(--fs-14); font-weight: 700; color: var(--c-success); }

/* SMS-код / вход */
.auth-box { display: flex; flex-direction: column; gap: var(--s-4); }
.auth-box__text { color: var(--c-text-2); font-size: var(--fs-14); }
.auth-box__consent { font-size: var(--fs-12); color: var(--c-text-2); line-height: 1.5; }
.auth-box__consent a { color: var(--c-text-2); text-decoration: underline; }
.auth-box__code .ui-input { font-size: 24px; letter-spacing: .4em; text-align: center; font-weight: 800; }
.auth-box__resend { font-size: var(--fs-14); color: var(--c-text-2); }
.auth-box__resend button { background: none; border: 0; padding: 8px 0; color: var(--c-primary); font-weight: 700; cursor: pointer; font-size: var(--fs-14); }
.phone-field__code { display: none !important; } /* выбор страны убран: маска +375 */

/* карта адреса */
.addr-map { position: relative; height: min(360px, 45vh); border-radius: var(--r-12); overflow: hidden; background: var(--c-surface-2); margin-top: var(--s-3); }
.addr-map #map { width: 100% !important; height: 100% !important; }
.addr-map .center-marker { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -36px 0 0 -18px; z-index: 5; pointer-events: none; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23D63484' d='M12 22s-7-6.5-7-12a7 7 0 0 1 14 0c0 5.5-7 12-7 12Z'/%3E%3Ccircle cx='12' cy='10' r='2.6' fill='%23fff'/%3E%3C/svg%3E"); filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.addr-map__loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--c-text-2); font-size: var(--fs-14); }
.ymaps-2-1-79-search__suggest, [class*="-suggest"] { z-index: 1000 !important; }

/* ==========================================================================
   Статические страницы
   ========================================================================== */
.st-hero { margin-top: var(--s-6); padding: var(--s-10) var(--s-10); border-radius: 28px; background: radial-gradient(120% 140% at 100% 0%, #FFD6E8 0%, #FCE8F1 40%, #FFFFFF 100%); }
.st-hero p { margin-top: var(--s-3); font-size: 18px; color: var(--c-text-2); max-width: 60ch; }
@media (max-width: 640px) { .st-hero { padding: var(--s-6) var(--s-4); border-radius: var(--r-20); } .st-hero p { font-size: var(--fs-16); } }
.st-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); counter-reset: st; list-style: none; padding: 0; margin: 0; }
.st-steps li { counter-increment: st; padding: var(--s-5); border-radius: var(--r-20); background: var(--c-surface); box-shadow: var(--sh-1); }
.st-steps li::before { content: counter(st); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 800; margin-bottom: var(--s-3); }
.st-steps b { display: block; margin-bottom: 4px; }
.st-steps p { margin: 0; color: var(--c-text-2); font-size: var(--fs-14); }
@media (max-width: 1023px) { .st-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .st-steps { grid-template-columns: 1fr; } }
.st-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 767px) { .st-cols { grid-template-columns: 1fr; } }
.st-contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 1023px) { .st-contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .st-contacts { grid-template-columns: 1fr; } }
.st-contact { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-5); border-radius: var(--r-20); background: var(--c-surface); box-shadow: var(--sh-1); }
.st-contact .ui-i { flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--c-primary-tint); color: var(--c-primary); }
.st-contact small { display: block; color: var(--c-text-2); font-size: var(--fs-12); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.st-contact a, .st-contact span { font-weight: 700; word-break: break-word; }
.st-contact a:hover { color: var(--c-primary); }
.st-req { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; font-size: var(--fs-14); }
.st-req dt { color: var(--c-text-2); }
.st-req dd { margin: 0; font-weight: 600; }
@media (max-width: 480px) { .st-req { grid-template-columns: 1fr; gap: 2px; } .st-req dd { margin-bottom: 8px; } }

/* ==========================================================================
   Поиск
   ========================================================================== */
.srch-form { display: flex; gap: var(--s-2); margin-top: var(--s-4); max-width: 720px; }
.srch-form .ui-input { flex: 1; }
.srch-groups { display: grid; gap: var(--s-2); }

/* мелкие исправления старых шаблонов витрины на мобильных */
@media (max-width: 1024px) {
  .wrapper, header, .footer { min-width: 0 !important; }
}

/* ---------- Плитки категорий на главной (21.11) ---------- */
.home-cats { display: grid; gap: var(--s-4); grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cat-card { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--r-20); overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--c-primary-tint), #fff); color: #fff; box-shadow: 0 1px 2px rgba(31,31,34,.06);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.cat-card--gift { background: linear-gradient(160deg, #FFF1E6, #fff); }
.cat-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); z-index: -2; }
.cat-card__shade { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,14,18,0) 38%, rgba(20,14,18,.28) 62%, rgba(20,14,18,.78) 100%); }
.cat-card__icon { position: absolute; inset: 0; display: grid; place-items: center; color: var(--c-primary); }
.cat-card__icon .ui-i { width: 48px; height: 48px; }
.cat-card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.cat-card__name { font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.cat-card__meta { font-size: 13px; font-weight: 600; opacity: .92; }
.cat-card__go { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(255,255,255,.92); color: var(--c-text); opacity: 0; transform: translateY(-4px) scale(.9); transition: opacity .2s, transform .2s var(--ease); }
.cat-card__go .ui-i { width: 18px; height: 18px; }
.cat-card:hover, .cat-card:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 32px -12px rgba(214,52,132,.35); }
.cat-card:hover .cat-card__img, .cat-card:focus-visible .cat-card__img { transform: scale(1.06); }
.cat-card:hover .cat-card__go, .cat-card:focus-visible .cat-card__go { opacity: 1; transform: none; }
.cat-card:not(:has(.cat-card__img)) { color: var(--c-text); }
.cat-card:not(:has(.cat-card__img)) .cat-card__shade { display: none; }
@media (max-width: 1100px) { .home-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  /* на планшете и телефоне — лента с прокруткой, без «хвостов» в последнем ряду */
  .home-cats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--s-3);
    margin: 0 calc(-1 * var(--s-4)); padding: 2px var(--s-4) 8px; scrollbar-width: none; }
  .home-cats::-webkit-scrollbar { display: none; }
  .cat-card { flex: 0 0 38%; scroll-snap-align: start; }
}
@media (max-width: 560px) { .cat-card { flex-basis: 44%; border-radius: var(--r-12); } .cat-card__name { font-size: 15px; } .cat-card__body { padding: 12px; } .cat-card__meta { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .cat-card, .cat-card__img, .cat-card__go { transition: none; } }
.cat-card__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .cat-card { flex-basis: 46%; } .cat-card__meta { font-size: 11.5px; } }

/* ---------------------------------------------------------------- GEO «Коротко» (24.11): свёрнуто, раскрытие без JS */
.cat-head__row > h1 { order: 1; }
.cat-head__row > .cat-head__count { order: 2; }
.cat-head__row > .geo-fold { order: 3; flex: 1 0 100%; }
.geo-fold { background: var(--c-primary-tint); border: 1px solid var(--c-primary-tint-2); border-radius: var(--r-12); color: var(--c-text); }
.geo-fold--lead { margin-top: var(--s-2); max-width: 860px; }
.geo-fold__sum { display: flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: var(--s-2) var(--s-3); cursor: pointer; list-style: none;
  font-size: var(--fs-14); font-weight: 700; color: var(--c-primary-hover); border-radius: var(--r-12); }
.geo-fold__sum::-webkit-details-marker { display: none; }
.geo-fold__sum:hover { background: var(--c-primary-tint-2); }
.geo-fold__ico { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--c-surface); flex: 0 0 auto; }
.geo-fold__title { margin: 0; font: inherit; color: inherit; letter-spacing: 0; }
.geo-fold__chev { margin-left: auto; transition: transform .2s; }
.geo-fold[open] > .geo-fold__sum .geo-fold__chev { transform: rotate(180deg); }
.geo-fold__body { padding: 0 var(--s-4) var(--s-4) calc(var(--s-3) + 32px); font-size: var(--fs-14); line-height: var(--lh-loose); color: var(--c-text); }
.geo-fold__body p { margin: 0 0 var(--s-2); }
.geo-fold__meta { color: var(--c-text-2); font-size: var(--fs-12); }
.geo-bottom .geo-fold { background: var(--c-surface); border-color: var(--c-border); }
.geo-bottom .geo-fold__sum { font-size: var(--fs-16); color: var(--c-text); min-height: 56px; padding: var(--s-3) var(--s-4); }
.geo-bottom .geo-fold__sum:hover { background: var(--c-surface-2); }
.geo-bottom .geo-fold__ico { background: var(--c-primary-tint); color: var(--c-primary-hover); }
.geo-bottom .geo-fold__body { padding: 0 var(--s-4) var(--s-4); }
.geo-table-wrap { overflow-x: auto; margin: 0 0 var(--s-4); }
.geo-table { width: 100%; max-width: 640px; border-collapse: collapse; font-size: var(--fs-14); }
.geo-table caption { text-align: left; font-weight: 700; padding: 0 0 var(--s-2); }
.geo-table th, .geo-table td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.geo-table thead th { color: var(--c-text-2); font-weight: 600; font-size: var(--fs-12); }
.geo-table tbody th { font-weight: 600; }
.geo-table td:last-child { white-space: nowrap; }
.geo-table a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.geo-faq { display: grid; gap: var(--s-3); max-width: 860px; }
.geo-faq__q { font-size: var(--fs-16); line-height: 1.35; margin: 0 0 4px; }
.geo-faq__a { margin: 0; color: var(--c-text-2); }
.cat-popular .ui-chip__count { margin-left: 4px; }
@media (max-width: 560px) { .geo-fold__body { padding-left: var(--s-3); } }
@media (prefers-reduced-motion: reduce) { .geo-fold__chev { transition: none; } }

/* ---------------------------------------------------------------- вход/регистрация магазина (auth/login, auth/register) */
.login__title { font-size: var(--fs-24, 24px); line-height: 1.25; font-weight: 800; margin: 0 0 8px; }
.login__text { color: var(--c-text-2); font-size: var(--fs-14); line-height: 1.5; margin: 0 0 16px; }
