/* ============================================================
   Product page v2 — стили (редизайн)
   Подключается из контроллера product.php только при ?v=2.
   Грузится ПОСЛЕ x-product.min.css → правила здесь перекрывают
   старые по каскаду.

   В этот проход вынесены стили только для «as-is» блоков:
   крошки, фото (главное + lightbox), мини-фото, доп. фото,
   наличие/артикул, название, цена/скидки, рейтинг,
   количество, корзина, wishlist, аккордеон-кнопка, похожие товары.

   НЕ включены (будут добавлены при миграции соответствующих блоков):
   - опции (HPMRR + select), product-meta
   - табы и контент описания / характеристик / отзывов
   - форма отзыва и звёзды для оценки
   ============================================================ */

/* === Защита от мобильного auto-zoom ===
   На мобильных некоторые 3rd-party виджеты (HPMRR Swiper со 35+ вариантами,
   sppro плитки с nowrap, и т.д.) рендерят контент шире viewport. Без этой защиты
   мобильный браузер видит body.scrollWidth > viewport и пересчитывает виртуальный
   viewport на ширину контента → media queries ломаются → страница «зум».
   `overflow-x: hidden` на body — стандартная defensive practice большинства
   современных сайтов, не считается костылём. Position:fixed/absolute попапы
   и тени НЕ страдают — они вне potoка. */
@media (max-width: 1024px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  /* Плитки sppro: в их CSS flex-wrap: nowrap при ≤991px — на мобиле распирает
     родителя при > 4 вариантах. Разрешаем wrap (это уже не костыль, а правильный фикс). */
  .section-content-product-groups .product-groups .product-group .product-group-products {
    flex-wrap: wrap !important;
  }
}

/* === Хлебные крошки === */
.breadcrumbs a {
  color: #4F4F4F;
  text-decoration: none;
  font-family: 'Century Gothic', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 5.5%;
}
.breadcrumbs a:hover {
  color: #28303a;
}

/* === Hero (главный двух-колоночный блок) ===
   .hero-section — растянут на весь экран, держит серый фон.
   .hero-section-inner — flex-контейнер с max-width 1920px и gap 40px,
   именно в нём фото и правая колонка стоят рядом. На >1920px экранах
   контент центрируется, серый фон продолжает заполнять края. */
.hero-section {
  position: relative;
  background-color: #F5F5F5;
}
.hero-section-inner {
  display: flex;
  /* width:100% — заполнять родителя (а не вставать на max-content содержимого:
     картинка + колонка = 1920, из-за чего контейнер переполнял окно и колонка
     уезжала за край). min-width:0 — чтобы этот flex-элемент мог ужиматься. */
  width: 100%;
  min-width: 0;
  max-width: 1920px;
  margin: 0 auto;
  gap: 40px;
}
.hero-section-bread-inner {
  margin: 0 auto;
  max-width: 1700px;
  padding: 20px 0;
}
.hero-section-content {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding-top: 70px;
}
@media (max-width: 1024px) {
  .hero-section-inner {
    flex-direction: column;
    gap: 0;
  }
  .hero-section-content {
    width: 100%;
    margin-top: 20px;
    padding-top: 20px;
  }
}

/* === Подробнее: отдельная секция под hero, контейнер 1660 (как сайт) === */
.product-details-section {
  width: 100%;
}
.product-details-inner {
  max-width: 1660px;
  margin: 0 auto;
  padding: 40px 20px;
}
@media (max-width: 1024px) {
  .product-details-inner {
    padding: 20px;
  }
}

/* Сетка двух колонок внутри раскрывающегося контента «Подробнее».
   Левая (Описание + Характеристики): max 960px, shrink-factor 2 — сжимается быстрее.
   Правая (Форма отзыва): max 600px, shrink-factor 1 — остаётся ближе к своему максимуму. */
.product-details-grid {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.product-details-grid__col {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}
.product-details-grid__col:first-child {
  flex: 0 2 960px;
  max-width: 960px;
}
.product-details-grid__col:last-child {
  flex: 0 1 600px;
  max-width: 600px;
}
@media (max-width: 1024px) {
  .product-details-grid {
    flex-direction: column;
    gap: 0;
    align-items: stretch; /* В column cross-axis = горизонталь, нужно растягивать колонки на 100% */
  }
  .product-details-grid__col {
    gap: 0;
  }
  .product-details-grid__col:first-child,
  .product-details-grid__col:last-child {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
  }
}

/* Карточка: заголовок (вне белого блока) + белый блок с padding 25/30 */
.product-detail-block {
  display: flex;
  flex-direction: column;
}
/* === Единая типографика заголовков (карточки «Подробнее» + секция отзывов).
   Один источник правды для всех заголовков на странице товара v2. === */
.product-detail-block__title,
.product-reviews-title {
  font-family: 'Century Gothic', sans-serif;
  font-size: 36px;
  font-weight: 700;
  line-height: 130%;
  color: rgba(79, 79, 79, 1);
  margin: 0 0 30px 0;
}

/* Заголовок-кнопка карточки добавляет к типографике поведение flex-кнопки:
   на ПК выглядит как статичный h2 (чеврон спрятан, карточка всегда видна),
   на мобилке становится кликабельной (см. media query ниже). */
.product-detail-block__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: default;
}
.product-detail-block__title-text {
  display: inline-block;
}
.product-detail-block__chevron {
  display: none;
  flex-shrink: 0;
  transition: transform 0.3s linear;
  color: #4F4F4F;
}

.product-detail-block {
  min-width: 0;
  max-width: 100%;
}
.product-detail-block__card {
  background-color: #fff;
  padding: 25px 30px;
  border-radius: 8px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  /* Разрешаем перенос длинных слов/URL чтобы не распирали карточку */
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
/* Дефолтный цвет текста описания. Без него em/strong/p наследуют зелёный
   от body.tw-text-primary (rgb(116,128,89)). Цвет задаём на контейнере, а не
   !important на тексте — тогда инлайновые цвета из админ-редактора остаются в приоритете. */
#card-description {
  color: #4F4F4F;
}
/* Содержимое описаний с картинок/таблиц часто не помещается на узких экранах — режем по ширине родителя */
.product-detail-block__card img,
.product-detail-block__card video,
.product-detail-block__card iframe {
  max-width: 100%;
  height: auto;
}
.product-detail-block__card table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
}
/* Атрибут = две явные колонки: название слева, значение справа. Через CSS-grid вместо flex,
   чтобы длинное значение переносилось ВНУТРИ правой колонки и не схлопывалось под название.
   minmax(0, 1fr) разрешает шринк колонки ниже её min-content (нужно для word-break). */
.product-detail-block__card .attribute-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px 12px;
  align-items: start;
}
.product-detail-block__card .attribute-item strong,
.product-detail-block__card .attribute-item span {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.product-detail-block__card .attribute-item span {
  width: auto;
  max-width: 100%;
  text-align: start;
}

/* Мобильная версия: каждая карточка — отдельный аккордеон. */
@media (max-width: 1024px) {
  /* Глобальная кнопка «Подробнее» не нужна — её роль берут на себя заголовки карточек.
     Контейнер аккордеона всегда раскрыт, JS-toggle глобальной кнопки игнорируется. */
  .section-content-accordeon-wrapper {
    display: none;
  }
  #product-details-content.details-accordion-content {
    max-height: none !important;
    overflow: visible !important;
  }

  /* Белая обводка вокруг всего блока (заголовок + карточка). При открытии карточки блок
     растягивается, поэтому нижний бордюр визуально «съезжает» под открытое содержимое.
     Чтобы между двумя соседними блоками был ОДИН общий бордюр, ставим только border-top
     на каждом + border-bottom на самом последнем блоке (форма отзыва). */
  .product-detail-block {
    width: 100%;
    border-top: 2px solid rgba(255, 255, 255, 1);
  }
  .product-details-grid__col:last-child .product-detail-block:last-child {
    border-bottom: 2px solid rgba(255, 255, 255, 1);
  }

  /* На мобилке размер уменьшается для всех заголовков сразу — карточек и секции отзывов */
  .product-detail-block__title,
  .product-reviews-title {
    font-weight: 400;
    font-size: 20px;
  }
  /* Карточка-аккордеон на мобилке — без margin-bottom (внутри идёт сама карточка),
     добавляется padding для увеличения тач-области и cursor: pointer для кликабельности. */
  .product-detail-block__title {
    margin-bottom: 0;
    padding: 14px 0;
    cursor: pointer;
  }
  /* Заголовок секции отзывов на мобилке держит свой margin-bottom для отделения от списка */
  .product-reviews-title {
    margin-bottom: 16px;
  }
  .product-detail-block__chevron {
    display: block;
    width: 14px;
    height: 9px;
  }
  .product-detail-block.is-open .product-detail-block__chevron {
    transform: rotate(180deg);
  }

  /* Карточка свёрнута по умолчанию, раскрывается через класс .is-open на родителе.
     Белый фон убираем когда закрыта — иначе при max-height:0 + border-radius браузер
     иногда рендерит тонкую полоску под заголовком. */
  .product-detail-block__card {
    max-height: 0;
    overflow: hidden;
    padding: 0 30px;
    background-color: transparent;
    border-radius: 0;
    transition:
      max-height 0.4s linear,
      padding 0.4s linear,
      background-color 0s linear 0.4s,
      border-radius 0s linear 0.4s;
  }
  .product-detail-block.is-open .product-detail-block__card {
    max-height: 2000px;
    padding: 25px 30px;
    margin-top: 12px;
    background-color: #fff;
    border-radius: 8px;
    transition:
      max-height 0.4s linear,
      padding 0.4s linear,
      background-color 0s linear 0s,
      border-radius 0s linear 0s;
  }
}
/* На очень узких экранах боковые padding'и карточки съедают слишком много места.
   ВАЖНО: на закрытом состоянии вертикаль обязательно 0, иначе карточка торчит из-под заголовка. */
@media (max-width: 500px) {
  .product-detail-block__card {
    padding: 0 16px;
  }
  .product-detail-block.is-open .product-detail-block__card {
    padding: 20px 16px;
  }
}

/* === Список отзывов: отдельная секция, всегда виден, не связан с кнопкой «Подробнее» === */
.product-reviews-section {
  width: 100%;
}
.product-reviews-inner {
  max-width: 1660px;
  margin: 0 auto;
  padding: 0 20px 40px 20px;
}
.product-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Белая карточка вокруг всего содержимого секции отзывов (саммари + сортировка + список).
   Заголовок секции остаётся снаружи (как у .product-detail-block — h2 над белым блоком). */
.product-reviews-card {
  background-color: #fff;
  padding: 25px 30px;
  border-radius: 8px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 500px) {
  .product-reviews-card {
    padding: 20px 16px;
  }
}

/* === Саммари отзывов: слева большая средняя оценка, справа распределение по 5..1 === */
.product-reviews-summary {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 32px;
}
.product-reviews-summary__avg {
  font-family: 'Century Gothic', sans-serif;
  font-weight: 700;
  font-size: 96px;
  line-height: 130%;
  color: rgba(79, 79, 79, 1);
}
.product-reviews-summary__breakdown {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}
.rating-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Century Gothic', sans-serif;
  font-size: 14px;
  line-height: 130%;
  color: rgba(79, 79, 79, 1);
}
.rating-row__stars {
  flex-shrink: 0;
}
.rating-row__percent {
  min-width: 40px;
}
.rating-row__count {
  color: rgba(126, 126, 126, 1);
}

@media (max-width: 1024px) {
  .product-reviews-summary {
    gap: 20px;
    margin-bottom: 20px;
  }
  .product-reviews-summary__avg {
    font-size: 48px;
  }
}

/* === Сортировка отзывов: лейбл + ряд кнопок-чипов === */
.product-reviews-sort {
  margin-bottom: 24px;
}
.product-reviews-sort__label {
  font-family: 'Century Gothic', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 130%;
  color: #000;
  margin: 0 0 12px 0;
}
.product-reviews-sort__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.product-reviews-sort__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(116, 128, 89, 1);
  border-radius: 999px;
  font-family: 'Century Gothic', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 130%;
  color: rgba(79, 79, 79, 1);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease;
}
.product-reviews-sort__btn:hover,
.product-reviews-sort__btn.is-active {
  background: linear-gradient(105.22deg, #BEC6A5 -11.84%, #BFD28B 14.08%, #BEC6A5 62.76%, #BFD28B 93.77%, #BEC6A5 129.99%);
  color: #fff;
}
.product-reviews-sort__btn--rating img {
  width: 14px;
  height: 14px;
  display: block;
}

/* Мобильный: лейбл уменьшается, кнопки переезжают в горизонтальный скролл (без переноса).
   overflow-x: auto + flex-wrap: nowrap; край без скроллбара — JS не нужен. */
@media (max-width: 1024px) {
  .product-reviews-sort {
    margin-bottom: 16px;
  }
  .product-reviews-sort__label {
    font-size: 14px;
  }
  .product-reviews-sort__buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px; /* запас для аутлайна при focus у крайних кнопок */
  }
  .product-reviews-sort__buttons::-webkit-scrollbar {
    display: none;
  }
  .product-reviews-sort__btn {
    padding: 8px 10px;
    font-size: 12px;
    flex-shrink: 0;
  }
}

/* === Карточка отзыва. Перекрывает старые правила из x-product.css/min.css:
   убираем тень, padding, белый фон (он теперь у .product-reviews-card),
   border-radius.
   ПК: 2 колонки grid (main + photos 224px).
   Mobile (≤1024): тот же .prod-comment превращается в 2x3 grid с template-areas,
   .prod-comment__main «плоский» через display: contents, чтобы его дети
   (head/meta/text) лезли в нужные ячейки grid. === */
.prod-comment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 224px;
  gap: 32px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.prod-comment + .prod-comment {
  margin-top: 32px;
}
.prod-comment__main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  max-width: 1000px;
}

/* --- Шапка карточки --- */
.prod-comment__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.prod-comment__name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* НЕ ставим min-width: 0 + flex: 1 1 auto — иначе при сжатой head
     name-wrap схлопывается до нуля (баг: «имя пропало»). По умолчанию
     flex-shrink: 1 + min-width: auto не даст name-wrap уйти ниже min-content. */
}
.prod-comment__name {
  font-family: 'Century Gothic', sans-serif;
  font-weight: 700;
  font-size: 36px;
  line-height: 130%;
  color: #000;
  /* Длинное имя может wrap-нуться на 2 строки — это нормально, звёзды останутся справа
     по align-items: center на .prod-comment__head, выровнены по центру вертикально. */
  word-break: break-word;
}
.prod-comment__approve {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}
/* Звёзды-картинки справа — никогда не должны ужиматься/деформироваться,
   даже если рядом длинное имя «отжимает» их к краю. */
.prod-comment__head .rating-stars {
  flex-shrink: 0;
}

/* Звёзды в шапке нужны только на мобиле. Селектор двойной (.rating-stars.X),
   потому что .rating-stars { display: inline-flex } определён ниже по файлу и
   при равной специфичности перебивает простой .X { display: none } по порядку. */
.rating-stars.prod-comment__stars-mobile { display: none; }

/* --- Meta-row: звёзды + (плюсы + минусы как 2 равные колонки grid).
   pros-cons теперь сам по себе grid 1fr 1fr — даже если один из блоков пустой,
   второй не смещается, сетка остаётся ровной. --- */
.prod-comment__meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.prod-comment__pros-cons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  gap: 24px;
}
.prod-comment__col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* --- Ряд 3: «Відгук» + тело (с обрезкой) --- */
.prod-comment__text-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Заголовки колонок (плюсы/минусы/відгук) — единый стиль */
.prod-comment__col-title {
  font-family: 'Century Gothic', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 100%;
  color: rgba(116, 128, 89, 1);
}

/* Тело плюсов/минусов/отзыва — единый стиль */
.prod-comment__col-text,
.prod-comment__text {
  font-family: 'Century Gothic', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0.055em;
  color: rgba(79, 79, 79, 1);
  margin: 0;
  word-break: break-word;
}

/* Текст отзыва с line-clamp до 4 строк. После клика на «Розгорнути»
   класс is-clamped снимается JS-ом → текст раскрывается полностью. */
.prod-comment__text {
  line-height: 1.5; /* для clamp нужна нормальная line-height; ниже компенсируем letter-spacing визуально */
}
.prod-comment__text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Кнопка «Розгорнути відгук» — текст слева + chevron справа. По умолчанию hidden,
   JS снимает атрибут hidden если текст реально обрезан. */
.prod-comment__expand {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: 'Century Gothic', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 130%;
  color: rgba(116, 128, 89, 1);
}
.prod-comment__expand img {
  width: 10px;
  height: auto;
  display: block;
}
/* display: inline-flex выше перекрывает дефолтное browser-style display: none
   у [hidden]. Явно возвращаем display: none, иначе hidden-кнопка остаётся видимой. */
.prod-comment__expand[hidden] {
  display: none;
}

/* --- Колонка 2: фото-слайдер. 224×224 на ПК. Если фото нет — колонка
   всё равно занимает 224px (резервирует место под слайдер).
   На мобиле пустая колонка скрывается, чтобы не было лишнего отступа. --- */
.prod-comment__photos {
  width: 224px;
  height: 224px;
}
.prod-comment__photos--empty {
  /* пустое зарезервированное место — ничего не рисуем */
  background: transparent;
}
.prod-comment__slider {
  position: relative;
  width: 224px;
  height: 224px;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
}
.prod-comment__slider-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.prod-comment__slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}
.prod-comment__slide {
  flex: 0 0 100%;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.prod-comment__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prod-comment__slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.prod-comment__slider-arrow img {
  width: 14px;
  height: auto;
  display: block;
}
.prod-comment__slider-arrow--prev { left: 8px; }
.prod-comment__slider-arrow--next { right: 8px; }
.prod-comment__slider-arrow[hidden] { display: none; }

/* Кнопка «Показати всі відгуки» — рисуется JS-ом если карточек больше 2 */
.product-reviews-show-all {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 24px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(116, 128, 89, 1);
  border-radius: 999px;
  font-family: 'Century Gothic', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 130%;
  color: rgba(79, 79, 79, 1);
  cursor: pointer;
  transition: background 0.3s ease;
}
.product-reviews-show-all:hover {
  background: linear-gradient(105.22deg, #BEC6A5 -11.84%, #BFD28B 14.08%, #BEC6A5 62.76%, #BFD28B 93.77%, #BEC6A5 129.99%);
}

/* === Мобильный/планшетный вариант (≤1024).
   Layout-перестановка:
     head    head            <- name+approve слева, звёзды справа
     photos  meta            <- 224 фото слева, плюсы/минусы колонкой справа
     text    text            <- тело отзыва на всю ширину (без заголовка «Відгук»)
   .prod-comment__main → display: contents (его head/meta/text становятся прямыми grid-children
   .prod-comment, чтобы их можно было разложить по grid-area).
   Когда у отзыва нет фото — добавляем .prod-comment--no-photos, который схлопывает
   grid в 1 колонку (иначе слева остаётся пустой 224px-блок). === */
@media (max-width: 1024px) {
  .prod-comment {
    grid-template-columns: minmax(0, 224px) minmax(0, 1fr);
    grid-template-areas:
      "head   head"
      "photos meta"
      "text   text";
    column-gap: 16px;
    row-gap: 16px;
  }
  .prod-comment--no-photos {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "meta"
      "text";
  }
  .prod-comment + .prod-comment {
    margin-top: 20px;
  }
  .prod-comment__main {
    display: contents;
    max-width: none;
  }
  .prod-comment__head      { grid-area: head; }
  .prod-comment__meta-row  { grid-area: meta; }
  .prod-comment__text-row  { grid-area: text; }
  .prod-comment__photos    { grid-area: photos; }

  /* Шапка: имя слева, звёзды справа */
  .prod-comment__head {
    justify-content: space-between;
  }
  .rating-stars.prod-comment__stars-mobile  { display: inline-flex; }
  .rating-stars.prod-comment__stars-desktop { display: none; }

  /* Meta на мобиле — колонкой (плюсы / минусы стек) */
  .prod-comment__meta-row {
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
  }
  .prod-comment__pros-cons {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .prod-comment__col {
    max-width: none;
  }

  /* Скрываем заголовок «Відгук» в блоке текста + кнопку «Розгорнути» уводим вправо */
  .prod-comment__review-heading {
    display: none;
  }
  .prod-comment__expand {
    align-self: flex-end;
  }

  /* Типографика */
  .prod-comment__name {
    font-size: 14px;
  }
  .prod-comment__approve {
    width: 15px;
    height: 15px;
  }
  .prod-comment__col-title {
    font-size: 10px;
  }
  .prod-comment__col-text,
  .prod-comment__text {
    font-size: 10px;
  }

  /* Фото — резиновое до 224, квадрат через aspect-ratio */
  .prod-comment__photos {
    width: 100%;
    max-width: 224px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .prod-comment__photos--empty {
    display: none;
  }
  .prod-comment__slider {
    width: 100%;
    height: 100%;
  }
}

/* На совсем узких экранах (<768) фото уменьшается до 100×100, чтобы оставить
   больше места под колонку с плюсами/минусами. Стрелки уезжают к самим краям
   фото и уменьшаются — иначе 32px-кнопка занимает почти треть 100px-фотки. */
@media (max-width: 767px) {
  .prod-comment {
    grid-template-columns: minmax(0, 100px) minmax(0, 1fr);
  }
  /* ВАЖНО: --no-photos должен остаться в 1 колонку даже на <768px.
     Без этого правила .prod-comment (более общее) перебивает --no-photos и
     ставит 2 колонки → grid-template-areas из 1-колонного --no-photos
     (head, meta, text) конфликтует → head попадает в первую 100px-колонку
     → имя в отзывах схлопывается до 100px и текст вертикальный. */
  .prod-comment--no-photos {
    grid-template-columns: minmax(0, 1fr);
  }
  .prod-comment__photos {
    max-width: 100px;
  }
  .prod-comment__slider-arrow {
    width: 20px;
    height: 20px;
  }
  .prod-comment__slider-arrow img {
    width: 8px;
  }
  .prod-comment__slider-arrow--prev { left: 0; }
  .prod-comment__slider-arrow--next { right: 0; }
}

/* === Главное фото === */
.hero-section-image {
  position: relative;
  background-color: #fff;
  display: flex;
  flex-basis: 60%;
  /* Без min-width:0 flex-элемент не сжимается ниже натуральной ширины картинки,
     поэтому в ряду (>1024px) фото держало размер, а правая колонка схлопывалась. */
  min-width: 0;
  max-width: 1120px;
  max-height: 840px;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
}
.hero-section-image-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #fff;
}
.hero-section-image-wrapper img {
  height: 100%;
  width: 100% !important;
  object-fit: cover;
  transition: opacity 0.3s ease;
  transform: scale(1);
  animation: zoomOut 10s ease forwards;
}
.section-content-thumbs-item img,
.hero-section-image-wrapper img {
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
@keyframes zoomOut {
  from { transform: scale(1.2); }
  to   { transform: scale(1); }
}
@media (max-width: 1024px) {
  /* КРИТИЧНО:
     1) min-width: 0 — разрешает flex-item шринкаться ниже min-content.
        По умолчанию flex-item.min-width = auto = min-content его содержимого.
        min-content картинки = её natural-width (1440-1920px из srcset),
        и эта величина «пропихивается» вверх по цепочке через width: 100% →
        inner растягивается до 1920 даже на 375 viewport.
     2) width: auto + max-width: 100% — НЕ width: 100%. В flex-column контексте
        с stretch (default align-items) элемент сам растянется к родителю по
        cross-axis. А с width: 100% браузер интерпретирует 100% как «найди
        размер родителя», но min-content родителя берётся из img.naturalWidth
        → петля даёт 1920. */
  .hero-section,
  .hero-section-inner,
  .hero-section-image,
  .hero-section-image-wrapper {
    min-width: 0 !important;
  }
  .hero-section-inner {
    width: auto !important;
    max-width: 100% !important;
  }
  .hero-section-image {
    flex-basis: auto !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    padding-top: 0;
  }
  .hero-section-image-wrapper {
    width: auto !important;
    max-width: 100% !important;
  }
  .hero-section-image-wrapper img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    object-fit: contain;
  }
}

/* === Стрелки навигации главного фото (на десктопе) === */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.hero-arrow:hover {
  opacity: 1;
}
.hero-arrow-prev { left: 20px; }
.hero-arrow-next { right: 20px; }
.hero-arrow img {
  width: 40px;
  height: 40px;
  display: block;
}

/* === Мобильные стикер/артикул поверх главного фото === */
.product-sticker-mobile {
  display: block;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
}
.product-code-mobile {
  display: block;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}
.product-model-mobile,
.product-model-mobile span {
  font-family: "Century Gothic", sans-serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 100%;
  letter-spacing: 5.5%;
  color: #7E7E7E;
}
@media (min-width: 1024px) {
  .product-code-mobile,
  .product-sticker-mobile {
    display: none;
  }
}

/* === Section content (правая колонка на ПК) === */
.section-content {
  display: flex;
  flex: 40%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
/* На ПК принудительно зануляем margin-bottom: auto, которое идёт из глобального
   x-product.min.css (грузится header.twig'ом раньше и применяет это правило на всех экранах).
   На мобилке оставляем оригинальное поведение — там layout всё равно другой. */
.section-content div:first-child {
  margin-bottom: 0;
}
@media (max-width: 1024px) {
  .section-content div:first-child {
    margin-bottom: auto;
  }
}
@media (max-width: 1024px) {
  .section-content {
    padding: 0;
  }
}

/* === Мини-фото (под названием на ПК; скрыто на мобилке) === */
.section-content-image-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}
.section-content-image {
  max-width: 250px;
  max-height: 250px;
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
  object-fit: cover;
}
.section-content-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
@media (max-width: 1024px) {
  .section-content-image-wrapper { display: none; }
}

/* === Наличие + стикер + артикул === */
.section-content-sticker-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 40px 0 0 0;
  width: 100%;
}
.section-content-sticker-wrapper .product-code {
  margin-left: auto;
}

.product-sticker {
  font-size: 14px;
  font-weight: 400;
  color: #7e7e7e;
}
.product-model {
  white-space: nowrap;
  color: #7e7e7e;
}
.product-model span {
  color: #9ca3af;
}

.product-stock-status {
  font-size: 14px;
}
.stock-status {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  font-weight: 700;
}
.stock-status.in-stock  { color: #28a745; }
.stock-status.out-of-stock { color: #dc3545; }

.pulse-dot {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}
.pulse-dot.pulse-green        { background-color: #28a745; }
.pulse-dot.pulse-green::before { background-color: #28a745; }
.pulse-dot.pulse-red          { background-color: #dc3545; }
.pulse-dot.pulse-red::before   { background-color: #dc3545; }

@keyframes pulse {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(2);   opacity: 0; }
}

@media (max-width: 1024px) {
  .product-code { display: none; }
}

/* === Название товара === */
.section-content-header-wrapper h1 {
  font-family: 'Century Gothic', sans-serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  color: #4F4F4F;
  padding: 0;
  margin-bottom: 16px;
}
@media (min-width: 350px) and (max-width: 768px) {
  .section-content-header-wrapper h1 { font-size: 18px; }
}
@media (min-width: 769px) and (max-width: 1023px) {
  .section-content-header-wrapper h1 { font-size: 26px; }
}
@media (min-width: 1024px) and (max-width: 1500px) {
  .section-content-header-wrapper h1 { font-size: clamp(18px, 2vw, 36px); }
}

/* === Доп. фото (миниатюры) === */
.section-content-thumbs-wrapper {
  position: relative;
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.section-content-thumbs-wrapper::-webkit-scrollbar { display: none; }
.section-content-thumbs-wrapper::after {
  content: attr(data-hint);
  position: absolute;
  bottom: -20px;
  left: 0;
  font-size: 12px;
  color: #999;
  opacity: 0;
  transition: opacity 0.3s;
}
.section-content-thumbs-wrapper:hover::after { opacity: 1; }

.section-content-thumbs-item {
  border-radius: 6px;
  width: 79px;
  height: 79px;
  flex: 0 0 79px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.section-content-thumbs-item:not(.active):not(.hover) { opacity: 0.7; }
.section-content-thumbs-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 768px) {
  .section-content-thumbs-item {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    min-width: 64px;
    min-height: 64px;
  }
}

/* На мобилке миниатюры идут первыми (order: -1) */
.special-order {
  order: -1 !important;
  justify-content: center;
  padding-bottom: 32px;
}
@media (min-width: 1024px) {
  .special-order {
    order: 0 !important;
    justify-content: start;
    padding-bottom: 0;
  }
}

/* === Цена + скидки === */
.product-protection {
  padding: 25px 0 0 0 !important;
}

.section-content-price-wrapper {
  width: 100%;
  margin-bottom: 8px;
  font-family: 'Century Gothic', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #4F4F4F;
}
.section-content-discounts-wrapper { width: 100%; }
.section-content-discounts {
  font-family: 'Century Gothic', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 100%;
  color: #748059;
  display: flex;
  align-items: center;
  gap: 2px;
}
@media (max-width: 768px) {
  .section-content-price-wrapper { font-size: 32px; }
  .section-content-discounts     { font-size: 20px; }
}
@media (max-width: 350px) {
  .section-content-price-wrapper { font-size: 16px; }
}

/* Тултип на индикаторе скидки */
.discount-tooltip-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.discount-tooltip-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
}
.discount-tooltip-trigger::before {
  content: '';
  position: absolute;
  bottom: 115%;
  margin-bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 11;
}
.discount-tooltip-trigger:hover::after,
.discount-tooltip-trigger:hover::before {
  opacity: 1;
  visibility: visible;
}
.discount-tooltip-trigger sup.q-mark {
  font-family: Arial, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  min-width: 13px;
  background-color: #748059;
  color: #ffffff;
  border-radius: 50%;
  font-size: 9px;
  font-weight: bold;
  vertical-align: super;
  margin-left: 3px;
  position: relative;
  top: -5px;
  line-height: 0;
  text-decoration: none;
}

/* === Управление количеством === */
.quantity-label {
  color: rgb(126, 126, 126);
  font-family: 'Century Gothic';
  font-size: 20px;
  font-weight: 400;
  line-height: 130%;
  display: block;
  padding-bottom: 0;
}
.quantity-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
}
.quantity-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s, transform 0.1s;
  user-select: none;
}
.quantity-btn:hover {
  background-color: #748059;
  color: white;
}
.quantity-btn:active   { transform: scale(0.95); }
.quantity-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.quantity-input {
  width: 60px !important;
  height: 32px;
  font-family: 'Century Gothic';
  color: #000;
  padding: 0 1rem;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  background: transparent;
  border: none;
  box-shadow: none;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}
@media (min-width: 1024px) {
  .quantity-input { height: 40px; }
}
.quantity-input:focus {
  outline: none;
  border-color: #748059;
  background-color: #fafafa;
}
.quantity-input.shake-animation    { animation: shake 0.3s; }
.quantity-input.highlight-change   { animation: highlight 0.3s; }
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.quantity-input[type=number] { -moz-appearance: textfield; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  75%      { transform: translateX(5px); }
}
@keyframes highlight {
  0%   { background-color: #fff; }
  50%  { background-color: #f0f8e6; }
  100% { background-color: #fff; }
}

/* === Рейтинг (звёзды и кол-во отзывов) === */
.product-info__rating-wrapper-pc {
  padding: 13px 0 0 0 !important;
  margin-right: auto;
  display: none;
}
.product-info__rating-wrapper-mobile {
  display: block;
  /* .section-content имеет align-items: center → принудительно прижимаем рейтинг влево */
  align-self: flex-start;
}

/* HPMRR-модуль и блок sppro — тот же горизонтальный «обнуль align-items», что и у рейтинга.
   Дополнительно — width: 100%, чтобы содержимое модулей могло занять колонку полностью. */
.section-content-hpmrr,
.section-content-product-groups {
  align-self: flex-start;
  width: 100%;
}

/* Sppro-модуль: дефолт плитки 56×72 слишком мелкий — поднимаем до 80×80.
   Селектор с .section-content-product-groups имеет 6 классов, перекрывает модульный (5). */
.section-content-product-groups .product-groups .product-group .product-group-products .product-group-product .group-image {
  width: 80px;
  height: 80px;
}
.section-content-product-groups .product-groups .product-group .product-group-products .product-group-product .group-image img {
  max-width: 64px;
  max-height: 64px;
}
@media (min-width: 1024px) {
  .product-info__rating-wrapper-pc     { display: block; }
  .product-info__rating-wrapper-mobile { display: none; }
}
.product-rating-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.product-rating-group--empty { opacity: 0.4; }
.product-rating-star {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.product-rating-count {
  margin-left: 6px;
  font-size: 16px;
  color: #7E7E7E;
  vertical-align: middle;
}
/* Кликабельный вариант — ссылка-якорь на секцию отзывов */
.product-rating-count--link {
  font-family: 'Century Gothic', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 130%;
  color: rgba(116, 128, 89, 1);
  border-bottom: 0.5px solid rgba(116, 128, 89, 1);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.product-rating-count--link:hover {
  opacity: 0.8;
}

/* === Корзина + количество + wishlist (правый ряд кнопок) === */
.section-content-buttons-wrapper {
  display: flex;
  align-items: center;
  justify-content: start;
  padding: 0;
  width: 100%;
  margin-top: 20px;
  margin-bottom: 20px;
  gap: 32px;
}
.buttons-right-side {
  display: flex;
  align-items: center;
  gap: 20px;
}
/* Quantity-блок справа от кнопки корзины — только на ПК (≥1280, xl).
   До этого размера используется второй экземпляр блока в .product-protection. */
.buttons-right-side .quantity-selector-block {
  display: none;
}
@media (min-width: 1280px) {
  .buttons-right-side .quantity-selector-block {
    display: flex;
    align-items: center;
    gap: 12px;
  }
}
@media (max-width: 1024px) {
  .section-content-buttons-wrapper { padding: 0; }
}
@media (min-width: 1024px) {
  .section-content-buttons-wrapper { margin-bottom: 0; }
}
.section-content-accordeon-wrapper {
  padding-left: 0;
}
@media (max-width: 480px) {
  .section-content-buttons-wrapper {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
}

/* Hover для кнопки корзины (если используется .btn-cart-стили) */
.btn-cart:hover:not(:disabled) {
  background: rgba(215, 181, 109, 1);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.btn-cart:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

/* === Wishlist кнопка === */
.wishlist-button-container {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  flex-shrink: 0;
  background: transparent;
  padding: 0;
  box-sizing: border-box;
}
.wishlist-button-container:hover { background-color: #f5f5f5; }
.wishlist-button-container button {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.wishlist-button-container button img {
  display: block;
  width: 40px;
  height: 40px;
  pointer-events: none;
}

/* === Кнопка «Подробнее» + аккордеон === */
.section-content-accordeon-wrapper {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  font-family: 'Century Gothic', sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 130%;
  letter-spacing: 5%;
  margin-top: 30px;
  padding-left: 0;
}
.section-content-accordeon-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  font-weight: 500;
  width: 100%;
}
.section-content-accordeon-button img {
  transition: transform 0.4s ease;
}
.section-content-accordeon-button.active img {
  transform: rotate(90deg);
}
.details-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
  display: block;
}
.details-accordion-content.is-open {
  overflow-y: auto;
  max-height: none !important;
}
@media (max-width: 1024px) {
  .details-accordion-content { padding-left: 0; }
}
@media (max-width: 768px) {
  .section-content-accordeon-button {
    display: none !important;
  }
  .details-accordion-content {
    max-height: none !important;
    overflow: visible !important;
  }
}

/* === Адаптивные сбросы padding для всей правой колонки === */
@media (max-width: 1024px) {
  .section-content-sticker-wrapper,
  .section-content-header-wrapper h1,
  .section-content-thumbs-wrapper,
  .section-content-price-wrapper,
  .section-content-discounts-wrapper,
  .section-content-buttons-wrapper {
    padding: 0;
  }
}

/* === Lightbox для главного фото === */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-overlay.show {
  opacity: 1;
  visibility: visible;
}
.lightbox-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
}
.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 2.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  z-index: 10001;
  transition: transform 0.2s ease;
}
.lightbox-close:hover { transform: scale(1.1); }

#lightbox-carousel .item img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .lightbox-content {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
  }
  .lightbox-close {
    top: 15px;
    right: 15px;
    font-size: 2rem;
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  }
}

/* === Toast-уведомления + cart-badge (используются add-to-cart JS) === */
.cart-toast {
  position: fixed;
  top: 90px;
  right: 20px;
  background: #fafafa;
  color: #4b4b4b;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
  transform: translateX(calc(100% + 20px));
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.cart-toast.show {
  transform: translateX(0);
  opacity: 1;
  animation: slideInBounce 0.6s ease-out;
}
@keyframes slideInBounce {
  0%   { transform: translateX(calc(100% + 20px)); opacity: 0; }
  60%  { transform: translateX(-10px); opacity: 1; }
  80%  { transform: translateX(5px); }
  100% { transform: translateX(0); }
}
.cart-toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.cart-toast-message {
  flex: 1;
  font-family: 'Century Gothic', sans-serif;
  font-size: 14px;
  line-height: 1.4;
}
.cart-toast-product { font-weight: 600; }

.cart-badge {
  box-sizing: border-box;
  position: absolute;
  font-family: 'Century Gothic', sans-serif;
  top: -8px;
  right: -8px;
  background: #B3261E;
  color: white;
  border-radius: 10px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.cart-badge.show {
  opacity: 1;
  transform: scale(1);
}
.cart-badge.pulse {
  animation: pulse 0.5s ease-out;
}

#openCartBtn { position: relative; }

@media (max-width: 768px) {
  .cart-toast {
    right: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }
  .cart-badge {
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    border-radius: 9px;
  }
}

/* === Похожие товары (Owl-карусель) === */
.related-products-carousel .owl-stage-outer { overflow: hidden; }
.related-products-carousel .owl-stage { display: flex; }
.related-products-carousel .owl-item { float: left; }

.related-products-carousel .owl-nav,
.related-products-carousel .owl-dots {
  display: none;
}

.related-products-prev-owl.disabled,
.related-products-next-owl.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.related-products-prev-owl:not(.disabled),
.related-products-next-owl:not(.disabled) {
  opacity: 1;
}
.related-products-prev-owl:hover:not(.disabled),
.related-products-next-owl:hover:not(.disabled) {
  opacity: 0.8;
}

.related-products-counter {
  font-family: 'Trajan Pro 3', serif;
  color: rgba(116, 128, 89, 1);
  user-select: none;
  display: flex;
  align-items: baseline;
}
.related-products-counter .related-current-slide {
  font-size: 60px;
  line-height: 1;
}
.related-products-counter .related-total-slides {
  font-size: 20px;
  line-height: 1;
}

/* ============================================================
   v2: Форма отзыва (новый дизайн)
   ============================================================ */

/* Между всеми блоками формы — единый отступ 20px через flex-gap. Чистим все margin'ы
   на прямых детях формы (включая глобальное `.prod-field:not(:first-child):not(:last-child)`). */
.product-detail-block__card .prod-add-review-desktop {
  gap: 20px;
}
.product-detail-block__card .prod-add-review-desktop > .prod-field,
.product-detail-block__card .prod-add-review-desktop > .review-form__intro,
.product-detail-block__card .prod-add-review-desktop > .review-form__rate,
.product-detail-block__card .prod-add-review-desktop > .review-form__submit {
  margin-top: 0;
  margin-bottom: 0;
}
/* Внутри .prod-field (label + input/textarea/upload-zone) тоже единые 20px между элементами */
.product-detail-block__card .prod-add-review-desktop .prod-field {
  gap: 20px;
}

.review-form__intro {
  font-family: 'Century Gothic', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 130%;
  color: rgba(79, 79, 79, 1);
}
@media (max-width: 1024px) {
  .review-form__intro {
    font-size: 15px;
  }
}

.review-form__rate {
  /* CSS-переменные дублируются здесь (а не только на .rating-stars), чтобы их видел
     .rating-stars__legend — он сосед .rating-stars, а CSS-vars наследуются только по DOM-цепочке. */
  --star-w: 44px;
  --star-h: 42px;
  --star-gap: 17px;
}
@media (max-width: 1024px) {
  .review-form__rate {
    --star-w: 24px;
    --star-h: 22px;
    --star-gap: 8px;
  }
}
.review-form__rate-label {
  font-family: 'Century Gothic', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 130%;
  color: rgba(79, 79, 79, 1);
  margin: 0 0 12px 0;
}

/* === Виджет звёзд рейтинга (используется и для ввода, и для отображения).
   Поддерживает partial-fill (нужно для дробных оценок типа 4.7). Каждая звезда —
   контейнер с двумя слоями: outline (фон) и fill (overlay с width: N% и overflow: hidden).
   Размеры регулируются CSS-переменными --star-w/--star-h на корневом .rating-stars. === */
.rating-stars {
  --star-w: 44px;
  --star-h: 42px;
  --star-gap: 17px;
  display: inline-flex;
  align-items: center;
  gap: var(--star-gap);
}
.rating-stars--small { /* в карточках отзывов */
  --star-w: 22px;
  --star-h: 21px;
  --star-gap: 3px;
}
@media (max-width: 1024px) {
  .rating-stars {
    --star-w: 24px;
    --star-h: 22px;
    --star-gap: 8px;
  }
  .rating-stars--input {
    margin-left: 6px;
  }
  .rating-stars--small {
    --star-w: 18px;
    --star-h: 17px;
  }
}

.rating-star {
  position: relative;
  display: block;
  width: var(--star-w);
  height: var(--star-h);
  padding: 0;
  background: none;
  border: none;
  flex-shrink: 0;
}
.rating-stars--input .rating-star {
  cursor: pointer;
}
.rating-stars--display .rating-star {
  cursor: default;
}
.rating-star__outline {
  display: block;
  width: var(--star-w);
  height: var(--star-h);
}
.rating-star__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: var(--star-h);
  overflow: hidden;
  pointer-events: none;
  transition: width 0.15s linear;
}
.rating-star__fill img {
  display: block;
  width: var(--star-w);
  height: var(--star-h);
  max-width: none; /* перекрываем глобальный max-width: 100% на картинках в карточке */
}

/* Легенда «Погано / Відмінно» под звёздами — CSS-grid с 5 колонками точно под звёздами.
   Лейблы кладём в столбцы 1 и 5, текст центрируется внутри колонки → центр слова
   совпадает с центром звезды (1 и 5 соответственно). Ширина и gap идентичны .rating-stars,
   поэтому ряды всегда выровнены, независимо от ширины родителя. */
.rating-stars__legend {
  display: grid;
  grid-template-columns: repeat(5, var(--star-w));
  column-gap: var(--star-gap);
  width: max-content; /* Жёстко ограничиваем шириной 5 колонок + 4 gap'а — иначе grid тянется на всю ширину родителя */
  margin-top: 6px;
  font-family: 'Century Gothic', sans-serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 130%;
  color: rgba(79, 79, 79, 1);
}
.rating-stars__legend > span {
  text-align: center;
  white-space: nowrap;
}

/* === Блок загрузки фотографий === */
.review-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Century Gothic', sans-serif;
  font-size: 16px;
  color: #4F4F4F;
  cursor: pointer;
}
.review-upload-label img {
  width: 15px;
  height: 15px;
}

.review-upload {
  position: relative;
  border: 1px solid rgba(217, 217, 217, 1);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.review-upload.is-dragover {
  border-color: #748059;
  background-color: rgba(116, 128, 89, 0.06);
}
.review-upload__input {
  display: none;
}
.review-upload__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.review-upload__top .review-upload__hint {
  text-align: right;
}
.review-upload__btn {
  display: inline-block;
  padding: 4px 6px;
  background: #748059;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Century Gothic', sans-serif;
  font-size: 14px;
  font-weight: 400;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}
.review-upload__btn:hover {
  background: #5d6647;
}
.review-upload__hint {
  font-family: 'Century Gothic', sans-serif;
  font-size: 13px;
  line-height: 130%;
  color: #7e7e7e;
  margin: 0;
}
@media (max-width: 768px) {
  .review-upload__hint {
    font-weight: 400;
    font-size: 7px;
    line-height: 130%;
    letter-spacing: 0;
  }
}
.review-upload__previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.review-upload__previews:empty {
  margin-top: 0;
}
.review-upload-preview {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
}
.review-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.review-upload-preview__remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.review-upload-preview__remove:hover {
  background: rgba(0, 0, 0, 0.9);
}
.review-upload__error {
  color: #dc3545;
  font-size: 13px;
  margin: 8px 0 0 0;
  font-family: 'Century Gothic', sans-serif;
}

/* Кастомный чекбокс в v2-форме: белый фон по умолчанию, зелёный при отмеченном состоянии.
   Глобальный x-product.min.css задаёт серый фон — перекрываем через scoping на card'е. */
.product-detail-block__card .custom-checkbox-wrapper label {
  background: #fff;
  border: 1px solid rgba(217, 217, 217, 1);
}
.product-detail-block__card .custom-checkbox-wrapper input:checked + label {
  background: rgba(116, 128, 89, 1);
  border-color: rgba(116, 128, 89, 1);
}

/* Перекрываем глобальные бордюры инпутов/текстарь внутри карточки формы отзыва в v2.
   Все поля одного оттенка (rgba(217,217,217,1)) — и однострочные input, и textarea. */
.product-detail-block__card .prod-field__input,
.product-detail-block__card .prod-field__area {
  border: 1px solid rgba(217, 217, 217, 1);
}

/* Плейсхолдеры: тот же тонкий серый. На ПК 16px / 100% / letter-spacing 5.5%, на мобилке 12px.
   Дублируем правила для каждого селектора браузера — иначе любой нераспознанный селектор
   валидирует только себя и портит всё правило. */
.product-detail-block__card .prod-field__input::placeholder,
.product-detail-block__card .prod-field__area::placeholder {
  color: rgba(217, 217, 217, 1);
  opacity: 1; /* Firefox по умолчанию даёт 0.54 */
  font-family: 'Century Gothic', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0.055em; /* 5.5% */
}
@media (max-width: 1024px) {
  .product-detail-block__card .prod-field__input::placeholder,
  .product-detail-block__card .prod-field__area::placeholder {
    font-size: 12px;
  }
}

/* Submit-кнопка отзыва — v2-специфичный класс (чтобы легаси ReviewsController из product-page.js
   не цеплялся за неё через `.prod-btn-submit-desktop`). Стиль скопирован из глобального CSS. */
.review-form__submit {
  display: inline-block;
  padding: 14px 60px;
  color: #fff;
  font-family: 'Century Gothic', sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 120%;
  border: none;
  border-radius: 54px;
  box-shadow: 0px 10px 16px 0px rgba(75, 75, 75, 0.45);
  background: #748059;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
@media (max-width: 1024px) {
  .review-form__submit {
    padding: 8px 40px;
    align-self: center;
  }
}
.review-form__submit:hover {
  background: #5d6647;
}
.review-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
