/*
 * Назначение: Стили первого экрана карточки товара (Hero section, галерея, корзина, инфо-блоки)
 */

body {
  overflow-x: hidden;
}

.product-hero {
  padding-bottom: 20px;
}

.product-hero__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.product-hero__card {
  background: var(--color-light);
  border-radius: 16px;
  padding: 20px;
}

/* Gallery overrides for card */
.product-hero__gallery {
  overflow: hidden;
  position: relative;
  /* узкий паддинг: картинка занимает почти всю карточку, как в каталоге */
  padding: 8px;
}

/* Gallery overlays (badges and favorite button) */
.product-hero__badges {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.product-hero__gallery-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.product-hero__gallery-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .product-hero__gallery-action-btn:hover {
    background-color: #fff;
  }
}

.product-hero__gallery-action-btn:active {
  transform: scale(0.92);
  background-color: var(--color-light);
}

.product-hero__gallery-action-btn img {
  width: 20px;
  height: 20px;
}

/* Mobile & Tablet */
@media (max-width: 1023px) {
  .product-hero__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "gallery info"
      "cart cart";
  }
  .product-hero__gallery {
    grid-area: gallery;
  }
  .product-hero__info {
    grid-area: info;
  }
  .product-hero__cart {
    grid-area: cart;
  }
  .product-hero__bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .product-hero__bottom .product-hero-group {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 767px) {
  .product-hero__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "gallery"
      "info"
      "cart";
  }
  .product-hero__bottom {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .product-hero__bottom .product-hero-group {
    border-bottom: 1px solid #e3e3e6;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }
}

/* Product hero group */

.product-hero-group {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e3e3e6;
}

.product-hero__info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Specifications */
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
  border-bottom: 1px dashed #e3e3e6;
}

.spec-row:last-of-type {
  margin-bottom: 0;
}

.spec-row span:first-child {
  color: var(--color-gray);
}

.spec-row span:last-child {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
}

.spec-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-blue);
  margin-top: 12px;
  text-decoration: none;
  font-weight: var(--fw-medium);
}

/* Addons */
.product-hero__addon {
  margin-bottom: 6px;
}
.product-hero__addon:last-child {
  margin-bottom: 0;
}

.product-hero__info-bottom {
  margin-top: auto;
}

.product-hero__addon-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  margin-bottom: 8px;
}

/* Stones custom select UI */
.product-hero__select-wrapper {
  position: relative;
}

.product-hero__select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color-base);
  border-radius: 8px;
  appearance: none;
  background: #fff;
  font-size: var(--fs-md);
  cursor: pointer;
}

.product-hero__select-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* --- RIGHT COLUMN REFACTOR (BEM) --- */

/* Группа 1: Топ экшены */
.product-hero__cart {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.product-hero__cart .product-hero-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.product-hero__top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.product-hero__compare-badge {
  background: #f4f4f4;
  padding: 6px 8px;
  border-radius: 6px;
  user-select: none;
}

.product-hero__compare-badge .checkbox {
  gap: 6px;
}

.product-hero__compare-badge .checkbox__box {
  width: 16px;
  height: 16px;
}

.product-hero__compare-badge .checkbox__input:checked + .checkbox__box::after {
  border-width: 0 1px 1px 0;
  /* top/left явно: wishlist-actions.css ставит этой же галочке top: -1px — с отрицательным
     полем она улетала за верх квадрата (доводка аудита 27.10) */
  top: 50%;
  left: 50%;
  margin: -5.5px 0 0 -2.5px;
  width: 4px;
  height: 8px;
}

.product-hero__compare-badge .checkbox__text {
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
}
.product-hero__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-md);
}
.product-hero__rating-icon {
  width: 14px;
  height: 14px;
}
.product-hero__reviews {
  color: var(--color-blue);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .product-hero__reviews:hover {
    text-decoration: underline;
  }
}

.product-hero__status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-md);
  color: var(--color-gray);
}
.product-hero__status {
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-hero__status--available {
  color: #00b14f;
}
.product-hero__status-dot {
  width: 6px;
  height: 6px;
  background: #00b14f;
  border-radius: 50%;
}

.product-hero__sku {
  font-size: var(--fs-md);
}

/* Группа 2: Цены */
.product-hero__price-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.product-hero__price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.product-hero__price-current {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-none);
}
.product-hero__price-currency {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-semibold);
}
.product-hero__price-old {
  font-size: var(--fs-xl);
  color: #999;
  text-decoration: line-through;
  margin-left: 8px;
}
.product-hero__lower-price {
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: var(--color-blue);
  text-decoration: underline;
}

/* Группа 3: Аддоны (динамические блоки) */
.product-hero__addons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-hero__addon-selected {
  display: grid;
  grid-template-columns: auto 1fr minmax(auto, 95px);
  gap: 12px;
  align-items: center;
  background: #f5f9fc;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.product-hero__addon-selected-info {
  font-size: var(--fs-md);
  line-height: var(--lh-tight);
}
.product-hero__addon-selected-price-col {
  text-align: right;
}
.product-hero__addon-selected-price {
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
  margin-bottom: 2px;
}
.product-hero__addon-selected-sub {
  font-size: var(--fs-sm);
  color: var(--color-gray);
}
.product-hero__addon-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-md);
  gap: 8px;
}
.product-hero__addon-simple-name {
  color: #333;
}
.product-hero__addon-simple-price {
  color: var(--color-gray);
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.product-hero__addon-simple-val {
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  color: #333;
  margin-left: 4px;
}

/* Группа 4: Итого и кнопки */
.product-hero__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.product-hero__total-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
}
.product-hero__total-price {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semibold);
}

.product-hero__cart-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(min-content, 1fr));
  gap: 10px;
}

.product-hero__add-to-cart,
.product-hero__fast-buy {
  height: 40px;
  padding: 8px 12px;
}
.product-hero__fast-buy {
  font-size: var(--fs-sm);
}

/* Запрос в корзину: тот же вид, что у плитки каталога (bridge-2026.css, раздел 10
   «Состояние кнопки В корзину на время запроса») — кнопка остаётся акцентной,
   метка и иконка гаснут, по центру белое кольцо card-cart-spin (оно объявлено в
   bridge-2026.css, он подключён на всех страницах). Класс .animation вешает и
   снимает addToCart() в script2.js. Крючок один для обоих видов корзины hero:
   addtocart.php и addtocart_units.php. pointer-events — чтобы второй клик не
   отправил товар дважды, как у маленькой плитки. */
.product-hero__add-to-cart.animation {
  position: relative;
  background: var(--color-accent);
  color: transparent;
  pointer-events: none;
}
.product-hero__add-to-cart.animation .button__icon {
  opacity: 0;
}
.product-hero__add-to-cart.animation::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid var(--color-light);
  border-top-color: transparent;
  border-radius: 50%;
  animation: card-cart-spin 0.6s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .product-hero__add-to-cart.animation::after {
    animation-duration: 1.8s;
  }
}

/* Группа 5 и 6: Инфо (Доставка, Оплата) */
.product-hero__bottom {
  margin-top: auto;
}

.product-hero__info-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  align-items: start;
}
.product-hero__info-icon {
  width: 24px;
  height: 24px;
  display: flex;
}
.product-hero__info-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-hero__info-action {
  align-self: center;
  grid-column: 2 / 3;
}
.product-hero__info-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
}
.product-hero__info-badge {
  display: inline-block;
  background: #8f36c5;
  color: white;
  font-size: var(--fs-md);
  padding: 3px 8px;
  margin-block: 2px;
  border-radius: 4px;
}
.product-hero__info-desc {
  font-size: var(--fs-md);
  line-height: var(--lh-tight);
  color: #333;
}
.product-hero__info-link {
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: #3696c5;
  text-decoration: underline;
  white-space: nowrap;
}

/* Info Banner */
.product-hero__banner {
  margin-top: 20px;
  padding: 16px 24px;
  background: white;
  border: 1px solid #ffd54f;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: var(--fs-lg);
}

.product-hero__banner a {
  color: var(--color-blue);
  text-decoration: underline;
}

/* Hidden legacy inputs container */
.product-hero__legacy-hidden {
  display: none !important;
}

/* Dynamically injected legacy elements (.added-prod) */
.added-prods {
  margin-top: 16px;
}
.added-prod {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 8px;
}
.added-prod_title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.added-prod_title-check {
  color: var(--color-accent);
}
.added-prod_price {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
}

/* Premium Slick Product Gallery - Horizontal & Synced */
.card-main_body {
  display: flex; /* Standard block flow to prevent Slick flex bugs! */
  flex-direction: column;
  overflow: hidden; /* Prevent horizontal overflow from sliders and navigation */
  height: 100%;
}

/* Main Image Slider */
.card-main_slick-one {
  position: relative;
  border-radius: 8px;
  background: var(--color-light);
  overflow: hidden;
  /* Кадр вертикальный 3:4 и не тянется: карточки грида идут stretch, поэтому
     рост правой колонки (галочки доп.услуг) раньше вытягивал слайдер и
     менял кадрирование — фото "уезжало". Высоту теперь задаёт собственная
     ширина слайдера, а не соседние колонки. */
  flex: 0 0 auto;
  aspect-ratio: 3 / 4;
  margin-bottom: 8px;
  /* -4px гасят внешний паддинг слайдов: картинка встаёт ровно на 8px от края
     карточки, как миниатюры снизу, а между слайдами остаётся зазор 8px */
  margin-inline: -4px;
}

.card-main_slick-one .slick-list,
.card-main_slick-one .slick-track,
.card-main_slick-one .slick-slide {
  height: 100%;
}

/* 8px между соседними слайдами: по 4px паддинга с каждой стороны.
   Слайду slick задаёт ширину инлайном, box-sizing: border-box её сохраняет. */
.card-main_slick-one .slick-slide {
  padding: 0 4px;
}

.card-main_slick-one a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0;
  outline: none;
  background: var(--color-light);
  text-decoration: none;
  cursor: zoom-in;
  border-radius: 8px;
  overflow: hidden;
}

.card-main_slick-one img {
  width: 100%;
  height: 100%;
  /* cover, а не contain: фото занимает кадр целиком, без полей по краям.
     Карточки товара вертикальные 3:4 — под этот кадр они и сняты. */
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

/* Horizontal Thumbnails Slider */
.card-main_slick-two {
  position: relative;
  padding: 0 44px; /* Space for absolute navigation arrows */
  margin-top: 12px;
}

.card-main_slick-two .slick-list {
  overflow: hidden;
}

.card-main_slick-two .slick-track {
  display: flex !important;
  gap: 8px;
  justify-content: center;
}

.card-main_slick-two .slick-slide {
  outline: none;
  padding: 4px 0;
}

.card-main_slick-two button {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  border: 1.5px solid var(--border-color-base);
  transition: all 0.25s ease;
  padding: 4px;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  margin: 0 auto;
}

@media (hover: hover) and (pointer: fine) {
  .card-main_slick-two button:hover {
    border-color: var(--color-blue);
  }
}

.card-main_slick-two .slick-slide.slick-current button {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 2.5px rgba(54, 150, 197, 0.2);
}

.card-main_slick-two button img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Horizontal Slick Nav Arrows */
.card-main_slick-two .slick-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--color-blue); /* Beautiful blue color from mockup */
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  padding: 0;
}

@media (hover: hover) and (pointer: fine) {
  .card-main_slick-two .slick-arrow:hover {
    color: #257ba5;
    transform: translateY(-50%) scale(1.1);
  }
}

.card-main_slick-two .slick-prev {
  left: 4px;
}

.card-main_slick-two .slick-next {
  right: 4px;
}

.card-main_slick-two .slick-arrow.slick-disabled {
  opacity: 0.25;
  pointer-events: none;
}

/* Dots for mobile view */
.card-main_slick-one .slick-dots {
  display: none !important;
}

/* Mobile & Tablet Overrides */
@media (max-width: 767px) {
  .card-main_slick-one,
  .product-hero--kupeli .card-main_slick-one {
    margin-bottom: 0;
  }
}

.product-price-currency {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  margin-left: 4px;
}

.added-prods-list {
  margin-bottom: 24px;
  font-size: var(--fs-md);
}

.total-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color-base);
  padding-top: 16px;
  margin-bottom: 24px;
}

.total-title {
  font-weight: var(--fw-semibold);
}

#addedPrice {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
}

/* ── Gallery Nav (static thumbnail pagination with arrows) ── */
.gallery-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  max-width: 100%;
}

/* Аудит P3.1: лента — обычная прокрутка (data-drag-scroll: протяжка мышью, дымка по краям).
   scroll-behavior: smooth снят — с ним каждый шаг протяжки мышью уезжал анимацией и лента
   отставала от курсора; докрутку к активной миниатюре плавной делает сам gallery.js.
   Короткая лента — по центру через auto-поля крайних миниатюр: в отличие от
   justify-content: center, при переполнении они схлопываются и начало ленты не обрезается. */
.gallery-nav__strip {
  display: flex;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
  overscroll-behavior-x: contain; /* упёрлись в край — страница и «Назад» по истории не трогаются */
  scrollbar-width: none; /* Hide scrollbar for Firefox */
  max-width: 284px; /* 5 items * 48px + 4 gaps * 8px + 12px padding = 284px */
  padding: 4px 6px; /* Give room for active shadow and border-box */
  margin: 0 auto;
  min-width: 0; /* Allow the strip to shrink on small screens without overflowing */
}

.gallery-nav__strip::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.gallery-nav__item:first-child {
  margin-left: auto;
}

.gallery-nav__item:last-child {
  margin-right: auto;
}

.gallery-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-light);
  border: var(--border-base-light);
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-nav__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-nav__item:hover {
    border-color: var(--color-blue-hover);
  }
}

.gallery-nav__item.is-active {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 2px rgba(54, 150, 197, 0.25);
}

.gallery-nav__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 100%;
  border: var(--border-base);
  background: #fff;
  cursor: pointer;
  color: var(--color-blue);
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease,
    transform var(--dur-press) var(--ease-out);
}

/* Нажатие подтверждается до того, как отработает обработчик */
.gallery-nav__arrow:active {
  transform: scale(0.92);
}

@media (hover: hover) and (pointer: fine) {
  .gallery-nav__arrow:hover {
    border-color: var(--color-blue);
    color: #257ba5;
  }
}

.gallery-nav__arrow.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

@media (max-width: 767px) {
  .gallery-nav__item {
    width: 48px;
    height: 48px;
  }
  .gallery-nav__arrow {
    width: 32px;
    height: 32px;
  }
}

/* ── Видео в галерее (2026-10-21) ──
   Кадр видео до нажатия — обложка и круглая «▶» по центру; по нажатию gallery.js ставит
   в кадр плеер (iframe VK / Rutube или <video>), фон кадра чёрный: ролик горизонтальный,
   кадр 3:4 — поля сверху и снизу. Моторика — только у кнопки: наведение и нажатие. */
.card-main_slick-one a.product-video {
  position: relative;
  cursor: pointer;
}

.card-main_slick-one a.product-video.is-playing {
  cursor: auto;
  background: #000;
}

.product-video__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.62);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  transition:
    transform var(--dur-enter) var(--ease-out),
    background-color var(--dur-enter) var(--ease-out);
}

/* Треугольник смещён вправо: визуальный центр, а не геометрический */
.product-video__play svg {
  margin-left: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .card-main_slick-one a.product-video:hover .product-video__play {
    transform: scale(1.06);
    background: rgba(17, 17, 17, 0.78);
  }
}

.card-main_slick-one a.product-video:active .product-video__play {
  transform: scale(0.94);
  transition-duration: var(--dur-press);
}

.product-video__player {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
  background: #000;
  object-fit: contain;
}

.gallery-nav__item--video {
  position: relative;
}

.gallery-nav__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.62);
  color: #fff;
  pointer-events: none;
}

.gallery-nav__play svg {
  margin-left: 1px;
}

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

/* ── Feedback Block (Как вам товар?) ── */
.product-feedback {
  position: relative;
}

.product-feedback__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  margin-bottom: 8px;
}

.product-feedback__options {
  display: flex;
  gap: 20px;
}

.product-feedback__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  touch-action: manipulation; /* Убирает задержку тапа в 300мс на мобильных устройствах */
}

@media (hover: hover) and (pointer: fine) {
  .product-feedback__option:hover {
    transform: translateY(-2px);
  }
}

.product-feedback__option:active {
  transform: translateY(0);
}

.product-feedback__icon {
  width: 24px;
  height: 24px;
  display: block;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-feedback__label {
  font-size: var(--fs-sm);
  color: var(--color-dark);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.product-feedback__option.is-active .product-feedback__icon {
  transform: scale(1.2);
}

.product-feedback__option.is-active[data-feedback="bad"]
  .product-feedback__label {
  color: #ff2e47;
  font-weight: var(--fw-medium);
}

.product-feedback__option.is-active[data-feedback="good"]
  .product-feedback__label {
  color: #ffa726;
  font-weight: var(--fw-medium);
}

.product-feedback__option.is-active[data-feedback="excellent"]
  .product-feedback__label {
  color: #00b14f;
  font-weight: var(--fw-medium);
}

.product-feedback__option:not(.is-active).is-dimmed {
  opacity: 0.4;
}

/* Всплывашка «Спасибо». Координату left ставит JS — по центру нажатого
   смайла (product.js). Здесь только сдвигаем её на половину собственной
   ширины, чтобы центр совпал с центром кнопки, и растим от низа: ответ
   должен появляться из того места, куда человек нажал. */
.product-feedback__thankyou {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  transform: translateX(-50%) translateY(6px) scale(0.96);
  transform-origin: bottom center;
  background: var(--color-dark);
  color: var(--color-light);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--dur-exit) var(--ease-out),
    transform var(--dur-exit) var(--ease-out);
  z-index: 100;
}

/* Плашку у края экрана прижимает JS, и хвостик тогда перестаёт совпадать
   с её центром — координату он получает оттуда же (product.js) */
.product-feedback__thankyou::after {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--thankyou-arrow, 50%);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--color-dark, #1c1c1e);
}

.product-feedback__thankyou.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  transition:
    opacity var(--dur-enter) var(--ease-out),
    transform var(--dur-enter) var(--ease-out);
}

/* ── Слой летающих эмоций-частиц ──
   Один canvas на весь блок обратной связи. Размеры и позицию задаёт JS
   (product.js, PARTICLE_PAD), поэтому здесь только выключаем его из потока. */
/* fixed, а не absolute: канвас шире блока на 170px с каждой стороны и
   в потоке страницы давал горизонтальный скролл на мобилке.
   Координаты проставляет JS (placeParticleCanvas). */
.product-feedback__canvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1020;
}

/* ======================================================
   7. ЦЕНОВЫЕ РЯДЫ И СЧЕТЧИКИ (ОСОБЫЕ ДЛЯ СТРАНИЦЫ ТОВАРА)
   ====================================================== */
.product-hero__price-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(min-content, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

@media (max-width: 1539px) {
  .product-hero__price-rows {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1023px) {
  .product-hero__price-rows {
    grid-template-columns: repeat(2, minmax(min-content, 1fr));
  }
}

@media (max-width: 767px) {
  .product-hero__price-rows {
    grid-template-columns: 1fr;
  }
}

.product-hero__price-row {
  display: flex;
  flex-direction: column;
  background-color: var(--color-gray-lighter);
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #eff1f5;
  height: 100%;
  box-sizing: border-box;
}

.product-hero__price-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.product-hero__price-row-price {
  margin-left: auto;
  color: var(--color-blue);
  font-weight: var(--fw-semibold);
  flex-shrink: 0;
}

.product-hero__price-row-old-price {
  color: var(--color-gray);
  text-decoration: line-through;
  flex-shrink: 0;
}

.product-hero__counter {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  min-height: 32px;
  border-radius: var(--radius-base);
  background-color: var(--color-light);
  border: 1px solid #e6e9ef;
  margin-top: auto;
}

.product-hero__counter-btn {
  border: none;
  background: transparent;
  height: 100%;
  cursor: pointer;
  font-size: var(--fs-xl);
  line-height: var(--lh-none);
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-hero__counter-btn--dec.is-hidden {
  visibility: hidden;
  pointer-events: none;
}
.product-hero__counter-btn--dec.is-cart {
  background-color: var(--color-accent);
  border-radius: 7px 0 0 7px;
  position: relative;
}
.product-hero__counter-btn--dec.is-cart::before {
  content: "";
  width: 14px;
  height: 14px;
  background-image: url("../../../assets/icons/interfaces/trash-light.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.product-hero__counter-btn--dec.is-minus {
  font-size: var(--fs-xl);
  font-weight: var(--fw-medium);
}

.product-hero__counter-input {
  border: none;
  background: transparent;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--color-dark);
  width: 100%;
  outline: none;
}

/* ── Options and Selectors (Размер, Цвет) ── */
.product-hero__selectors {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.product-hero__field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--fs-md);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-gray-light);
}

.product-hero__field:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.product-hero__field-label {
  color: var(--color-gray);
  white-space: nowrap;
}

/* ======================================================
   Cart Add-To-Cart Tooltip styles
   ====================================================== */
.addtocart-bar {
  position: relative;
}

.cart-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(8px);
  z-index: 99;
  background-color: var(--color-light, #ffffff);
  border: 1px solid var(--border-color-base, #e3e3e6);
  border-radius: 2px;
  padding: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08), var(--shadow-soft, 0 4px 20px rgba(0, 0, 0, 0.06));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    visibility 0.3s ease;
  width: max-content;
}

.cart-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.cart-tooltip__inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-tooltip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.cart-tooltip__icon img {
  width: 14px;
  height: 14px;
  display: block;
}

.cart-tooltip__text {
  font-size: var(--fs-xs);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  color: var(--color-dark, #0a0a0a);
  text-align: left;
  white-space: normal;
}

/* Arrow pointing down */
.cart-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-light, #ffffff) transparent transparent transparent;
}

.cart-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--border-color-base, #e3e3e6) transparent transparent transparent;
  margin-top: -1px;
}

/* ======================================================
   8. АДАПТИВ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (<= 479px)
   ====================================================== */
@media (max-width: 479px) {
  .spec-row span:last-child {
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
  }

  .product-hero__compare-badge .checkbox__text {
    font-size: var(--fs-sm);
  }

  .product-hero__rating {
    font-size: var(--fs-sm);
  }

  .product-hero__status-row {
    font-size: var(--fs-sm);
  }

  .product-hero__sku {
    font-size: var(--fs-sm);
  }

  .product-hero__price-current {
    font-size: var(--fs-xl);
  }

  .product-hero__price-currency {
    font-size: var(--fs-xl);
  }

  .product-hero__price-old {
    font-size: var(--fs-md);
  }

  .product-hero__total-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
  }

  .product-hero__total-price {
    font-size: var(--fs-2xl);
    font-weight: var(--fw-semibold);
  }

  .product-hero__info-title {
    font-size: var(--fs-md);
  }

  .product-hero__info-badge {
    font-size: var(--fs-sm);
  }

  .product-hero__info-link {
    font-size: var(--fs-sm);
  }

  .product-feedback__title {
    font-size: var(--fs-md);
  }

  .product-hero__price-row-head {
    font-size: var(--fs-sm);
  }

  .product-hero__field {
    font-size: var(--fs-md);
  }

  .product-hero__banner {
    font-size: var(--fs-md);
  }

  .product-hero__addon-title {
    font-size: var(--fs-md);
  }
}
