@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-soft: #f2f6ff;
  --line: #dbe3f1;
  --text: #171f2e;
  --muted: #67758e;
  --accent: #2f6fed;
  --accent-strong: #225cd1;
  --accent-soft: #e7f0ff;
  --radius-xl: 1.1rem;
  --radius-lg: 0.9rem;
  --radius-md: 0.7rem;
  --radius-sm: 0.55rem;
  --shadow-lg: 0 24px 56px rgba(26, 40, 74, 0.24);
  --shadow-sm: 0 10px 26px rgba(24, 41, 77, 0.1);
  --page-gap: 1rem;
  --control-height-mobile: 2.85rem;
  --control-height-desktop: 2.4rem;
  --header-height-mobile: 4.6rem;
  --header-height-desktop: 4.2rem;
  --mobile-bottom-nav-height: 4.65rem;
  --gallery-thumb-size: 3.25rem;
  --gallery-strip-height: 4.4rem;
  /* Единая макс. ширина контента внутренних экранов на desktop
     (корзина, контакты, заказ, о нас, профиль, фильтры) — ограничивает
     растягивание на широких мониторах, контент центрируется. */
  --screen-max: 36rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Полный запрет пользовательского zoom (ТЗ «Mini App без зума»): pinch,
   двойной тап и любой другой zoom-жест. pan-x pan-y разрешает скролл в обеих
   осях, но не включает pinch-zoom и double-tap-zoom. Специфичные touch-action
   (ленты pan-x, image-viewer pan-y, modal-open none) перекрывают универсал;
   -webkit-text-size-adjust блокирует авто-масштабирование текста при повороте. */
* {
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.45;
  background:
    radial-gradient(circle at 100% 0%, #eaf2ff 0%, transparent 38%),
    radial-gradient(circle at 0% 0%, #f5f8ff 0%, transparent 34%),
    var(--bg);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0.4rem;
}

input,
button {
  font: inherit;
}

.container {
  width: min(100% - calc(var(--page-gap) * 2), 120rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
}

.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid #dbe3f1;
  border-radius: 0 0 1.7rem 1.7rem;
  background: #ffffff;
  box-shadow: 0 8px 24px -22px rgba(31, 56, 108, 0.5);
}

.app-header {
  position: relative;
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: var(--header-height-mobile);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.logo__image {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.55rem;
  object-fit: contain;
  object-position: center;
  border: 0;
  /* Логотип — прозрачный SVG, белой плашки под ним нет */
  background: transparent;
  box-shadow: none;
  flex: 0 0 auto;
}

.worktime {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  margin-left: auto;
  min-width: 0;
}

.worktime__status {
  margin: 0;
  padding: 0.14rem 0.46rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.worktime__status--open {
  color: #1d8d45;
  background: #e9f9ef;
}

.worktime__status--closed {
  color: #ffffff;
  background: #d94a4a;
}

.worktime__status--dayoff {
  color: #ffffff;
  background: #e5942c;
}

.worktime__details {
  position: static;
}

.worktime__details > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  color: #45608f;
  font-size: 0.63rem;
  font-weight: 600;
}

.worktime__details > summary::-webkit-details-marker {
  display: none;
}

.worktime__details[open] > summary {
  color: #2f6fed;
}

.worktime__panel {
  position: absolute;
  top: calc(100% + 0.36rem);
  right: 0;
  z-index: 180;
  min-width: 13.8rem;
  padding: 0.36rem 0.5rem 0.5rem;
  border: 1px solid #d5e0f2;
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 24px rgba(28, 45, 80, 0.18);
}

.worktime__close {
  margin: 0 0 0.22rem auto;
  width: 1.3rem;
  height: 1.3rem;
  padding: 0;
  border: 1px solid #d0dcef;
  border-radius: 999px;
  background: #f7faff;
  color: #556783;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}

.worktime__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.22rem;
}

.worktime__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  color: #385072;
  font-size: 0.72rem;
  padding: 0.18rem 0.34rem;
  border-radius: 0.45rem;
}

.worktime__list li.is-current {
  background: #edf4ff;
  color: #264a87;
}

.worktime__list li strong {
  color: #1f3255;
  font-weight: 700;
}

.worktime__list li.is-current strong {
  color: #1f4f9e;
}

.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 2.7rem;
  min-width: 2.7rem;
  height: 2.7rem;
  min-height: 2.7rem;
  padding: 0;
  border: 1px solid #ccd8ee;
  border-radius: 0.85rem;
  background: #f7faff;
  color: transparent;
  font-size: 0;
  line-height: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.16s ease;
}

.header-action:hover {
  border-color: #b9c9e8;
  background: #eef4ff;
}

.header-action:active {
  transform: scale(0.98);
}

.header-action::before {
  content: "";
  width: 1.2rem;
  height: 1.2rem;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M3 4h1.5l1.35 9.4A2 2 0 0 0 7.83 15H17a2 2 0 0 0 1.98-1.72L20 7H6.1' stroke='%235e6e86' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='9' cy='19' r='1.35' fill='%235e6e86'/%3E%3Ccircle cx='17' cy='19' r='1.35' fill='%235e6e86'/%3E%3C/svg%3E");
}

.header-action::after {
  content: attr(data-count);
  position: absolute;
  top: -0.25rem;
  right: -0.22rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding-inline: 0.24rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #db2f45;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(95, 9, 23, 0.25);
  transform: scale(0.75);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.header-action.has-count::after {
  transform: scale(1);
  opacity: 1;
}

.app-main {
  padding-top: 0.9rem;
  /* Нижний отступ передан футеру (.catalog-footer): он сам приклеен к
     нижней навигации, поэтому двойного воздуха быть не должно. */
  padding-bottom: 0;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 210;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.28rem;
  border-top: 1px solid rgba(210, 220, 237, 0.95);
  border-radius: 1rem 1rem 0 0;
  padding: 0.38rem 0.45rem calc(0.36rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 -10px 26px rgba(20, 35, 66, 0.14);
}

.bottom-nav__item {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.14rem;
  min-height: calc(var(--mobile-bottom-nav-height) - 0.72rem);
  border: 0;
  border-radius: 0.78rem;
  background: transparent;
  color: #6e7f98;
  padding: 0.3rem 0.1rem;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.bottom-nav__item:active {
  transform: scale(0.98);
}

.bottom-nav__item--active {
  background: linear-gradient(140deg, #3b82f6, #2f6fed);
  color: #ffffff;
  box-shadow: 0 7px 18px rgba(47, 111, 237, 0.32);
}

.bottom-nav__item--active .bottom-nav__text {
  color: #ffffff;
  font-weight: 800;
}

.bottom-nav__icon {
  position: relative;
  width: 1.16rem;
  height: 1.16rem;
  border-radius: 0.28rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.bottom-nav__icon--catalog {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236e7f98' stroke-width='2.1' d='M3.5 6.8h17M3.5 12h17M3.5 17.2h17'/%3E%3C/svg%3E");
}

.bottom-nav__item--active .bottom-nav__icon--catalog {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23ffffff' stroke-width='2.3' d='M3.5 6.8h17M3.5 12h17M3.5 17.2h17'/%3E%3C/svg%3E");
}

.bottom-nav__icon--cart {
  background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22%3E%3Cpath d=%22M3.4 5h1.7l1.2 8.3a1.8 1.8 0 0 0 1.8 1.5h8.3a1.8 1.8 0 0 0 1.8-1.5l.9-5.8H6.1%22 stroke=%22%236e7f98%22 stroke-width=%222.3%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3Ccircle cx=%229.2%22 cy=%2218.5%22 r=%221.25%22 fill=%22%236e7f98%22/%3E%3Ccircle cx=%2216.5%22 cy=%2218.5%22 r=%221.25%22 fill=%22%236e7f98%22/%3E%3C/svg%3E');
}

.bottom-nav__item--active .bottom-nav__icon--cart {
  background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22%3E%3Cpath d=%22M3.4 5h1.7l1.2 8.3a1.8 1.8 0 0 0 1.8 1.5h8.3a1.8 1.8 0 0 0 1.8-1.5l.9-5.8H6.1%22 stroke=%22%23ffffff%22 stroke-width=%222.4%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3Ccircle cx=%229.2%22 cy=%2218.5%22 r=%221.25%22 fill=%22%23ffffff%22/%3E%3Ccircle cx=%2216.5%22 cy=%2218.5%22 r=%221.25%22 fill=%22%23ffffff%22/%3E%3C/svg%3E');
}

.bottom-nav__icon--contact {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236e7f98' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round' d='M5 7.2A2.2 2.2 0 0 1 7.2 5h9.6A2.2 2.2 0 0 1 19 7.2v9.6a2.2 2.2 0 0 1-2.2 2.2H7.2A2.2 2.2 0 0 1 5 16.8V7.2Zm1.5.4 5.5 4.5 5.5-4.5'/%3E%3C/svg%3E");
}

.bottom-nav__item--active .bottom-nav__icon--contact {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23ffffff' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' d='M5 7.2A2.2 2.2 0 0 1 7.2 5h9.6A2.2 2.2 0 0 1 19 7.2v9.6a2.2 2.2 0 0 1-2.2 2.2H7.2A2.2 2.2 0 0 1 5 16.8V7.2Zm1.5.4 5.5 4.5 5.5-4.5'/%3E%3C/svg%3E");
}

.bottom-nav__icon--order {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%236e7f98' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round' d='M7 4.8h10A2.2 2.2 0 0 1 19.2 7v10A2.2 2.2 0 0 1 17 19.2H7A2.2 2.2 0 0 1 4.8 17V7A2.2 2.2 0 0 1 7 4.8Zm2.2 4.2h5.6M9.2 12h5.6M9.2 15h3.2'/%3E%3C/svg%3E");
}

.bottom-nav__item--active .bottom-nav__icon--order {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23ffffff' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round' d='M7 4.8h10A2.2 2.2 0 0 1 19.2 7v10A2.2 2.2 0 0 1 17 19.2H7A2.2 2.2 0 0 1 4.8 17V7A2.2 2.2 0 0 1 7 4.8Zm2.2 4.2h5.6M9.2 12h5.6M9.2 15h3.2'/%3E%3C/svg%3E");
}

.bottom-nav__icon--about {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' stroke='%236e7f98' stroke-width='2.1'/%3E%3Cpath stroke='%236e7f98' stroke-width='2.1' stroke-linecap='round' d='M12 10.3v5.2M12 7.7h.01'/%3E%3C/svg%3E");
}

.bottom-nav__item--active .bottom-nav__icon--about {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' stroke='%23ffffff' stroke-width='2.3'/%3E%3Cpath stroke='%23ffffff' stroke-width='2.3' stroke-linecap='round' d='M12 10.3v5.2M12 7.7h.01'/%3E%3C/svg%3E");
}

.bottom-nav__icon--profile {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='3.6' stroke='%236e7f98' stroke-width='2.1'/%3E%3Cpath stroke='%236e7f98' stroke-width='2.1' stroke-linecap='round' d='M5.4 19.5c.8-3.2 3.2-4.9 6.6-4.9s5.8 1.7 6.6 4.9'/%3E%3C/svg%3E");
}

.bottom-nav__item--active .bottom-nav__icon--profile {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='3.6' stroke='%23ffffff' stroke-width='2.3'/%3E%3Cpath stroke='%23ffffff' stroke-width='2.3' stroke-linecap='round' d='M5.4 19.5c.8-3.2 3.2-4.9 6.6-4.9s5.8 1.7 6.6 4.9'/%3E%3C/svg%3E");
}

.bottom-nav__text {
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

.bottom-nav__count {
  position: absolute;
  top: -0.36rem;
  right: -0.46rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.24rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #db2f45;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
}

.search-panel {
  margin: 0;
  padding: 0.12rem 0 0.8rem;
  background: transparent;
}

.search-field {
  position: relative;
}

.search-field::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 1.05rem;
  z-index: 2;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  opacity: 0.56;
  pointer-events: none;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2367758e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.4' d='m21 21-4.35-4.35m1.6-5.15a6.75 6.75 0 1 1-13.5 0 6.75 6.75 0 0 1 13.5 0Z'/%3E%3C/svg%3E");
}

.search-field input {
  width: 100%;
  min-height: 3.45rem;
  border: 1px solid #ccd8ee;
  border-radius: 0.95rem;
  padding: 0 1.15rem 0 2.7rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(27, 49, 94, 0.08);
}

.search-field input::placeholder {
  color: #8996ab;
}

/* Плавная подсказка поиска (ротация названий): оверлей поверх поля.
   Смена — fade + сдвиг: уходит вверх и появляется снизу. */
.search-field__hint {
  position: absolute;
  top: 50%;
  left: 2.7rem;
  right: 1.15rem;
  z-index: 3;
  transform: translateY(calc(-50% - 8px));
  color: #8996ab;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.search-field__hint.is-enter {
  opacity: 1;
  transform: translateY(-50%);
}

.search-field input:focus {
  outline: none;
  border-color: #89a8e6;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.16);
}

.search-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.45rem;
  max-width: 6rem;
  min-height: 2.15rem;
  border: 1px solid #d2ddef;
  border-radius: 0.65rem;
  background: #f7faff;
  padding: 0 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.search-button--left {
  left: 0.35rem;
  max-width: 5.55rem;
}

.search-button--right {
  right: 0.35rem;
  min-width: 5rem;
  max-width: 6rem;
  overflow: visible;
}

.search-button--active {
  border-color: #2f6fed;
  background: #2f6fed;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(31, 56, 108, 0.18);
}

.search-button--right.search-button--active {
  padding-right: 0.55rem;
  font-weight: 600;
}

.search-button--right.search-button--active[data-filters-count]:not([data-filters-count="0"])::after {
  content: attr(data-filters-count);
  position: absolute;
  top: -0.38rem;
  right: -0.42rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.24rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #db2f45;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(24, 40, 76, 0.18);
}

.search-button:hover {
  border-color: #bdcdea;
  background: #eff5ff;
}

.search-button:active {
  transform: translateY(-50%) scale(0.98);
}

.catalog-nav[hidden],
.catalog-nav__top[hidden] {
  display: none;
}

.catalog-nav {
  margin: 0.55rem 0 0;
}

.catalog-nav__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-bottom: 0.45rem;
}

.catalog-nav__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7faff;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.catalog-nav__back:hover {
  border-color: #bdcdea;
  background: #eff5ff;
}

.catalog-nav__back:active {
  background: var(--accent-soft);
}

.catalog-nav__back:focus-visible {
  outline: none;
  border-color: #8eace3;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.16);
}

.catalog-nav__back-icon {
  display: block;
  width: 20px;
  height: 20px;
}

.catalog-nav__back:focus-visible {
  outline: none;
  border-color: #8eace3;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.16);
}

.catalog-nav__crumbs {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.catalog-nav__crumbs::-webkit-scrollbar {
  display: none;
}

.catalog-nav__crumb {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border: none;
  background: transparent;
  padding: 0.18rem 0.1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.catalog-nav__crumb:hover {
  color: var(--text);
}

.catalog-nav__crumb:focus-visible {
  outline: none;
  border-radius: 0.35rem;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.16);
}

.catalog-nav__crumb--current {
  color: var(--text);
  font-weight: 600;
}

.catalog-nav__separator {
  flex: 0 0 auto;
  color: #c3cddd;
  font-size: 0.78rem;
}

.catalog-nav__rail {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.45rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.1rem 0 0.15rem;
}

.catalog-nav__rail::-webkit-scrollbar {
  display: none;
}

.catalog-nav__rail .chip {
  flex: 0 0 auto;
  min-height: 2.2rem;
  padding: 0 0.8rem;
  font-size: 0.8rem;
  white-space: nowrap;
  /* Стилистика «Ничего не найдено»: мягкий градиент с бликом сверху,
     лёгкая точечная текстура, светлая рамка и воздушная тень */
  border-color: #e2eaf9;
  background:
    radial-gradient(120% 170% at 47% -70%, rgba(47, 111, 237, 0.15), rgba(47, 111, 237, 0) 58%),
    radial-gradient(rgba(47, 111, 237, 0.05) 1px, transparent 1.1px) 0 0 / 14px 14px,
    linear-gradient(180deg, #fdfeff 0%, #f0f6ff 100%);
  box-shadow: 0 3px 10px -6px rgba(47, 111, 237, 0.2), inset 0 1px 0 #fff;
}

.catalog-nav__rail .chip:hover:not(:disabled):not(.chip--active) {
  border-color: #c8d7f0;
  background:
    radial-gradient(120% 170% at 47% -70%, rgba(47, 111, 237, 0.22), rgba(47, 111, 237, 0) 60%),
    radial-gradient(rgba(47, 111, 237, 0.07) 1px, transparent 1.1px) 0 0 / 14px 14px,
    linear-gradient(180deg, #ffffff 0%, #f2f7ff 100%);
  box-shadow: 0 5px 14px -6px rgba(47, 111, 237, 0.28), inset 0 1px 0 #fff;
}

/* Активный чип — акцентный синий в той же воздушной стилистике */
.catalog-nav__rail .chip.chip--active {
  border-color: #2f6fed;
  background: linear-gradient(180deg, #3a7af0 0%, #2f6fed 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px -4px rgba(47, 111, 237, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.catalog-nav__rail .chip.chip--active:hover:not(:disabled) {
  border-color: #2f6fed;
  background: linear-gradient(180deg, #3a7af0 0%, #2f6fed 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px -4px rgba(47, 111, 237, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.catalog-nav__rail .chip.chip--active:focus-visible {
  border-color: #2f6fed;
  background: linear-gradient(180deg, #3a7af0 0%, #2f6fed 100%);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.16), 0 4px 12px -4px rgba(47, 111, 237, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.catalog-nav__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.catalog-nav__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 3rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 30%, #ffffff 100%);
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.catalog-nav__fade.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.catalog-nav__fade--left {
  right: auto;
  left: 0;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 30%, rgba(255, 255, 255, 0) 100%);
}

.catalog-nav__hint {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.catalog-nav__row:has(.catalog-nav__rail:empty) {
  display: none;
}

.sale-showcase {
  margin: 0.42rem 0 0.92rem;
  padding: 0.55rem 0.45rem 0.6rem;
  border: 1px solid #dce5f3;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(30, 64, 142, 0.08);
}

.sale-showcase__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.22rem;
  margin-bottom: 0.42rem;
}

.sale-showcase__title {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.2;
  font-weight: 800;
  color: #24314f;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Анимированная молния «Распродажи» (Lottie-стикер material/fire.*). */
.sale-showcase__title-fire {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}
.sale-showcase__title-fire svg {
  width: 100%;
  height: 100%;
}

.sale-showcase__timer {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #b91c1c;
  background: #fff1f1;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 0.18rem 0.44rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sale-showcase__row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(88px, 88px);
  gap: 0.42rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.06rem 0.08rem 0.2rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.sale-showcase__row::-webkit-scrollbar {
  height: 0.32rem;
}

.sale-showcase__row::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c7d7f2;
}

.sale-showcase__item {
  position: relative;
  width: 100%;
  border: 1px solid #d5e1f4;
  border-radius: 0.66rem;
  background: #fff;
  padding: 0.24rem;
  display: grid;
  gap: 0.24rem;
  cursor: pointer;
  scroll-snap-align: start;
  text-align: left;
}

.sale-showcase__item:active {
  transform: scale(0.985);
}

.sale-showcase__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #eef3ec;
}

.sale-showcase__name {
  margin: 0;
  min-height: 2.3em;
  font-size: 0.68rem;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: 0.005em;
  color: #223251;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.sale-showcase__badge {
  position: absolute;
  top: 0.38rem;
  left: 0.38rem;
  border-radius: 999px;
  padding: 0.1rem 0.36rem;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
  background: linear-gradient(135deg, #ff5a5a, #e11d2e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 6px 14px rgba(185, 28, 28, 0.28);
}

@keyframes sale-fire-flicker {
  0% {
    transform: translateY(0) scale(1) rotate(-2deg);
  }
  50% {
    transform: translateY(-1px) scale(1.08) rotate(2deg);
  }
  100% {
    transform: translateY(0) scale(0.98) rotate(-1deg);
  }
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.catalog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.05rem;
  border: 1px solid #e2eaf9;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(85% 110% at 50% -40%, rgba(47, 111, 237, 0.18), rgba(47, 111, 237, 0) 62%),
    radial-gradient(60% 55% at 88% 118%, rgba(47, 111, 237, 0.12), rgba(47, 111, 237, 0) 55%),
    radial-gradient(rgba(47, 111, 237, 0.07) 1px, transparent 1.1px) 0 0 / 16px 16px,
    linear-gradient(180deg, #fdfeff 0%, #f0f6ff 100%);
  box-shadow: 0 10px 28px -12px rgba(47, 111, 237, 0.18), inset 0 1px 0 #fff;
  padding: 1.35rem 0.9rem;
  text-align: center;
  color: #5d6e86;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

.catalog-empty__icon {
  display: block;
  width: 4.5rem;
  height: auto;
}

.catalog-empty__icon svg {
  display: block;
  width: 100%;
  height: auto;
}

.catalog-empty__messages {
  display: grid;
  gap: 0.3rem;
}

.catalog-empty__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #171f2e;
  line-height: 1.35;
}

.catalog-empty__hint {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  color: #8a9bb5;
  line-height: 1.45;
}

/* SEO-футер перенесён из каталога в модалку «О нас» (см. .about-modal-footer). */

.catalog-grid:not(.is-loading):not(.is-ready) > .product-card {
  display: none;
}

.catalog-grid.is-loading > .product-card:not(.product-card--skeleton) {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .catalog-grid.is-ready > .product-card {
    animation: product-card-in 0.38s ease both;
  }
}

@keyframes product-card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #dce5f3;
  border-radius: 1.1rem;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(22, 37, 72, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: #c3d4f2;
  box-shadow: 0 18px 38px rgba(22, 37, 72, 0.14);
}

.product-card__media-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #edf3ff;
}

.product-card__image {
  transition: transform 0.45s ease;
}

.product-card__media-link:hover .product-card__image {
  transform: scale(1.045);
}

.product-card__fav {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid #e2eaf9;
  border-radius: 50%;
  /* Тот же фон, что у блока «Ничего не найдено»: мягкий градиент с бликом
     сверху, лёгкая точечная текстура и воздушная тень */
  background:
    radial-gradient(120% 170% at 47% -70%, rgba(47, 111, 237, 0.15), rgba(47, 111, 237, 0) 58%),
    radial-gradient(rgba(47, 111, 237, 0.05) 1px, transparent 1.1px) 0 0 / 14px 14px,
    linear-gradient(180deg, #fdfeff 0%, #f0f6ff 100%);
  color: #aab8d2;
  cursor: pointer;
  box-shadow: 0 3px 10px -6px rgba(47, 111, 237, 0.2), inset 0 1px 0 #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Анимированный стикер-сердечко (lottie, оригинальный Telegram-стикер):
   смайл чистый, без серого тона; подложка — мягкое «стекло». Анимация
   играет только при наведении курсора или у товара, добавленного
   в избранное (пауза/плей — в app.js, syncFavStickerPlayState). */
.product-card__fav-sticker {
  grid-area: 1 / 1;
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.product-card__fav-sticker:not(:empty) {
  opacity: 1;
}

.product-card__fav-sticker svg {
  width: 100%;
  height: 100%;
  display: block;
}

.product-card__fav:hover {
  transform: scale(1.1);
  border-color: #c8d7f0;
  background:
    radial-gradient(120% 170% at 47% -70%, rgba(47, 111, 237, 0.2), rgba(47, 111, 237, 0) 58%),
    radial-gradient(rgba(47, 111, 237, 0.06) 1px, transparent 1.1px) 0 0 / 14px 14px,
    linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  color: #ef4444;
  box-shadow: 0 5px 14px -7px rgba(47, 111, 237, 0.35), inset 0 1px 0 #fff;
}

.product-card__fav:active {
  transform: scale(0.92);
}

.product-card__fav--active {
  border-color: #ffb3bf;
  background:
    radial-gradient(120% 170% at 47% -70%, rgba(255, 90, 110, 0.3), rgba(255, 90, 110, 0) 58%),
    radial-gradient(rgba(255, 90, 110, 0.08) 1px, transparent 1.1px) 0 0 / 14px 14px,
    linear-gradient(180deg, #fff5f6 0%, #ffe0e6 100%);
  color: #e11d2e;
  box-shadow: 0 4px 14px -5px rgba(225, 29, 46, 0.45), inset 0 1px 0 #fff;
  animation: fav-active-pulse 1.6s ease-in-out infinite;
}

@keyframes fav-active-pulse {
  0%, 100% {
    box-shadow: 0 4px 14px -5px rgba(225, 29, 46, 0.45), inset 0 1px 0 #fff;
  }
  50% {
    box-shadow: 0 6px 20px -6px rgba(225, 29, 46, 0.6), inset 0 1px 0 #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card__fav--active {
    animation: none;
  }
}

.product-card__fav--active:hover {
  color: #ef4444;
}

.product-card__badges {
  position: absolute;
  top: 0.42rem;
  left: 0.42rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  max-width: calc(100% - 0.84rem);
  pointer-events: none;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.15rem;
  border-radius: 999px;
  padding: 0.06rem 0.52rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 2px 6px rgba(10, 23, 17, 0.16);
}

.product-badge--modal {
  min-height: 1.35rem;
  font-size: 0.7rem;
}

.product-badge--hit {
  color: #fff;
  background: linear-gradient(135deg, #ff8a1e, #ff5e00);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 3px 10px rgba(255, 94, 0, 0.32);
}

.product-badge--new {
  color: #fff;
  background: linear-gradient(135deg, #37a2ff, #2f7ff0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 3px 10px rgba(41, 121, 236, 0.32);
}

.product-badge--sale {
  color: #fff;
  background: linear-gradient(135deg, #ff5a5a, #e11d2e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 3px 10px rgba(225, 29, 46, 0.32);
}

.product-badge--neutral {
  color: #fff;
  background: linear-gradient(135deg, #97a3b2, #7c8898);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 2px 6px rgba(10, 23, 17, 0.16);
}

.product-card__sale-badge {
  position: absolute;
  right: 0.42rem;
  bottom: 0.42rem;
  z-index: 3;
}

.product-card__image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.66rem;
  padding: 0.9rem;
}

.product-card__title {
  display: -webkit-box;
  min-height: 2.6rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.36;
}

.product-card__type {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.32;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__size {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.32;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__material {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.32;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__price-row {
  display: flex;
  align-items: flex-end;
  gap: 0.46rem;
  margin-top: auto;
  min-height: 1.55rem;
}

.product-card__price {
  order: 2;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #131b28;
}

.product-card__views {
  order: 3;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.12rem 0.44rem;
  border: 1px solid #d6e2f6;
  border-radius: 999px;
  background: #f3f7ff;
  color: #5a6f95;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.product-card__views::before {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 0.72rem;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M2.2 12c2.3-4 5.6-6 9.8-6s7.5 2 9.8 6c-2.3 4-5.6 6-9.8 6s-7.5-2-9.8-6z' stroke='%235a6f95' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='3.1' stroke='%235a6f95' stroke-width='2.1'/%3E%3C/svg%3E");
}

.product-card--sale .product-card__price,
.product-card__price--sale-pulse {
  display: inline-block;
  color: #dc2626;
  text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  transform-origin: center;
  will-change: transform, text-shadow, filter, color;
  animation: sale-price-pulse 1.05s ease-in-out infinite;
}

@keyframes sale-price-pulse {
  0% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
    filter: saturate(1);
  }
  50% {
    transform: scale(1.085);
    color: #ef4444;
    text-shadow: 0 0 12px rgba(220, 38, 38, 0.58), 0 0 24px rgba(248, 113, 113, 0.34);
    filter: saturate(1.38);
  }
  100% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
    filter: saturate(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card--sale .product-card__price,
  .product-card__price--sale-pulse {
    animation: sale-price-pulse-reduced 1.6s ease-in-out infinite;
  }
}

@keyframes sale-price-pulse-reduced {
  0%, 100% {
    color: #dc2626;
    text-shadow: 0 0 0 rgba(220, 38, 38, 0);
  }
  50% {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
  }
}

.product-card__old-price {
  order: 1;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  color: #8d97aa;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.product-card__button {
  margin-top: 0.42rem;
}

.product-card--skeleton {
  pointer-events: none;
}

.skeleton-block,
.skeleton-line,
.skeleton-button {
  background: linear-gradient(90deg, #e8eee7 25%, #f3f7f2 37%, #e8eee7 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}

.skeleton-line {
  height: 0.72rem;
  border-radius: 999px;
}

.skeleton-line--title {
  width: 100%;
}

.skeleton-line--short {
  width: 72%;
}

.skeleton-line--price {
  width: 3.8rem;
  height: 0.95rem;
}

.skeleton-line--old-price {
  width: 2.8rem;
  height: 0.65rem;
}

.skeleton-button {
  margin-top: auto;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height-mobile);
  border: 1px solid transparent;
  border-radius: 0.68rem;
  padding: 0 0.95rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.16s ease;
}

.button--primary {
  color: #ffffff;
  background: var(--accent);
}

.button--primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(31, 56, 108, 0.18);
}

.button--ghost {
  border-color: #cfdbee;
  color: var(--text);
  background: #f8fbff;
}

.button--in-cart {
  border-color: #9fbae8;
  color: #2154b8;
  background: var(--accent-soft);
}

.button--primary.button--in-cart {
  border-color: #9fbae8;
  color: #2154b8;
  background: var(--accent-soft);
}

.button--primary.button--in-cart:hover {
  background: #dce9ff;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: scale(0.98);
}

.button--full {
  width: 100%;
}

.button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Кнопки внутренних экранов Mini App (корзина, фильтры, контакты, заказ,
   о нас, sort/success): крупный мобильный кегль для touch-навигации (ТЗ
   «Кнопки: 18–20px» → 1rem в меру дизайн-системы проекта). Каталог и
   модалка товара не затрагиваются (там свой компактный масштаб). */
.modal--fullscreen .button,
.sort-modal .button,
.success-state .button {
  font-size: 1rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal:target {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal.modal--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 32, 52, 0.52);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 35rem);
  max-height: 92svh;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 24px 56px rgba(22, 37, 72, 0.26);
  transform: translateY(1rem) scale(0.985);
  transition: transform 0.24s ease;
  display: flex;
  flex-direction: column;
}

.modal:target .modal__dialog {
  transform: translateY(0) scale(1);
}

.modal.modal--open .modal__dialog {
  transform: translateY(0) scale(1);
}

/* Единый scroll-lock модалок (ТЗ): BODY/каталог НЕ скроллится (body.modal-open
   overflow:hidden), а САМА модалка — скролл-контейнер (стандартная модель
   веб-приложения). Оверлей .modal — скролл-контейнер модалки (overflow-y:auto,
   overscroll-behavior:contain, touch-action:pan-y): жесты на нём скроллят
   модалку, но НЕ body (фон заблокирован). Затемнение .modal__backdrop —
   touch-action:none (жесты на фоне не скроллят ничего). Диалог .modal__dialog —
   pan-y: жесты на самом диалоге (шапка/поля) тоже прокручивают модалку.
   Внутренние контейнеры (скролл-зоны) — pan-y + overscroll-behavior:contain
   (достижение края не «цепляет» оверлей/фон). */
.modal {
  touch-action: pan-y;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal__backdrop {
  touch-action: none;
}

.modal__dialog {
  touch-action: pan-y;
}

.product-modal__content,
.cart-modal,
.filters-modal__scroll {
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.modal__close {
  position: sticky;
  top: 0.7rem;
  z-index: 5;
  display: grid;
  place-items: center;
  margin: 0.7rem 0.7rem -2.7rem auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid #cfdaee;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #5f6d83;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.16s ease;
}

.modal__close-icon {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
}

/* Тач-зона закрытия в маленьких диалогах (sort/success): визуально 32px,
   но попадание — 44×44 (невидимая область вокруг кнопки). */
.modal__close::before {
  content: "";
  position: absolute;
  inset: -6px;
}

.modal__close:hover {
  border-color: #bdcdea;
  background: #f2f7ff;
}

.modal__close:active {
  transform: scale(0.96);
}

.modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

/* ============================================================================
   .dt-header — ЕДИНАЯ шапка full-screen экранов/модалок (Mini App UX).
   Структура: [ ← ] Название экрана [ × ].
   Один общий компонент для ВСЕХ внутренних экранов: корзина, профиль,
   избранное, заказы, настройки, помощь, о нас, контакты, фильтры,
   карточка товара. Кнопки 44×44 (тач-зона), иконки 20×20, заголовок
   строго по центру (сетка 44px | 1fr | 44px).
   ← = назад на предыдущий экран; × = закрыть текущий экран целиком.
   ----------------------------------------------------------------------------
   Разметка (генерируется статикой index.html и profile.js одинаково):
   <header class="dt-header">
     <button class="dt-header__btn dt-header__back" data-header-back …>
       <svg class="dt-header__icon">…←…</svg>
     </button>
     <h2 class="dt-header__title">Название</h2>
     <button class="dt-header__btn dt-header__close" data-header-close …>
       <svg class="dt-header__icon">…×…</svg>
     </button>
   </header>
   ========================================================================== */
.dt-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  padding: 0.5rem 0.75rem;
  /* iPhone/MAX WebView: шапка не залезает под статус-бар (viewport-fit=cover) */
  padding-top: calc(0.5rem + env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.dt-header__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.dt-header__btn:hover {
  background: var(--surface-soft);
}

.dt-header__btn:active {
  background: var(--accent-soft);
}

.dt-header__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.18);
}

.dt-header__btn[hidden] {
  display: none;
}

.dt-header__icon {
  display: block;
  width: 20px;
  height: 20px;
}

.dt-header__title {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--text);
}

/* Overlay-вариант (карточка товара): шапка поверх hero-фото, в поток не
   попадает — не ломает grid/flex раскладку товарной модалки на любом
   вьюпорте; фон непрозрачный (surface), контент скроллится под ней. */
.dt-header--overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

/* Внутри модалок, где шапка не в потоке, родитель должен быть контейнером
   позиционирования (например .product-modal — см. ниже). */
.modal__dialog--product {
  position: relative;
}

.scroll-top {
  position: fixed;
  right: 0.82rem;
  bottom: calc(var(--mobile-bottom-nav-height) + 0.8rem + env(safe-area-inset-bottom));
  z-index: 190;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #c8d6ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(34, 56, 102, 0.16);
  transition: transform 0.16s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.scroll-top:hover {
  border-color: #b7caeb;
  background: #f3f8ff;
}

.scroll-top:active {
  transform: scale(0.95);
}

/* ===== COMPACT STICKY HEADER (scroll, точечный UI-фикс) ===== */
.header-wrapper {
  transition: padding 0.22s ease;
}
.header-wrapper.is-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem var(--page-gap);
}
.header-wrapper.is-compact .app-header,
.header-wrapper.is-compact .app-header__inner,
.header-wrapper.is-compact .search-panel,
.header-wrapper.is-compact .search-panel .container {
  display: contents;
}
.header-wrapper.is-compact .logo {
  order: 1;
  flex: 0 0 auto;
  gap: 0;
}
.header-wrapper.is-compact .logo span {
  max-width: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  white-space: nowrap;
  padding: 0;
}
.header-wrapper.is-compact .worktime {
  display: none;
}
.header-wrapper.is-compact .search-field {
  order: 2;
  flex: 1 1 100px;
  min-width: 0;
}
.header-wrapper.is-compact .search-field input {
  min-width: 0;
  min-height: 2.6rem;
  border-radius: 0.8rem;
  padding: 0 0.7rem 0 2.35rem;
  font-size: 0.92rem;
  box-shadow: 0 3px 12px rgba(27, 49, 94, 0.07);
}
.header-wrapper.is-compact .header-action {
  order: 3;
  flex: 0 0 auto;
}
.header-wrapper.is-compact .catalog-nav {
  order: 4;
  flex-basis: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0.15rem 0 0;
}
.header-wrapper.is-compact .catalog-nav__rail {
  padding: 0.05rem 0;
}
.header-wrapper.is-compact .catalog-nav__rail .chip {
  min-height: 2rem;
}
.header-wrapper.is-compact .catalog-nav__hint {
  width: 2rem;
  height: 2rem;
}

.logo span {
  transition: max-width 0.22s ease, opacity 0.18s ease, visibility 0.18s ease;
}

/* ===== SCROLL-TOP: скрыт у верха, плавное появление ===== */
.scroll-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease,
    background-color 0.2s ease, border-color 0.2s ease;
}
.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.scroll-top:active {
  transform: scale(0.95);
}

@media (prefers-reduced-motion: reduce) {
  .header-wrapper,
  .header-wrapper *,
  .scroll-top {
    transition: none !important;
  }
}

.modal__dialog--product {
  width: min(100%, 36rem);
}

.product-modal {
  position: relative; /* контейнер позиционирования для overlay-шапки .dt-header */
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.product-modal__hero {
  width: 100%;
  height: 42svh;
  max-height: 42svh;
  object-fit: cover;
  background: #eef2ec;
  cursor: zoom-in;
}

.product-modal__hero-wrap {
  position: relative;
}

.product-modal__hero.is-unavailable {
  filter: grayscale(100%);
}

.product-modal__hero-unavailable {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.55rem;
  justify-items: center;
  background: rgba(62, 73, 92, 0.55);
  padding: 0.9rem;
}

.product-modal__hero-unavailable[hidden] {
  display: none !important;
}

.product-modal__hero-unavailable-title {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
}

.product-modal__notify-button {
  min-height: 2rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.92);
  color: #2b3f67;
  border-color: rgba(255, 255, 255, 0.75);
}

.product-modal__gallery {
  display: flex;
  flex: 0 0 var(--gallery-strip-height);
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.32rem 0.9rem;
  min-height: var(--gallery-strip-height);
  max-height: var(--gallery-strip-height);
  scrollbar-gutter: stable both-edges;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  border-bottom: 1px solid rgba(219, 227, 241, 0.8);
}

.product-modal__thumb {
  position: relative;
  flex: 0 0 var(--gallery-thumb-size);
  width: var(--gallery-thumb-size);
  height: var(--gallery-thumb-size);
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-modal__thumb img {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  object-fit: cover;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.product-modal__thumb:disabled {
  cursor: not-allowed;
}

.product-modal__thumb:disabled img {
  filter: grayscale(100%);
  opacity: 0.65;
}

.product-modal__thumb.is-active img {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.22), 0 6px 14px rgba(31, 56, 108, 0.16);
  transform: translateY(-1px) scale(1.02);
}

.product-modal__thumb.is-active {
  box-shadow: 0 0 0 1px rgba(47, 111, 237, 0.1);
}

.product-modal__thumb.is-active::after {
  content: "Выбрано";
  position: absolute;
  left: 50%;
  bottom: 0.28rem;
  transform: translateX(-50%);
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.92);
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  pointer-events: none;
  z-index: 3;
}

.product-modal__thumb.is-unavailable img {
  filter: grayscale(100%);
}

.product-modal__thumb-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.28rem;
  background: rgba(64, 73, 90, 0.58);
  padding: 0.32rem;
}

.product-modal__thumb-overlay-title {
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
}

.product-modal__gallery::-webkit-scrollbar {
  height: 0.38rem;
}

.product-modal__gallery::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c8d3cc;
}

.product-modal__gallery::-webkit-scrollbar-track {
  background: transparent;
}

.product-modal__content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.95rem 1.05rem 1.2rem;
  overflow-y: auto;
}

.product-modal__name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.32;
}

.product-modal__price-row {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
}

.product-modal__price-row .product-card__price {
  font-size: 1.5rem;
}

.product-modal__price-row .product-card__old-price {
  font-size: 0.95rem;
}

.product-modal__badges-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  order: -1;
}

.product-modal__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* «В наличии: N шт.» рядом с бейджами — справа, мелкий полупрозрачный текст
   (из параметров убран: это статус товара, а не характеристика). */
.product-modal__stock-badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.1;
  color: rgba(23, 31, 46, 0.5);
  white-space: nowrap;
}

.product-modal__description-block {
  margin: 0;
  border: 1px solid #e1e9f7;
  border-radius: 0.6rem;
  background: #f8fbff;
}

.product-modal__description-block[hidden] {
  display: none;
}

.product-modal__description-toggle {
  padding: 0.5rem 0.7rem;
  color: #2b3a5c;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-modal__description-toggle::-webkit-details-marker {
  display: none;
}

.product-modal__description-toggle::after {
  content: "↓";
  font-size: 0.8rem;
  color: #7a89a8;
}

.product-modal__description-block[open] .product-modal__description-toggle::after {
  content: "↑";
}

.product-modal__description-block .product-modal__description {
  border: 0;
  border-top: 1px solid #e1e9f7;
  border-radius: 0 0 0.6rem 0.6rem;
}

.product-modal__description {
  margin: 0;
  border: 1px solid #e1e9f7;
  border-radius: 0.6rem;
  background: #f8fbff;
  padding: 0.6rem 0.7rem;
  color: #44506a;
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-line;
}

.product-modal__type {
  margin: 0;
  border: 1px solid #e1e9f7;
  border-radius: 0.6rem;
  background: #f6f9ff;
  padding: 0.48rem 0.65rem;
  color: #44506a;
  font-size: 0.83rem;
  line-height: 1.38;
}

.product-modal__size {
  margin: 0;
  border: 1px solid #e1e9f7;
  border-radius: 0.6rem;
  background: #f6f9ff;
  padding: 0.48rem 0.65rem;
  color: #44506a;
  font-size: 0.83rem;
  line-height: 1.38;
}

.product-modal__material {
  margin: 0;
  border: 1px solid #e1e9f7;
  border-radius: 0.6rem;
  background: #f6f9ff;
  padding: 0.48rem 0.65rem;
  color: #44506a;
  font-size: 0.83rem;
  line-height: 1.38;
}

.product-modal__actions {
  /* 2026-08-24 (UX hardening): единая метрика кнопок нижней панели —
     «В корзину» и «Поделиться» (высота 3.1rem; на desktop — 3.2rem), чтобы
     панель выглядела как набор однородных control-ов. Блок цены справа —
     информационный (Вариант 1), метрику кнопок не использует. */
  --pm-control-h: 3.1rem;
  --pm-control-radius: 0.68rem;
  --pm-control-pad-x: 0.95rem;
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: grid;
  /* Кнопка «В корзину» + «Поделиться» + информация о цене справа. */
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: stretch;
  margin-top: 0.45rem;
  padding: 0.7rem 0.3rem 0.3rem;
  /* Liquid glass по образцу .header-wrapper: полупрозрачный матовый фон,
     чтобы кнопки и блок цены не сливались с контентом, прокручивающимся
     под панелью. Рамка равномерная со всех сторон (без акцента сверху),
     стекло скруглено целиком. */
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(219, 227, 241, 0.5);
  border-radius: 0.9rem;
  box-shadow: 0 -8px 24px -24px rgba(31, 56, 108, 0.45);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  backdrop-filter: blur(14px) saturate(1.35);
}

.product-modal__actions .button--full {
  width: 100%;
  min-width: 0;
  min-height: 3.1rem;
  font-size: 0.98rem;
  font-weight: 600;
}

/* Кнопки панели в стиле liquid glass: полупрозрачные заливки + лёгкий blur,
   чтобы кнопки «парили» над матовым стеклом панели, не теряя контраста. */
.product-modal__actions .button--primary {
  background: rgba(47, 111, 237, 0.86);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 16px -10px rgba(47, 111, 237, 0.55);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
}

.product-modal__actions .button--primary:hover {
  background: rgba(33, 84, 184, 0.9);
}

.product-modal__actions .button--primary.button--in-cart {
  background: rgba(238, 244, 255, 0.72);
}

.product-modal__copy-link {
  gap: 0.35rem;
  min-height: var(--pm-control-h);
  margin-left: 0.5rem;
  white-space: nowrap;
  font-size: 0.82rem;
  /* Liquid glass: полупрозрачная матовая подложка поверх стекла панели. */
  border-color: rgba(47, 111, 237, 0.28);
  color: #2f6fed;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  backdrop-filter: blur(10px) saturate(1.3);
}

.product-modal__copy-link:hover {
  border-color: rgba(47, 111, 237, 0.42);
  background: rgba(255, 255, 255, 0.75);
  color: #2154b8;
}

.product-modal__copy-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.product-modal__copy-link.is-success {
  border-color: #9fbae8;
  background: var(--accent-soft);
  color: #2154b8;
}

/* Цена в нижней панели — Вариант 1 (label «Цена» + актуальная цена), но
   показывается, только когда основная цена ушла за экран: дубль управляется
   IntersectionObserver в app.js (класс .is-visible). НЕ кнопка: без фона,
   рамки, курсора и интерактива. Разделитель включается цветом, а не шириной —
   скрытый блок не оставляет 1px-линии. */
.product-modal__sticky-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.15rem;
  max-width: 0;
  margin-left: 0;
  padding-left: 0;
  border-left: 1px solid transparent;
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  overflow: hidden;
  transition:
    max-width 0.22s ease,
    margin-left 0.22s ease,
    padding-left 0.22s ease,
    border-color 0.22s ease,
    opacity 0.16s ease;
}

.product-modal__sticky-price.is-visible {
  max-width: 11rem;
  margin-left: 0.6rem;
  padding-left: 0.6rem;
  border-color: rgba(23, 31, 46, 0.14);
  opacity: 1;
}

.product-modal__price-label {
  color: rgba(23, 31, 46, 0.5);
  font-size: 0.66rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.product-modal__sticky-price-value {
  display: block;
  max-width: 100%;
  color: #131b28;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-products {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 0.2rem;
}

.related-products__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(37, 49, 75, 0.72);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.related-products__title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #3b82f6;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
  animation: related-title-pulse 1.8s ease-out infinite;
}

.related-products__row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 132px);
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.05rem 0.05rem 0.25rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.related-products__row::-webkit-scrollbar {
  display: none;
}

.related-products__row::-webkit-scrollbar-thumb {
  display: none;
}

/* Градиентные края «Похожих товаров» — по схеме ленты чипов каталога:
   контент растворяется у краёв, а не обрезается жёстко. Фейды включаются
   только пока в эту сторону есть что доскроллить (JS). */
.related-products__viewport {
  position: relative;
}

.related-products__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.25rem;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.related-products__fade--right {
  right: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
}

.related-products__fade--left {
  left: 0;
  background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.related-products__fade.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.related-products__item {
  width: 100%;
  border: 1px solid #d8e3f5;
  border-radius: 0.7rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 0.42rem;
  display: grid;
  gap: 0.38rem;
  text-align: left;
  color: inherit;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.related-products__item:hover {
  border-color: #bfd3f7;
  box-shadow: 0 8px 18px rgba(31, 67, 142, 0.12);
  transform: translateY(-1px);
}

.related-products__item:active {
  transform: scale(0.99);
}

.related-products__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #eff3ec;
}

.related-products__name {
  margin: 0;
  min-height: 2.2em;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: #1f2d48;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.related-products__price {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #0f1e3b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

@keyframes related-title-pulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.option-group {
  display: grid;
  gap: 0.45rem;
}

/* Контейнеры единого UX-порядка модалки товара (ТЗ): все интерактивные
   параметры (option-group с чипами/селектами) — в .product-modal__options,
   информационные характеристики (read-only строки) — в .product-modal__params.
   Оба — flex-колонки с тем же межблочным gap, что и у контента модалки,
   чтобы визуальный ритм блоков не изменился. */
.product-modal__options,
.product-modal__params {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
}

.option-group--required-missing .option-group__label {
  color: #b24141;
}

.option-group--required-missing .chip-row {
  border: 1px solid rgba(220, 100, 100, 0.35);
  border-radius: 0.68rem;
  padding: 0.4rem;
  background: rgba(220, 100, 100, 0.06);
}

.option-group__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.option-group__select {
  width: 100%;
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 0.68rem;
  background: #f9fbff;
  color: #4f5f79;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0 0.7rem;
  outline: none;
}

.option-group__select:focus {
  border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
}

.chip {
  min-height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f4f7ff;
  padding: 0 0.9rem;
  color: #5f6d84;
  font-size: 0.84rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 0.1s ease, background-color 0.1s ease, color 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.chip:hover:not(:disabled):not(.chip--active) {
  border-color: #b8caea;
  background: #f2f7ff;
}

.chip--active {
  border-color: #2f6fed;
  background: #2f6fed;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(31, 56, 108, 0.16);
  transform: translateY(-1px) scale(1.02);
}

.chip--active:hover:not(:disabled),
.chip--active:focus-visible {
  border-color: #2f6fed;
  background: #2f6fed;
  color: #ffffff;
}

.chip:active:not(:disabled):not(.chip--active) {
  transform: translateY(0) scale(0.99);
}

.chip:focus-visible {
  outline: none;
  border-color: #8eace3;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.16);
}

.chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.modal__dialog--cart {
  width: min(100%, 38rem);
}

.cart-modal {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  /* 2026-08-24 (UX hardening): .cart-modal — скролл-зона диалога корзины,
     занимает всё свободное место (flex:1 + min-height:0), а CTA «Отправить
     заявку» вынесена в .cart-footer вне скролл-контейнера: на iPhone (WebKit)
     sticky-кнопка могла оставаться прижатой к низу вьюпорта и перекрывать
     последний товар корзины. Теперь список всегда можно доскроллить выше
     кнопки, и кнопка физически не может наложиться на товары. */
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.1rem;
  padding-bottom: calc(1.1rem + env(safe-area-inset-bottom));
  overflow-y: auto;
}

.cart-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
  order: 1;
}

.cart-empty-state {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 11rem;
  border: 1px solid #e2eaf9;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(85% 110% at 50% -40%, rgba(47, 111, 237, 0.18), rgba(47, 111, 237, 0) 62%),
    radial-gradient(60% 55% at 88% 118%, rgba(47, 111, 237, 0.12), rgba(47, 111, 237, 0) 55%),
    radial-gradient(rgba(47, 111, 237, 0.07) 1px, transparent 1.1px) 0 0 / 16px 16px,
    linear-gradient(180deg, #fdfeff 0%, #f0f6ff 100%);
  box-shadow: 0 10px 28px -12px rgba(47, 111, 237, 0.18), inset 0 1px 0 #fff;
  text-align: center;
  padding: 1.1rem;
}

.cart-empty-state__icon {
  display: block;
  width: 4.5rem;
  height: auto;
}

.cart-empty-state__icon svg {
  display: block;
  width: 100%;
  height: auto;
}

.cart-empty-state__title {
  color: #171f2e;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
}

.cart-empty-state__hint {
  color: #8a9bb5;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.45;
  max-width: 22rem;
}

.cart-empty-state__cta {
  margin-top: 0.35rem;
  width: min(100%, 18rem);
}

.cart-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 0.75rem;
  align-items: start;
  border: 1px solid #dde6f4;
  border-radius: 0.75rem;
  background: #fbfcff;
  padding: 0.85rem;
}

.cart-item__image {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #eef2ec;
}

.cart-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.cart-item__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.32;
}

.cart-item__params {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.cart-item__qty-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

/* Контрол количества в корзине — компактный, в общем размере текста корзины
   (по запросу: кнопки +1/−1 не должны быть крупнее строки товара). */
.cart-item__qty-btn {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: #ffffff;
  color: #4b5970;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.cart-item__qty-btn:hover:not(:disabled) {
  border-color: #9fbae8;
  background: var(--accent-soft);
  color: #2154b8;
}

.cart-item__qty-btn:disabled {
  color: #b7c3d9;
  cursor: not-allowed;
}

.cart-item__qty-value {
  min-width: 2.4rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2b3a55;
}

/* Правая колонка карточки: цена за единицу (вторично, мелко), итог позиции
   (unit_price × quantity — главный элемент), кнопка удаления. */
.cart-item__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  min-width: 0;
}

.cart-item__unit-price {
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.cart-item__line-total {
  font-size: 1.12rem;
  font-weight: 700;
  color: #1c2a44;
  white-space: nowrap;
}

.cart-item__remove {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2rem;
  margin-top: 0.15rem;
  padding: 0;
  border: 0;
  background: none;
  color: #5e6e86;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.16s ease;
}

.cart-item__remove:hover {
  color: #b24141;
}

@media (max-width: 26rem) {
  .cart-item {
    grid-template-columns: 3.5rem 1fr;
  }

  .cart-item__image {
    width: 3.5rem;
    height: 3.5rem;
  }

  .cart-item__aside {
    grid-column: 2 / 3;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.checkout-form {
  display: grid;
  gap: 0.62rem;
  order: 2;
}

.checkout-form[hidden] {
  display: none !important;
}

.checkout-open-button[hidden],
.cart-list[hidden],
.cart-empty-state[hidden] {
  display: none !important;
}

/* Футер диалога корзины: итоги (Товаров/Итого) + CTA «Отправить заявку» вне
   скролл-зоны (см. комментарий у .cart-modal). Нижний отступ учитывает Home
   Indicator iPhone через env(safe-area-inset-bottom). */
.cart-footer {
  flex: 0 0 auto;
  padding: 0.65rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom));
}

/* Блок итогов корзины: «Товаров N шт.» / «Итого N ₽» (Σ unit_price × quantity). */
.cart-summary {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #dde6f4;
}

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

.cart-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: #4b5970;
}

.cart-summary__row--total {
  margin-top: 0.15rem;
  padding-top: 0.5rem;
  border-top: 1px solid #eef2f7;
  font-size: 1.06rem;
  font-weight: 700;
  color: #1c2a44;
}

/* Пустая корзина: кнопка скрыта (hidden ставит app.js) — футер целиком
   убирается, чтобы не оставалось пустой полосы под состоянием
   «Корзина пуста». :has() поддерживается во всех целевых браузерах
   (Chromium/WebView MAX, Safari 15.4+). */
.cart-footer:has(.checkout-open-button[hidden]) {
  display: none;
}

.checkout-open-button {
  min-height: 3.05rem;
  border-radius: 0.9rem;
  box-shadow: 0 14px 30px rgba(31, 70, 151, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.checkout-open-button.is-inactive,
.checkout-open-button:disabled {
  background: #aebfdf;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.95;
}

.checkout-open-button.is-loading {
  opacity: 0.98;
  cursor: wait;
}

.checkout-open-button.is-loading::after {
  content: "";
  width: 1rem;
  height: 1rem;
  margin-left: 0.52rem;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: checkout-spin 0.72s linear infinite;
}

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

.checkout-form > .button[type="submit"] {
  display: none;
}

.cart-status {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  display: none !important;
}

.cart-status--error {
  color: #a2362e;
}

.field {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.field input {
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 0 0.75rem;
  color: var(--text);
  font-size: 1rem;
}

.field--consent {
  gap: 0.42rem;
  margin-top: 0.15rem;
}

.field-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f8fbff;
  padding: 0.8rem 0.9rem;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.4;
}

.field-consent input[type="checkbox"] {
  margin-top: 0.12rem;
  width: 1rem;
  height: 1rem;
  accent-color: #2f6fed;
}

.field-consent a {
  color: #2f6fed;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.field select {
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 0 0.75rem;
  color: var(--text);
  font-size: 1rem;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: #8faee4;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.16);
}

.field--invalid input,
.field--invalid select {
  border-color: #dc6464;
  box-shadow: 0 0 0 3px rgba(220, 100, 100, 0.14);
}

.field--invalid .field-consent input[type="checkbox"] {
  outline: 2px solid rgba(220, 100, 100, 0.45);
  outline-offset: 1px;
}

.field--invalid .field-consent {
  border-color: rgba(220, 100, 100, 0.6);
}

.field__error {
  margin: 0.05rem 0 0;
  min-height: 0.95rem;
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.3;
  color: #b24141;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.field__error.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.checkout-status {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.checkout-status--error {
  color: #a2362e;
}

/* Уведомления — карточки по типам (2026-08-25, референс): акцентная
   полоска слева, круг с SVG-иконкой на светло-акцентном фоне, заголовок
   события, кнопка закрытия × и опциональный CTA (например, «Перейти в
   корзину» у типа cart). Вариант задаётся классом app-toast--<type> через
   переопределение акцента (--toast-accent/--toast-soft). */
.toast-stack {
  position: fixed;
  top: calc(0.72rem + env(safe-area-inset-top));
  left: 50%;
  z-index: 420;
  display: grid;
  gap: 0.5rem;
  width: min(calc(100% - 1.25rem), 25rem);
  transform: translateX(-50%);
  pointer-events: none;
}

.app-toast {
  --toast-accent: #2f6fed;
  --toast-soft: #e7f0ff;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.55rem 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(23, 41, 74, 0.14);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.app-toast__rail {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--toast-accent);
}

.app-toast__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--toast-soft);
  color: var(--toast-accent);
}

.app-toast__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.app-toast__title {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.app-toast__cta {
  flex: none;
  border: 1px solid var(--toast-accent);
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 0.5rem 0.8rem;
  color: var(--toast-accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.app-toast__cta:hover {
  background: var(--toast-soft);
}

.app-toast__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8b98ad;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.app-toast__close:hover {
  background: #f0f4fb;
  color: var(--text);
}

.app-toast__close svg {
  width: 1.05rem;
  height: 1.05rem;
}

.app-toast--info {
  --toast-accent: #2f6fed;
  --toast-soft: #e7f0ff;
}

.app-toast--success {
  --toast-accent: #1f9d61;
  --toast-soft: #e6f6ee;
}

.app-toast--warning {
  --toast-accent: #d97706;
  --toast-soft: #fdf3e2;
}

.app-toast--error {
  --toast-accent: #d64545;
  --toast-soft: #fdeaec;
}

.app-toast--cart {
  --toast-accent: #2f6fed;
  --toast-soft: #e7f0ff;
}

.app-toast--favorites {
  --toast-accent: #ef4a76;
  --toast-soft: #fdecf1;
}

.app-toast--auth {
  --toast-accent: #2f6fed;
  --toast-soft: #e7f0ff;
}

.app-toast--order {
  --toast-accent: #1f9d61;
  --toast-soft: #e6f6ee;
}

/* VPN / соединение — жёлтый «тёплый» тост (не белый), закрывается крестиком. */
.app-toast--vpn {
  --toast-accent: #b45309;
  --toast-soft: #fdeec9;
  background: #fff6e1;
  border-color: #f5d694;
}

@media (prefers-reduced-motion: reduce) {
  .app-toast {
    transition: none;
  }
}

.cart-modal__empty-link {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  text-decoration: underline;
}

.modal__dialog--empty {
  width: min(100%, 22rem);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 12rem;
  padding: 1rem;
}

.empty-state p {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 600;
}

.success-state {
  display: grid;
  justify-items: center;
  gap: 0.78rem;
  min-height: 14rem;
  padding: 1.2rem 1rem 1.45rem;
  text-align: center;
}

.success-state__brand {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.9rem;
  padding: 0.18rem;
  background: linear-gradient(150deg, #f5f9ff 0%, #eaf2ff 100%);
  border: 1px solid #d8e4f7;
  box-shadow: 0 8px 20px rgba(30, 54, 104, 0.12);
}

.success-state__brand img {
  width: 100%;
  height: 100%;
  border-radius: 0.72rem;
  object-fit: contain;
  background: #ffffff;
}

.success-state__check {
  width: 3.55rem;
  height: 3.55rem;
}

.success-state__check svg {
  width: 100%;
  height: 100%;
  display: block;
}

.success-state__check-circle {
  fill: #ebf7ef;
  stroke: #40a760;
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.success-state__check-mark {
  fill: none;
  stroke: #2f9a53;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
}

.modal:target .success-state__check-circle,
.modal.modal--open .success-state__check-circle {
  animation: success-circle-draw 0.45s ease forwards;
}

.modal:target .success-state__check-mark,
.modal.modal--open .success-state__check-mark {
  animation: success-mark-draw 0.34s ease 0.2s forwards;
}

.success-state__title {
  margin: 0;
  color: #1e355f;
  font-size: 1.12rem;
  font-weight: 700;
}

.success-state__text {
  margin: 0;
  color: #55667f;
  font-size: 0.91rem;
  line-height: 1.42;
}

@keyframes success-circle-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes success-mark-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.modal--fullscreen {
  padding: 0;
  align-items: stretch;
}

.modal__dialog--fullscreen {
  width: 100%;
  max-width: none;
  height: 100svh;
  max-height: 100svh;
  border-radius: 0;
  transform: translateY(100%);
}

.modal--fullscreen:target .modal__dialog--fullscreen {
  transform: translateY(0);
}

/* 2026-08-24 (единый full-screen UX): контент информационных модалок
   (Связаться / Как заказать / О нас) — единственная скролл-зона диалога:
   в 100svh-диалоге он занимает всё свободное место под .dt-header. */
.modal__dialog--fullscreen > .info-modal {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* На desktop контент полноэкранных экранов центрируется узкой колонкой
   --screen-max (по образцу профиля), а не растягивается на всю ширину
   монитора: карточки/списки сохраняют комфортную длину строки, по бокам —
   свободные поля. Шапка .dt-header ограничена той же колонкой: кнопки ←/×
   не уезжают к краям 1920px-экрана, заголовок центрирован в колонке. */
@media (min-width: 62rem) {
  .modal__dialog--fullscreen > .cart-modal,
  .modal__dialog--fullscreen > .info-modal,
  .modal__dialog--fullscreen > .cart-footer {
    width: min(100%, var(--screen-max));
    margin-left: auto;
    margin-right: auto;
  }

  .modal__dialog--fullscreen .dt-header {
    width: min(100%, var(--screen-max));
    margin-inline: auto;
  }
}

.filters-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
}

.filters-modal__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1rem 1.2rem;
}

.filters-modal__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.filter-group {
  display: grid;
  gap: 0.72rem;
  margin-bottom: 1.15rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f9fbff;
}

.filter-group h3 {
  margin: 0;
  font-size: 1rem;
}

.filter-group--selected {
  background: #f4f8ff;
}

.filters-selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.filters-selected-chip {
  font-size: 0.74rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  font-size: 0.9rem;
}

.check-row input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filters-empty-hint {
  margin: 0;
  color: #6f7f99;
  font-size: 0.82rem;
}

.filters-show-more {
  justify-self: start;
  min-height: 2.5rem;
  border: 1px solid #c7d8f3;
  border-radius: 0.62rem;
  background: #ffffff;
  color: #375684;
  padding: 0 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.filters-show-more:active {
  transform: scale(0.98);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.58rem;
}

.price-grid input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 0.7rem;
}

.price-grid input:focus {
  outline: none;
  border-color: #8faee4;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.14);
}

.filters-modal__actions {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, #ffffff 78%, rgba(255, 255, 255, 0));
  display: grid;
  gap: 0.6rem;
  padding: 0.9rem 1rem calc(0.95rem + env(safe-area-inset-bottom));
}

.modal__dialog--sheet {
  width: min(100%, 28rem);
}

.sort-modal {
  display: grid;
  gap: 0.72rem;
  padding: 1rem;
}

.info-modal {
  display: grid;
  gap: 0.8rem;
  /* Мобильный ритм: 16px по бокам (ТЗ), снизу — запас под Home Indicator */
  padding: 1rem 1rem calc(1.1rem + env(safe-area-inset-bottom));
}

/* Единая карточка-строка контактов/действий: одинаковые border/radius/padding,
   тач-высота ≥44px, иконка слева, текст по левому краю. */
.info-modal__link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f8fbff;
  padding: 0.8rem 0.9rem;
  color: #26344b;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
}

.info-modal__link--call {
  justify-content: center;
  text-align: center;
  border-color: #b8cbed;
  background: #eef5ff;
  color: #1f3f7f;
  font-weight: 600;
}

.info-modal__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  display: block;
}

/* Группы (MAX/Telegram) — сетка 2×2 на мобильном и desktop: компактные
   пилюли одинаковой ширины, без растягивания на весь экран. */
.info-modal__chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 2.5rem;
  gap: 0.44rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbff;
  padding: 0 0.9rem;
  color: #22344f;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.info-chip img,
.info-chip__icon {
  width: 1rem;
  height: 1rem;
  display: block;
  flex: 0 0 1rem;
}

/* ==========================================================================
   «Связаться» (Вариант 2, 2026-08-25): секции «Личные контакты»
   (карточки-строки) и «Наши сообщества» (2 карточки в ряд), CTA
   «Позвонить в магазин» и подпись-футер. Только presentation: URL,
   обработчики и данные контактов не менялись. Скоуп — .contact-ui /
   .dt-header--contact, остальные экраны не затронуты.
   ========================================================================== */

/* Круглые кнопки ←/× на мягкой подложке (как в референсе). */
.contact-modal .dt-header__btn {
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.contact-modal .dt-header__btn:hover {
  background: #e8eefb;
}

.contact-ui__section-title {
  margin: 0.3rem 0 0.05rem;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.contact-ui__section-title--first {
  margin-top: 0.5rem;
}

/* Карточка контакта: [иконка] название/подсказка [>] */
.contact-ui__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.35rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  padding: 0.55rem 0.8rem 0.55rem 0.65rem;
  color: var(--text);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.contact-ui__link:hover {
  border-color: #c3d2ec;
  background: #f9fbff;
}

.contact-ui__link:active {
  background: var(--surface-soft);
}

.contact-ui__badge {
  width: 2.9rem;
  height: 2.9rem;
  flex: 0 0 2.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-ui__badge img,
.contact-ui__badge svg {
  display: block;
  width: 100%;
  height: 100%;
}

.contact-ui__text {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  flex: 1 1 auto;
}

.contact-ui__name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.contact-ui__hint {
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--muted);
}

.contact-ui__chevron {
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff3fa;
  color: #45536e;
}

.contact-ui__chevron svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
}

.contact-ui__chevron--sm {
  width: 1.55rem;
  height: 1.55rem;
  flex-basis: 1.55rem;
}

.contact-ui__chevron--sm svg {
  width: 0.9rem;
  height: 0.9rem;
}

/* Наши сообщества: две компактные карточки в ряд. */
.contact-ui__socials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.contact-ui__social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: 4.1rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  padding: 0.55rem;
  color: var(--text);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.contact-ui__social:hover {
  border-color: #c3d2ec;
  background: #f9fbff;
}

.contact-ui__social-icon {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-ui__social-icon img,
.contact-ui__social-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.contact-ui__social-name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
}

.contact-ui__social-hint {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--muted);
}

/* CTA «Позвонить в магазин» — отдельная доминирующая карточка. */
.contact-ui__call {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.7rem;
  border: 1px solid #cfe0f8;
  border-radius: 1.25rem;
  background: #eef4fe;
  padding: 0.65rem 0.75rem 0.65rem 0.85rem;
  color: #17345f;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.contact-ui__call:hover {
  border-color: #b6d0f5;
  background: #e7f1fe;
}

.contact-ui__call-icon {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: var(--surface);
  color: var(--accent);
}

.contact-ui__call-icon svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

.contact-ui__call-name {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
  color: #16325c;
}

.contact-ui__call-hint {
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.3;
  color: #5c7495;
}

.contact-ui__call-phone {
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
}

.contact-ui__call-phone svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.contact-ui__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.contact-ui__footer svg {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 0.95rem;
}

/* Узкие экраны (≤448px): у сообществ убираем подсказку и шеврон, уменьшаем
   иконку — названия помещаются в две колонки без обрезки. */
@media (max-width: 28rem) {
  .contact-ui__social-hint,
  .contact-ui__chevron--sm {
    display: none;
  }

  .contact-ui__social {
    min-height: 3.5rem;
    gap: 0.4rem;
  }

  .contact-ui__social-icon {
    width: 1.75rem;
    height: 1.75rem;
    flex-basis: 1.75rem;
  }

  .contact-ui__social-name {
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Очень узкие экраны (≤368px): ещё компактнее иконка и шрифт, чтобы
   длинное название «Группа в Telegram» не обрезалось. */
@media (max-width: 23rem) {
  .contact-ui__social-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-basis: 1.5rem;
  }

  .contact-ui__social {
    gap: 0.35rem;
  }

  .contact-ui__social-name {
    font-size: 0.75rem;
  }
}

.info-modal__text {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: #fbfcff;
  padding: 0.95rem 1.05rem;
  color: #26344b;
  font-size: 1rem;
  line-height: 1.5;
}

.about-info {
  gap: 0.8rem;
}

.about-policy-chips {
  flex-wrap: wrap;
  gap: 0.46rem;
}

.about-policy-chips .info-chip {
  flex: 1 1 calc(50% - 0.23rem);
  min-height: 2.75rem;
  border-radius: 0.9rem;
  background: #fbfcff;
  color: #26344b;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
}

.about-policy-chips .info-chip:hover {
  border-color: #9ebaf0;
  background: #f0f6fe;
}

/* «О нас» скроллится как остальные fullscreen-экраны: единственная
   скролл-зона — .info-modal (правило .modal__dialog--fullscreen > .info-modal). */

.about-faq {
  display: grid;
  gap: 0.55rem;
}

.about-faq__item {
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: #fbfcff;
  overflow: hidden;
}

.about-faq__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.95rem 1rem;
  color: #26344b;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}

.about-faq__btn:hover,
.about-faq__btn:active {
  background: #f4f8fe;
}

.about-faq__btn:focus-visible {
  outline: 2px solid #9ebaf0;
  outline-offset: -2px;
}

.about-faq__title {
  color: #26344b;
  font-size: 1rem;
  font-weight: 600;
}

.about-faq__icon {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  color: #7d889c;
  transition: transform .25s ease;
}

.about-faq__item.is-open .about-faq__icon {
  transform: rotate(90deg);
}

.about-faq__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}

.about-faq__panel-inner {
  overflow: hidden;
  min-height: 0;
}

.about-faq__item.is-open .about-faq__panel {
  grid-template-rows: 1fr;
}

.about-faq__text {
  margin: 0;
  padding: 0 1rem 0.9rem;
  color: #4a5b78;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Карта магазина: адаптивная высота (aspect-ratio 5:4), а не фикс 500×400;
   ширина iframe всегда 100% контейнера, высота — от пропорции. */
.about-map {
  display: block;
  width: 100%;
  height: 340px;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  overflow: hidden;
  background: #fbfcff;
}

.about-map > ymaps,
.about-map > div,
.about-map iframe {
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
  border: 0;
}

.about-route-link {
  width: 100%;
  margin-top: 0.85rem;
  text-align: center;
}

.order-guide {
  gap: 0.9rem;
}

/* Инструкция «Как заказать?» (референс 2026-08-25): одна большая светлая
   карточка с тонкой границей; внутри 5 строк — компактные синие бейджи
   01–05, основной текст справа, тонкие разделители между пунктами. */
.order-guide__list {
  margin: 0;
  padding: 0.35rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: #fbfcff;
  list-style: none;
}

.order-guide__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.85rem 0.05rem;
}

.order-guide__list li + li {
  border-top: 1px solid #eef2f9;
}

.order-guide__num {
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  background: #eef3fc;
  color: #2f6fed;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.order-guide__step {
  font-size: 1rem;
  line-height: 1.5;
  color: #26344b;
  padding-top: 0.1rem;
}

/* Заметный заголовок секции и вторичный подзаголовок «Личные контакты». */
.order-guide__note {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: #1c2c4f;
}

.order-guide__sub {
  margin: 0.08rem 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.3;
  color: #5b6b85;
}

/* MAX-карточки: [иконка] имя/подсказка [>], кликабельны целиком. */
.order-guide__chat {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 4.55rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--surface);
  padding: 0.55rem 0.75rem 0.55rem 0.65rem;
  color: var(--text);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.order-guide__chat:hover {
  border-color: #c3d2ec;
  background: #f9fbff;
}

.order-guide__chat-icon {
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-guide__chat-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.order-guide__chat-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 auto;
}

.order-guide__chat-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.order-guide__chat-hint {
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--muted);
}

.order-guide__chevron {
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff3fa;
  color: #45536e;
}

.order-guide__chevron svg {
  display: block;
  width: 1rem;
  height: 1rem;
}

/* CTA «Позвонить в магазин»: светло-голубая карточка с тонкой синей
   границей, иконка телефона в светлом круге, текст по центру. */
.order-guide__call {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 4.75rem;
  border: 1px solid #bcd4f6;
  border-radius: 1.1rem;
  background: #eef5fe;
  padding: 0.7rem 1rem;
  color: var(--accent);
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.order-guide__call:hover {
  border-color: #a8c8f2;
  background: #e7f1fd;
}

.order-guide__call-icon {
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
}

.order-guide__call-icon svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

.order-guide__call-text {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 0.12rem;
  text-align: center;
}

.order-guide__call-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--accent);
}

.order-guide__call-hint {
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.3;
  color: #5c7495;
}

.sort-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: #fbfcff;
  font-size: 1rem;
}

.sort-option input {
  accent-color: var(--accent);
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.image-viewer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.image-viewer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(9, 12, 11, 0.88);
}

.image-viewer__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  justify-items: center;
  width: min(100vw, 66rem);
  max-width: calc(100vw - 1rem);
  max-height: calc(100svh - 1rem);
  padding: 2.9rem 0.4rem 2.1rem;
}

.image-viewer__image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100svh - 5.8rem);
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.42);
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

.image-viewer__close,
.image-viewer__nav {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(20, 26, 23, 0.68);
  color: #ffffff;
  line-height: 1;
}

.image-viewer__close {
  top: 0.45rem;
  right: 0.45rem;
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1.28rem;
}

.image-viewer__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1.6rem;
}

.image-viewer__nav--prev {
  left: 0.15rem;
}

.image-viewer__nav--next {
  right: 0.15rem;
}

.image-viewer__nav:disabled {
  opacity: 0.35;
}

.image-viewer__counter {
  margin: 0.65rem 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 41.99rem) {
  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal__dialog {
    width: 100%;
    max-height: 96svh;
    border-radius: 1rem 1rem 0 0;
  }

  .modal__dialog--product {
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .modal__dialog--fullscreen {
    max-height: 100svh;
    border-radius: 0;
  }

  .image-viewer__dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100svh;
    padding: 3.2rem 0.35rem 1.9rem;
  }

  .image-viewer__image {
    max-height: calc(100svh - 6.1rem);
    border-radius: 0.65rem;
  }

  .image-viewer__nav {
    width: 2.1rem;
    height: 2.1rem;
    font-size: 1.35rem;
  }

  .image-viewer__counter {
    font-size: 0.76rem;
  }
}

@media (min-width: 42rem) {
  :root {
    --page-gap: 1.25rem;
  }

  .app-main {
    padding-bottom: calc(2.4rem + var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom));
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .modal {
    align-items: center;
    padding: 1rem;
  }

  /* Полноэкранные внутренние экраны остаются edge-to-edge и на desktop:
     базовое .modal--fullscreen { padding:0 } стоит раньше в каскаде и теряет
     приоритет перед этим медиа-правилом (равная специфичность) — возвращаем. */
  .modal--fullscreen {
    padding: 0;
    align-items: stretch;
  }
}

@media (min-width: 62rem) {
  :root {
    --page-gap: 1.5rem;
  }

  .app-header__inner {
    min-height: var(--header-height-desktop);
  }

  .app-main {
    padding-top: 1rem;
    padding-bottom: calc(2.4rem + var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom));
  }

  .search-panel {
    padding: 0.36rem 0 0.46rem;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1.25rem;
  }

  .button {
    min-height: var(--control-height-desktop);
    font-size: 0.84rem;
  }

  .search-field input {
    min-height: 3.05rem;
    font-size: 0.9rem;
  }

  .search-button {
    min-height: 1.95rem;
    font-size: 0.7rem;
  }

  .product-card__body {
    padding: 1rem;
  }

  .field input,
  .field select {
    font-size: 0.9rem;
  }
}

@media (min-width: 80rem) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 90rem) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1.5rem;
  }
}

@media (min-width: 100rem) {
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1.5rem;
  }
}

body.modal-open {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

html.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.image-viewer-open {
  overflow: hidden;
  touch-action: none;
}

body,
.app-main,
.catalog,
.modal,
.modal__dialog,
.cart-modal,
.product-modal__gallery {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body::-webkit-scrollbar,
.app-main::-webkit-scrollbar,
.catalog::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.modal__dialog::-webkit-scrollbar,
.cart-modal::-webkit-scrollbar,
.product-modal__gallery::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.legal-page .app-main {
  padding-top: 1rem;
  padding-bottom: 1.4rem;
}

.legal-main {
  max-width: 56rem;
}

.legal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

.legal-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 1.2rem;
}

.legal-actions .button {
  width: auto;
  min-width: 10rem;
}

.legal-content h1 {
  margin: 0 0 1rem;
  color: #1e355f;
  font-size: clamp(1.25rem, 2.7vw, 1.9rem);
  line-height: 1.2;
}

.legal-content h2 {
  margin: 1.1rem 0 0.58rem;
  color: #1f3f7f;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.28;
}

.legal-content p {
  margin: 0.5rem 0;
  color: #33455f;
  font-size: 0.95rem;
  line-height: 1.62;
}

.legal-content ul {
  margin: 0.45rem 0 0.7rem;
  padding-left: 1.15rem;
  color: #33455f;
}

.legal-content li {
  margin-bottom: 0.35rem;
  line-height: 1.52;
}

@media (max-width: 41.99rem) {
  .legal-page .app-header__inner {
    gap: 0.72rem;
  }

  .legal-page .logo span {
    font-size: 0.96rem;
  }

  .legal-card {
    padding: 0.92rem;
    border-radius: var(--radius-md);
  }

  .legal-actions .button {
    width: 100%;
  }
}

.notfound-page .app-main {
  padding-top: 1rem;
  padding-bottom: 1.6rem;
}

.notfound-main {
  min-height: calc(100dvh - 6rem);
  display: grid;
  place-items: center;
}

.notfound-card {
  width: min(100%, 34rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 1.15rem;
  text-align: center;
}

.notfound-code {
  margin: 0;
  color: #2f6fed;
  font-size: clamp(2.3rem, 8vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
}

.notfound-title {
  margin: 0.65rem 0 0.45rem;
  color: #1e355f;
  font-size: clamp(1.2rem, 3.2vw, 1.7rem);
  line-height: 1.2;
}

.notfound-text {
  margin: 0;
  color: #4c5e7c;
  font-size: 0.95rem;
  line-height: 1.45;
}

.notfound-actions {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.notfound-actions .button {
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (min-width: 62rem) {
  .modal__dialog--product {
    width: min(100%, 62rem);
  }

  .product-modal {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
      "hero content"
      "gallery content";
    column-gap: 1.5rem;
  }

  .product-modal__hero-wrap {
    grid-area: hero;
    height: 100%;
    min-height: 0;
  }

  .product-modal__gallery {
    grid-area: gallery;
    align-self: start;
  }

  .product-modal__content {
    grid-area: content;
    min-height: 0;
    padding: 1.3rem 1.5rem 1.4rem;
    gap: 0.9rem;
  }

  .product-modal__hero {
    height: 100%;
    max-height: none;
    min-height: 18rem;
  }

  .product-modal__name {
    font-size: 1.3rem;
  }

  .product-modal__price-row .product-card__price {
    font-size: 1.65rem;
  }

  .product-modal__gallery {
    --gallery-thumb-size: 3.75rem;
    --gallery-strip-height: 4.9rem;
  }

  .product-modal__actions {
    margin-top: 0.6rem;
    padding: 0.8rem 0.3rem 0.3rem;
  }

  .product-modal__actions .button--full {
    min-height: 3.2rem;
  }
}

@media (max-width: 61.99rem) {
  .product-modal__hero {
    background: #f2f6ff;
  }
}

/* ===== 2026-08-24 (UX hardening): единая высота control-ов нижней панели
   модалки товара на desktop (кнопка «В корзину» там 3.2rem). ===== */
@media (min-width: 62rem) {
  .product-modal__actions {
    --pm-control-h: 3.2rem;
  }
}

/* ===== 2026-08-24 (UX hardening): подсказка горизонтального свайпа =====
   Класс .swipe-hint-rail ставит swipe-hint.js (swipe-hint.js?v=20260824-ux)
   на горизонтальные ленты товаров с переполнением: мягкий fade по правому
   краю + однократный сдвиг содержимого влево на 10px и обратно (без bounce).
   Слой подсказки не перехватывает касания (pointer-events: none). */
.swipe-hint-rail {
  position: relative;
}

.swipe-hint-rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2.4rem;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.swipe-hint-rail.is-nudging > * {
  animation: swipe-hint-nudge 0.6s ease-in-out;
  will-change: transform;
}

@keyframes swipe-hint-nudge {
  0% {
    transform: translateX(0);
  }

  30% {
    transform: translateX(-10px);
  }

  100% {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .swipe-hint-rail.is-nudging > * {
    animation: none;
  }
}

/* Узкие экраны: компактная кнопка «Поделиться» и уменьшенный блок цены,
   чтобы тройка «В корзину → Поделиться → Цена» не вылезала за границы
   карточки. */
@media (max-width: 30rem) {
  .product-modal__copy-link {
    margin-left: 0.35rem;
    padding: 0 0.55rem;
    font-size: 0.76rem;
  }

  .product-modal__actions .button--full {
    font-size: 0.92rem;
  }

  .product-modal__sticky-price.is-visible {
    margin-left: 0.4rem;
    padding-left: 0.45rem;
  }

  .product-modal__sticky-price-value {
    font-size: 1.12rem;
  }

  .product-modal__price-label {
    font-size: 0.62rem;
  }
}

/* Каталожный футер: SEO-блок «О магазине» оформлен как подвал — интро,
   четыре карточки (ассортимент / доставка и оплата / адрес и часы /
   о компании с реквизитами ИП) и строка копирайта с политиками. Весь
   текст остаётся видимым (это SEO-контент), но структурирован вместо
   «стены текста». */
.catalog-footer {
  margin-top: 2.75rem;
  /* Низ вплотную к нижней навигации: лёгкий воздух (0.25rem) между последней
     строкой футера и панелью. */
  padding: 2.5rem 0 calc(0.25rem + var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: transparent; /* фон — как у страницы (body), без выделяющей подложки */
}

/* Футер в модалке «О нас»: внутри нет нижней навигации — убираем лишний
   нижний отступ, чтобы блок аккуратно завершал скролл модалки. */
.catalog-footer.about-modal-footer {
  margin-top: 2.25rem;
  padding: 2.25rem 0 1rem;
}

.catalog-footer__intro {
  max-width: 46rem;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.catalog-footer__intro h2 {
  margin: 0 0 0.6rem;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.35;
}

.catalog-footer__intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  /* Текст слегка «подсмыт»: полупрозрачный, но читаемый (и видимый для
     поисковиков — это SEO-контент). */
  opacity: 0.72;
}

.catalog-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.catalog-footer__card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .catalog-footer__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(24, 41, 77, 0.14);
  }
}

.catalog-footer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.45rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 0.9rem;
}

.catalog-footer__card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.catalog-footer__card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.72;
}

.catalog-footer__card p a {
  color: var(--accent);
  text-decoration: none;
}

.catalog-footer__card p a:hover {
  text-decoration: underline;
}

/* Карточка «О компании» с реквизитами — на всю ширину сетки */
.catalog-footer__card--about {
  grid-column: 1 / -1;
}

.catalog-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.catalog-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.catalog-footer__links a:hover {
  color: var(--accent);
}

@media (max-width: 56rem) {
  .catalog-footer__grid {
    grid-template-columns: 1fr;
  }
}
