/* Product Page Styles */

/* Product Hero Section (первый экран) */
.product-hero-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  
  gap: 60px;
}

.product-hero__image-col {
  min-width: 0;
}

.product-hero__image-wrapper {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.product-hero-swiper {
  border-radius: 16px;
}

.product-hero-swiper .swiper-wrapper {
  height: 600px;
}

.product-hero-swiper .swiper-slide {
  position: relative;
  height: 100%;
}

.product-hero-swiper .swiper-slide .product-hero__image,
.product-hero-swiper .swiper-slide img {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  object-fit: contain;
  width: 100%;
  height: 100%;
}

.product-hero__image {
  display: block;
  width: 100%;
  height: auto;
}

/* Hero Swiper: стрелки и точки */
.product-hero-swiper .swiper-button-prev,
.product-hero-swiper .swiper-button-next {
  --swiper-navigation-size: 44px;
  --swiper-navigation-color: #fff;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  transition: background 0.2s ease;
}

.product-hero-swiper .swiper-button-prev:hover,
.product-hero-swiper .swiper-button-next:hover {
  background: rgba(0, 0, 0, 0.5);
}

.product-hero-swiper .swiper-button-prev::after,
.product-hero-swiper .swiper-button-next::after {
  font-size: 20px;
}

.product-hero-swiper .swiper-pagination-bullet {
  background: rgba(0, 0, 0, 0.35);
  opacity: 1;
}

.product-hero-swiper .swiper-pagination-bullet:hover {
  background: rgba(0, 0, 0, 0.5);
}

.product-hero-swiper .swiper-pagination-bullet-active {
  background: var(--color-primary, #174783);
}

@media screen and (max-width: 768px) {
  .product-hero-swiper .swiper-wrapper {
    height: 480px;
  }
}

@media screen and (max-width: 640px) {
  .product-hero-swiper .swiper-wrapper {
    height: 360px;
  }
}

@media screen and (max-width: 480px) {
  .product-hero-swiper .swiper-wrapper {
    height: 300px;
  }
}

.product-hero__content {
  max-width: 520px;
}

.product-hero__title {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 500;
  color: var(--color-text);
}

.product-hero__article {
  margin: 0 0 20px;
  font-size: 16px;
  color: var(--color-text-muted);
}

.product-hero__price {
  margin: 0 0 25px;
  font-size: 26px;
  font-weight: 500;
  color: var(--color-text);
}

.product-hero__actions {
  margin-bottom: 30px;
}

.product-hero__button {
  display: inline-block;
}

/* specs + notice теперь стилизуются через .page__content по тегам */

.product-hero__links {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 16px;
}

.product-hero__link {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: transparent 1px solid;
  transition: border-bottom 0.2s;
}

.product-hero__link:hover {
  border-color: var(--color-accent);
}

.product-hero__link_muted {
  color: rgba(255, 95, 46, 0.6);
}

/* Product content: блок с таблицей (TABLE) — заголовок + место под кнопку */
.product-content__table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.product-content__table-title {
  margin: 0;
  font-weight: 600;
  font-size: 30px;
  line-height: 120%;
  color: var(--color-primary);
  text-align: left;
}

.product-content__table-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-content__scheme-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 18px;
  font-weight: 500;
  color: #ffffff;
  background-color: var(--color-accent);
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.product-content__scheme-link:hover {
  color: #ffffff;
  background-color: var(--color-accent-hover);
}

.product-content__scheme-link:active {
  transform: translateY(1px);
}

/* Product Specifications Section */
.product-specs-table {
  width: 100%;
  overflow-x: auto;
}

.product-specs-table table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 0;
}

.product-specs-table thead th {
  padding: 15px 20px;
  text-align: left;
  font-size: 22px;
  font-weight: 500;
  color: #ffffff;
  background-color: var(--color-primary, #174783);
  border: 5px solid #ffffff;
  border-top: 0;
  border-bottom-width: 5px;
  border-right-width: 5px;
  border-left-width: 5px;
}

.product-specs-table thead th:not(:last-child) {
  border-right: none;
}

.product-specs-table thead tr:first-child th {
  border-top-width: 0;
}

.product-specs-table tbody td {
  padding: 15px 20px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--color-text);
  border: 5px solid #ffffff;
  border-top: 0;
  border-bottom-width: 5px;
  border-right-width: 5px;
  border-left-width: 5px;
  vertical-align: middle;
}

.product-specs-table tbody td:not(:last-child) {
  border-right: none;
}

.product-specs-table tbody tr:first-child td {
  border-top-width: 5px;
}

.product-specs-table tbody tr:nth-child(odd) {
  background-color: #eff4fa;
}

.product-specs-table tbody tr:nth-child(even) {
  background-color: #ffffff;
}
.product-advantages-grid__content>p:nth-child(2){
  margin-top: 0;
}
/* Product scheme image under specs */
.product-content__scheme img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Anchor scroll offset for fixed header */
#product-specs,
#product-specs-table,
#product-scheme {
  scroll-margin-top: 100px;
}

/* Product Features Section */
.product-features-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.product-features-section__title {
  margin-bottom: 60px;
}

.product-features-section__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.product-features-section__item {
  list-style: none;
}

/* Product Advantages (шаблон 1: чередование 6+6) */
.product-advantages-alt {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.product-advantages-alt__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.product-advantages-alt__row--reverse .product-advantages-alt__col--image {
  order: 2;
}

.product-advantages-alt__row--reverse .product-advantages-alt__col--text {
  order: 1;
}

.product-advantages-alt__col {
  min-width: 0;
}

.product-advantages-alt__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.product-advantages-alt__heading {
  margin-top: 0;
  font-weight: 600;
  font-size: 30px;
  line-height: 120%;
  color: var(--color-text);
  text-align: left;
}

/* Product Advantages (шаблон 2: сетка 4 колонки) */
.product-advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.product-advantages-grid__item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-advantages-grid__image-wrapper {
  margin-bottom: 24px;
}

.product-advantages-grid__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.product-advantages-grid__content {
  flex: 1;
}

.product-advantages-grid__title {
  margin-top: 0;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 22px !important;
  line-height: 133%;
  color: var(--color-text);
  text-align: left;
}
@media (max-width: 576px) {
  .product-advantages-grid__title {
    font-size: 20px !important;
  }
}
@media (max-width: 1200px) {
  .product-advantages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

@media (max-width: 768px) {
  .product-advantages-alt__row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-advantages-alt__row--reverse .product-advantages-alt__col--image,
  .product-advantages-alt__row--reverse .product-advantages-alt__col--text {
    order: unset;
  }

  .product-advantages-grid {
    grid-template-columns: 1fr;
  }
}

/* Product Details Section */
.product-details-section {
  padding-top: 30px;
  padding-bottom: 60px;
}

.product-details-section__content {
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
}

.product-details-section__content h2 {
  font-size: 30px;
  font-weight: 500;
  color: var(--color-primary, #174783);
  margin: 0 0 20px;
}

.product-details-section__content p {
  margin: 0 0 20px;
}

.product-details-section__content p:last-child {
  margin-bottom: 0;
}

/* Product Delivery Banner (rec637034614) */
.product-delivery-banner {
  padding-top: 60px;
  padding-bottom: 60px;
}

.product-delivery-banner__inner {
  max-width: 66.666%;
  margin-left: auto;
  margin-right: auto;
}

.product-delivery-banner__text {
  background-color: var(--color-primary, #174783);
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 400;
  border-radius: 5px;
  padding: 24px 28px;
}

.product-delivery-banner__text p {
  margin: 0 0 0.75em;
}

.product-delivery-banner__text p:last-of-type {
  margin-bottom: 0;
}

.product-delivery-banner__text ul {
  margin: 0.5em 0 0.75em;
  padding-left: 1.25em;
  list-style-type: disc;
}

.product-delivery-banner__text li {
  margin-bottom: 0.25em;
}

.product-delivery-banner__text li:last-child {
  margin-bottom: 0;
}

@media screen and (max-width: 768px) {
  .product-delivery-banner__inner {
    max-width: 100%;
  }

  .product-delivery-banner__text {
    padding: 20px;
    font-size: 16px;
  }
}

/* Product Gallery Popup */
.product-gallery-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-gallery-popup.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.product-gallery-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.product-gallery-popup__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
  z-index: 1;
}

.product-gallery-popup__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.product-gallery-popup__close:hover {
  color: #c7c7c7;
}

.product-gallery-popup-swiper {
  width: 100%;
  border-radius: 12px;
}

.product-gallery-popup-swiper .swiper-wrapper {
  height: 600px;
}

.product-gallery-popup-swiper .swiper-slide {
  position: relative;
  height: 100%;
}

.product-gallery-popup-swiper .swiper-slide .product-hero__image,
.product-gallery-popup-swiper .swiper-slide img {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  object-fit: contain;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  border-radius: 16px;
}

.product-gallery-popup-prev,
.product-gallery-popup-next {
  --swiper-navigation-size: 25px;
  --swiper-navigation-color: #fff;
  width: 48px;
  height: 48px;
  background: rgba(20, 38, 52, 0.12);
  border-radius: 50%;
  transition: background 0.2s ease;
}
.swiper-button-prev:after{
  margin-right: 3px;
}
.swiper-button-next:after{
  margin-left: 3px;
}
.product-gallery-popup-prev:hover,
.product-gallery-popup-next:hover {
  background: rgba(20, 38, 52, 0.2);
}

.product-gallery-popup__caption {
  margin: 16px 0 0;
  padding: 0 40px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  min-height: 1.5em;
}

@media screen and (max-width: 768px) {
  .product-gallery-popup-swiper .swiper-wrapper {
    height: 480px;
  }
}

@media screen and (max-width: 640px) {
  .product-gallery-popup-swiper .swiper-wrapper {
    height: 360px;
  }

  .product-gallery-popup-prev,
  .product-gallery-popup-next {
    --swiper-navigation-size: 40px;
    width: 40px;
    height: 40px;
  }

  .product-gallery-popup__caption {
    font-size: 16px;
    padding: 0 16px;
  }
}

@media screen and (max-width: 480px) {
  .product-gallery-popup-swiper .swiper-wrapper {
    height: 300px;
  }
}

/* Responsive */
@media screen and (max-width: 980px) {
  .product-hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .product-hero__title {
    font-size: 30px;
  }

  .product-specs-table thead th {
    font-size: 18px;
    padding: 12px 16px;
  }

  .product-specs-table tbody td {
    font-size: 16px;
    padding: 12px 16px;
  }

  .product-features-section {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .product-features-section__title {
    margin-bottom: 40px;
  }

  .product-features-section__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .product-details-section {
    padding-top: 30px;
    padding-bottom: 40px;
  }

  .product-details-section__content h2 {
    font-size: 24px;
  }
}

@media screen and (max-width: 640px) {
  .product-hero-section {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .product-hero__title {
    font-size: 24px;
  }

  .product-specs-table thead th {
    font-size: 16px;
    padding: 10px 12px;
  }

  .product-specs-table tbody td {
    font-size: 14px;
    padding: 10px 12px;
  }

  .product-features-section__list {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .product-details-section__content h2 {
    font-size: 22px;
  }
}

