/* product.tpl — карточка товара (референс: тёмный фон, без серого у картинки, бежевые акценты) */

:root {
  --product-bg: #1a1616;
  --product-title: #ffffff;
  --product-muted: var(--color-gold, #B09678);
  --product-accent: var(--color-gold, #B09678);
  --product-accent-hover: #7d6856;
}

.product-new-breadcrumb {
  background: var(--product-bg);
  padding: 1rem 0;
  margin-top: 200px;
}

.product-new-breadcrumb .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.product-new-breadcrumb .breadcrumb-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: var(--product-muted);
}

.product-new-breadcrumb .breadcrumb-nav a {
  color: var(--product-title);
  text-decoration: none;
}

.product-new-breadcrumb .breadcrumb-nav a:hover {
  color: var(--product-title);
}

.product-new-breadcrumb .breadcrumb-nav .active {
  color: var(--product-title);
}

.product-new-breadcrumb .breadcrumb-nav li+li::before {
  content: ">";
  margin-right: 0.25rem;
  color: var(--product-title);
}

/* Основная секция */
.product-new-section {
  background: var(--product-bg);
  color: var(--product-title);
  padding: 2rem 0 4rem;
}

.product-new-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.product-new__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .product-new__row {
    grid-template-columns: 1fr;
  }
}

/* Галерея — без отдельного фона, картинка на тёмном фоне страницы */
.product-new__gallery {
  position: sticky;
  top: 1rem;
}

.product-new__main-image {
  margin-bottom: 1rem;
}

.product-new__main-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Инфо-блок */
.product-new__info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.product-new__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--product-title);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.product-new__brand {
  font-size: 1rem;
  color: var(--product-muted);
  margin: 0;
}

/* Кнопка PDF — прозрачный фон, обводка и текст бежевые */
.product-new__pdf-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--product-muted);
  color: var(--product-muted);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: border-color 0.2s, color 0.2s;
}

.product-new__pdf-btn:hover {
  border-color: var(--product-title);
  color: var(--product-title);
}

/* Строка вариантов (кнопки по name) */
.product-new__variant-row {
  margin-top: 0.5rem;
}

.product-new__variant-row label,
.product-new__variant-row .product-new__param-label {
  display: block;
  font-size: 0.9rem;
  color: var(--product-title);
  margin-bottom: 0.5rem;
}

.product-new__variant-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Кнопки вариантов: невыбранные — прозрачные с бежевой обводкой и текстом */
.product-new__variant-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--product-muted);
  color: var(--product-title);
  font-size: 0.9rem;
  border-radius: 15px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.product-new__variant-btn:hover {
  border-color: var(--product-muted);
  color: var(--product-title);
}

/* Выбранная кнопка — тёплый коричневый фон, белый текст */
.product-new__variant-btn.is-selected {
  background: var(--product-accent);
  border-color: var(--product-accent);
  color: var(--product-title);
}

#product_main_filters .product-new__variant-btn {
  height: 69px;
  padding: 0px;
}

/* Плашка варианта без иконки цоколя — компенсируем отступ слева */
#product_main_filters .product-new__variant-btn--no-base {
  padding-left: 1.25em;
}



.product-new__variant-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.product-new__variant-icon--base{
  flex-shrink: 0;
  width: 45px;
  height: 45px;
}

/* Обёртка: текст + иконка мощности, иконка обрамляет конец текста (как на референсе) */
.product-new__variant-label-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 2.5em;
  padding-right: 1.25em; /* место под половинку иконки, чтобы иконка не обрезалась */
}

.product-new__variant-icon--power {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5em;
  height: 2.5em;
  flex-shrink: 0;
  object-fit: contain;
  z-index: 0;
  pointer-events: none;
}

.product-new__variant-label-wrap .product-new__variant-label {
  position: relative;
  z-index: 1;
  /*padding-right: 1.25em;  конец текста (например "12W") попадает в центр иконки-рамки */
}

.product-new__variant-label {
  white-space: nowrap;
}

.product-new__variant-desc {
  font-size: 0.85rem;
  color: var(--product-muted);
  margin: 0.5rem 0 0;
}

/* Доп. фильтры (упаковка, цветовая температура — генерируются JS) */
.product-new__extra-filters .product-new__variant-row {
  margin-top: 1rem;
}

.product-new__extra-filters .product-new__variant-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Кружок цвета для фильтра «Цветовая температура» */
.product-new__colortemp-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 0.35rem;
  vertical-align: middle;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.15);
}

/* Количество и кнопка заказа */
.product-new__quantity-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.product-new__quantity-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-new__quantity-label {
  font-size: 0.9rem;
  color: var(--product-title);
}

.product-new__quantity-hint {
  font-size: 0.8rem;
  color: var(--product-muted);
  margin: 0;
}

.product-new__quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
}

/* В карточке товара блок количества как в корзине — используем стили .cart-quantity-box из style.css */
.product-new__quantity-controls.cart-quantity-box {
  gap: 0;
  display: inline-flex;
  align-items: stretch;
}

.product-new__quantity-controls.cart-quantity-box .product-new__qty-btn,
.product-new__quantity-controls.cart-quantity-box .product-new__qty-input {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--color-gold);
  border-radius: 50%;
  color: #C7B49B;
  font-size: 16px;
}

.product-new__quantity-controls.cart-quantity-box .product-new__qty-input {
  flex: 1;
  min-width: 40px;
  border-radius: 0;
  border-top: 1px solid var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
  border-left: none;
  border-right: none;
  font-size: 14px;
  font-weight: 500;
}

.product-new__quantity-controls.cart-quantity-box .product-new__qty-btn:hover {
  color: #d4c4ad;
  border-color: var(--color-gold);
}

.product-new__qty-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--product-muted);
  border-radius: 50%;
  background: transparent;
  color: var(--product-muted);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.product-new__qty-btn:last-of-type {
  border: 1px solid var(--product-muted);
}

.product-new__qty-btn:hover {
  color: var(--product-title);
}

.product-new__qty-input {
  width: 4rem;
  height: 40px;
  border: 1px solid var(--product-muted);
  border-radius: 4px;
  background: transparent;
  color: var(--product-title);
  font-size: 1rem;
  text-align: center;
  -moz-appearance: textfield;
  padding: 0px;
}

.product-new__qty-input::-webkit-outer-spin-button,
.product-new__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Кнопка «Добавить в заявку» — тёплый коричневый, белый текст */
.product-new__order-btn {
  padding: 0.75rem 1.5rem;
  background: var(--product-accent);
  border: none;
  color: var(--product-title);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.product-new__order-btn:hover {
  background: var(--product-accent-hover);
}

.product-new__order-btn:disabled {
  background: var(--product-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.product-new__no-stock {
  color: var(--product-muted);
  margin: 0;
}

/* Свойства товара (таблица) */
.product-new__props {
  margin-top: 3rem;
  border-top: 1px solid var(--product-muted);
}

.product-new__props-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.product-new__props-table tbody tr {
  border-bottom: 1px solid var(--product-muted);
}

.product-new__props-table tbody tr:last-child {
  border-bottom: none;
}

.product-new__props-name {
  padding: 0.6rem 0.5rem 0.6rem 0;
  color: var(--product-title);
  vertical-align: top;
  width: 40%;
}

.product-new__props-value {
  padding: 0.6rem 0;
  color: var(--product-title);
}

.product-new__props-value-item {
  display: block;
}

.product-new__props-value-item+.product-new__props-value-item {
  margin-top: 0.25rem;
}

/* ── Сопутствующий ассортимент ── */
.product-new__related {
  padding: 24px 0;
  border-bottom: 2px solid #B09678;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.product-new__related-head {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
}

.product-new__related-title {
  flex: 1;
  font-family: 'Montserrat', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1;
}

.product-new__related-arrows {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-shrink: 0;
}

.product-new__related-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.product-new__related-arrow:hover {
  opacity: 0.75;
}

.product-new__related-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  width: 100%;
}

.product-new__related-card {
  display: flex;
  flex-direction: column;
  width: 364px;
  flex-shrink: 0;
  background: #353530;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
}

.product-new__related-card:hover {
  color: inherit;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.product-new__related-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #2a2a26;
}

.product-new__related-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.25s ease;
}

.product-new__related-card-img--first {
  position: relative;
  z-index: 1;
}

.product-new__related-card-img--hover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  opacity: 0;
}

.product-new__related-card:hover .product-new__related-card-image.product-new__related-card-image--has-second .product-new__related-card-img--first {
  opacity: 0;
}

.product-new__related-card:hover .product-new__related-card-img--hover {
  opacity: 1;
  z-index: 2;
}

.product-new__related-card-body {
  background: #262623;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-new__related-card-brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #B09678;
  margin: 0;
  white-space: nowrap;
}

.product-new__related-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  min-height: 58px;
  line-height: 1.3;
}

.product-new__related-card-specs {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-new__related-card-spec-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 32px;
}

.product-new__related-card-spec-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-style: italic;
  font-weight: 400;
  color: #B09678;
  margin: 0;
  flex-shrink: 0;
}

.product-new__related-card-spec-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #fff;
  margin: 0;
}

@media (max-width: 991px) {
  .product-new__related-card {
    width: 100%;
    max-width: 364px;
  }
}

/* Описание товара под таблицей свойств */
.product-new__description {
  margin-top: 3rem;
  padding-top: 2rem;
}

.product-new__description-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--product-title);
  margin: 0 0 1rem;
}

.product-new__description-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--product-title);
}

.product-new__description-body p {
  margin: 0 0 0.75rem;
}

.product-new__description-body p:last-child {
  margin-bottom: 0;
}

.product-new__description-body ul,
.product-new__description-body ol {
  margin: 0 0 0.75rem;
  padding-left: 1.5rem;
}

.product-new__description-body a {
  color: var(--product-muted);
  text-decoration: underline;
}

.product-new__description-body a:hover {
  color: var(--product-title);
}

/* Летящий плейсхолдер при добавлении в корзину товара без картинки */
.cart-transfer-fly--placeholder .cart-transfer-fly__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 40px;
  min-height: 40px;
  border: 2px solid var(--color-gold);
  border-radius: 4px;
  background: #1a1918;
  box-sizing: border-box;
}