/* =========================================================
   product-v2.css — карточка товара /shop/view?id=N (v2-дизайн)
   Используется только когда отрендерен view_v2.php (.product-v2-page).
   ========================================================= */

/* Скрыть каталожные элементы каталога когда есть .product-v2-page */
body:has(.product-v2-page) .rubrics,
body:has(.product-v2-page) .filters,
body:has(.product-v2-page) #sidebarPanel,
body:has(.product-v2-page) .filter-mobile-btn,
body:has(.product-v2-page) .pl_filter,
body:has(.product-v2-page) .goods__sort,
body:has(.product-v2-page) .sort-bar,
body:has(.product-v2-page) .products-area > nav,
body:has(.product-v2-page) .products-area > p:empty,
html.is-product-page .rubrics,
html.is-product-page .filters,
html.is-product-page #sidebarPanel,
html.is-product-page .filter-mobile-btn,
html.is-product-page .pl_filter,
html.is-product-page .goods__sort,
html.is-product-page .sort-bar,
html.is-product-page .products-area > nav,
html.is-product-page .products-area > p:empty {
  display: none;
}
body:has(.product-v2-page) .catalog-layout,
html.is-product-page .catalog-layout {
  display: block;
}
body:has(.product-v2-page) .products-area,
html.is-product-page .products-area {
  width: 100%;
  max-width: 100%;
}

/* Скрыть legacy элементы view.php если они еще остались */
.shopView,
#shop_view,
.shopView__good-card {
  display: none;
}

/* ============================================================
   PRODUCT-V2 PAGE
   ============================================================ */
.product-v2-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--c-text);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0 60px;
}

/* Breadcrumbs — единый стиль .breadcrumbs (common-v2.css) */

/* === Product detail layout === */
.product-detail {
  display: flex;
  gap: 48px;
  margin-bottom: 48px;
  align-items: flex-start;
}
.product-gallery {
  flex: 0 0 480px;
  max-width: 480px;
  width: 480px;
  position: sticky;
  top: 24px;
}
.product-gallery__main {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  cursor: zoom-in; /* перенесено из дубля ниже (L744) */
}
.product-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  cursor: zoom-in;
  display: block;
}
.product-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.product-gallery__thumb {
  width: 80px;
  height: 80px;
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--c-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
  padding: 0;
}
.product-gallery__thumb:hover,
.product-gallery__thumb.active {
  border-color: var(--c-coral);
}
.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* === Info column === */
.product-info {
  flex: 1;
  min-width: 0;
}
.product-info__article {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.product-info__collection {
  color: var(--c-coral);
  text-decoration: none;
  font-weight: 500;
}
.product-info__collection:hover { text-decoration: underline; }
.product-info__title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 16px;
  color: var(--c-text);
}

/* Trust badges */
.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.product-badge svg { color: #2e7d32; flex-shrink: 0; }

/* Price block */
.product-info__price-block {
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.product-info__price {
  font-size: 32px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.1;
  margin-bottom: 4px;
}
.product-info__price-note {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
/* .product-info__retail — удалён (dead, не в DOM) */

/* Specs inline (мини-таблица в price-block) */
.product-specs-inline {
  margin-bottom: 20px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: visible; /* нельзя hidden: режет tooltip админа "в наличии" */
  background: #fff;
}
.product-specs-inline__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--c-border);
}
.product-specs-inline__row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.product-specs-inline__row:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
  border-bottom: none;
}
.product-specs-inline__label { color: var(--c-text-secondary); }
.product-specs-inline__value { font-weight: 500; text-align: right; color: var(--c-text); }

/* product-stock — статус-цвета. не нужен: .product-stock--* —
   уникальные v2-классы, в main.css/common-v2 их нет. */
.product-stock--in_stock { color: var(--c-green); font-weight: 600; }
.product-stock--low_stock { color: #d4a01d; font-weight: 600; }
.product-stock--planned { color: var(--c-text-secondary); font-weight: 600; }
.product-stock--out { color: var(--c-coral); font-weight: 600; }

/* Admin tooltip "На складе" — сам блок перенесён в common-v2.css.
   Здесь добавлен только декоративный underline для подсказки на карточке товара. */
.goods__sklad-wrap {
  cursor: help;
  border-bottom: 1px dotted currentColor;
}

/* Quantity stepper.
   flex-wrap: nowrap по умолчанию (запрещаем переносить); на ≤600px переходит
   в wrap (см. @media ниже). Раньше тут было flex-wrap: wrap + дубль
   .product-info__qty-row { flex-wrap: nowrap } ниже — слито в одно правило. */
.product-info__qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
}
.product-info__qty-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-secondary);
}
.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.qty-stepper__btn {
  width: 40px;
  height: 44px;
  border: none;
  background: var(--c-bg-light);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-secondary);
  transition: all 0.2s;
  font-family: inherit;
}
.qty-stepper__btn:hover {
  background: var(--c-border);
  color: var(--c-text);
}
.qty-stepper__input {
  width: 64px;
  height: 44px;
  border: none;
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  -moz-appearance: textfield;
  background: #fff;
  color: var(--c-text);
  font-family: inherit;
}
.qty-stepper__input::-webkit-outer-spin-button,
.qty-stepper__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
/* .product-info__pack-hint — удалён (dead, не в DOM) */

/* Total */
.product-info__total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--c-border);
  margin-bottom: 20px;
}
.product-info__total-label {
  font-size: 14px;
  color: var(--c-text-secondary);
}
.product-info__total-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text);
}

/* Actions row — две кнопки бок о бок */
.product-info__actions {
  display: flex;
  gap: 12px;
  margin: 0;
  flex-wrap: nowrap;
  align-items: stretch;
}
/* Удалён сломанный "px) {" media-query (без префикса @media), который никогда
   не применялся. Намерение покрыто @media(max-width:850px) ниже, где
   .product-info__actions переходит в flex-direction: column. */
/* Главная зелёная кнопка — большая, занимает ~65% строки.
   !important НУЖЕН на .goods__price-button.buttonAddToCart-варианте —
   базовое правило в common-v2.css L385 имеет `all: unset !important +
   декларации !important`, которое побеждает по каскаду независимо от
   специфичности. Без !important кнопка возвращается к slate-цвету 38px
   (инцидент 2026-05-28). */
.product-v2-page .btn-add-cart,
html.is-product-page .btn-add-cart,
html.is-product-page .product-info__actions .btn-add-cart,
html.is-product-page .product-info__actions .goods__price-button.buttonAddToCart {
  flex: 2 1 0 !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 24px !important;
  background: var(--c-coral) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius) !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  transition: background 0.2s, transform 0.1s !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  width: auto !important;
  white-space: nowrap !important;
  margin: 0 !important;
}
html.is-product-page .product-info__actions .btn-add-cart:hover,
html.is-product-page .product-info__actions .goods__price-button.buttonAddToCart:hover {
  background: var(--c-coral-hover) !important;
}
.btn-add-cart:active { transform: translateY(1px); }
.btn-add-cart svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-right: 0;
  display: inline-block;
  vertical-align: middle;
}
.btn-add-cart .btn-add-cart__label,
.btn-add-cart span {
  display: inline-block;
  vertical-align: middle;
  white-space: nowrap;
}
/* Состояние «В корзине» — зелёный = success.
   !important обязателен: база выше задаёт background !important. */
.btn-add-cart--in-cart,
html.is-product-page .product-info__actions .btn-add-cart.btn-add-cart--in-cart,
html.is-product-page .product-info__actions .goods__price-button.buttonAddToCart.btn-add-cart--in-cart {
  background: var(--c-green) !important;
  color: #fff !important;
}
html.is-product-page .product-info__actions .btn-add-cart.btn-add-cart--in-cart:hover,
html.is-product-page .product-info__actions .goods__price-button.buttonAddToCart.btn-add-cart--in-cart:hover {
  background: var(--c-green-hover) !important;
}

/* Outline кораловая "Заказать в один клик" — занимает ~35% */
html.is-product-page .product-info__actions .btn-one-click {
  flex: 1 1 0;
  height: 56px;
  min-height: 56px;
  padding: 0 20px;
  background: #fff;
  color: var(--c-coral);
  border: 2px solid var(--c-coral);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
}
html.is-product-page .product-info__actions .btn-one-click:hover {
  background: var(--c-coral);
  color: #fff;
}

/* "Рассчитать с лого" — компактная inline-ссылка-кнопка */
.product-info__calc-row {
  display: flex;
  margin-top: 12px;
  margin-bottom: 0;
  width: 100%;
}
.btn-calc-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 16px;
  background: transparent;
  color: var(--c-coral);
  border: 2px solid var(--c-coral);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
}
.btn-calc-logo:hover {
  background: rgba(234,91,113,0.08);
  border-color: var(--c-coral-hover);
  color: var(--c-coral-hover);
}
.btn-calc-logo svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.btn-calc-logo--in-cart {
  background: #f5f6f8;
  color: #6b7280;
  border-color: #d8dde5;
  cursor: not-allowed;
  opacity: 0.85;
}
.btn-calc-logo--in-cart svg { color: var(--c-green); }
.btn-calc-logo--in-cart:hover {
  background: #f5f6f8;
  color: #6b7280;
  border-color: #d8dde5;
}

/* Ссылка "Найти похожие" — теперь в qty-row справа от инпута */
/* ============================================================
   Группа «Найти похожие» + «Примерить» — обе ссылки в ОДНУ строку
   с количеством. Высота 32px, компактный padding, единый стиль.
   ============================================================ */

/* общая база */
.product-info__find-similar,
.product-info__try-on {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;       /* не сжимаются — но и не должны переноситься */
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease, filter .15s ease;
}
.product-info__find-similar:hover,
.product-info__try-on:hover { text-decoration: none; }

/* «Найти похожие» — outline-стиль */
.product-info__find-similar {
  margin-left: auto;            /* группа прижимается вправо в строке счётчика */
  color: var(--c-coral);
  background: #fff;
  border: 1px solid rgba(234,91,113,0.45);
}
.product-info__find-similar:hover {
  background: rgba(234,91,113,0.08);
  border-color: var(--c-coral);
  color: var(--c-coral-hover);
}
.product-info__find-similar svg { flex-shrink: 0; width: 12px; height: 12px; }
.product-info__find-similar + .product-info__try-on { margin-left: 6px; }

/* «Примерить» — акцентный CTA */
.product-info__try-on {
  margin-left: 6px;
  color: #fff;
  background: linear-gradient(135deg, #ea5b71 0%, #ff7e3e 100%);
  border: 1px solid transparent;
  box-shadow: 0 3px 10px -2px rgba(234,91,113,0.45),
              0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
  isolation: isolate;
}
.product-info__try-on:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -4px rgba(234,91,113,0.55),
              0 2px 5px rgba(0,0,0,0.08);
  filter: saturate(1.05) brightness(1.04);
}
.product-info__try-on:active { transform: translateY(0); }

/* shimmer-блик при наведении */
.product-info__try-on::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    transparent 30%,
    rgba(255,255,255,0.45) 48%,
    rgba(255,255,255,0.0)  62%);
  transform: translateX(-110%);
  transition: transform .65s cubic-bezier(.4,.1,.2,1);
  pointer-events: none;
  z-index: 1;
}
.product-info__try-on:hover::before { transform: translateX(110%); }
.product-info__try-on > * { position: relative; z-index: 2; }

/* иконка-сумочка в белом кружке */
.product-info__try-on-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  flex-shrink: 0;
}
.product-info__try-on-icon svg { display: block; width: 12px; height: 12px; }

/* пульсирующая «искра» */
.product-info__try-on-spark {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffe27a;
  box-shadow: 0 0 0 1.5px #ea5b71;
  animation: bf-try-spark 1.8s ease-in-out infinite;
}
@keyframes bf-try-spark {
  0%, 100% { transform: scale(0.85); opacity: 0.85; }
  50%      { transform: scale(1.15); opacity: 1; }
}

.product-info__try-on-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.product-info__try-on-arrow {
  display: inline-flex;
  align-items: center;
  transition: transform .2s ease;
}
.product-info__try-on-arrow svg { width: 10px; height: 10px; }
.product-info__try-on:hover .product-info__try-on-arrow { transform: translateX(2px); }

/* мобилка: даём строке qty-row жить в нескольких рядах,
   ссылки уезжают на свою строку и тянутся 50/50.
   FIX: было "px) {" без префикса @media — правила никогда не применялись.
   Восстановлен breakpoint 600px (типичный для перехода на узкие экраны). */
@media (max-width: 600px) {
  .product-info__qty-row { flex-wrap: wrap; }
  .product-info__find-similar,
  .product-info__try-on {
    flex: 1 1 0;
    margin-left: 0;
    margin-top: 8px;
    justify-content: center;
    padding: 0 10px;
  }
  .product-info__find-similar + .product-info__try-on { margin-left: 8px; }
}

/* Розничная цена — компактный inline-блок справа от опт. цены */
.product-info__price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.product-info__price-main { flex: 0 1 auto; }
.product-info__price-retail-compact {
  flex: 0 0 auto;
  text-align: right;
  padding-left: 16px;
  border-left: 1px solid var(--c-border);
  margin-top: 4px;
}
.product-info__price-retail-compact .product-info__price-retail-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.1;
}
.product-info__price-retail-compact .product-info__price-retail-label {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-top: 2px;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}
/* ROADMAP 3.6 «Допродажи»: скидка за объём (крупный опт) на странице товара */
.product-info__volume-discount {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 20px;
  padding: 10px 12px;
  background: #eef7ef;
  border-radius: 8px;
}
.product-info__volume-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-green);
}
.product-info__volume-tier {
  font-size: 13px;
  color: var(--c-text);
}
.product-info__volume-tier b {
  color: var(--c-green);
}
/* Мобила: опт слева, розница справа — ОДНОЙ строкой (как на десктопе).
   Раньше розница уезжала отдельной строкой (width:100%) и между ценами
   зияла пустота. Шрифты чуть компактнее, чтобы влезало в 375px. */
@media (max-width: 600px) {
  /* flex-start: розничная цена на одной ВЕРХНЕЙ линии с опт-ценой
     (при flex-end розница проваливалась на линию «опт — от N шт»). */
  .product-info__price-row { flex-wrap: nowrap; align-items: flex-start; row-gap: 0; }
  .product-info__price { font-size: 26px; }
  .product-info__price-retail-compact {
    margin-top: 0;
    padding-left: 12px;
    text-align: right;
  }
  .product-info__price-retail-compact .product-info__price-retail-value { font-size: 16px; }
}

/* Lightbox для фото */
.v2-lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
.v2-lightbox.active { display: flex; }
.v2-lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.v2-lightbox__content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}
.v2-lightbox__counter {
  margin-top: 12px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}
.v2-lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-lightbox__close:hover { background: rgba(255,255,255,0.2); }
.v2-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.v2-lightbox__nav:hover { background: rgba(255,255,255,0.25); }
.v2-lightbox__nav--prev { left: 24px; }
.v2-lightbox__nav--next { right: 24px; }
/* FIX: было "px) {" без @media — кнопки lightbox на телефоне должны быть
   меньше и ближе к краям. Восстановлен 600px. */
@media (max-width: 600px) {
  .v2-lightbox__nav { width: 44px; height: 44px; font-size: 28px; }
  .v2-lightbox__nav--prev { left: 8px; }
  .v2-lightbox__nav--next { right: 8px; }
  .v2-lightbox__close { top: 12px; right: 12px; }
}

/* Delivery & guarantees grid */
.product-delivery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}
.product-delivery-grid__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--c-text-secondary);
  line-height: 1.5;
}
.product-delivery-grid__item strong { color: var(--c-text); }
.product-delivery-grid__item svg { flex-shrink: 0; margin-top: 2px; }

/* === Specifications === */
.product-specs {
  margin-bottom: 48px;
}
.product-specs__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
  color: var(--c-text);
}
.specs-table {
  width: 100%;
  /* на всю ширину контента (1200px) пары «label — value» разъезжаются
     и выглядят пустырём — ограничиваем компактной карточкой */
  max-width: 720px;
  border-collapse: collapse;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.specs-table tr {
  border-bottom: 1px solid var(--c-border);
}
.specs-table tr:last-child { border-bottom: none; }
.specs-table tr:nth-child(even) { background: var(--c-bg-light); }
.specs-table td {
  padding: 14px 18px;
  font-size: 14px;
  vertical-align: top;
}
.specs-table td:first-child {
  font-weight: 500;
  color: var(--c-text-secondary);
  width: 240px;
}
.specs-table td:last-child {
  color: var(--c-text);
  font-weight: 500;
}

/* === Description === */
.product-description {
  margin-bottom: 48px;
}
.product-description__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--c-text);
}
.product-description__content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--c-text-secondary);
  max-width: 800px;
}
.product-description__content p { margin: 0 0 12px; }

/* === Related === */
.related-section {
  margin-bottom: 48px;
  scroll-margin-top: 100px; /* запас под sticky header при якорном скролле */
}
.related-section__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--c-text);
  scroll-margin-top: 100px;
}
.related-section__link {
  color: var(--c-coral);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.related-section__link:hover {
  color: var(--c-coral-hover);
  border-bottom-color: var(--c-coral-hover);
  text-decoration: none;
}
/* .goods__list--related: grid для секций "Из коллекции" / "Похожие товары" в view_v2.php.
   .related-grid убран (не используется — PHP рендерит только .goods__list--related). */
.goods__list--related {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
}
@media (max-width: 1024px) {
  .goods__list--related { grid-template-columns: repeat(3, 1fr); }
}
/* .related-card* удалены — dead code (внутри .goods__list--related рендерятся
   .goods__infoblock-content через goods_list_item.tpl.php). */

/* === Модалка калькулятора печати === */
.v2-calc-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  backdrop-filter: blur(2px);
}
.v2-calc-backdrop.active { display: block; }

.v2-calc-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(580px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.v2-calc-modal.active { display: block; }
.v2-calc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-border);
}
.v2-calc-modal__header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--c-text);
}
.v2-calc-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--c-text-muted);
  border-radius: 6px;
  transition: all 0.2s;
}
.v2-calc-modal__close:hover {
  background: var(--c-bg-light);
  color: var(--c-text);
}
.v2-calc-modal__body { padding: 20px 24px 24px; }

.v2-calc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.v2-calc-label {
  flex: 0 0 140px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-secondary);
}
.v2-calc-select {
  flex: 1;
  min-width: 200px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff;
  color: var(--c-text);
  outline: none;
  cursor: pointer;
  font-family: inherit;
}
.v2-calc-select:focus { border-color: var(--c-coral); }

.v2-calc-radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.v2-calc-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  color: var(--c-text);
}
.v2-calc-radio input { cursor: pointer; }

.v2-calc-result {
  margin: 20px 0 0;
  padding: 16px;
  background: var(--c-bg-light);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
}
.v2-calc-result__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 14px;
  color: var(--c-text-secondary);
}
.v2-calc-result__row strong,
.v2-calc-result__row > span:last-child {
  color: var(--c-text);
  font-weight: 500;
}
.v2-calc-result__row--total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
}
.v2-calc-result__row--total > span:last-child { font-weight: 700; color: var(--c-text); }
.v2-calc-result__per-piece {
  text-align: right;
  font-size: 12px;
  color: var(--c-text-muted);
  margin-top: 4px;
}
.v2-calc-result__per-piece strong { color: var(--c-coral); }

.v2-calc-actions {
  margin: 20px 0 12px;
}
.v2-calc-actions .btn-add-cart {
  width: 100%;
  flex: 1 1 100%;
}
.v2-calc-note {
  font-size: 12px;
  color: var(--c-text-muted);
  text-align: center;
  line-height: 1.5;
}
.v2-calc-note a { color: var(--c-coral); }

/* === Адаптив === */
@media (max-width: 1024px) {
  .product-detail { gap: 32px; }
  .product-gallery { flex: 0 0 400px; max-width: 400px; width: 400px; }
  .goods__list--related { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 850px) {
  .product-detail { flex-direction: column; gap: 24px; }
  .product-gallery {
    flex: none;
    max-width: 100%;
    width: 100%;
    position: static;
  }
  .product-info__actions { flex-direction: column; }
  .btn-one-click { width: 100%; }
  .product-delivery-grid { grid-template-columns: 1fr; }
  .specs-table td:first-child { width: 140px; }
  .goods__list--related { grid-template-columns: repeat(2, 1fr); }
  .product-gallery__main img { padding: 0; }
}
@media (max-width: 480px) {
  .product-info__title { font-size: 22px; }
  .product-info__price { font-size: 26px; }
  .goods__list--related { grid-template-columns: 1fr; }
  .product-gallery__thumb { width: 60px; height: 60px; }
  .product-info__price-block { padding: 16px; }
}
