/**
 * Сторінка товару — сучасний шар (структура без змін)
 * Scoped: .page-product
 */

.page-product {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  color: var(--pm-text);
  background: #f7f3f0;
}

/* ── Заголовок сторінки ── */
.page-product .product-page__title {
  padding: 1.25rem 0 0.5rem;
  background: transparent;
}

.page-product .product-page__title .sectionHeader {
  margin: 0;
}

.page-product .product-page__title .header-text {
  margin: 0;
  padding: 0 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--pm-primary) !important;
  background: transparent !important;
  border-left: 4px solid var(--pm-accent);
}

/* ── Головний блок: галерея + замовлення ── */
.page-product .product-page__buy {
  padding: 1rem 0 2.5rem;
}

.page-product .product-page__buy > .container > .row {
  align-items: flex-start;
}

/* Галерея */
.page-product .product-gallery {
  height: auto;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(93, 64, 55, 0.08);
  box-shadow: var(--pm-shadow);
  overflow: visible;
}

.page-product .product-gallery .gallery-top,
.page-product .product-gallery .swgallery-pad {
  border-radius: 14px;
  overflow: hidden;
}

.page-product .product-gallery .gallery-top {
  height: auto;
  width: 100%;
}

.page-product .product-img.ratio-container-1-1 img,
.page-product .product-gallery img {
  height: 100% !important;
  width: 100%;
  object-fit: contain;
}

.page-product .gallery-thumbs {
  padding: 0.75rem 0 0.15rem;
  max-height: none !important;
}

.page-product .gallery-thumbs .swiper-slide {
  height: auto;
  padding: 0.35rem;
  border: 2px solid rgba(93, 64, 55, 0.1);
  border-radius: 12px;
  background: #faf6f2;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-product .gallery-thumbs .swiper-slide-thumb-active {
  border-color: var(--pm-accent);
  box-shadow: 0 4px 14px rgba(199, 91, 57, 0.2);
  opacity: 1;
}

.page-product .swiper-button-next,
.page-product .swiper-button-prev {
  color: var(--pm-accent);
}

.page-product .swiper-pagination-bullet-active {
  background: var(--pm-accent);
}

/* Картка замовлення */
.page-product .order-form-card {
  margin-bottom: 1rem;
  border: 1px solid rgba(93, 64, 55, 0.08);
  border-radius: 20px;
  overflow: visible;
  background: #fff;
  box-shadow: var(--pm-shadow);
}

.page-product .order-form-card .card-header.primary-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 1.2rem 1.35rem;
  border: none;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(135deg, var(--pm-primary) 0%, #6d4c41 55%, var(--pm-warm) 100%);
  color: #fff;
  cursor: default;
}

.page-product .order-form-card .card-header h2 {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.page-product .order-form-card .product-price {
  flex-shrink: 0;
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--pm-peach);
  white-space: nowrap;
}

.page-product .order-form-card .card-body {
  padding: 1.25rem 1.35rem 0.5rem;
}

.page-product ul.product-attributes {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.65;
  border-bottom: 1px solid rgba(93, 64, 55, 0.1);
}

.page-product ul.product-attributes li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding: 0.35rem 0;
}

.page-product ul.product-attributes span {
  min-width: 5.5rem;
  font-weight: 700;
  color: var(--pm-primary);
}

.page-product .order-form-inner {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: 0.85rem 1.15rem;
  align-items: center;
  font-size: 1rem;
}

.page-product .order-form-inner .col-form-label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--pm-muted);
}

.page-product .c-stepper.js-spinner {
  display: flex;
  align-items: stretch;
  max-width: 9.5rem;
  border: 1px solid rgba(93, 64, 55, 0.15);
  border-radius: 12px;
  overflow: hidden;
  background: #faf6f2;
}

.page-product .c-stepper__controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.5rem;
  border: none;
  background: var(--pm-light);
  color: var(--pm-primary);
  font-size: 1.15rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.page-product .c-stepper__controls button:hover {
  background: var(--pm-accent);
  color: #fff;
}

.page-product .c-stepper input.quantity {
  border: none;
  background: #fff;
  font-weight: 700;
  color: var(--pm-primary);
}

.page-product #productTotal,
.page-product input#productTotal {
  font-size: clamp(1.35rem, 3vw, 1.75rem) !important;
  font-weight: 800 !important;
  color: var(--pm-accent) !important;
}

.page-product .order-form-card .card-footer {
  padding: 1rem 1.35rem 1.25rem;
  background: #faf6f2;
  border-top: 1px solid rgba(93, 64, 55, 0.08);
}

.page-product .order-form-card .card-footer .d-flex {
  gap: 0.65rem;
}

.page-product #addToCart.btn-primary {
  flex: 1;
  min-height: 2.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--pm-accent);
  border-color: var(--pm-accent);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(199, 91, 57, 0.35);
}

.page-product #addToCart.btn-primary:hover {
  background: #b54a2a;
  border-color: #b54a2a;
}

.page-product .btn_favorite {
  border-radius: 12px;
}

/* Месенджери */
.page-product .product-details .messengers-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.5rem 0 0;
  padding: 0;
}

.page-product .messengers-links a {
  text-decoration: none;
}

.page-product .messengers-links .messenger-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(93, 64, 55, 0.1);
  box-shadow: 0 4px 14px rgba(50, 25, 17, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-product .messengers-links a:hover .messenger-icon {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(50, 25, 17, 0.12);
}

/* Теги + замовлення в 1 клік */
.page-product .product-page__extras {
  padding-bottom: 1.5rem;
}

.page-product .tags_title {
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pm-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.page-product .product_tag_container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-product .product_tag {
  display: inline-block;
}

.page-product .chip,
.page-product a.tag_link.chip {
  display: inline-flex;
  align-items: center;
  height: auto;
  min-height: 2rem;
  padding: 0.35rem 0.9rem;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--pm-primary);
  background: #fff;
  border: 1px solid rgba(93, 64, 55, 0.12);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.page-product .chip:hover,
.page-product a.tag_link.chip:hover {
  color: #fff;
  background: var(--pm-accent);
  border-color: var(--pm-accent);
  text-decoration: none;
}

.page-product .product-page__oneclick-title {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pm-primary) !important;
}

.page-product form.additional-form.oneclickorder-form {
  padding: 1.1rem 1.15rem;
  background: #fff;
  border: 1px solid rgba(93, 64, 55, 0.1);
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(50, 25, 17, 0.06);
}

.page-product form.additional-form .form-outline .form-control {
  border-radius: 10px;
  border-color: rgba(93, 64, 55, 0.2);
}

.page-product form.additional-form .form-control:focus {
  border-color: var(--pm-accent);
  box-shadow: 0 0 0 3px rgba(199, 91, 57, 0.15);
}

.page-product #oneClickOrderSend.btn-primary {
  border-radius: 10px;
  font-weight: 700;
}

/* Комплекти (subproducts) */
.page-product .container.subprods {
  padding-bottom: 1.5rem;
}

.page-product .subproduct-wrp {
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(93, 64, 55, 0.1);
  box-shadow: 0 4px 16px rgba(50, 25, 17, 0.06);
}

/* Опис + відгуки */
.page-product .product-page__details {
  padding: 0 0 3rem;
}

.page-product .col-product-characteristics {
  padding: 0 !important;
}

.page-product .col-product-characteristics > .card {
  border: 1px solid rgba(93, 64, 55, 0.08);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--pm-shadow);
}

.page-product .col-product-characteristics > .card > .card-body {
  padding: 1.35rem 1.5rem 1.5rem;
}

.page-product .col-product-characteristics .nav-tabs {
  gap: 0.35rem;
  margin-bottom: 1.25rem !important;
  padding-bottom: 0;
  border-bottom: 2px solid rgba(93, 64, 55, 0.1);
}

.page-product .col-product-characteristics .nav-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--pm-muted);
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 10px 10px 0 0;
  background: transparent;
}

.page-product .col-product-characteristics .nav-tabs .nav-link.active,
.page-product .col-product-characteristics .nav-tabs .nav-link:hover {
  color: var(--pm-primary);
  background: rgba(199, 91, 57, 0.06);
  border-bottom-color: var(--pm-accent);
}

.page-product .col-product-characteristics .tab-pane {
  padding-top: 0.25rem;
}

.page-product .col-product-characteristics h6 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--pm-primary);
}

.page-product p.description {
  font-size: 1.05rem;
  line-height: 1.65;
  text-indent: 0;
  color: var(--pm-text);
}

.page-product table.product-characteristics,
.page-product table.tbl-product-description {
  font-size: 1rem;
  border-radius: 12px;
  overflow: hidden;
}

.page-product .table-striped th {
  background: linear-gradient(180deg, #faf6f2, #f3ece8);
  color: var(--pm-primary);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.page-product .table-striped td {
  color: var(--pm-text);
}

.page-product #review-btn-add {
  margin-bottom: 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(199, 91, 57, 0.25);
}

.page-product .card.card_review {
  margin-bottom: 1rem;
  border: 1px solid rgba(93, 64, 55, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(50, 25, 17, 0.06);
}

/* Trust block (delpayref) на сторінці товару */
.page-product section.home-trust.bottom-cards-icon {
  margin-top: 0;
  padding: 2.5rem 0 3rem;
  background: #fff;
}

/* ── Мобільний ── */
@media (max-width: 767.98px) {
  .page-product .product-page__title {
    padding-top: 0.75rem;
  }

  .page-product .product-page__buy {
    padding-bottom: 1.75rem;
  }

  .page-product .product-gallery {
    padding: 0.75rem;
    border-radius: 16px;
  }

  .page-product .order-form-inner {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .page-product .c-stepper.js-spinner {
    max-width: 100%;
  }

  .page-product .product-page__extras > .row > .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 1.25rem;
  }

  .page-product .col-product-characteristics > .card > .card-body {
    padding: 1rem;
  }

  .page-product .col-product-characteristics .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .page-product .col-product-characteristics .nav-tabs .nav-link {
    white-space: nowrap;
    font-size: 0.88rem;
    padding: 0.55rem 0.75rem;
  }
}

@media (min-width: 768px) {
  .page-product .product-details .messengers-links {
    justify-content: flex-start;
  }
}
