/* ==========================================================================
   Карточка товара (неавторизованный пользователь) — Figma node 3827:4376
   (fileKey o1dtSkoTovK5La7uhTgo3C). Шапка/футер — 1:1 переиспользованы.
   ========================================================================== */

.pdp-crumbs {
  margin-top: 16px; /* как .arch-crumbs на остальных целевых страницах, единый отступ от шапки, было 56px */
  font-family: 'DINPro Regular', 'Inter', Arial, sans-serif;
  font-size: 14px;
  line-height: normal;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.pdp-body {
  margin-top: 40px;
  display: flex;
  align-items: flex-start;
  gap: 54px;
}

.pdp-main {
  width: 788px;
  flex-shrink: 0;
}

/* --- Заголовок товара --- */
.pdp-head {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-transform: uppercase;
}

.pdp-head__art {
  font-family: 'DINPro Cond Regular', 'Inter', Arial, sans-serif;
  font-weight: 400;
  font-size: 30px;
  line-height: normal;
  color: #E2480A;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.pdp-head__title {
  font-family: 'DINPro Cond Regular', 'Inter', Arial, sans-serif;
  font-weight: 400;
  font-size: 70px;
  line-height: 1;
  color: #000;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.pdp-head__variant {
  font-family: 'DINPro Cond Regular', 'Inter', Arial, sans-serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1;
  color: #000;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

/* --- Ряд иконок (избранное/корзина) + свотчи для авторизованных --- */
.pdp-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

body[data-user="1"] .pdp-actions {
  justify-content: space-between;
}

.pdp-actions__icons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pdp-actions__icon {
  width: 50px;
  height: 50px;
  display: block;
}

.favorite-button--detail {
  width: 50px;
  height: 50px;
  background: #FAF8F5;
}

.pdp-swatches {
  display: flex;
  align-items: center;
  gap: 24px;
}

.pdp-swatches__sizes {
  background: #FAF8F5;
  height: 65px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.pdp-swatches__size {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DINPro Medium', 'Inter', Arial, sans-serif;
  font-size: 20px;
  color: #516B43;
}

.pdp-swatches__size.is-active {
  background: #516B43;
  color: #FAF8F5;
}

.pdp-swatches__colors {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdp-swatches__color {
  width: 65px;
  height: 65px;
  display: block;
}

/* --- Галерея --- */
.pdp-gallery {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdp-gallery__main {
  position: relative;
  width: 100%;
  aspect-ratio: 1456 / 950;
  overflow: hidden;
}

.pdp-gallery__main img {
  position: absolute;
  width: 100%;
  height: 122.61%;
  left: 0;
  top: -9.35%;
  object-fit: cover;
}

.pdp-gallery__thumbs {
  display: flex;
  gap: 40px;
  align-items: center;
}

.pdp-gallery__thumb {
  /* Раньше <div>, теперь <button> (кликабельно — переключает главное фото,
     см. product-gallery.js) — appearance/padding сбрасывают дефолтный вид
     кнопки браузера, чтобы выглядела ровно как прежний <div>. */
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  cursor: pointer;
  width: 164px;
  height: 129px;
  background: #F4F1EA;
  border: 1px solid rgba(81, 107, 67, 0.5);
  box-sizing: border-box;
  overflow: hidden;
}

.pdp-gallery__thumb.is-active {
  border-color: #E2480A;
}

.pdp-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-gallery__thumb--plain {
  background: none;
  border: none;
  width: 164.747px;
  height: 131.798px;
}

/* --- Секции (Описание/Тех.характеристики/Материалы/Технологии) --- */
.pdp-section {
  margin-top: 72px;
  width: 100%;
}

.pdp-section__title {
  font-family: 'DINPro Cond Regular', 'Inter', Arial, sans-serif;
  font-weight: 400;
  font-size: 30px;
  line-height: normal;
  color: #000;
  text-transform: uppercase;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.pdp-section__body {
  margin-top: 40px;
}

.pdp-description {
  font-family: 'DINPro Regular', 'Inter', Arial, sans-serif;
  font-size: 14px;
  line-height: 24px;
  color: #000;
  width: 736px;
  max-width: 100%;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

/* --- Технические характеристики --- */
.pdp-specs {
  display: flex;
  gap: 48px;
}

.pdp-specs__col {
  flex: 1 0 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}

.pdp-specs__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.pdp-specs__label {
  font-family: 'DINPro Regular', 'Inter', Arial, sans-serif;
  font-size: 16px;
  line-height: 40px;
  color: rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.pdp-specs__leader {
  flex: 1 0 0;
  height: 1px;
  min-width: 20px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.2);
  margin-bottom: 14px;
}

.pdp-specs__value {
  font-family: 'DINPro Regular', 'Inter', Arial, sans-serif;
  font-size: 18px;
  line-height: 40px;
  color: #000;
  white-space: nowrap;
}

/* «Монтаж» — подзаголовок внутри секции характеристик (см. шаблон), тот же
   ритм 72, что между секциями. Значение «Спец.монтаж» бывает длинным
   («Фундамент У / Фундамент ФК; СНТ 400, СПЧ 600, БП 200») — переносится
   по словам, прижато вправо, пунктир остаётся у нижней строки. */
.pdp-section__title--sub {
  margin-top: 72px;
}

/* line-height 22 + padding 9 = те же 40 в одну строку, что у соседних
   строк; при переносе строки идут плотно, а не через 40px. */
.pdp-specs__row--wrap .pdp-specs__value {
  min-width: 0;
  padding: 9px 0;
  line-height: 22px;
  white-space: normal;
  text-align: right;
}

.pdp-montazh-memo {
  display: block;
  width: fit-content;
  margin: 8px 0 0 auto;
  font-family: 'DINPro Medium', 'Inter', Arial, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
  color: #E2480A;
}

.pdp-montazh-memo:hover {
  text-decoration: underline;
}

/* --- Материалы/Технологии --- */
.pdp-materials {
  display: flex;
  gap: 32px;
  align-items: center;
}

.pdp-materials img {
  display: block;
  height: 58px;
  width: auto;
}

/* --- Декоративное фото внизу левой колонки --- */
.pdp-bottom-photo {
  margin-top: 72px;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* --- Правый сайдбар --- */
.pdp-side {
  width: 358px;
  flex-shrink: 0;
}

.pdp-panel {
  background: #FAF8F5;
}

.pdp-panel--locked {
  display: none;
  border: 1px solid #E2480A;
  padding-bottom: 30px; /* держит "Открыть полный доступ" внутри рамки без margin-collapse */
}

.pdp-panel__title {
  padding: 30px 0 0 30px;
  font-family: 'DINPro Cond Regular', 'Inter', Arial, sans-serif;
  font-weight: 400;
  font-size: 30px;
  color: #000;
  text-transform: uppercase;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.pdp-panel--locked .pdp-panel__title {
  color: #E2480A;
}

.pdp-panel__subtitle {
  padding: 0 0 20px 30px;
  font-family: 'DINPro Regular', 'Inter', Arial, sans-serif;
  font-size: 16px;
  color: #000;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.pdp-panel--locked .pdp-panel__subtitle {
  color: #C6BFAE;
}

.pdp-files {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdp-file {
  padding: 0 0 0 30px;
  display: flex;
  gap: 24px;
  align-items: center;
}

.pdp-file__badge {
  flex-shrink: 0;
  min-width: 55px;
  max-width: 55px;
  height: 36px;
  background: #F4F1EA;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DINPro Cond Regular', 'Inter', Arial, sans-serif;
  font-weight: 400;
  font-size: 22px;
  color: #C6BFAE;
  text-transform: uppercase;
}

.pdp-file__badge img {
  width: 18.266px;
  height: 26px;
  display: block;
}

.pdp-file__info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdp-file__name-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.pdp-file__name {
  font-family: 'DINPro Regular', 'Inter', Arial, sans-serif;
  font-size: 14px;
  color: #000;
  text-decoration: underline;
  text-decoration-skip-ink: none;
}

.pdp-panel--locked .pdp-file__name {
  color: #C6BFAE;
}

.pdp-file__ext-icon {
  width: 12px;
  height: 12px;
  display: block;
}

.pdp-file__size {
  font-family: 'DINPro Regular', 'Inter', Arial, sans-serif;
  font-size: 10px;
  color: #C6BFAE;
  text-transform: uppercase;
}

.pdp-file-divider {
  height: 1px;
  background: #F4F1EA;
  flex-shrink: 0;
}

.pdp-panel__cta {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.pdp-panel__btn {
  background: #E2480A;
  height: 50px;
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DINPro Cond Medium', 'Inter', Arial, sans-serif;
  font-size: 18px;
  letter-spacing: 0.9px;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Карточка менеджера "Задать вопрос" --- */
.pdp-contact {
  margin-top: 40px;
  position: relative;
  padding: 40px 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  overflow: hidden;
}

.pdp-contact__bg {
  position: absolute;
  inset: 0;
  background: #516B43;
  z-index: 0;
}

.pdp-contact__texture {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  overflow: hidden;
  z-index: 0;
}

.pdp-contact__texture img {
  position: absolute;
  width: 465.53%;
  height: 287.57%;
  left: -352.34%;
  top: -187.41%;
  max-width: none;
}

.pdp-contact__title {
  position: relative;
  z-index: 1;
  font-family: 'DINPro Cond Regular', 'Inter', Arial, sans-serif;
  font-weight: 400;
  font-size: 30px;
  color: #fff;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-align: center;
}

.pdp-contact__person {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  gap: 16px;
  align-items: center;
}

.pdp-contact__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
}

.pdp-contact__name-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pdp-contact__name {
  font-family: 'DINPro Regular', 'Inter', Arial, sans-serif;
  font-size: 16px;
  color: #fff;
}

.pdp-contact__role {
  font-family: 'DINPro Regular', 'Inter', Arial, sans-serif;
  font-size: 16px;
  color: #8E9B70;
}

/* --- Изделия в реальных проектах / С этим товаром покупают --- */
.pdp-related {
  margin-top: 72px;
}

.pdp-related__grid {
  margin-top: 40px;
  display: flex;
  gap: 32px;
}

.pdp-related__card {
  flex: 1 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.pdp-related__card:only-child {
  flex: 0 0 276px;
}

.pdp-related__photo {
  position: relative;
  height: 200px;
  min-width: 270px;
  padding: 10px 10px 20px 20px;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.pdp-related__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-related__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.2) 100%);
  mix-blend-mode: darken;
}

.pdp-related__caption {
  font-family: 'DINPro Cond Regular', 'Inter', Arial, sans-serif;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0.54px;
  color: #000;
  text-transform: uppercase;
  line-height: 0.8;
}

.pdp-related__caption span:first-child {
  font-family: 'DINPro Cond Medium', 'Inter', Arial, sans-serif;
}

.pdp-related__caption span:last-child {
  font-family: 'DINPro Cond Light', 'Inter', Arial, sans-serif;
  font-weight: 300;
}

.pdp-divider {
  margin-top: 40px;
  position: relative;
  height: 3px;
}

.pdp-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 1px;
  height: 1px;
  background: #8E9B70;
  opacity: 0.5;
}

.pdp-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 80px;
  height: 3px;
  background: #8E9B70;
}

.pdp-bought {
  margin-top: 72px;
}

.pdp-bought__grid {
  margin-top: 40px;
  display: flex;
  gap: 44px;
}

/* --- Гость/авторизован (?user=1) --- */
.pdp-auth-only {
  display: none;
}

body[data-user="1"] .pdp-auth-only {
  display: block;
}

body[data-user="1"] .pdp-guest-only {
  display: none;
}

body[data-user="1"] .pdp-swatches.pdp-auth-only {
  display: flex;
}
