/**
 * Shop — стили публичного магазина
 * Тёплый минимализм, цвета проекта #5A3036, #C97289
 */

:root {
  --shop-primary: #5A3036;
  --shop-primary-dark: #4a2529;
  --shop-accent: #C97289;
  --shop-bg: #FAFAF8;
  --shop-card-bg: #ffffff;
  --shop-text: #2C2C2C;
  --shop-text-muted: #666;
  --shop-border: rgba(0, 0, 0, 0.12);
  --shop-radius: 12px;
  --shop-radius-lg: 16px;
  --shop-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shop-shadow-hover: 0 8px 24px rgba(90, 48, 54, 0.12);
  /* Единые отступы страницы shop. На мобильных меньше — меньше боковых отступов */
  --shop-page-padding: 10px;
  --shop-page-max-width: 1200px;
  /* Высота логотипа в шапке — подберите под себя (например: 48, 64, 80, 96, 128) */
  --shop-logo-height: 64px;
  --shop-header-height: 56px;
  /* Кнопка «Все коллекции» — эталон высоты/типографики для «Каталог» и поиска в шапке */
  --shop-ui-btn-fs: 0.85rem;
  --shop-ui-btn-fw: 600;
  --shop-ui-btn-py: 8px;
  --shop-ui-btn-px: 12px;
  --shop-ui-btn-radius: 10px;
  --shop-ui-btn-lh: 1.35;
  --shop-ui-btn-height: calc(var(--shop-ui-btn-py) + var(--shop-ui-btn-py) + var(--shop-ui-btn-lh) * var(--shop-ui-btn-fs));
  /* ~ширина кнопки «Все коллекции» с тем же padding */
  --shop-ui-btn-min-width: min(100%, 11.5rem);
}

@media (min-width: 480px) {
  :root {
    --shop-page-padding: 14px;
  }
}

@media (min-width: 768px) {
  :root {
    --shop-page-padding: 20px;
  }
}

/* Общий контейнер для выравнивания блоков */
.shop-inner {
  max-width: var(--shop-page-max-width);
  margin: 0 auto;
  padding-left: var(--shop-page-padding);
  padding-right: var(--shop-page-padding);
  width: 100%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Убираем эффект растягивания (rubber band) при достижении подвала на мобильных */
@media (max-width: 767px) {
  html, body {
    overscroll-behavior-y: none;
  }
}

.shop-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--shop-bg);
  color: var(--shop-text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.shop-filter-overlay-open {
  overflow: hidden;
  touch-action: none;
}

/* Вариант 5: всё скроллится вместе со страницей (без фиксации) */
.shop-header {
  flex-shrink: 0;
  background: var(--shop-card-bg);
  box-shadow: var(--shop-shadow);
  overflow: visible;
}

/* === Шапка макета (как в макете: фон #F688A2, нижний отступ 8px под лого) === */
.shop-header--masthead {
  --shop-masthead-pill-radius: 999px;
  /* Увеличенный верхний отступ только на мобилке — см. max-width: 767px */
  --shop-masthead-pad-top: 6px;
  background: #f688a2;
  box-shadow: none;
  min-height: min(88px, 14vw);
  padding-bottom: 8px;
  padding-top: var(--shop-masthead-pad-top);
  box-sizing: border-box;
}

.shop-header-masthead-inner {
  max-width: var(--shop-page-max-width);
  margin: 0 auto;
  padding-left: var(--shop-page-padding);
  padding-right: var(--shop-page-padding);
  width: 100%;
  min-width: 0;
}

.shop-header-masthead-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.shop-header-masthead-logo {
  flex-shrink: 0;
  align-self: flex-end;
}

.shop-header-masthead-logo .shop-logo-img {
  display: block;
  height: clamp(32px, 5vw, 88px);
  width: auto;
  max-width: min(220px, 26vw);
  object-fit: contain;
}

.shop-header-search-cluster.shop-search-bar {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
}

.shop-header-search-column {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
}

/* В DOM сначала форма поиска, затем навигация — на ПК/планшете блок ссылок над поиском */
@media (min-width: 768px) {
  .shop-header-search-column .shop-header-topnav {
    order: 1;
  }

  .shop-header-search-column .shop-header-masthead-search-form {
    order: 2;
  }
}

.shop-header-topnav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.shop-header-topnav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: clamp(0.78rem, 0.9vw, 0.88rem);
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 8px;
  transition: background 0.2s, opacity 0.2s;
}

.shop-header-topnav-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.shop-header-topnav-ico {
  display: none;
  width: clamp(9px, 2vw, 16px);
  height: clamp(9px, 2vw, 16px);
  object-fit: contain;
  flex-shrink: 0;
}

.shop-header-masthead-search-form {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.shop-header-masthead-search-wrap {
  min-height: var(--shop-ui-btn-height);
  height: var(--shop-ui-btn-height);
  border-radius: var(--shop-masthead-pill-radius);
  border: none;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  align-items: center;
  overflow: hidden;
}

.shop-header-masthead .shop-header-masthead-search-wrap:focus-within {
  box-shadow: 0 0 0 2px rgba(89, 47, 53, 0.35);
}

.shop-header-masthead .shop-header-masthead-search-wrap .shop-search-input {
  padding: 0 4px 0 14px;
  font-size: var(--shop-ui-btn-fs);
  font-weight: 400;
  line-height: var(--shop-ui-btn-lh);
  height: 100%;
  min-height: 0;
}

.shop-header--masthead .shop-header-masthead-search-wrap .shop-search-icon {
  color: #666;
  padding: 0 12px 0 4px;
  align-self: stretch;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.shop-header--masthead .shop-header-masthead-search-wrap .shop-search-icon svg {
  width: 18px;
  height: 18px;
}

.shop-catalog-btn {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  min-height: var(--shop-ui-btn-height);
  height: var(--shop-ui-btn-height);
  padding: 0 20px 0 16px;
  border: none;
  border-radius: var(--shop-masthead-pill-radius);
  background: #4e3034;
  color: #fff;
  cursor: pointer;
  font-size: var(--shop-ui-btn-fs);
  font-weight: var(--shop-ui-btn-fw);
  line-height: var(--shop-ui-btn-lh);
  transition: background 0.2s, transform 0.15s;
  box-sizing: border-box;
}

.shop-catalog-btn:hover {
  background: #3d282b;
}

.shop-catalog-btn[aria-expanded="true"] {
  background: #352325;
}

.shop-catalog-btn-icon {
  width: auto;
  height: auto;
  max-width: min(28px, calc(var(--shop-ui-btn-height) - 4px));
  max-height: min(28px, calc(var(--shop-ui-btn-height) - 4px));
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.shop-catalog-btn-label {
  flex: 0 0 auto;
  text-align: left;
  line-height: var(--shop-ui-btn-lh);
  white-space: nowrap;
}

.shop-header-actions {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 8px;
  margin-left: 10px;
  align-self: flex-end;
}

.shop-header-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: #fff;
  font-weight: 400;
  font-size: 0.65rem;
  line-height: 1.15;
  padding: 0 2px;
  min-width: 0;
  height: var(--shop-ui-btn-height);
  min-height: var(--shop-ui-btn-height);
  max-height: var(--shop-ui-btn-height);
  box-sizing: border-box;
  transition: opacity 0.2s;
}

.shop-header-action:hover {
  opacity: 0.92;
}

.shop-header-action-ico {
  width: calc(var(--shop-ui-btn-height) * 0.5);
  height: calc(var(--shop-ui-btn-height) * 0.5);
  max-width: calc(var(--shop-ui-btn-height) * 0.5);
  max-height: calc(var(--shop-ui-btn-height) * 0.5);
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* ПК: иконки корзина / войти / избранное — в 1.5 раза крупнее базовых */
@media (min-width: 768px) {
  .shop-header--masthead .shop-header-action-ico {
    width: calc(var(--shop-ui-btn-height) * 0.75);
    height: calc(var(--shop-ui-btn-height) * 0.75);
    max-width: calc(var(--shop-ui-btn-height) * 0.75);
    max-height: calc(var(--shop-ui-btn-height) * 0.75);
  }
}

.shop-header-action-label {
  display: block;
  text-align: center;
  line-height: 1.15;
  max-width: 5rem;
  font-size: 0.65rem;
}

@media (max-width: 767px) {
  .shop-header-action-label {
    display: none;
  }
}

/* Канал Telegram: бейдж с числом подписчиков (API getChatMemberCount), ~½ от базового размера */
.shop-header--masthead .shop-header-channel-badge {
  position: absolute;
  top: -2px;
  right: -1px;
  min-width: 0.675rem;
  height: 0.675rem;
  padding: 0 2px;
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 0.675rem;
  text-align: center;
  background: #fff;
  color: var(--shop-primary, #c2185b);
  border-radius: 999px;
  box-shadow: 0 0.5px 2px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(194, 24, 87, 0.2);
  max-width: 1.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Избранное: тот же стиль, чуть шире для двух цифр и «99+» */
.shop-header--masthead .shop-header-favorites-badge.shop-header-channel-badge {
  max-width: 2.15rem;
}

/* Профиль: таймер до отмены неоплаченного заказа (MM:SS), цвет фона задаётся из JS */
.shop-header--masthead .shop-header-unpaid-badge.shop-header-channel-badge {
  max-width: 2.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 0.5px 2px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1024px) {
  .shop-header--masthead {
    min-height: auto;
    padding-bottom: 8px;
    padding-top: var(--shop-masthead-pad-top);
  }

  .shop-header-masthead-row {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0;
  }

  .shop-header-masthead-logo {
    flex: 0 0 auto;
  }

  .shop-header-masthead-logo .shop-logo-img {
    max-width: min(200px, 38vw);
    height: clamp(28px, 7vw, 72px);
  }

  .shop-header-search-cluster.shop-search-bar {
    flex: 1 1 100%;
    order: 3;
    min-width: 0;
    gap: 8px;
  }

  .shop-header-actions {
    flex: 1 1 auto;
    order: 2;
    justify-content: flex-end;
    gap: 8px;
    margin-left: 10px;
  }

  .shop-header-masthead-logo {
    order: 1;
    margin-right: 20px;
  }

  /* На планшете лого + действия в одной строке */
  .shop-header-masthead-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: end;
    column-gap: 10px;
    row-gap: 8px;
  }

  .shop-header-masthead-logo {
    grid-column: 1;
    grid-row: 1;
    margin-right: 0;
  }

  .shop-header-actions {
    grid-column: 2;
    grid-row: 1;
    margin-left: 0;
  }

  .shop-header-search-cluster.shop-search-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 767px) {
  /* (1) Лого | действия  (2) поиск на всю ширину  (3) Каталог | Как это работает | Отзывы | Позвонить — nav с display:contents */
  .shop-header--masthead {
    --shop-masthead-pad-top: clamp(14px, 3.5vw, 28px);
    min-height: min(96px, calc(14vw + 10px));
    padding-bottom: clamp(14px, 4vw, 26px);
  }

  .shop-header-masthead-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
    align-items: center;
    column-gap: 0.45rem;
    row-gap: 0.75rem;
  }

  .shop-header-search-cluster.shop-search-bar {
    display: contents;
    flex: unset;
    order: unset;
    grid-column: unset;
    grid-row: unset;
    gap: 0;
  }

  .shop-header-search-column {
    display: contents;
    gap: 0;
  }

  .shop-header-masthead-logo {
    grid-column: 1;
    grid-row: 1;
    margin-right: 0;
    align-self: center;
    justify-self: start;
  }

  .shop-header--masthead .shop-logo.shop-header-masthead-logo {
    margin-right: 0;
    margin-left: 0;
  }

  .shop-header-actions {
    grid-column: 4;
    grid-row: 1;
    margin-left: 0;
    align-self: center;
    justify-self: end;
    gap: 0.8rem;
  }

  .shop-catalog-btn {
    grid-column: 1;
    grid-row: 3;
    justify-self: stretch;
    align-self: stretch;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: auto;
    min-height: 0;
    justify-content: center;
    padding: 0.4rem 0.3rem;
    font-size: clamp(0.58rem, 2.4vw, 0.76rem);
  }

  .shop-header-masthead-search-form {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  .shop-header-topnav {
    display: contents;
  }

  .shop-header-topnav > .shop-header-topnav-link:nth-child(1) {
    grid-column: 2;
    grid-row: 3;
  }

  .shop-header-topnav > .shop-header-topnav-link:nth-child(2) {
    grid-column: 3;
    grid-row: 3;
  }

  .shop-header-topnav > .shop-header-topnav-link:nth-child(3) {
    grid-column: 4;
    grid-row: 3;
  }

  .shop-header--masthead .shop-header-topnav-link {
    display: inline-flex;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    justify-content: center;
    align-self: stretch;
    border: 1px solid #fff;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: clamp(0.58rem, 2.4vw, 0.76rem);
    font-weight: 700;
    padding: 0.4rem 0.25rem;
    gap: 0;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .shop-header--masthead .shop-header-topnav-link:hover {
    background: rgba(255, 255, 255, 0.14);
  }

  /* Корзина / Войти / Избранное */
  .shop-header--masthead .shop-header-action-ico {
    width: clamp(24px, calc(9vw * 0.8), 32px);
    height: clamp(24px, calc(9vw * 0.8), 32px);
    max-width: clamp(24px, calc(9vw * 0.8), 32px);
    max-height: clamp(24px, calc(9vw * 0.8), 32px);
  }

  .shop-header--masthead .shop-header-topnav-ico {
    display: none !important;
  }

  .shop-header--masthead .shop-catalog-btn-icon {
    max-width: min(18px, calc((var(--shop-ui-btn-height) - 4px) * 0.65));
    max-height: min(18px, calc((var(--shop-ui-btn-height) - 4px) * 0.65));
  }

  .shop-header--masthead .shop-header-action {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .shop-header-topnav-text {
    display: inline;
  }

  .shop-catalog-btn-label {
    display: inline;
  }
}

@media (min-width: 768px) {
  .shop-header-topnav-text {
    display: inline;
  }

  .shop-header-topnav-ico {
    display: none;
  }
}

@media (max-width: 520px) {
  /* Та же сетка шапки, что и в 767 (display:contents) */
  .shop-header-search-cluster.shop-search-bar {
    display: contents;
  }
}

/* Отдельная полоса поиска больше не используется — кластер в шапке */
.shop-search-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.shop-search-bar-row .shop-search-form {
  flex: 1;
  min-width: 0;
}

/* Одна кнопка «Каталог»: на мобильных — три полоски, от 768px — подпись «Каталог» */
.shop-static-menu-btn .shop-static-menu-label {
  display: none;
}

/* Кастомный фон из кабинета производителя — тёмный текст */
.shop-header--custom-bg .shop-header-link,
.shop-header--custom-bg .shop-header-phone {
  color: var(--shop-text);
}
.shop-header--custom-bg .shop-header-link:hover,
.shop-header--custom-bg .shop-header-phone:hover {
  color: var(--shop-primary);
  background: rgba(0, 0, 0, 0.06);
}
.shop-header--custom-bg .shop-search-wrap {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.9);
}
.shop-header--custom-bg .shop-search-wrap:focus-within {
  border-color: var(--shop-primary);
}
.shop-header--custom-bg .shop-search-input {
  color: var(--shop-text);
}
.shop-header--custom-bg .shop-search-input::placeholder {
  color: var(--shop-text-muted);
}
.shop-header--custom-bg .shop-search-icon {
  color: var(--shop-text-muted);
}

/* Плавающая панель: кнопка меню + поиск при скролле каталога (выше иконок избранное/поделиться на карточках) */
.shop-floating-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 270; /* выше панели товара (260) — может перекрывать её, уйдёт при скролле вниз */
  background: var(--shop-card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shop-masthead-pill-radius: 999px;
  padding: 8px var(--shop-page-padding) 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-100%);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.shop-floating-bar.shop-floating-bar--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.shop-floating-bar-inner {
  max-width: var(--shop-page-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.shop-floating-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-floating-menu-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  color: var(--shop-text);
  cursor: pointer;
  transition: background 0.2s;
}
.shop-floating-menu-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}
.shop-floating-menu-btn[aria-expanded="true"] {
  background: var(--shop-primary);
  color: #fff;
}

/* Каталог в плавающей полосе: та же «таблетка», что в шапке; только иконка сетки */
.shop-floating-bar .shop-catalog-btn.shop-floating-menu-btn {
  width: auto;
  min-width: var(--shop-ui-btn-height);
  height: var(--shop-ui-btn-height);
  min-height: var(--shop-ui-btn-height);
  padding: 0 14px;
  border-radius: var(--shop-masthead-pill-radius);
  background: #4e3034;
  color: #fff;
  border: none;
  box-sizing: border-box;
}
.shop-floating-bar .shop-catalog-btn.shop-floating-menu-btn:hover {
  background: #3d282b;
}
.shop-floating-bar .shop-catalog-btn.shop-floating-menu-btn[aria-expanded="true"] {
  background: #352325;
  color: #fff;
}
.shop-floating-bar .shop-catalog-btn-icon {
  max-width: min(24px, calc(var(--shop-ui-btn-height) - 8px));
  max-height: min(24px, calc(var(--shop-ui-btn-height) - 8px));
}

/* Поиск в плавающей полосе — высота и скругление как у поля в шапке */
.shop-floating-bar .shop-floating-search .shop-search-wrap.shop-header-masthead-search-wrap {
  min-height: var(--shop-ui-btn-height);
  height: var(--shop-ui-btn-height);
  border: none;
  border-radius: var(--shop-masthead-pill-radius);
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.shop-floating-bar .shop-floating-search .shop-search-wrap.shop-header-masthead-search-wrap:focus-within {
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(89, 47, 53, 0.35);
}
.shop-floating-bar .shop-floating-search .shop-header-masthead-search-wrap .shop-search-input {
  padding: 0 4px 0 14px;
  font-size: var(--shop-ui-btn-fs);
  font-weight: 400;
  line-height: var(--shop-ui-btn-lh);
  height: 100%;
  min-height: 0;
}
.shop-floating-bar .shop-floating-search .shop-header-masthead-search-wrap .shop-search-icon {
  color: #666;
  padding: 0 12px 0 4px;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.shop-floating-bar .shop-floating-search .shop-header-masthead-search-wrap .shop-search-icon svg {
  width: 18px;
  height: 18px;
}

.shop-floating-bar .shop-floating-filter-btn {
  width: auto;
  min-width: var(--shop-ui-btn-height);
  height: var(--shop-ui-btn-height);
  border-radius: 10px;
}

@media (max-width: 767px) {
  /* Не наследовать сетку шапки от общего .shop-catalog-btn на мобилке */
  .shop-floating-bar .shop-catalog-btn.shop-floating-menu-btn {
    grid-column: unset;
    grid-row: unset;
    justify-self: unset;
    align-self: unset;
    width: auto;
    min-width: var(--shop-ui-btn-height);
    max-width: none;
    height: var(--shop-ui-btn-height);
    min-height: var(--shop-ui-btn-height);
    padding: 0 14px;
    font-size: var(--shop-ui-btn-fs);
  }
}

/* Статичная кнопка «Каталог» в строке поиска: шире базовых 44px, отдельный вид на ПК */
@media (min-width: 768px) {
  .shop-search-bar-row .shop-static-menu-btn.shop-floating-menu-btn {
    width: auto;
    min-width: 132px;
    min-height: 44px;
    height: 44px;
    padding: 0 22px;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(90, 48, 54, 0.22);
    background: linear-gradient(180deg, #ffffff 0%, #fbf9f8 100%);
    box-shadow: 0 1px 3px rgba(90, 48, 54, 0.08);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--shop-primary);
  }

  .shop-search-bar-row .shop-static-menu-btn .shop-static-menu-icon {
    display: none;
  }

  .shop-search-bar-row .shop-static-menu-btn .shop-static-menu-label {
    display: inline;
    line-height: 1.2;
    white-space: nowrap;
  }

  .shop-search-bar-row .shop-static-menu-btn.shop-floating-menu-btn:hover {
    background: rgba(90, 48, 54, 0.07);
    border-color: rgba(90, 48, 54, 0.38);
    color: var(--shop-primary-dark);
  }

  .shop-search-bar-row .shop-static-menu-btn.shop-floating-menu-btn[aria-expanded="true"] {
    background: var(--shop-primary);
    border-color: var(--shop-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(90, 48, 54, 0.35);
  }
}

.shop-floating-search {
  flex: 1;
  min-width: 0;
}

.shop-floating-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.shop-floating-panel[aria-hidden="false"] {
  max-height: 120px;
}

.shop-floating-panel-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 10px 0 4px;
}
.shop-floating-panel-scroll::-webkit-scrollbar {
  display: none;
}

.shop-floating-panel .shop-subcat-icon {
  width: 44px;
  min-width: 44px;
  flex-shrink: 0;
}
.shop-floating-panel .shop-subcat-icon-img {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}
.shop-floating-panel .shop-subcat-icon-title {
  font-size: 8px;
  max-width: 44px;
}
.shop-floating-panel .shop-subcat-icon-img--menu {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  color: var(--shop-text);
}
.shop-floating-panel .shop-subcat-icon-img--menu svg {
  display: block;
}

/* Плавающая полоса: кнопка фильтра */
.shop-floating-filter-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  color: var(--shop-text);
  cursor: pointer;
  transition: background 0.2s;
}
.shop-floating-filter-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.1);
}
.shop-floating-filter-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.shop-floating-filter-btn.shop-floating-filter-btn--active:not(:disabled) {
  background: var(--shop-primary);
  color: #fff;
}

/* Оверлей фильтра каталога */
.shop-floating-filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 275;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}
.shop-floating-filter-overlay[aria-hidden="false"] {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}
.shop-floating-filter-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.shop-floating-filter-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(90vh, 640px);
  background: var(--shop-card-bg);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateY(105%);
  transition: transform 0.28s ease;
}
.shop-floating-filter-overlay[aria-hidden="false"] .shop-floating-filter-sheet {
  transform: translateY(0);
}
.shop-floating-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}
.shop-floating-filter-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}
.shop-floating-filter-close {
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--shop-text-muted);
  padding: 4px 8px;
}
.shop-floating-filter-body {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.shop-floating-filter-row {
  margin-bottom: 12px;
}
.shop-floating-filter-label {
  display: block;
  font-size: 0.82rem;
  color: var(--shop-text-muted);
  margin-bottom: 4px;
}
.shop-floating-filter-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--shop-card-bg);
  color: var(--shop-text);
  box-sizing: border-box;
}
.shop-floating-filter-fieldset {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 12px;
  margin: 16px 0 0;
}
.shop-floating-filter-legend {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 6px;
}
.shop-floating-filter-hint {
  font-size: 0.78rem;
  color: var(--shop-text-muted);
  margin: 0 0 10px;
  line-height: 1.35;
}
.shop-floating-filter-dims {
  display: grid;
  gap: 10px;
}
@media (min-width: 480px) {
  .shop-floating-filter-dims {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.shop-floating-filter-foot {
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}
.shop-floating-filter-foot .shop-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.shop-floating-filter-price-block {
  margin-bottom: 16px;
}

.shop-floating-filter-price-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-floating-filter-price-bounds {
  font-size: 0.78rem;
  color: var(--shop-text-muted);
}

.shop-floating-filter-price-hint {
  margin-top: 4px;
  margin-bottom: 8px;
}

.shop-ff-price-range-wrap {
  position: relative;
  height: 40px;
  margin: 12px 0 8px;
  --range-pct-low: 0%;
  --range-pct-high: 100%;
}

.shop-ff-price-range-track-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.shop-ff-price-range-track-bg::after {
  content: '';
  position: absolute;
  left: var(--range-pct-low);
  right: calc(100% - var(--range-pct-high));
  top: 0;
  bottom: 0;
  background: rgba(90, 48, 54, 0.35);
  border-radius: 4px;
}

.shop-ff-price-range-input {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 40px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.shop-ff-price-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--shop-primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  pointer-events: auto;
}

.shop-ff-price-range-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--shop-primary);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  pointer-events: auto;
}

.shop-ff-price-range-input::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
}

.shop-ff-price-range-input::-moz-range-track {
  height: 6px;
  background: transparent;
}

.shop-ff-price-range-low {
  z-index: 2;
}

.shop-ff-price-range-high {
  z-index: 3;
}

.shop-ff-price-range-display {
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--shop-text);
}

/* Левая панель меню подкатегорий */
.shop-floating-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 201;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}
.shop-floating-sidebar-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.shop-floating-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 85vw);
  max-width: 280px;
  background: var(--shop-card-bg);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 202;
  transform: translateX(-100%);
  transition: transform 0.25s ease, top 0.25s ease;
  overflow-y: auto;
}
/* Плашка поиска видна — боковое меню опускаем ниже, чтобы не перекрывалось */
body.shop-floating-bar-visible .shop-floating-sidebar {
  top: 66px;
}
.shop-floating-sidebar[aria-hidden="false"] {
  transform: translateX(0);
}

.shop-floating-sidebar-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-floating-sidebar .shop-floating-sidebar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--shop-text);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}
.shop-floating-sidebar .shop-floating-sidebar-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}
.shop-floating-sidebar .shop-floating-sidebar-btn--active {
  background: rgba(90, 48, 54, 0.1);
  color: var(--shop-primary);
  font-weight: 600;
}
.shop-floating-sidebar-btn-img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.shop-header-inner {
  max-width: var(--shop-page-max-width);
  margin: 0 auto;
  padding: 0 var(--shop-page-padding);
  height: var(--shop-header-height);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.shop-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
  margin: 0;
  padding: 0;
}

.shop-logo-img {
  height: var(--shop-logo-height);
  max-height: calc(var(--shop-header-height) - 12px);
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

/* Общее .shop-logo { margin: 0 } ниже по файлу сбрасывает отступы — для макетной шапки задаём разрыв до «Каталога» */
.shop-header--masthead .shop-logo.shop-header-masthead-logo {
  margin-right: 24px;
  margin-left: 0;
}

@media (max-width: 768px) {
  :root {
    --shop-logo-height: 44px;
  }
}

@media (max-width: 480px) {
  :root {
    --shop-logo-height: 40px;
    --shop-header-height: 50px;
  }
}

@media (max-width: 360px) {
  :root {
    --shop-logo-height: 32px;
    --shop-header-height: 48px;
  }
  .shop-header-link {
    min-width: 40px;
    min-height: 40px;
  }
  .shop-header-icon {
    width: 24px;
    height: 24px;
  }
}

.shop-search-form {
  width: 100%;
}

.shop-search-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: var(--shop-card-bg);
  overflow: hidden;
}

.shop-search-wrap:focus-within {
  border-color: var(--shop-primary);
}

/* Шапка shop: тот же радиус «таблетки», что у «Каталог» (общий .shop-search-wrap ниже задаёт 8px и перебивает) */
.shop-header--masthead .shop-search-wrap.shop-header-masthead-search-wrap {
  border-radius: var(--shop-masthead-pill-radius, 999px);
  border: none;
  background: #fff;
}

.shop-header--masthead .shop-search-wrap.shop-header-masthead-search-wrap:focus-within {
  border-color: transparent;
}

.shop-search-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px 8px 12px;
  font-size: 0.9rem;
  border: none;
  background: transparent;
  color: var(--shop-text);
}

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

.shop-search-input:focus {
  outline: none;
}

.shop-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: var(--shop-text-muted);
  flex-shrink: 0;
}

.shop-search-icon svg {
  display: block;
}

/* Иконки выровнены справа */
.shop-header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
}

.shop-header-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  min-width: 40px;
  min-height: 40px;
  box-sizing: border-box;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--shop-text);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.shop-header-link:hover {
  background: rgba(90, 48, 54, 0.08);
  color: var(--shop-primary);
}

.shop-header-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.shop-header-phone {
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  font-weight: 600;
  color: var(--shop-primary);
  white-space: nowrap;
}

.shop-header-phone:hover {
  text-decoration: underline;
}

.shop-header-nav .shop-cart-btn {
  margin-left: 8px;
}

.shop-cart-btn {
  position: relative;
}

@media (max-width: 480px) {
  .shop-header-inner {
    padding: 6px 10px 0;
    gap: 8px;
  }
  .shop-header-nav {
    gap: 4px;
  }
  .shop-header-link {
    padding: 6px;
    min-width: 44px;
    min-height: 44px;
  }
  .shop-header-icon {
    width: 26px;
    height: 26px;
  }
}

/* Текст в меню — только на широких экранах; на средних — иконки, чтобы телефон и корзина влазили */
@media (max-width: 1024px) {
  .shop-header-link span:not(.shop-cart-badge) {
    display: none;
  }
  .shop-header-link {
    padding: 8px;
  }
}

@media (max-width: 768px) {
  .shop-header-icon {
    width: 22px;
    height: 22px;
  }
  .shop-header-inner {
    gap: 12px;
    padding: 6px var(--shop-page-padding) 0;
  }
  .shop-header-nav {
    gap: 4px;
  }
}

/* Коллекции: карусель и «Посмотреть все коллекции» (на главной — под полосой категорий) */
.shop-collections {
  background: var(--shop-card-bg);
  padding: 12px 0;
  margin-top: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.shop-collections-inner {
  padding-top: 0;
  padding-bottom: 0;
}

.shop-collections-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

/* На главной — только полоса карусели + кнопка; заголовок скрыт визуально; кнопка по центру блока */
body:not(.shop-all-collections-mode) .shop-collections-head {
  justify-content: center;
  margin-bottom: 4px;
}

body:not(.shop-all-collections-mode) .shop-collections-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.shop-all-collections-mode .shop-collections-head {
  justify-content: space-between;
  margin-bottom: 10px;
}

body.shop-all-collections-mode .shop-collections-title {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.shop-collections-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--shop-text);
}

.shop-collections-head-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

body.shop-all-collections-mode .shop-collections-head-actions {
  justify-content: flex-end;
}

.shop-collections-head-actions > .shop-back-btn {
  flex-shrink: 0;
}

/* Текст как «Как это работает» в шапке (.shop-header-topnav-link), тёмный цвет на светлом фоне блока */
.shop-collections .shop-collections-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: min(100%, 22rem);
  min-width: 0;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 3px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--shop-text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: clamp(0.78rem, 0.9vw, 0.88rem);
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  transition: background 0.2s, opacity 0.2s;
  box-sizing: border-box;
}

.shop-collections .shop-collections-all-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Иначе display:inline-flex из правила выше перебивает UA [hidden] и кнопка остаётся видимой рядом с «Назад» */
.shop-collections .shop-collections-all-btn[hidden] {
  display: none !important;
}

.shop-collections-loading {
  padding: 12px 0;
  color: var(--shop-text-muted);
  font-size: 0.9rem;
}

.shop-collections-carousel {
  overflow: hidden;
  margin-left: calc(-1 * var(--shop-page-padding));
  margin-right: calc(-1 * var(--shop-page-padding));
  padding-left: var(--shop-page-padding);
  padding-right: 0;
}

/* Горизонтальный скролл полосы коллекций (тач / колёсико мыши — см. block-categories.js).
   pan-x без pan-y блокировал вертикальный скролл страницы при жесте над полосой. */
.shop-collections-marquee {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(90, 48, 54, 0.35) transparent;
}

.shop-collections-marquee::-webkit-scrollbar {
  height: 6px;
}

.shop-collections-marquee::-webkit-scrollbar-thumb {
  background: rgba(90, 48, 54, 0.28);
  border-radius: 999px;
}

.shop-collections-marquee-track {
  display: block;
  width: max-content;
}

.shop-collections-strip {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-shrink: 0;
  padding-right: 10px;
  align-items: stretch;
}

.shop-collections-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #f5f5f5;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.shop-collections-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(90, 48, 54, 0.15);
}

.shop-collections-card-visual {
  position: relative;
  display: block;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

/* Полоса: оба ребёнка absolute — без фиксированного flex-слота min-height:0 с flex:1 даёт схлопывание до 0 (в сетке спасает aspect-ratio). */
.shop-collections-card--strip .shop-collections-card-visual {
  flex: 0 0 92px;
  min-height: 92px;
  height: 92px;
  border-radius: 12px; /* без блока с количеством — цельная «плитка» */
}

.shop-collections-card-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.shop-collections-card-title--overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 8px 10px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-align: left;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.72) 38%,
    rgba(0, 0, 0, 0.35) 68%,
    transparent 100%
  );
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 10px rgba(0, 0, 0, 0.55);
}

.shop-collections-card-word {
  display: block;
}

.shop-collections-card-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  padding: 0;
  pointer-events: none;
}

.shop-collections-card-count {
  font-size: 11px;
  color: var(--shop-text-muted);
  padding: 6px 8px 8px;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.06);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  background: var(--shop-card-bg, #fff);
}

.shop-collections-card--strip {
  flex: 0 0 calc((100vw - 40px) / 4);
  max-width: 200px;
  min-width: 68px;
}

@media (min-width: 900px) {
  .shop-collections-card--strip {
    flex: 0 0 clamp(130px, 12vw, 190px);
  }
}

.shop-collections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 4px;
}

@media (min-width: 560px) {
  .shop-collections-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .shop-collections-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.shop-collections-card--grid .shop-collections-card-visual {
  min-height: 120px;
  aspect-ratio: 4 / 3;
}

.shop-collections-card--grid .shop-collections-card-title--overlay {
  font-size: 13px;
}

/* Баннер под шапкой (первый блок контента на главной) */
.shop-promo-wrapper {
  margin-top: 12px;
  margin-bottom: 0;
}

/* Главное меню каталога под баннером — те же пункты, что боковая панель (/api/nav) */
.shop-categories-bar {
  background: var(--shop-card-bg);
  padding: 12px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.shop-categories-bar .shop-inner {
  padding-top: 0;
  padding-bottom: 0;
}

.shop-categories-loading {
  padding: 16px;
  color: var(--shop-text-muted);
  font-size: 0.9rem;
}

.shop-categories-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  padding: 4px 0;
}

.shop-cat-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 65px;
  width: 100%;
  min-width: 0;
  padding: 14px 10px;
  padding-right: 60px;
  background: #f5f5f5;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.shop-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(90, 48, 54, 0.2);
  filter: brightness(0.97);
}

.shop-cat-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--shop-text);
  line-height: 1.4;
  flex: 1;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}

.shop-cat-card-word {
  display: block;
}

.shop-cat-card-img {
  position: absolute;
  right: 0;
  bottom: 0;
  max-height: 100%;
  max-width: calc(100% - 20px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: right bottom;
  z-index: 0;
  pointer-events: none;
}

.shop-cat-card:hover .shop-cat-card-title {
  color: var(--shop-primary);
}

@media (max-width: 480px) {
  .shop-categories-scroll {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .shop-cat-card {
    min-height: 58px;
    padding: 10px 8px;
    padding-right: 50px;
  }
  .shop-cat-card-title {
    font-size: 12px;
  }
}

/* Иконки подкатегорий над товарами (как subsubcategory-card-horizontal в webapp) */
.shop-subcats-bar {
  margin-bottom: 16px;
}

.shop-subcats-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.shop-subcats-scroll::-webkit-scrollbar {
  display: none;
}

.shop-subcat-icon {
  flex: 0 0 auto;
  width: 52px;
  min-width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.shop-subcat-icon:hover {
  background: rgba(90, 48, 54, 0.06);
}

.shop-subcat-icon--active {
  border-color: var(--shop-primary);
  background: rgba(90, 48, 54, 0.08);
}

.shop-subcat-icon-img {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  margin-bottom: 4px;
}

.shop-subcat-icon-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-subcat-icon-title {
  font-size: 9px;
  text-align: center;
  line-height: 1.2;
  color: var(--shop-text);
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-cart-btn {
  position: relative;
}

/* Шапка: как плашки Telegram / избранного, красный фон; текущий размер ÷1.5 от удвоенного */
.shop-cart-badge {
  position: absolute;
  top: -3px;
  right: -1px;
  min-width: 0.9rem;
  height: 0.9rem;
  padding: 0 3px;
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 0.9rem;
  text-align: center;
  background: #e53935;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 0.67px 2.67px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  max-width: 2.87rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main */
.shop-main {
  flex: 1;
  max-width: var(--shop-page-max-width);
  margin: 0 auto;
  padding: 24px var(--shop-page-padding);
  width: 100%;
}

/* Promo block */
.shop-promo {
  margin-bottom: 16px;
  border-radius: var(--shop-radius-lg);
  overflow: hidden;
  background: var(--shop-card-bg);
  box-shadow: var(--shop-shadow);
}

/* Макет overlay: баннер на всю ширину — без второй «карточки» за ним */
.shop-promo:has(.shop-promo-split--premium) {
  background: transparent;
  box-shadow: none;
}

/* Высота по контенту (split: фото + текст). Раньше 16:9 + max-height давали низкую полоску и ломали % у картинки. */
.shop-promo-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

/* Карусель: стрелки по бокам, точки — полоска у нижнего края баннера (как у крупных витрин) */
.shop-promo-carousel {
  position: relative;
  width: 100%;
  min-height: 0;
}

.shop-promo-carousel--multi .shop-promo-nav {
  display: none;
}

@media (min-width: 768px) {
  .shop-promo-carousel--multi .shop-promo-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 6;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #1a1a1a;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    transition: background 0.15s ease, transform 0.15s ease;
  }

  .shop-promo-carousel--multi .shop-promo-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
  }

  .shop-promo-carousel--multi .shop-promo-nav--prev {
    left: 10px;
  }

  .shop-promo-carousel--multi .shop-promo-nav--next {
    right: 10px;
  }

  .shop-promo-carousel--multi .shop-promo-nav span {
    display: block;
    margin-top: -2px;
  }
}

.shop-promo-slider {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.shop-promo-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-width: 0; /* flex: не раздувать слайд шире карусели */
}

/* Полноэкранный баннер (отчёт товаров и др.): картинка на всю ширину, кнопка в доке снизу */
.shop-promo-slide--fullbleed {
  height: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.shop-promo-slide-stack--fullbleed {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  height: auto;
}

.shop-promo-fullbleed {
  width: 100%;
  box-sizing: border-box;
}

/* Полоса full_bleed: десктоп — макет 1920×640 (3:1); мобилка ≤767px — 1200×630 или близко 1080×540 (2:1). */
.shop-promo-fullbleed-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  height: auto;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--shop-radius-lg);
  /* Fallback; средний цвет с картинки — block-promo.js → --shop-promo-avg */
  background: var(--shop-promo-avg, #1a1a1a);
}

@media (max-width: 767px) {
  .shop-promo-fullbleed-visual {
    aspect-ratio: 1200 / 630;
  }
}

/* ПК: размытый дубликат заполняет полосу под «узкой» картинкой (без чёрных столбов) */
.shop-promo-fullbleed-under {
  display: none;
}

@media (min-width: 768px) {
  .shop-promo-fullbleed-under {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .shop-promo-fullbleed-under-img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 110%;
    height: 110%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: blur(28px);
    opacity: 0.88;
    transform-origin: center center;
  }
}

.shop-promo-fullbleed-hit {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  line-height: 0;
}

.shop-promo-img--fullbleed {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
}

/* Текст поверх баннера: средняя треть ширины (безопасная зона), выравнивание внутри неё */
.shop-promo-fullbleed-safe {
  position: absolute;
  left: 33.33%;
  width: 33.33%;
  top: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding: 12px 12px 14px;
  pointer-events: none;
  font-family: "Microsoft Sans Serif", Tahoma, Arial, sans-serif;
}


.shop-promo-fullbleed-safe--left {
  align-items: flex-start;
  text-align: left;
}

.shop-promo-fullbleed-safe--center {
  align-items: center;
  text-align: center;
}

.shop-promo-fullbleed-safe--right {
  align-items: flex-end;
  text-align: right;
}

.shop-promo-fullbleed-overlay-title {
  margin: 0 0 0.15em;
  font-size: clamp(1.15rem, 3.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 1px 12px rgba(0, 0, 0, 0.35);
  white-space: pre-line;
}

.shop-promo-fullbleed-overlay-seo {
  margin: 0.2em 0 0;
  font-size: clamp(0.72rem, 1.75vw, 0.92rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  white-space: pre-line;
}

.shop-promo-fullbleed-below {
  padding: 10px 4px 0;
}

.shop-promo-fullbleed-title {
  margin: 0 0 6px;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--shop-text, #222);
}

.shop-promo-seo--fullbleed {
  margin: 0;
  padding: 0;
  font-size: clamp(0.92rem, 2vw, 1.02rem);
  line-height: 1.5;
  color: var(--shop-text-muted, #555);
}

/* Фото на всю ширину + текст и градиент поверх (hero_layout: image_overlay; overlay_preset в style_json) */
.shop-promo-slide--image-overlay {
  height: auto;
  min-height: 0;
}

.shop-promo-slide-stack--image-overlay {
  width: 100%;
  min-height: 0;
}

.shop-promo-image-overlay {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--shop-radius-lg);
  overflow: hidden;
}

a.shop-promo-image-overlay--hero:focus-visible {
  outline: 2px solid var(--shop-primary, #5a3036);
  outline-offset: 2px;
}

/* Высота блока как раньше; фото — contain + центр: весь кадр виден, без кропа по cover */
.shop-promo-image-overlay-visual {
  position: relative;
  width: 100%;
  min-height: min(200px, 38vh);
  max-height: min(300px, 52vh);
  aspect-ratio: 21 / 9;
  background: #1a1a1a;
  border-radius: var(--shop-radius-lg);
  overflow: hidden;
  isolation: isolate;
}

.shop-promo-img--image-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.shop-promo-image-overlay-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.shop-promo-image-overlay-shade--dark_bottom {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.2) 45%, transparent 72%);
}

.shop-promo-image-overlay-shade--soft_bottom {
  background: linear-gradient(to top, rgba(20, 20, 22, 0.55) 0%, rgba(0, 0, 0, 0.12) 50%, transparent 78%);
}

.shop-promo-image-overlay-shade--dark_left {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
}

.shop-promo-image-overlay-shade--olive_left {
  background: linear-gradient(90deg, rgba(91, 103, 77, 0.92) 0%, rgba(91, 103, 77, 0.35) 42%, transparent 70%);
}

.shop-promo-image-overlay-shade--olive_bottom {
  background: linear-gradient(to top, rgba(91, 103, 77, 0.88) 0%, rgba(91, 103, 77, 0.35) 42%, transparent 72%);
}

.shop-promo-image-overlay-shade--warm_left {
  background: linear-gradient(90deg, rgba(74, 45, 42, 0.78) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
}

.shop-promo-image-overlay-shade--light_bottom {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.45) 45%, transparent 75%);
}

.shop-promo-image-overlay-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  padding: clamp(1rem, 3vw, 1.75rem);
  box-sizing: border-box;
  gap: 0.4rem;
  pointer-events: none;
}

.shop-promo-image-overlay-content--dark_left,
.shop-promo-image-overlay-content--olive_left,
.shop-promo-image-overlay-content--warm_left {
  justify-content: center;
  align-items: flex-start;
  max-width: 52%;
  padding-right: 0.5rem;
}

.shop-promo-image-overlay-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.8vw, 1.65rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  white-space: pre-line;
}

.shop-promo-image-overlay-seo {
  margin: 0;
  font-size: clamp(0.82rem, 1.85vw, 1rem);
  line-height: 1.45;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.93);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.shop-promo-image-overlay-content--light_bottom .shop-promo-image-overlay-title,
.shop-promo-image-overlay-content--light_bottom .shop-promo-image-overlay-seo {
  color: #1a1a1a;
  text-shadow: none;
}

.shop-promo-image-overlay-content--light_bottom .shop-promo-image-overlay-seo {
  color: rgba(26, 26, 26, 0.8);
}

.shop-promo-image-overlay-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  pointer-events: none;
}

@media (max-width: 599px) {
  .shop-promo-image-overlay-visual {
    aspect-ratio: 2 / 1;
    min-height: 150px;
    max-height: min(260px, 45vh);
  }

  .shop-promo-image-overlay-content--dark_left,
  .shop-promo-image-overlay-content--olive_left,
  .shop-promo-image-overlay-content--warm_left {
    max-width: 88%;
  }
}

/* Split: высота слайда = высота контента, без height:100% по цепочке */
.shop-promo-slide--split {
  height: auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.shop-promo-slide-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.shop-promo-slide-stack--split {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  height: auto;
}

.shop-promo-split {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 220px;
  height: auto;
  box-sizing: border-box;
}

.shop-promo-split-media {
  position: relative;
  flex: 0 0 40%;
  flex-shrink: 0;
  max-width: 50%;
  min-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
  background: #1a1a1a;
  border-radius: var(--shop-radius);
}

/* «Кино»: размытый fill за чётким contain — без пустых полос и без обрезки центра */
.shop-promo-split-cinema {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.shop-promo-img--cinema-bg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 118%;
  height: 118%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center;
  filter: blur(26px);
  opacity: 0.88;
  transform-origin: center center;
}

@media (prefers-reduced-motion: reduce) {
  .shop-promo-img--cinema-bg {
    filter: blur(12px);
    opacity: 0.92;
  }
}

.shop-promo-hero-link--split {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 200px;
  position: relative;
  z-index: 2;
}

.shop-promo-img--split {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(320px, 65vh);
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  border-radius: var(--shop-radius);
}

.shop-promo-split-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px 16px;
  gap: 10px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
}

.shop-promo-split-heading {
  margin: 0;
  font-size: clamp(1.05rem, 2.6vw, 1.38rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: var(--shop-text, #222);
}

.shop-promo-seo--split {
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
  min-height: 0;
}

.shop-promo-actions--split {
  padding: 0;
  margin-top: auto;
  justify-content: flex-start;
}
@media (min-width: 480px) {
  .shop-promo-actions--split .shop-promo-btn {
    flex: 0 1 auto;
    max-width: 100%;
    min-width: 0;
  }
}

/* Overlay (hero_layout: overlay): текст поверх фото слева, градиент под текстом; палитра — panel_tint */
.shop-promo-split--premium {
  --shop-promo-panel: #5b674d;
  display: block;
  width: 100%;
  min-height: 0;
  border-radius: var(--shop-radius-lg);
  overflow: hidden;
}

.shop-promo-split--premium.shop-promo-split--tint-olive {
  --shop-promo-panel: #5b674d;
}

.shop-promo-split--premium.shop-promo-split--tint-burgundy {
  --shop-promo-panel: #5a3036;
}

.shop-promo-split--premium.shop-promo-split--tint-forest {
  --shop-promo-panel: #3d4f3d;
}

.shop-promo-split--premium.shop-promo-split--tint-slate {
  --shop-promo-panel: #4a5568;
}

.shop-promo-split--premium.shop-promo-split--tint-warm {
  --shop-promo-panel: #6b4e3d;
}

.shop-promo-split--premium.shop-promo-split--tint-deep {
  --shop-promo-panel: #2d3436;
}

.shop-promo-split--premium.shop-promo-split--tint-charcoal {
  --shop-promo-panel: #2d3142;
}

a.shop-promo-split--premium.shop-promo-split--hero {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.shop-promo-split--premium.shop-promo-split--hero:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 3px;
}

.shop-promo-split--premium .shop-promo-split-body {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(48%, 22rem);
  max-width: min(92vw, 22rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(0.75rem, 2.2vw, 1.5rem) clamp(0.85rem, 2vw, 1.35rem);
  gap: clamp(0.45rem, 1.4vw, 0.85rem);
  background: transparent;
  color: #fff;
  text-align: left;
  z-index: 3;
  box-sizing: border-box;
}

.shop-promo-split--premium .shop-promo-split-heading {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 4.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  white-space: pre-line;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.shop-promo-split--premium .shop-promo-seo--split {
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(0.74rem, 1.5vw, 0.9rem);
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: 0.01em;
  white-space: pre-line;
  max-width: 20rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.shop-promo-split--premium .shop-promo-split-media {
  display: block;
  position: relative;
  width: 100%;
  max-width: none; /* сброс .shop-promo-split-media { max-width: 50% } — иначе баннер «в половину» */
  min-width: 0;
  min-height: min(220px, 46vh);
  aspect-ratio: 2 / 1;
  max-height: none;
  padding: 0;
  background: var(--shop-promo-panel);
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  flex: none;
}

/* Горизонтальный переход: без color-mix в базовом правиле — иначе WebKit может отбросить
   весь background, если var() внутри color-mix считается невалидным (@supports не спасает). */
.shop-promo-split--premium .shop-promo-split-media::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, var(--shop-promo-panel) 0%, transparent 68%);
}

@supports (background: linear-gradient(90deg, color-mix(in srgb, red 50%, blue), transparent)) {
  .shop-promo-split--premium .shop-promo-split-media::before {
    background: linear-gradient(
      90deg,
      var(--shop-promo-panel) 0%,
      color-mix(in srgb, var(--shop-promo-panel) 72%, transparent) 14%,
      color-mix(in srgb, var(--shop-promo-panel) 38%, transparent) 30%,
      color-mix(in srgb, var(--shop-promo-panel) 12%, transparent) 48%,
      transparent 64%
    );
  }
}

.shop-promo-split--premium .shop-promo-img--split {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  border-radius: 0;
  z-index: 1;
}

.shop-promo-split--premium .shop-promo-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
}

@media (max-width: 599px) {
  .shop-promo-slide-stack--split .shop-promo-split {
    flex-direction: column;
    min-height: 0;
  }

  .shop-promo-split--premium .shop-promo-split-media {
    aspect-ratio: 16 / 9;
    min-height: min(200px, 42vh);
  }

  .shop-promo-slide-stack--split .shop-promo-split:not(.shop-promo-split--premium) .shop-promo-split-media {
    flex: 0 0 auto;
    flex-shrink: 0;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    min-height: 140px;
    max-height: 220px;
  }

  .shop-promo-slide-stack--split .shop-promo-split:not(.shop-promo-split--premium) .shop-promo-hero-link--split {
    min-height: 120px;
  }

  .shop-promo-slide-stack--split .shop-promo-split:not(.shop-promo-split--premium) .shop-promo-img--split {
    max-height: 200px;
  }

  .shop-promo-slide-stack--split .shop-promo-split:not(.shop-promo-split--premium) .shop-promo-split-body {
    padding-top: 10px;
    overflow-x: hidden;
  }
}

/* Десктоп: без внутреннего скролла в колонке текста — вся карточка по высоте контента */
@media (min-width: 600px) {
  .shop-promo-split-body {
    overflow-y: visible;
  }
}

.shop-promo-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 340px;
  overflow: hidden;
  border-radius: var(--shop-radius-lg) var(--shop-radius-lg) 0 0;
}

/* Премиум: клик по фото — только область изображения; кнопки и заголовок в «доке» снизу */
.shop-promo-visual--overlay {
  border-radius: var(--shop-radius-lg) var(--shop-radius-lg) 0 0;
}

.shop-promo-hero-link--image-only,
div.shop-promo-hero-link--static.shop-promo-hero-link--image-only {
  display: block;
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: 160px;
  color: inherit;
  text-decoration: none;
}

.shop-promo-hero-link--image-only .shop-promo-img,
div.shop-promo-hero-link--static.shop-promo-hero-link--image-only .shop-promo-img {
  height: 100%;
}

.shop-promo-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0;
  padding: 0;
  pointer-events: none;
}

.shop-promo-dock .shop-promo-actions--on-image,
.shop-promo-dock .shop-promo-title-overlay--on-image {
  pointer-events: auto;
}

.shop-promo-actions--on-image {
  padding: 10px 12px 8px;
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.12) 70%, transparent 100%);
}

.shop-promo-actions--on-image .shop-promo-btn {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 9px 12px;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 479px) {
  .shop-promo-actions--on-image {
    flex-direction: column;
    align-items: stretch;
  }
  .shop-promo-actions--on-image .shop-promo-btn {
    width: 100%;
  }
}

p.shop-promo-title-overlay--on-image {
  margin: 0;
  position: relative;
  padding: 12px 16px 14px;
  font-size: clamp(1.08rem, 3.2vw, 1.38rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  box-sizing: border-box;
}

.shop-promo-hero-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 160px;
  color: inherit;
  text-decoration: none;
}

.shop-promo-hero-link--static {
  cursor: default;
}

.shop-promo-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 180px;
}

.shop-promo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Узкая полоса: высота контейнера фиксирована, картинка масштабируется по высоте (width: auto), без object-fit:cover — иначе позднее правило обрезает верх/низ */
.shop-promo-img.shop-promo-img--fullbleed {
  width: auto;
  max-width: none;
  height: 100%;
  object-fit: unset;
  object-position: center center;
}

.shop-promo-title-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 16px;
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
  max-height: 46%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  box-sizing: border-box;
}

.shop-promo-seo {
  margin: 0;
  padding: 12px 16px 14px;
  font-size: clamp(0.98rem, 2.4vw, 1.08rem);
  line-height: 1.55;
  color: var(--shop-text, #333);
  font-weight: 450;
}

.shop-promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px 14px;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.shop-promo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  text-align: center;
  box-sizing: border-box;
  word-break: break-word;
  hyphens: auto;
}

/* Узкий экран: кнопки колонкой — не вылезают за скругления карточки */
@media (max-width: 479px) {
  .shop-promo-actions {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }
  .shop-promo-btn {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 480px) {
  .shop-promo-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
  .shop-promo-btn {
    flex: 1 1 calc(50% - 6px);
    max-width: calc(50% - 4px);
    min-width: 120px;
  }
}

.shop-promo-actions--stackcol {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
}
@media (min-width: 480px) {
  .shop-promo-actions--stackcol .shop-promo-btn {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }
}

/* Много кнопок: горизонтальный скролл внутри карточки, без выхода за край */
@media (min-width: 480px) {
  .shop-promo-actions--scroll {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 12px;
  }
  .shop-promo-actions--scroll .shop-promo-btn {
    flex: 0 0 auto;
    max-width: min(240px, 85vw);
    min-width: min(200px, 70vw);
  }
}

.shop-promo-btn--primary {
  background: var(--shop-primary);
  color: #fff;
}
.shop-promo-btn--success {
  background: #198754;
  color: #fff;
}
.shop-promo-btn--danger {
  background: #dc3545;
  color: #fff;
}
.shop-promo-btn--default {
  background: var(--shop-card-bg, #f0f0f0);
  color: var(--shop-text, #222);
  border-color: rgba(0, 0, 0, 0.12);
}

.shop-promo-placeholder {
  background: linear-gradient(135deg, var(--shop-primary) 0%, var(--shop-primary-dark) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
}

.shop-promo-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.shop-promo-desc {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 4px;
}

.shop-promo-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.shop-promo-badge--novelty { background: #1e232d; color: #fff; }
.shop-promo-badge--restocked { background: #1e3d2d; color: #fff; }
.shop-promo-badge--banner { background: var(--shop-primary); color: #fff; }

.shop-promo-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px;
}

/* Точки у нижнего края баннера (слегка заходят на изображение), читаемы на светлом и тёмном фото */
.shop-promo-dots--hoff {
  position: relative;
  z-index: 4;
  margin-top: -36px;
  padding: 10px 12px 14px;
  gap: 10px;
  pointer-events: none;
}

.shop-promo-dots--hoff .shop-promo-dot {
  pointer-events: auto;
}

.shop-promo-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}

.shop-promo-dot.active {
  background: #fff;
  transform: scale(1.25);
  box-shadow: 0 0 0 2px var(--shop-primary, #5a3036), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Sections */
.shop-section {
  margin-bottom: 40px;
}

#shop-catalog,
#reviews,
#favorites {
  scroll-margin-top: 24px;
}

/* Фото/слайдер категории (коллекции) при открытии cat_* — как в webapp */
.shop-category-hero {
  margin: 0 0 16px;
  box-sizing: border-box;
}

.shop-category-hero-inner {
  width: 100%;
  max-width: 100%;
}

.shop-category-hero-heading {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--shop-text);
  margin-bottom: 10px;
  padding: 0 4px;
}

.shop-category-hero-slider-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--shop-radius-lg, 12px);
  overflow: hidden;
  background: var(--shop-card-bg);
  /* Единый кадр: фото целиком вписываются, без обрезки (как коллаж в блоке) */
  aspect-ratio: 16 / 9;
  max-height: min(52vw, 360px);
  min-height: 168px;
}

.shop-category-hero-track {
  display: flex;
  height: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.shop-category-hero-track::-webkit-scrollbar {
  display: none;
}

.shop-category-hero-slide {
  position: relative;
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
  overflow: hidden;
  isolation: isolate;
}

/* Как карточки коллекций / баннер cinema: размытый fill + чёткое фото contain */
.shop-category-hero-cinema {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.shop-category-hero-img-bg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 118%;
  height: 118%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center;
  filter: blur(18px);
  opacity: 0.88;
  transform-origin: center center;
}

@media (prefers-reduced-motion: reduce) {
  .shop-category-hero-img-bg {
    filter: blur(10px);
    opacity: 0.92;
  }
}

.shop-category-hero-cinema-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.14) 16%,
    transparent 28%,
    transparent 72%,
    rgba(0, 0, 0, 0.14) 84%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

.shop-category-hero-img-fg {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}

.shop-category-hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 5;
  pointer-events: none;
}

.shop-category-hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s ease, transform 0.2s ease;
}

.shop-category-hero-dot.active {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.1);
}

.shop-category-hero-desc {
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--shop-card-bg);
  border-radius: var(--shop-radius, 10px);
  color: var(--shop-text);
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Блок «Как это работает» */
.shop-how-it-works-section {
  background: var(--shop-card-bg);
  border-radius: var(--shop-radius-lg);
  box-shadow: var(--shop-shadow);
  padding: 24px 0;
}

.shop-how-it-works-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.shop-how-it-works-header .shop-section-title {
  margin-bottom: 0;
}

.shop-how-it-works-loading {
  text-align: center;
  padding: 24px;
  color: var(--shop-text-muted);
}

.shop-how-it-works-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shop-how-it-works-card {
  background: var(--shop-bg);
  border-radius: var(--shop-radius);
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.shop-how-it-works-card img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.shop-how-it-works-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--shop-text);
  margin-bottom: 8px;
}

.shop-how-it-works-card-body {
  font-size: 0.95rem;
  color: var(--shop-text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.shop-how-it-works-empty {
  text-align: center;
  padding: 24px;
  color: var(--shop-text-muted);
}

/* Блок отзывов */
.shop-reviews-section {
  background: var(--shop-card-bg);
  border-radius: var(--shop-radius-lg);
  box-shadow: var(--shop-shadow);
  padding: 24px 0;
}

.shop-reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.shop-reviews-header .shop-section-title {
  margin-bottom: 0;
}

/* Квадратная кнопка «назад» — визуал у .shop-back-btn; здесь только чтобы не сжималась в flex */
.shop-reviews-header > .shop-back-btn {
  flex-shrink: 0;
}

.shop-reviews-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--shop-bg);
  border-radius: var(--shop-radius);
  font-size: 14px;
}

.shop-reviews-avg {
  font-weight: 700;
  font-size: 18px;
  color: var(--shop-primary);
}

.shop-reviews-stars {
  color: #ffd700;
  font-size: 16px;
}

.shop-reviews-count {
  color: var(--shop-text-muted);
}

.shop-reviews-loading {
  text-align: center;
  padding: 24px;
  color: var(--shop-text-muted);
}

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

.shop-review-card {
  background: var(--shop-bg);
  border-radius: var(--shop-radius);
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.shop-review-card-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
@media (max-width: 767px) {
  .shop-review-card-inner {
    flex-direction: column;
  }
  .shop-review-products-col {
    width: 100%;
  }
}

.shop-review-products-col {
  flex-shrink: 0;
  min-width: 0;
}

.shop-review-products-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--shop-text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.shop-review-product-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 768px) {
  .shop-review-product-cards {
    max-width: 200px;
  }
}

.shop-review-product-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  text-decoration: none;
  color: var(--shop-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.shop-review-product-card:hover {
  border-color: var(--shop-primary);
  box-shadow: 0 2px 8px rgba(90, 48, 54, 0.12);
}

.shop-review-product-card-img {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.shop-review-product-card-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-review-content-col {
  flex: 1;
  min-width: 0;
}

.shop-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.shop-review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--shop-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}

.shop-review-info {
  flex: 1;
  min-width: 0;
}

.shop-review-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--shop-text);
}

.shop-review-date {
  font-size: 12px;
  color: var(--shop-text-muted);
}

.shop-review-rating {
  color: #ffd700;
  font-size: 14px;
  flex-shrink: 0;
}

.shop-review-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--shop-text);
  margin-bottom: 12px;
}

.shop-reviews-photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.shop-reviews-photo {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.shop-reviews-photo:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.03);
}
.shop-reviews-photo:focus-visible {
  outline: 2px solid var(--shop-primary);
  outline-offset: 2px;
}

.shop-reviews-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--shop-text-muted);
}

.shop-reviews-empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.shop-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--shop-text);
}

.shop-catalog-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 4px 0 12px;
  background: var(--shop-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.shop-catalog-top-bar .shop-section-title {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.shop-catalog-top-bar > .shop-back-btn {
  flex-shrink: 0;
}

.shop-catalog-hint {
  color: var(--shop-text-muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

/* Product grid */
.shop-product-grid-wrap {
  position: relative;
  min-height: 120px;
}

.shop-product-grid-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.shop-product-grid-loading[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.shop-product-grid-loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid rgba(90, 48, 54, 0.2);
  border-top-color: var(--shop-primary);
  border-radius: 50%;
  animation: shop-spin 0.8s linear infinite;
}

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

@keyframes shop-product-card-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 480px) {
  .shop-product-grid {
    gap: 8px;
  }
}

@media (min-width: 768px) {
  .shop-product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

@media (min-width: 1024px) {
  .shop-product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
}

/* Product card */
.shop-product-card {
  background: var(--shop-card-bg);
  border-radius: var(--shop-radius);
  box-shadow: var(--shop-shadow);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  animation: shop-product-card-enter 0.38s ease-out both;
}

.shop-product-card:hover {
  box-shadow: var(--shop-shadow-hover);
  transform: translateY(-2px);
}

.shop-product-card--active {
  box-shadow: 0 0 0 2px var(--shop-accent), var(--shop-shadow-hover);
}

.shop-product-card--active:hover {
  box-shadow: 0 0 0 2px var(--shop-accent), 0 8px 24px rgba(201, 114, 137, 0.2);
}

.shop-product-card.shop-product-card--fav-removing {
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .shop-product-card {
    animation: none;
  }
  .shop-product-card.shop-product-card--fav-removing {
    transition-duration: 0.01ms;
  }
}

.shop-product-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.shop-product-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
  border-radius: var(--shop-radius) var(--shop-radius) 0 0;
  overflow: hidden;
  flex-shrink: 0;
}

.shop-product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Оверлей матраса: жёсткость + нагрузка (кг), только при наличии данных в характеристиках */
.shop-mattress-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
  border-radius: 0 0 var(--shop-radius) var(--shop-radius);
}

.shop-mattress-overlay-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.shop-mattress-overlay-row--kg-only {
  justify-content: flex-end;
}

/* Одна линия по высоте и скруглению; нагрузка — тот же тип плашки, цвет акцента shop */
.shop-mattress-overlay-hard {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  padding: 5px 8px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  word-wrap: break-word;
}

.shop-mattress-overlay-kg {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--shop-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(201, 114, 137, 0.35);
}

@media (min-width: 768px) {
  .shop-mattress-overlay-hard {
    font-size: 11px;
    padding: 6px 10px;
  }
  .shop-mattress-overlay-kg {
    font-size: 11px;
    padding: 6px 10px;
  }
}

/* Стили скидки в блоке цены под фото */
.shop-product-card--sale .shop-product-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.shop-price-old {
  text-decoration: line-through;
  font-size: 13px;
  font-weight: 500;
  color: var(--shop-text-muted);
}

.shop-price-sale {
  font-weight: 700;
  color: var(--shop-accent);
}

/* Иконки поделиться и избранное — ниже плавающей панели поиска */
.shop-share-icon,
.shop-favorite-icon {
  position: absolute;
  top: 10px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  background: transparent;
  border: none;
  transition: opacity 0.2s ease;
}

.shop-share-icon {
  right: 10px;
}

.shop-favorite-icon {
  right: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@media (hover: hover) {
  .shop-share-icon:hover,
  .shop-favorite-icon:hover {
    opacity: 0.85;
  }
}

.shop-share-icon:active,
.shop-favorite-icon:active {
  opacity: 0.7;
}

.shop-share-icon svg,
.shop-favorite-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
}

.shop-share-icon svg path,
.shop-favorite-icon svg path {
  fill: #9e9e9e;
  transition: fill 0.2s ease;
}

@media (hover: hover) {
  .shop-share-icon:hover svg path {
    fill: #1976d2;
  }
}

.shop-favorite-icon svg path {
  fill: #9e9e9e;
}

.shop-favorite-icon.active svg path {
  fill: #d32f2f;
}

@media (hover: hover) {
  .shop-favorite-icon:hover:not(.active) svg path {
    fill: #d32f2f;
  }
}

/* Приглушение при отсутствии в наличии — как в webapp */
.shop-product-card--out-of-stock .shop-product-img-wrap {
  position: relative;
}

.shop-product-card--out-of-stock .shop-product-img-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 1;
  border-radius: var(--shop-radius) var(--shop-radius) 0 0;
}

.shop-product-card--out-of-stock .shop-product-img-wrap img {
  opacity: 0.6;
  filter: grayscale(30%);
}

/* Toast для «Ссылка скопирована» */
.shop-share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.shop-share-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.shop-product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}

.shop-product-badge--sale {
  background: var(--shop-primary);
  color: #fff;
}

/* Матрасы: «Акция» + «Производитель» — колонка сверху слева, производитель под акцией */
.shop-product-badges-stack {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  max-width: calc(100% - 88px);
  pointer-events: none;
}

.shop-product-badges-stack .shop-product-badge {
  position: static;
  top: auto;
  left: auto;
}

.shop-product-badge--manufacturer {
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Компактный блок info (как в corpus) */
.shop-product-info-compact {
  display: flex;
  flex-direction: column;
  padding: 12px;
  flex: 1;
  min-width: 0;
}

.shop-product-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* В компактной сетке — не больше трёх строк, полное имя в карточке товара */
.shop-product-info-compact .shop-product-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.35;
}

.shop-compact-size {
  font-size: 12px;
  color: var(--shop-text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

/* Миниатюры цветовых вариантов в компактной карточке */
.shop-compact-color-variants {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.shop-compact-color-thumb {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  background: var(--shop-bg);
}

.shop-compact-color-thumb:hover {
  border-color: rgba(90, 48, 54, 0.4);
}

.shop-compact-color-thumb.active {
  border-color: var(--shop-primary);
}

.shop-compact-color-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-product-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--shop-primary);
  margin-bottom: 0;
}

/* Кнопки в компактной карточке (как в corpus) */
.compact-card-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* «Подробнее» — высота и таблетка как «Каталог», заливка белая, текст чёрный, тонкая обводка цветом каталога */
.compact-details-btn {
  flex: 1;
  min-width: 0;
  min-height: var(--shop-ui-btn-height);
  height: var(--shop-ui-btn-height);
  padding: 0 16px;
  font-size: var(--shop-ui-btn-fs);
  font-weight: var(--shop-ui-btn-fw);
  line-height: var(--shop-ui-btn-lh);
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #4e3034;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.shop-product-link:hover .compact-details-btn {
  background: #f7f5f4;
  color: #1a1a1a;
  border-color: #3d282b;
}

.compact-cart-btn {
  flex-shrink: 0;
  width: var(--shop-ui-btn-height);
  height: var(--shop-ui-btn-height);
  min-width: var(--shop-ui-btn-height);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--shop-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.compact-cart-btn:hover {
  background: var(--shop-primary-dark);
}

.compact-cart-btn:active {
  transform: scale(0.98);
}

.compact-cart-btn.disabled,
.compact-cart-btn:disabled {
  background: var(--shop-text-muted);
  cursor: default;
  width: auto;
  min-width: 40px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
}

.compact-cart-btn.disabled:hover,
.compact-cart-btn:disabled:hover {
  background: var(--shop-text-muted);
}

.compact-cart-btn .compact-cart-btn-ico {
  width: auto;
  height: auto;
  max-width: min(28px, calc(var(--shop-ui-btn-height) - 8px));
  max-height: min(28px, calc(var(--shop-ui-btn-height) - 8px));
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* Кнопка «наверх» (каталог): размер как .compact-cart-btn, появление вместе с плавающей панелью */
.shop-scroll-top-btn {
  position: fixed;
  right: var(--shop-page-padding);
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 89;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, bottom 0.25s ease;
  pointer-events: none;
  touch-action: manipulation;
}

.shop-scroll-top-btn.shop-scroll-top-btn--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

body.shop-floating-bar-visible .shop-scroll-top-btn.shop-scroll-top-btn--visible {
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--shop-ui-btn-height));
}

.shop-scroll-top-btn .shop-scroll-top-btn-svg {
  display: block;
  flex-shrink: 0;
  width: auto;
  height: auto;
  max-width: min(28px, calc(var(--shop-ui-btn-height) - 8px));
  max-height: min(28px, calc(var(--shop-ui-btn-height) - 8px));
}

@media (min-width: 768px) {
  .shop-scroll-top-btn {
    right: max(var(--shop-page-padding), calc((100vw - var(--shop-page-max-width)) / 2 + var(--shop-page-padding)));
  }
}

.shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--shop-text-muted);
}

.shop-catalog-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  min-height: 48px;
}

.shop-load-more {
  text-align: center;
  margin-top: 0;
}

.shop-load-more-btn {
  padding: 12px 32px;
  background: transparent;
  color: var(--shop-primary);
  border: 2px solid var(--shop-primary);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.shop-load-more-btn:hover {
  background: var(--shop-primary);
  color: #fff;
}

.shop-back-btn {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--shop-primary);
  border: 2px solid var(--shop-primary);
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-shadow: var(--shop-shadow);
}

.shop-back-btn:hover {
  background: var(--shop-primary);
  color: #fff;
}

.shop-back-btn--inline {
  margin-left: auto;
}

.shop-fixed-actions {
  position: fixed;
  bottom: 24px;
  right: var(--shop-page-padding);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .shop-fixed-actions {
    right: max(var(--shop-page-padding), calc((100vw - var(--shop-page-max-width)) / 2 + var(--shop-page-padding)));
  }
}

.shop-fixed-actions .shop-fixed-actions-back,
.shop-fixed-actions .shop-fixed-actions-add {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--shop-primary);
  border: 2px solid var(--shop-primary);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-shadow: var(--shop-shadow);
}

.shop-fixed-actions .shop-fixed-actions-back:hover,
.shop-fixed-actions .shop-fixed-actions-add:hover:not(.disabled) {
  background: var(--shop-primary);
  color: #fff;
}

.shop-fixed-actions .shop-fixed-actions-add.disabled {
  background: rgba(255, 255, 255, 0.6);
  color: var(--shop-text-muted);
  border-color: var(--shop-text-muted);
  cursor: default;
}

/* Desktop: кнопка «В корзину» в плашке, footer панели скрыт */
@media (min-width: 768px) {
  .shop-catalog-with-panel.shop-panel-open .shop-product-panel-footer {
    display: none !important;
  }
}

/* Обёртка каталога + панели (desktop: панель справа сдвигает каталог, как в Google Images) */
@media (min-width: 768px) {
  .shop-catalog-with-panel.shop-panel-open {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 0;
  }
  .shop-catalog-with-panel.shop-panel-open .shop-catalog-section {
    flex: 1;
    min-width: 0;
  }
  /* Уменьшаем компактные карточки (zoom пересчитывает layout) */
  .shop-catalog-with-panel.shop-panel-open .shop-catalog-section {
    zoom: 0.9;
  }
  /* Панель: отступы как у компактных карточек (8px), фикс по верху и низу экрана */
  .shop-catalog-with-panel.shop-panel-open .shop-product-panel {
    position: sticky;
    top: 8px;
    bottom: 8px;
    z-index: 50;
    align-self: flex-start;
    margin-top: 48px; /* выравнивание с первым рядом компактных карточек */
    width: 44%;
    max-width: 420px;
    flex-shrink: 0;
    transform: none;
    transition: transform 0.3s ease;
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 16px); /* 8px сверху + 8px снизу */
  }
  .shop-catalog-with-panel.shop-panel-open:has(.shop-catalog-section.shop-catalog-has-subcats) .shop-product-panel {
    top: 8px;
    bottom: 8px;
    margin-top: 132px; /* заголовок + подкатегории — выравнивание с первым рядом */
    max-height: calc(100vh - 16px);
  }
  body.shop-floating-bar-visible .shop-catalog-with-panel.shop-panel-open .shop-product-panel {
    top: 8px;
    bottom: 8px;
    margin-top: 48px;
    max-height: calc(100vh - 16px);
  }
  body.shop-floating-bar-visible .shop-catalog-with-panel.shop-panel-open:has(.shop-catalog-section.shop-catalog-has-subcats) .shop-product-panel {
    top: 8px;
    bottom: 8px;
    margin-top: 132px;
    max-height: calc(100vh - 16px);
  }
  .shop-catalog-with-panel.shop-panel-open .shop-product-overlay {
    display: none;
  }
  /* Закрытие: панель уезжает с теми же размерами (не на весь экран) */
  .shop-catalog-with-panel.shop-panel-open.shop-panel-closing .shop-product-panel {
    transform: translateX(100%);
  }
}

/* Product detail panel (slide-in справа) */
.shop-product-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.shop-product-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 767px) {
  .shop-product-overlay[aria-hidden="false"] {
    touch-action: none;
    overscroll-behavior: none;
  }
}

.shop-product-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 450px;
  background: var(--shop-card-bg);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  z-index: 260;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.shop-product-panel[aria-hidden="false"] {
  transform: translateX(0);
}

@media (max-width: 767px) {
  .shop-product-panel {
    max-width: none;
    width: 100%;
  }
}

.shop-product-panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-product-panel-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--shop-text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  transition: background 0.2s;
}

.shop-product-panel-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.shop-product-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-top: 44px;
  min-height: 0;
}

@media (max-width: 767px) {
  .shop-product-panel-content {
    overscroll-behavior-y: contain;
  }
}

.shop-product-panel-footer {
  flex-shrink: 0;
  padding: 12px 16px;
  background: var(--shop-card-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.shop-product-panel-footer-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

/* В панели товара --shop-masthead-pill-radius не задан: явное скругление как у «Каталог» */
.shop-product-panel .shop-catalog-btn.shop-product-detail-add--sticky,
.shop-product-panel-body .shop-catalog-btn.shop-product-detail-add-inline {
  border-radius: 999px;
}

@media (max-width: 767px) {
  .shop-product-panel-footer-actions .shop-catalog-btn.shop-product-detail-add--sticky {
    grid-column: unset !important;
    grid-row: unset !important;
    justify-self: unset;
    align-self: stretch;
    height: var(--shop-ui-btn-height);
    min-height: var(--shop-ui-btn-height);
    padding: 0 16px;
    font-size: var(--shop-ui-btn-fs);
  }
  .shop-product-panel-footer-actions .shop-product-panel-cart-btn--footer {
    grid-column: unset !important;
    grid-row: unset !important;
  }
  .shop-product-panel-footer-actions.has-cart-items .shop-catalog-btn.shop-product-detail-add--sticky {
    flex: 0 0 80%;
    width: 80%;
    max-width: 80%;
    min-width: 0;
  }
  .shop-product-panel-footer-actions.has-cart-items .shop-product-panel-cart-btn--footer {
    flex: 0 0 20%;
    width: 20%;
    max-width: 20%;
    min-width: 0;
  }
  .shop-product-panel-footer-actions:not(.has-cart-items) .shop-catalog-btn.shop-product-detail-add--sticky {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
  }
}

.shop-product-panel-footer .shop-catalog-btn.shop-product-detail-add--sticky {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Кнопка корзины в мобильном футере панели (на ПК футер скрыт) */
.shop-product-panel-footer .shop-product-panel-cart-btn--footer {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--shop-ui-btn-height);
  height: var(--shop-ui-btn-height);
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: #4e3034;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s ease, transform 0.15s ease;
}

.shop-product-panel-footer .shop-product-panel-cart-btn--footer:hover {
  background: #3d282b;
}

.shop-product-panel-footer .shop-product-panel-cart-btn-ico {
  width: auto;
  height: auto;
  max-width: min(24px, calc(var(--shop-ui-btn-height) - 8px));
  max-height: min(24px, calc(var(--shop-ui-btn-height) - 8px));
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* Плашка количества — цвет как фон шапки shop */
.shop-product-panel-footer .shop-product-panel-cart-btn-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 5px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35rem;
  text-align: center;
  background: #f688a2;
  color: #fff;
  border-radius: 999px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.shop-catalog-btn.shop-product-detail-add.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--shop-text-muted) !important;
  color: #fff !important;
}

.shop-product-panel-loading {
  text-align: center;
  padding: 40px 16px;
  color: var(--shop-text-muted);
}

.shop-product-detail-photo-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.shop-product-detail-photo-main {
  width: 100%;
  cursor: pointer;
  border-radius: var(--shop-radius);
  overflow: hidden;
  background: var(--shop-bg);
  position: relative;
  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none;
  user-select: none;
}

/* Оверлей панели: без горизонтального жеста как у карусели — свайп влево/вправо не листает фото (JS отключён <768px) */
@media (max-width: 767px) {
  .shop-product-detail-photo-main {
    touch-action: manipulation;
  }
}

.shop-product-detail-photo-main .shop-product-detail-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain; /* сохраняем пропорции, без растягивания */
  display: block;
  transition: opacity 0.22s ease;
}

.shop-product-detail-photo-main .shop-product-detail-photo-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px;
  border-radius: 20px;
  pointer-events: none;
}

/* Миниатюры: горизонтальная полоса под главным фото, без вертикального скролла */
.shop-product-detail-thumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.shop-product-detail-thumbs::-webkit-scrollbar {
  height: 4px;
}

.shop-product-detail-thumbs::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.shop-product-detail-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--shop-bg);
  transition: border-color 0.2s;
}

.shop-product-detail-thumb:hover,
.shop-product-detail-thumb.active {
  border-color: var(--shop-primary);
}

.shop-product-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shop-product-detail-gallery {
  margin-bottom: 16px;
  border-radius: var(--shop-radius);
  overflow: hidden;
  background: var(--shop-bg);
}

.shop-product-detail-gallery-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.shop-product-detail-gallery-item {
  flex: 0 0 120px;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--shop-card-bg);
}

.shop-product-detail-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shop-product-panel-body .shop-product-detail-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--shop-text);
}

.shop-product-detail-price-wrap {
  margin-bottom: 12px;
}

/* Мобильная: inline-кнопка скрыта, используется footer */
.shop-product-detail-add-inline {
  display: none;
}

/* Desktop: цена и кнопка «В корзину» в одну строку напротив друг друга */
@media (min-width: 768px) {
  .shop-product-detail-price-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .shop-product-detail-price-block {
    flex: 1;
    min-width: 0;
  }
  .shop-product-detail-add-wrap {
    flex-shrink: 0;
    align-self: flex-start;
  }
  .shop-product-detail-add-inline {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
  .shop-product-panel-body .shop-catalog-btn.shop-product-detail-add-inline {
    width: auto;
    min-width: 0;
  }
}

.shop-product-panel-body .shop-product-detail-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--shop-primary);
}

.shop-product-detail-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-product-detail-price-old {
  font-size: 1rem;
  color: var(--shop-text-muted);
  text-decoration: line-through;
}

.shop-product-detail-price--sale {
  color: var(--shop-accent);
}

.shop-product-detail-sale-badge {
  display: inline-block;
  background: rgba(201, 114, 137, 0.15);
  color: var(--shop-accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.shop-product-detail-stock {
  font-size: 0.85rem;
  margin-top: 4px;
}

.shop-product-detail-stock-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 4px;
}

.shop-product-detail-stock-row .shop-product-detail-stock {
  margin-top: 0;
}

.shop-product-detail-delivery-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  line-height: 1.3;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 6px;
  box-sizing: border-box;
  max-width: 100%;
  background: #f688a2;
  color: #4e3034;
}

.shop-product-detail-stock.many {
  color: #2e7d32;
}

.shop-product-detail-stock.low {
  color: #ed6c02;
}

.shop-product-detail-colors {
  margin-bottom: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.shop-product-detail-colors-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--shop-text-muted);
  margin-bottom: 10px;
}

.shop-product-detail-colors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-product-detail-color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.shop-product-detail-color-item:hover {
  background: rgba(90, 48, 54, 0.06);
}

.shop-product-detail-color-item.active {
  border-color: var(--shop-primary);
  background: rgba(90, 48, 54, 0.08);
}

.shop-product-detail-color-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}

.shop-product-detail-color-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-product-detail-color-name {
  font-size: 10px;
  text-align: center;
  color: var(--shop-text);
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-product-detail-color-status {
  font-size: 9px;
  margin-top: 2px;
}

.shop-product-detail-color-status.many {
  color: #2e7d32;
}

.shop-product-detail-color-status.low {
  color: #ed6c02;
}

.shop-product-panel-body .shop-product-detail-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--shop-text-muted);
  margin-bottom: 16px;
}

.shop-product-detail-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.shop-product-detail-spec {
  font-size: 0.9rem;
  color: var(--shop-text);
}

.shop-product-detail-spec-badge {
  display: inline-block;
  background: rgba(90, 48, 54, 0.1);
  color: var(--shop-primary);
  border: 1px solid rgba(90, 48, 54, 0.2);
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 600;
  font-size: 0.8rem;
}

.shop-product-detail-linked {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.shop-product-detail-linked-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--shop-text);
}

.shop-product-detail-linked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.shop-product-detail-linked-card {
  background: var(--shop-bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.shop-product-detail-linked-img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 8px;
  background: var(--shop-card-bg);
}

.shop-product-detail-linked-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--shop-text);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-product-detail-linked-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--shop-primary);
  margin-bottom: 8px;
}

.shop-product-detail-linked-btn {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  border-radius: 6px;
  border: none;
  background: var(--shop-primary);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: auto;
}

.shop-product-detail-linked-btn:hover {
  opacity: 0.9;
}

.shop-product-detail-linked-btn.disabled {
  background: var(--shop-text-muted);
  cursor: default;
}

/* Блок «Коллекция» внизу карточки товара (как в webapp: категория-коллекция) */
.shop-product-detail-collection-root {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.shop-product-detail-collection-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--shop-text);
  text-align: left;
}

.shop-product-detail-collection-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}

.shop-product-detail-collection-scroll::-webkit-scrollbar {
  display: none;
}

.shop-collection-item {
  flex: 0 0 calc((100% - 30px) / 4);
  min-width: calc((100% - 30px) / 4);
  max-width: calc((100% - 30px) / 4);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.2s ease;
  border-radius: 8px;
}

.shop-collection-item:hover {
  transform: translateY(-2px);
}

.shop-collection-item-img-wrap {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.shop-collection-item-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  display: block;
  transition: border-color 0.2s ease;
  background: var(--shop-card-bg);
}

.shop-collection-item:hover .shop-collection-item-img {
  border-color: var(--shop-primary);
}

.shop-collection-item--current .shop-collection-item-img {
  border-color: var(--shop-primary);
  box-shadow: 0 0 0 1px var(--shop-primary);
}

.shop-collection-item-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  pointer-events: none;
}

.shop-collection-item-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--shop-text);
  margin-top: 6px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Баннер согласия на cookie (только главная, block-cookie-consent.js + localStorage) */
.shop-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 380;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(90, 48, 54, 0.12);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.shop-cookie-banner[hidden] {
  display: none !important;
}

.shop-cookie-banner-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 14px var(--shop-page-padding);
  max-width: var(--shop-page-max-width);
  margin: 0 auto;
  box-sizing: border-box;
}

.shop-cookie-banner-text {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--shop-text);
  min-width: 0;
}

.shop-cookie-banner-accept {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .shop-cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px var(--shop-page-padding);
  }

  .shop-cookie-banner-accept {
    width: 100%;
  }
}

/* Toast «Добавлено в корзину» — показ при добавлении товара (критично на мобильных) */
.shop-cart-added-toast {
  position: fixed;
  bottom: max(80px, calc(60px + env(safe-area-inset-bottom)));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 24px;
  background: var(--shop-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(90, 48, 54, 0.35);
  z-index: 510;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  pointer-events: none;
  white-space: nowrap;
}
.shop-cart-added-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Нижняя плашка корзины: компактная, слева, не перекрывает кнопку «В корзину» */
.shop-cart-bar {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 12px;
  right: auto;
  width: auto;
  max-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 42px;
  background: #f688a2; /* как .shop-header--masthead */
  border: 1px solid rgba(90, 48, 54, 0.2);
  border-radius: 10px;
  box-shadow: var(--shop-shadow);
  z-index: 500;
  backdrop-filter: none;
  transition: transform 0.3s ease, opacity 0.3s ease, bottom 0.25s ease;
}

/* Вместе с плавающей панелью каталога поднимаем плашку корзины — на одну «высоту» с кнопкой «наверх» справа */
body.shop-floating-bar-visible .shop-cart-bar {
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--shop-ui-btn-height));
}
.shop-cart-bar--visible {
  animation: shop-cart-bar-appear 0.35s ease;
}
@keyframes shop-cart-bar-appear {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Отступ снизу, чтобы «В корзину» в footer не перекрывалась плашкой корзины (когда панель товара закрыта) */
body.shop-cart-bar-visible .shop-product-panel-footer {
  padding-bottom: 52px;
}
/* Панель товара выше плашки корзины (z-index 260 vs 85) — лишний отступ не нужен; иначе после добавления в корзину снова «раздувает» низ.
   На desktop вешается .shop-panel-open; на mobile его нет — смотрим aria-hidden у панели. */
body.shop-cart-bar-visible .shop-catalog-with-panel.shop-panel-open .shop-product-panel-footer,
body.shop-cart-bar-visible .shop-product-panel[aria-hidden="false"] .shop-product-panel-footer {
  padding-bottom: 12px;
}

.shop-cart-bar-summary {
  flex: 1;
  font-weight: 600;
  font-size: 13px;
  color: var(--shop-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-cart-bar-buttons {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.shop-cart-bar-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: all 0.2s;
}

.shop-cart-bar-btn-open {
  background: rgba(255, 255, 255, 0.9);
  color: var(--shop-primary);
  border: 1px solid rgba(90, 48, 54, 0.25);
}

.shop-cart-bar-btn-open:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(90, 48, 54, 0.15);
}

.shop-cart-bar-btn-checkout {
  background: var(--shop-primary);
  color: #fff;
}

.shop-cart-bar-btn-checkout:hover {
  background: var(--shop-primary-dark);
  box-shadow: var(--shop-shadow-hover);
}

@media (max-width: 767px) {
  .shop-cart-added-toast {
    bottom: max(70px, calc(56px + env(safe-area-inset-bottom)));
  }
}

/* Мобильная плашка корзины: только кол-во + «Открыть», стиль как у кнопки «Назад», не перекрывает «В корзину» */
@media (max-width: 767px) {
  .shop-cart-bar .shop-cart-bar-btn-checkout {
    display: none;
  }
  /* Фон как у шапки .shop-header--masthead (#f688a2), скругление «таблетка» как у кнопки «Каталог» (999px); обводка и цвет текста — без изменений */
  .shop-cart-bar {
    background: #f688a2;
    border-radius: 999px;
    backdrop-filter: none;
    border: 2px solid var(--shop-primary);
    color: var(--shop-primary);
    max-width: 140px;
    z-index: 85;
  }
  .shop-cart-bar-summary {
    font-weight: 600;
    font-size: 14px;
    color: var(--shop-primary);
  }
  .shop-cart-bar-btn-open {
    background: transparent !important;
    color: var(--shop-primary);
    border: none;
    padding: 0 0 0 4px;
    font-weight: 600;
  }
}

@media (max-width: 480px) {
  .shop-cart-bar {
    left: var(--shop-page-padding);
    max-width: 130px;
    padding: 10px 12px;
    min-height: 44px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .shop-cart-bar-summary { font-size: 13px; }
  body.shop-cart-bar-visible .shop-product-panel-footer {
    padding-bottom: 48px;
  }
  .shop-cart-added-toast {
    font-size: 13px;
    padding: 10px 20px;
    bottom: max(65px, calc(52px + env(safe-area-inset-bottom)));
  }
}

/* Модальное окно корзины */
.shop-cart-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.shop-cart-modal-backdrop[aria-hidden="false"] {
  display: flex;
}

.shop-cart-modal {
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  background: var(--shop-card-bg);
  border-radius: var(--shop-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-cart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.shop-cart-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.shop-cart-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--shop-text-muted);
}

.shop-cart-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--shop-text);
}

.shop-cart-modal-body {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.shop-cart-modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.shop-cart-clear-btn {
  padding: 8px 12px;
  font-size: 13px;
  background: transparent;
  color: var(--shop-text-muted);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  cursor: pointer;
}

.shop-cart-clear-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.shop-cart-modal-summary {
  flex: 1;
  font-weight: 700;
  font-size: 14px;
}

.shop-cart-checkout-btn {
  padding: 12px 20px;
  background: var(--shop-primary);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

.shop-cart-checkout-btn:hover {
  background: var(--shop-primary-dark);
}

/* Cart items */
.shop-cart-empty {
  color: var(--shop-text-muted);
  padding: 24px 0;
  text-align: center;
}

.shop-cart-item-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  min-width: 0;
}

.shop-cart-item-row > * { min-width: 0; }

.shop-cart-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #f2f2f2;
  flex-shrink: 0;
}

.shop-cart-item-info { flex: 1; }

.shop-cart-item-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shop-cart-item-price {
  color: var(--shop-primary, #1e3d2d);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.shop-cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.shop-qty-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop-qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--shop-border);
  background: var(--shop-card-bg);
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-qty-btn:hover {
  background: var(--shop-bg);
}

.shop-qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}

.shop-cart-remove-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
}

.shop-cart-remove-btn:hover {
  opacity: 0.7;
}

/* Success page */
.shop-success {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.shop-success-inner {
  text-align: center;
  max-width: 400px;
}

.shop-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: #1e3d2d;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-success-icon--warning {
  background: #b8860b;
  font-size: 2.5rem;
}

.shop-success-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.shop-success-text {
  margin-bottom: 8px;
}

.shop-success-hint {
  color: var(--shop-text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.shop-success-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--shop-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
}

.shop-success-pdf-btn {
  margin-bottom: 12px;
  background: #0d47a1;
}

/* Оформление заказа: скрываем главный контент и меню (как у отзывов/профиля); видны шапка с лого/действиями и блок оформления */
body.shop-checkout-active .shop-promo-wrapper,
body.shop-checkout-active .shop-collections,
body.shop-checkout-active .shop-categories-bar,
body.shop-checkout-active .shop-search-bar,
body.shop-checkout-active .shop-floating-bar,
body.shop-checkout-active .shop-cart-bar,
body.shop-checkout-active .shop-catalog-with-panel,
body.shop-checkout-active .shop-floating-sidebar,
body.shop-checkout-active .shop-floating-sidebar-overlay,
body.shop-checkout-active .shop-scroll-top-btn {
  display: none !important;
}

/* При открытии отзывов, «Как это работает» или избранного скрываем рекламу и категории */
body.shop-reviews-active .shop-promo-wrapper,
body.shop-reviews-active .shop-collections,
body.shop-reviews-active .shop-categories-bar,
body.shop-reviews-active .shop-search-bar,
body.shop-reviews-active .shop-floating-bar,
body.shop-how-it-works-active .shop-promo-wrapper,
body.shop-how-it-works-active .shop-collections,
body.shop-how-it-works-active .shop-categories-bar,
body.shop-how-it-works-active .shop-search-bar,
body.shop-how-it-works-active .shop-floating-bar,
body.shop-favorites-active .shop-promo-wrapper,
body.shop-favorites-active .shop-collections,
body.shop-favorites-active .shop-categories-bar,
body.shop-favorites-active .shop-search-bar,
body.shop-favorites-active .shop-floating-bar,
body.shop-reviews-active .shop-scroll-top-btn,
body.shop-how-it-works-active .shop-scroll-top-btn,
body.shop-favorites-active .shop-scroll-top-btn {
  display: none !important;
}

/* Checkout block (отображается при aria-hidden="false", скрыт по умолчанию) */
.shop-checkout-block[aria-hidden="true"] {
  display: none;
}

.shop-checkout-block {
  background: var(--shop-card-bg);
  padding: 24px 0;
  margin-bottom: 24px;
  border-radius: var(--shop-radius-lg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.shop-checkout-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--shop-page-padding);
  position: relative;
  min-height: 200px;
}

.shop-checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.shop-checkout-title {
  font-size: 1.5rem;
  margin: 0;
}

.shop-checkout-close {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  color: var(--shop-text-muted);
}

.shop-checkout-close:hover {
  color: var(--shop-text);
}

.shop-checkout-loading {
  padding: 32px;
  text-align: center;
  color: var(--shop-text-muted);
}

.shop-checkout-submit-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
  border-radius: var(--shop-radius-lg);
}

.shop-checkout-submit-loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--shop-border);
  border-top-color: var(--shop-primary);
  border-radius: 50%;
  animation: shop-checkout-spin 0.8s linear infinite;
}

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

.shop-checkout-submit-loading-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--shop-text);
}

.shop-checkout-payment-wrap {
  margin-top: 16px;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid var(--shop-border);
}

/* Встроенный блок оплаты shop */
.shop-payment-loading,
.shop-payment-error {
  padding: 24px;
  text-align: center;
  color: var(--shop-text-muted);
}

.shop-payment-error {
  color: #dc3545;
}

.shop-payment-inner {
  max-width: 400px;
}

.shop-payment-amount {
  margin-bottom: 24px;
}

.shop-payment-amount h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--shop-text);
}

.shop-payment-sum {
  font-size: 28px;
  font-weight: 700;
  color: var(--shop-primary);
  margin-bottom: 8px;
}

.shop-payment-due {
  font-size: 14px;
  color: var(--shop-text-muted);
  margin: 0;
}

.shop-payment-actions {
  margin-bottom: 16px;
}

.shop-payment-btn {
  width: 100%;
  max-width: 320px;
  padding: 14px 24px;
}

.shop-payment-hint {
  font-size: 13px;
  color: var(--shop-text-muted);
  margin: 0;
}

.shop-payment-contact {
  margin-top: 12px;
}

.shop-payment-contact a {
  color: var(--shop-primary);
  font-weight: 500;
  text-decoration: none;
}

.shop-payment-contact a:hover {
  text-decoration: underline;
}

.shop-payment-unpaid-timer,
.shop-payment-unpaid-fallback {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(90, 48, 54, 0.07);
  border: 1px solid rgba(90, 48, 54, 0.18);
}

.shop-payment-unpaid-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--shop-primary);
}

.shop-payment-unpaid-countdown {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--shop-text);
}

.shop-payment-unpaid-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.shop-payment-unpaid-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--shop-primary), #c75c6a);
  transition: width 0.4s ease;
}

.shop-payment-unpaid-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--shop-text-muted);
}

.shop-payment-done {
  padding: 24px;
  text-align: center;
}

.shop-payment-done p {
  margin-bottom: 16px;
  color: var(--shop-text);
}

.shop-checkout-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.shop-checkout-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.shop-checkout-summary-total {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-weight: 700;
  font-size: 16px;
}

.shop-checkout-form {
  display: grid;
  gap: 24px;
}

.shop-checkout-step {
  display: none;
  padding: 16px 0;
}

.shop-checkout-step.active {
  display: block;
}

.shop-checkout-step h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.shop-checkout-field {
  margin-bottom: 16px;
}

.shop-checkout-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--shop-text);
}

.shop-checkout-field input[type="text"],
.shop-checkout-field input[type="tel"],
.shop-checkout-field input[type="number"],
.shop-checkout-select {
  width: 100%;
  max-width: 400px;
  padding: 12px 14px;
  border: 2px solid var(--shop-border);
  border-radius: 10px;
  font-size: 15px;
  background: #fff;
  color: var(--shop-text);
  transition: border-color 0.2s;
}

.shop-checkout-field input:focus,
.shop-checkout-select:focus {
  outline: none;
  border-color: var(--shop-primary);
  box-shadow: 0 0 0 3px rgba(30, 61, 45, 0.1);
}

.shop-checkout-consent {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f8f9fa;
  border-left: 4px solid var(--shop-primary);
  border-radius: 8px;
}

.shop-checkout-consent label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--shop-text);
  cursor: pointer;
}

.shop-checkout-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--shop-primary);
}

.shop-checkout-consent a {
  color: var(--shop-primary);
  text-decoration: underline;
}

.shop-checkout-radio-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}

.shop-checkout-radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.shop-checkout-radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--shop-primary);
  cursor: pointer;
}

.shop-checkout-radio-option label {
  margin: 0;
  cursor: pointer;
  font-weight: 500;
}

.shop-checkout-checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.shop-checkout-checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--shop-primary);
  cursor: pointer;
}

.shop-checkout-lift-options {
  margin-top: 12px;
  padding-left: 0;
}

.shop-checkout-btn,
.shop-checkout-btn-mini {
  padding: 10px 20px;
  background: var(--shop-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.shop-checkout-btn:hover,
.shop-checkout-btn-mini:hover {
  opacity: 0.9;
}

.shop-checkout-btn-sec {
  background: var(--shop-text-muted);
}

.shop-checkout-btn-sec:hover {
  background: var(--shop-border);
}

.shop-checkout-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.shop-checkout-date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 15px;
  margin-bottom: 20px;
}

.shop-checkout-date-option {
  padding: 15px;
  border: 2px solid var(--shop-border);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.shop-checkout-date-option:hover {
  border-color: var(--shop-primary);
}

.shop-checkout-date-option.shop-checkout-date-sel {
  border-color: var(--shop-primary);
  background: rgba(30, 61, 45, 0.1);
  color: var(--shop-primary);
}

.shop-checkout-date-option.shop-checkout-date-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.shop-checkout-date-option.shop-checkout-date-disabled:hover {
  border-color: #d0d0d0;
}

.shop-checkout-day-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.shop-checkout-day-date {
  font-size: 13px;
  color: var(--shop-text-muted);
  margin-bottom: 4px;
}

.shop-checkout-day-status {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  font-style: italic;
}

.shop-checkout-date-disabled .shop-checkout-day-status {
  color: #d32f2f;
  font-weight: 500;
}

.shop-checkout-date-btn {
  padding: 10px 16px;
  border: 1px solid var(--shop-border);
  background: var(--shop-card-bg);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.shop-checkout-date-btn:hover {
  border-color: var(--shop-primary);
  background: rgba(30, 61, 45, 0.05);
}

.shop-checkout-totals {
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.shop-checkout-totals div {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 15px;
}

.shop-checkout-totals div:last-child {
  font-weight: 700;
  font-size: 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.shop-checkout-hint {
  font-size: 13px;
  color: var(--shop-text-muted);
  margin-bottom: 16px;
}

.shop-checkout-delivery-info {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
}

.shop-checkout-delivery-info strong {
  display: block;
  margin-bottom: 6px;
  color: #1976d2;
}

.shop-checkout-delivery-info-p {
  margin: 0 0 10px 0;
}

.shop-checkout-delivery-info-p:last-child {
  margin-bottom: 0;
}

.shop-checkout-services-block {
  padding: 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.shop-checkout-service-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.shop-checkout-service-total {
  font-weight: 700;
  border-top: 2px solid var(--shop-border);
  margin-top: 8px;
  padding-top: 10px;
}

.shop-checkout-msg {
  padding: 12px 16px;
  background: #fff3cd;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 14px;
}

/* Footer — фон как у кнопки «Каталог» (#4e3034) */
.shop-footer {
  background: #4e3034;
  color: rgba(255, 255, 255, 0.95);
  padding: 24px var(--shop-page-padding);
  margin-top: auto;
}

.shop-footer-inner {
  max-width: var(--shop-page-max-width);
  margin: 0 auto;
  text-align: center;
}

.shop-footer-line {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

/* === Личный кабинет (profile) === */
.shop-profile-page .shop-search-bar,
.shop-profile-page .shop-collections,
.shop-profile-page .shop-categories-bar,
.shop-profile-page .shop-floating-bar,
.shop-profile-page .shop-scroll-top-btn {
  display: none !important;
}

.shop-profile-page .shop-header--masthead {
  min-height: auto;
  padding-bottom: 8px;
  padding-top: var(--shop-masthead-pad-top);
}

.shop-profile-section {
  padding: var(--shop-page-padding);
  max-width: var(--shop-page-max-width);
  margin: 0 auto;
}

.shop-profile-header {
  margin-bottom: 24px;
}

.shop-profile-admin-only {
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: rgba(90, 48, 54, 0.06);
  border-radius: var(--shop-radius);
  border: 1px solid rgba(90, 48, 54, 0.12);
}

.shop-profile-tg-login-wrap {
  min-height: 40px;
}

.shop-profile-manufacturer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--shop-primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.shop-profile-manufacturer-btn:hover {
  opacity: 0.92;
  color: #fff;
}

.shop-profile-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.shop-profile-header .shop-section-title {
  margin-bottom: 0;
}

.shop-profile-verify-btn {
  border: 1px solid var(--shop-primary);
  background: rgba(255, 255, 255, 0.92);
  color: var(--shop-primary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  max-width: min(100vw - 120px, 280px);
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
}

/* «Назад» в ЛК: те же отступы и толщина рамки, что у «Проверить статус заказа» */
.shop-profile-header-actions .shop-back-btn {
  flex-shrink: 0;
  padding: 10px 14px;
  border-width: 1px;
  box-shadow: none;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  box-sizing: border-box;
}

@media (max-width: 520px) {
  .shop-profile-header.shop-reviews-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .shop-profile-header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.shop-profile-verify-btn:hover {
  background: var(--shop-primary);
  color: #fff;
}

.shop-identity-content {
  max-width: 520px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.shop-identity-modal {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.shop-identity-modal-head {
  position: relative;
  padding: 28px 48px 22px 24px;
  background: linear-gradient(135deg, var(--shop-primary, #1976d2) 0%, #0d47a1 100%);
  color: #fff;
}

.shop-identity-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.shop-identity-modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.shop-identity-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.shop-identity-modal-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shop-identity-modal-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.92;
}

.shop-identity-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, #f1f5f9 0%, #fff 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.shop-identity-step {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.shop-identity-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: #e2e8f0;
  color: #64748b;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.shop-identity-step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--shop-muted);
  line-height: 1.2;
}

.shop-identity-step.is-current .shop-identity-step-num {
  background: var(--shop-primary, #1976d2);
  color: #fff;
  box-shadow: 0 4px 14px rgba(25, 118, 210, 0.45);
  transform: scale(1.05);
}

.shop-identity-step.is-current .shop-identity-step-label {
  color: var(--shop-primary, #1976d2);
}

.shop-identity-step.is-done .shop-identity-step-num {
  background: #22c55e;
  color: #fff;
}

.shop-identity-step.is-done .shop-identity-step-label {
  color: #15803d;
}

.shop-identity-step.is-pending .shop-identity-step-label {
  color: #94a3b8;
}

.shop-identity-step-connector {
  flex: 0 0 24px;
  height: 3px;
  margin-top: 13px;
  border-radius: 2px;
  background: #e2e8f0;
  transition: background 0.25s;
}

.shop-identity-step-connector.is-active {
  background: linear-gradient(90deg, #22c55e, var(--shop-primary, #1976d2));
}

.shop-identity-modal-body {
  padding: 20px 20px 24px;
  background: #fafbfc;
}

.shop-identity-alert {
  border-radius: 12px;
}

.shop-identity-input {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 12px 14px;
  font-size: 16px;
}

.shop-identity-primary-btn {
  width: 100%;
  margin-top: 4px;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 700;
}

.shop-identity-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 8px;
}

.shop-identity-action-row .shop-identity-primary-btn {
  width: auto;
  min-width: 148px;
  flex: 0 0 auto;
  margin-top: 0;
}

.shop-identity-step-phone .shop-identity-action-row {
  flex-direction: column;
  align-items: stretch;
}

.shop-identity-step-phone .shop-identity-action-row .shop-identity-primary-btn {
  width: 100%;
}

.shop-identity-inline-msg {
  flex: 1 1 200px;
  font-size: 13px;
  line-height: 1.4;
  min-width: 0;
}

.shop-identity-inline-msg--error {
  color: #b71c1c;
  font-weight: 600;
}

.shop-identity-inline-msg--ok {
  color: #15803d;
  font-weight: 600;
}

.shop-identity-hint {
  font-size: 14px;
  line-height: 1.45;
}

.shop-identity-attempts {
  margin-top: 4px;
  font-weight: 600;
  color: var(--shop-primary, #1976d2);
}

.shop-identity-step-done {
  text-align: center;
}

.shop-identity-success {
  padding: 24px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: 16px;
  border: 1px solid #a7f3d0;
}

.shop-identity-success-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

.shop-identity-success-text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #065f46;
  line-height: 1.5;
}

.shop-profile-verify-hint {
  margin-bottom: 10px;
  color: var(--shop-muted);
}

.shop-identity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.shop-identity-photo-btn {
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.shop-identity-photo-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.shop-identity-photo-btn img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.shop-identity-photo-btn.is-selected {
  border-color: var(--shop-primary);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.25);
}

.shop-profile-message {
  text-align: center;
  color: var(--shop-muted);
  margin-bottom: 16px;
}

.shop-profile-link-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--shop-accent, #1976d2);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.shop-profile-loading,
.shop-profile-no-orders,
.shop-profile-no-user {
  text-align: center;
  padding: 32px 16px;
}

/* Карточка заказа */
.shop-order-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.shop-order-card--corpus {
  border-left: 4px solid #ff6b6b;
  box-shadow: 0 6px 24px rgba(255,107,107,0.15);
  position: relative;
}

.shop-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.shop-order-number {
  font-size: 18px;
  font-weight: 600;
  color: var(--shop-accent, #1976d2);
}

.shop-order-date {
  color: #999;
  font-size: 14px;
}

.shop-order-details {
  margin-bottom: 16px;
}

.shop-order-detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.shop-order-detail-row--sum {
  padding: 10px 0;
  margin: 8px 0;
  border-top: 1px solid #e0e0e0;
  font-weight: 600;
}

.shop-order-sum {
  color: var(--shop-accent, #1976d2) !important;
  font-size: 16px;
}

.shop-order-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.shop-order-status--not-paid { background: #fff3cd; color: #856404; }
.shop-order-status--assembling { background: #cce5ff; color: #004085; }
.shop-order-status--paid { background: #d4edda; color: #155724; }
.shop-order-status--delivered { background: #d1e7dd; color: #0f5132; }
.shop-order-status--cancelled { background: #f8d7da; color: #721c24; }

.shop-paid-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 10px;
  background: rgba(25,135,84,0.12);
  color: #198754;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.shop-order-delivery-hint {
  font-size: 13px;
  color: #666;
  font-style: italic;
  margin-top: 4px;
}

.shop-corpus-items-list { margin: 12px 0; }

.shop-corpus-item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

.shop-corpus-item-row:last-child { border-bottom: none; }

.shop-corpus-item-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.shop-corpus-item-info { flex: 1; }

.shop-corpus-item-title { font-size: 15px; font-weight: 500; }
.shop-corpus-item-meta { display: flex; justify-content: space-between; font-size: 14px; }
.shop-corpus-item-qty { color: #999; }
.shop-corpus-item-price { font-weight: 700; color: var(--shop-accent); }

.shop-corpus-services {
  margin-top: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.shop-corpus-services-title {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

.shop-corpus-services-list { display: flex; flex-direction: column; gap: 8px; }

.shop-service-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.shop-order-progress { margin-top: 16px; }

.shop-order-progress-title { font-size: 14px; margin-bottom: 8px; }

.shop-order-progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.shop-order-progress-fill {
  height: 100%;
  background: var(--shop-accent, #1976d2);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.shop-order-progress-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.shop-order-progress-step {
  font-size: 12px;
  color: #999;
}

.shop-order-progress-step.active {
  color: var(--shop-accent);
  font-weight: 600;
}

.shop-order-unpaid-timer {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(90, 48, 54, 0.06);
  border: 1px solid rgba(90, 48, 54, 0.15);
}

.shop-order-unpaid-timer-text {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--shop-primary);
  margin-bottom: 8px;
}

.shop-order-unpaid-timer-bar {
  height: 8px;
  border-radius: 4px;
  background: #e0e0e0;
  overflow: hidden;
}

.shop-order-unpaid-timer-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--shop-primary), #c75c6a);
  transition: width 0.4s ease;
}

.shop-order-unpaid-hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--shop-text-muted);
}

.shop-order-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.shop-order-btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shop-order-btn-primary {
  background: var(--shop-accent, #1976d2);
  color: #fff;
}

.shop-order-btn-secondary {
  background: #6c757d;
  color: #fff;
}

.shop-order-btn-danger {
  background: #dc3545;
  color: #fff;
}

.shop-order-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.shop-assembling-msg {
  padding: 12px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  color: #856404;
  font-size: 14px;
  text-align: center;
}

.shop-review-done {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #e8f5e9, #d1e7dd);
  border: 1px solid #198754;
  border-radius: 8px;
  color: #0f5132;
}

.shop-review-done--thanks {
  background: linear-gradient(135deg, #fff8e6, #fff3cd);
  border-color: #e6d9a8;
  color: #856404;
}

/* Модальное окно отзыва */
.shop-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.shop-modal-content {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

#shop-review-modal .shop-modal-content {
  max-width: 520px;
}

.shop-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.shop-modal-title { font-size: 1.1rem; margin: 0; }

.shop-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.shop-modal-body {
  padding: 16px;
  overflow-y: auto;
}

.shop-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px;
  border-top: 1px solid #e0e0e0;
}

.shop-alert { padding: 12px; border-radius: 8px; margin-bottom: 12px; }
.shop-alert-error { background: #f8d7da; color: #721c24; }
.shop-alert-success { background: #d1e7dd; color: #0f5132; }

.shop-form-group { margin-bottom: 16px; }
.shop-form-label { display: block; margin-bottom: 8px; font-weight: 500; }

.shop-rating-stars {
  display: flex;
  gap: 4px;
  font-size: 28px;
  cursor: pointer;
}

.shop-review-star { user-select: none; }

.shop-rating-text { font-size: 14px; color: #666; margin-top: 4px; }

.shop-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  resize: vertical;
}

.shop-char-counter { font-size: 12px; color: #666; margin-top: 4px; }

.shop-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box;
}

.shop-review-rating-name-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 0;
}

.shop-review-rating-block {
  flex: 1 1 200px;
  min-width: 0;
}

.shop-review-author-block {
  flex: 1 1 220px;
  min-width: 0;
}

.shop-review-name-preview {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--shop-muted, #666);
  line-height: 1.4;
}

.shop-review-name-preview strong {
  color: var(--shop-primary, #1976d2);
  font-weight: 700;
}

.shop-review-photo-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-review-photo-input {
  font-size: 14px;
  max-width: 100%;
}

.shop-review-photo-hint {
  font-size: 12px;
  color: var(--shop-muted, #666);
}

.shop-review-uploaded-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  min-height: 0;
}

.shop-review-uploaded-thumb-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shop-review-uploaded-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-review-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.shop-review-photo-remove:hover {
  background: rgba(0, 0, 0, 0.75);
}

.shop-review-upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--shop-muted, #666);
  width: 100%;
}

.shop-review-upload-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #e0e0e0;
  border-top-color: var(--shop-primary, #1976d2);
  border-radius: 50%;
  animation: shop-review-spin 0.7s linear infinite;
}

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

.shop-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.shop-btn-primary { background: var(--shop-accent, #1976d2); color: #fff; }
.shop-btn-secondary { background: #6c757d; color: #fff; }

/* Оплата в ЛК — модальное окно; контент оплаты — те же классы, что после оформления в каталоге */
.shop-profile-payment-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.shop-profile-payment-dialog {
  background: var(--shop-card-bg);
  border-radius: var(--shop-radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, 900px);
  max-height: min(92dvh, 900px);
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.shop-profile-payment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.shop-profile-payment-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.shop-profile-payment-close {
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--shop-text-muted);
}

.shop-profile-payment-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--shop-text);
}

.shop-profile-payment-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  flex: 1;
  padding: 0 0 16px;
}

.shop-profile-payment-scroll .shop-checkout-payment-wrap {
  margin-top: 0;
  border-radius: 0;
  border: none;
  min-height: min(120px, 40vh);
}

@media (max-width: 480px) {
  .shop-profile-payment-overlay {
    align-items: flex-end;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .shop-profile-payment-dialog {
    max-height: min(92vh, 100%);
    max-height: min(92dvh, 100%);
    border-radius: var(--shop-radius-lg) var(--shop-radius-lg) 0 0;
    max-width: 100%;
  }
}
