/* =============================================================================
   product-landing.css — Marketplace Style (Fully Customizable & Centered Reviews)
   ============================================================================= */

:root {
  /* === БАЗОВЫЕ ЦВЕТА === */
  --lp-color-white: #ffffff; /* Чисто белый (фоны карточек, текст кнопок) */
  --lp-color-black: #000000; /* Чисто черный (текст некоторых бейджей) */

  /* === ПАЛИТРА БРЕНДА === */
  --lp-primary: #f50057; /* Основной акцентный цвет (кнопки, иконки, галочки) */
  --lp-primary-hover: #c51162; /* Цвет основной кнопки при наведении */
  --lp-primary-light: #fff5f8; /* Очень светлый фон (для выбранной карточки комплекта) */
  --lp-primary-rgb:
    245, 0, 87; /* RGB-компоненты основного цвета (нужны для свечения и пульсации) */

  --lp-accent-gold: #ffb800; /* Дополнительный акцент (бейджи "Выгодно", рейтинги) */

  /* === ФОНЫ И ПОВЕРХНОСТИ === */
  --lp-bg: #f4f5f7; /* Цвет фона всей страницы и блоков с отзывами */
  --lp-surface: #ffffff; /* Цвет фона основных карточек (по умолчанию белый) */

  /* === ТЕКСТ === */
  --lp-text-main: #242424; /* Главный цвет текста (почти черный) */
  --lp-text-muted: #8c8c8c; /* Второстепенный текст (серый) */

  /* === ЛИНИИ И ОБВОДКИ === */
  --lp-border: #eaeaea; /* Цвет всех рамок, инпутов и разделительных линий */

  /* === ТЕМНЫЙ ФУТЕР === */
  --lp-footer-bg: #1c1c22; /* Цвет фона подвала */
  --lp-footer-text: #a0a0b0; /* Цвет тусклого текста в подвале */
  --lp-footer-border: rgba(
    255,
    255,
    255,
    0.08
  ); /* Линия-разделитель в подвале */

  /* === ТЕНИ === */
  --lp-shadow-card: 0 4px 16px rgba(0, 0, 0, 0.04); /* Тень белых карточек */
  --lp-shadow-photo: 0 8px 24px rgba(0, 0, 0, 0.08); /* Тень фотографий */
  --lp-shadow-sticky: 0 -4px 10px rgba(0, 0, 0, 0.05); /* Тень нижней плавающей панели */
  --lp-shadow-primary: 0 4px 12px rgba(var(--lp-primary-rgb), 0.3); /* Тень кнопок/бейджей в цвет бренда */

  /* === СКРУГЛЕНИЯ === */
  --lp-radius-card: 16px; /* Скругление больших карточек */
  --lp-radius-btn: 12px; /* Скругление кнопок и полей ввода */
  --lp-radius-img: 20px; /* Скругление фотографий */

  /* === ШРИФТЫ === */
  --lp-font-main: "Inter", "Segoe UI", sans-serif;
}

/* ── Базовые настройки ── */
body {
  font-family: var(--lp-font-main);
  background-color: var(--lp-bg);
  color: var(--lp-text-main);
  line-height: 1.5;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}
a {
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 16px;
  color: var(--lp-text-main);
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.lp-page {
  padding: 24px 0 0px;
}

/* ── Обёртки Маркетплейса (Белые карточки) ── */
.lp-marketplace-wrapper {
  max-width: 1140px;
  margin: 0 auto 24px auto;
  padding: 0 15px;
}

.lp-marketplace-card {
  background: var(--lp-surface);
  border-radius: var(--lp-radius-card);
  padding: 24px;
  box-shadow: var(--lp-shadow-card);
}

/* Сетка на ПК: 2 колонки */
.lp-marketplace-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 992px) {
  .lp-marketplace-top {
    grid-template-columns: 450px 1fr;
    align-items: start;
  }
  .lp-marketplace-card {
    padding: 32px;
  }
}

.lp-marketplace-card .lp-section,
.lp-marketplace-card .lp-hero,
.lp-marketplace-card .lp-main-photo,
.lp-marketplace-card .lp-prices,
.lp-marketplace-card .lp-cta {
  padding: 10px 0;
}
.lp-marketplace-card .container {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

/* ── Заголовок (Hero) ── */
.lp-hero__title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 16px;
  text-align: left;
}
@media (min-width: 768px) {
  .lp-hero__title {
    font-size: 32px;
  }
}

/* ── Навигация (Возврат в каталог) ── */
.lp-nav-bar {
  max-width: 1140px;
  margin: 0 auto 16px auto;
  padding: 0 15px;
}

.lp-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lp-text-muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.lp-back-link:hover {
  color: var(--lp-primary);
}

.lp-back-link i {
  font-size: 20px;
}

/* ── Стилизованные Фотографии (Главное фото) ── */
.lp-main-photo__inner {
  position: relative; /* Обязательно оставляем для бейджика скидки! */
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  background: transparent;

  /* Делаем контейнер невидимым гибким центром (Flexbox) */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Убираем тени, рамки и скругления у прозрачного контейнера */
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.lp-main-photo__img {
  /* Картинка адаптируется, не превышая размеры контейнера */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;

  border-radius: var(--lp-radius-img);
  box-shadow: var(--lp-shadow-photo);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface); /* Защита для PNG с прозрачным фоном */
}

.lp-discount-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--lp-primary);
  color: var(--lp-color-white);
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  z-index: 2;
  box-shadow: var(--lp-shadow-primary);
}

/* ── Стилизованные Фотографии (В описании) ── */
.lp-content-photo-wrapper {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  margin: 24px auto;
  background: transparent;

  /* Делаем контейнер невидимым гибким центром (Flexbox) */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Убираем тени, рамки и скругления у прозрачного контейнера */
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.lp-content-img {
  /* Картинка адаптируется, не превышая размеры контейнера */
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: 0;

  border-radius: var(--lp-radius-img);
  box-shadow: var(--lp-shadow-photo);
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
}
/* ── Стилизованное Видео ── */
.lp-video-wrapper {
  width: 100%;
  max-width: 340px; /* Делаем чуть уже, чем 400px, иначе вертикальное видео на ПК будет слишком высоким */
  margin: 24px auto;
  background: transparent;

  /* Делаем гибким центром, как у фото */
  display: flex;
  align-items: center;
  justify-content: center;

  /* Убираем рамки и тени у контейнера */
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.lp-video {
  /* Видео само обтягивает себя и не превышает размеры контейнера */
  max-width: 100%;
  max-height: 75vh; /* Защита для ПК: видео никогда не будет выше 75% высоты экрана */
  width: auto;
  height: auto;
  display: block;
  outline: none;

  /* ПЕРЕНОСИМ всю красоту на сам плеер */
  border-radius: var(--lp-radius-img);
  box-shadow: var(--lp-shadow-photo);
  border: 1px solid var(--lp-border);
  background: var(--lp-color-black); /* Оставляем черный фон для плеера */
}

/* ── Ценник ── */
.lp-price-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
}
.lp-price-item--old .lp-price-item__label {
  display: none;
}
.lp-price-item--old .lp-price-item__value {
  color: var(--lp-text-muted);
  font-size: 20px;
  text-decoration: line-through;
}
.lp-price-item--new .lp-price-item__label {
  display: none;
}
.lp-price-item--new .lp-price-item__value {
  color: var(--lp-primary);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

/* ── Стили для дробной части главной цены ── */
.lp-price-fraction {
  font-size: 0.65em;
  font-weight: 700;
}

/* ── Кнопка CTA ── */
.lp-cta .text-center {
  text-align: left !important;
}
.lp-btn-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--lp-primary);
  color: var(--lp-color-white);
  font-size: 18px;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: var(--lp-radius-btn);
  border: none;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  width: fit-content;
  min-width: 240px;
}
.lp-btn-order:hover {
  background: var(--lp-primary-hover);
  color: var(--lp-color-white);
  transform: translateY(-2px);
}
/* Деактивированное состояние кнопки (при отправке) */
form.submited .lp-btn-order {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
  pointer-events: none !important; /* Намертво блокирует клики на уровне CSS */
}
@media (max-width: 500px) {
  .lp-btn-order {
    width: 100%;
  }
}

.lp-btn-pulse {
  animation: pulse-btn 2s infinite;
}
.lp-btn-pulse:hover {
  animation: none;
}

/* ── Описание и Текст ── */
.lp-section__heading {
  font-size: 22px;
  margin-bottom: 20px;
  text-transform: uppercase;
  text-align: left;
}
.lp-section__heading--accent {
  color: var(--lp-primary);
}
.lp-text-block {
  font-size: 16px;
  line-height: 1.6;
  color: var(--lp-text-main);
  text-align: left;
}

/* ── Характеристики (Marketplace Table Style) ── */
.lp-specs ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lp-specs li {
  display: flex;
  flex-direction: column; /* На телефоне название сверху, значение снизу */
  padding: 12px 0;
  border-bottom: 1px solid var(--lp-border);
  font-size: 15px;
  line-height: 1.4;
}

.lp-specs li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lp-specs li::before {
  display: none !important; /* Убираем маркер-точку */
}

/* Настраиваем левую часть (Название характеристики) */
.lp-specs li b {
  color: var(--lp-text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

/* На ПК делаем 2 аккуратные колонки в одну строку */
@media (min-width: 768px) {
  .lp-specs li {
    flex-direction: row;
    align-items: baseline; /* Выравниваем по базовой линии текста */
  }

  .lp-specs li b {
    width: 40%; /* Название занимает 40% ширины карточки */
    flex-shrink: 0;
    margin-bottom: 0;
    padding-right: 16px;
  }
}

/* ── Шаги заказа ── */
.lp-steps .row {
  display: flex;
  flex-wrap: wrap;
}
.lp-step {
  padding: 16px 10px;
  text-align: center;
  height: 100%;
}
.lp-step__icon {
  width: 56px;
  height: 56px;
  background: var(--lp-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
  color: var(--lp-primary);
}
.lp-step__title {
  font-size: 16px;
  margin-bottom: 4px;
}
.lp-step__text {
  font-size: 14px;
  color: var(--lp-text-muted);
  margin: 0;
}

/* ── Опции Цен ── */
.lp-po-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lp-po-header {
  text-align: left;
}
.lp-po-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.lp-po-description {
  color: var(--lp-text-muted);
  font-size: 14px;
}

@media (min-width: 768px) {
  .lp-po-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: stretch;
  }
  .lp-po-header {
    grid-column: 1 / -1;
  }
}

.lp-po-option {
  cursor: pointer;
  display: block;
  margin: 0;
  height: 100%;
}
.lp-po-option input {
  display: none;
}
.lp-po-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 2px solid var(--lp-border);
  border-radius: var(--lp-radius-btn);
  background: var(--lp-surface);
  height: 100%;
  transition: 0.2s;
}
.lp-po-option input:checked + .lp-po-card {
  border-color: var(--lp-primary);
  background: var(--lp-primary-light);
}
.lp-po-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.lp-po-name {
  font-size: 16px;
  font-weight: 700;
}
.lp-po-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--lp-primary);
}
.lp-po-sub {
  font-size: 13px;
  color: var(--lp-text-muted);
  line-height: 1.4;
}
.lp-po-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 8px;
  background: var(--lp-accent-gold);
  color: var(--lp-color-black);
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  align-self: flex-start;
}

/* ── Отзывы (Центрирование и ограничение ширины) ── */
.lp-reviews .owl-carousel {
  position: relative;
}

.lp-reviews .owl-stage {
  display: flex;
}
.lp-reviews .owl-item {
  display: flex;
  flex: 1 0 auto;
  justify-content: center; /* Центрируем саму карточку внутри слайдера */
}

.lp-review-card {
  background: var(--lp-bg);
  border-radius: var(--lp-radius-card);
  padding: 24px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%; /* На телефонах 100% */
}

@media (min-width: 992px) {
  .lp-review-card {
    width: 60%; /* На ПК карточка занимает 60% и центрируется */
  }
}

.lp-review-card__img {
  border-radius: 12px;
  margin-bottom: 16px;
  width: 100%;
  max-width: 280px;
  align-self: center;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
}
.lp-review-card__text {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  font-style: italic;
  flex-grow: 1;
}
.lp-review-card__author {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--lp-border);
  padding-top: 16px;
}
.lp-review-card__name {
  font-weight: 700;
}

.owl-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.owl-prev,
.owl-next {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  background: var(--lp-surface) !important;
  color: var(--lp-text-main) !important;
  border-radius: 50% !important;
  box-shadow: var(--lp-shadow-photo) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 30px !important;
  margin: 0 -20px !important;
  transition: 0.2s;
}
.owl-prev:hover,
.owl-next:hover {
  color: var(--lp-primary) !important;
}
@media (max-width: 991px) {
  .owl-prev,
  .owl-next {
    width: 36px !important;
    height: 36px !important;
    font-size: 26px !important;
    margin: 0 -10px !important;
  }
}

/* ── Форма заказа ── */
.lp-order__form {
  text-align: left;
}
.lp-order__field {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-btn);
  background: var(--lp-bg);
  font-size: 16px;
  margin-bottom: 16px;
  transition: 0.2s;
  outline: none;
}
.lp-order__field:focus {
  border-color: var(--lp-primary);
  background: var(--lp-surface);
}
.lp-order__consent {
  font-size: 13px;
  color: var(--lp-text-muted);
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* ── Темный Футер ── */
.lp-footer {
  background: var(--lp-footer-bg);
  color: var(--lp-footer-text);
  text-align: center;
  font-size: 14px;
  padding: 40px 0;
  margin-top: 24px;
}
.lp-footer__hours {
  color: var(--lp-color-white);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}
.lp-footer__info p {
  margin: 4px 0;
}
.lp-footer__links {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--lp-footer-border);
}
.lp-footer__links a {
  color: var(--lp-color-white);
  margin: 0 12px;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-block;
}
.lp-footer__links a:hover {
  color: var(--lp-primary);
}

/* ── Sticky Bar ── */
.lp-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--lp-surface);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--lp-shadow-sticky);
  z-index: 1000;
  transform: translateY(100%);
  transition: 0.3s;
}
.lp-sticky-bar.is-visible {
  transform: translateY(0);
}
.lp-sticky-bar__price {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.lp-sticky-bar__price-old {
  font-size: 13px;
  color: var(--lp-text-muted);
  text-decoration: line-through;
}
.lp-sticky-bar__price-new {
  font-size: 22px;
  font-weight: 800;
  color: var(--lp-primary);
}
.lp-sticky-bar .lp-btn-order {
  min-width: auto;
  padding: 12px 24px;
  font-size: 15px;
}
@media (min-width: 992px) {
  .lp-sticky-bar {
    display: none !important;
  }
}

/* ── Анимации ── */
@keyframes pulse-btn {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--lp-primary-rgb), 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(var(--lp-primary-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--lp-primary-rgb), 0);
  }
}
