/* ============================================================
   СЕКЦИЯ
   ============================================================ */
.product__page {
  background-color: var(--bg-light);
}

.product__section {
  padding: 50px;
}

@media (width <= 1000px) {
  .product__section {
    padding: 20px;
  }
}

.product__content {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 80px;
}

.product__button--arrow {
  width: 20px;
  height: 25px;
}

/* ============================================================
   ГАЛЕРЕЯ (общий контейнер)
   ============================================================ */
.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  width: 100%;
  max-width: 600px;
  flex: 0 0 auto;
}

/* ============================================================
   ГЛАВНЫЙ СЛАЙДЕР (Swiper)
   ============================================================ */
.gallery__main {
  position: relative;
  width: 100%;
  overflow: hidden; /* соседний слайд выезжает из-за края */
  touch-action: pan-y; /* вертикальный скролл не блокируем */
}

.gallery__main .swiper-wrapper {
  display: flex;
  align-items: center;
}

.gallery__main .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  flex-shrink: 0;
}

.gallery__image {
  width: 100%;
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none; /* drag не выделяет картинку */
}

/* ============================================================
   СТРЕЛКИ
   ============================================================ */
.gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: opacity 0.2s ease;
}

.gallery__arrow:hover {
  opacity: 0.6;
}

.gallery__arrow--prev {
  left: 0;
  transform: translateY(-50%) rotate(180deg);
}

.gallery__arrow--next {
  right: 0;
}

.gallery__arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.gallery__arrow-icon {
  width: 32px;
  height: 32px;
  fill: currentColor;
  stroke: #333;
}

/* ============================================================
   МИНИАТЮРЫ (Swiper)
   ============================================================ */
.gallery__thumbs {
  width: 100%;
  overflow: hidden;
  margin-top: 16px;
}

.gallery__thumbs .swiper-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery__thumbs .swiper-slide {
  cursor: pointer;
  opacity: 0.5;
  transition:
    opacity 0.2s ease,
    border-color 0.2s ease;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  box-sizing: border-box;
  height: auto;
  flex-shrink: 0;
}

.gallery__thumbs .swiper-slide:hover {
  opacity: 1;
}

.gallery__thumbs .swiper-slide-thumb-active {
  opacity: 1;
  border-color: #ff9800;
}

.gallery__thumb {
  width: 100%;
  height: 80px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ============================================================
   ИНФО
   ============================================================ */
.product__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 60px;
  padding-top: 40px;
}

.product__title {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--bg-dark);
}

.product__title-accent {
  color: var(--accent);
}

.product__descr {
  line-height: 1.5;
  color: var(--bg-dark);
  max-width: 500px;
}

/* Характеристики */
.product__rubrick {
  border: 1px solid var(--accent);
  padding: 10px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  line-height: 18px;
}

.product__specs {
  display: flex;
  gap: 40px;
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  flex-wrap: wrap;
}

.product__spec {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product__spec-icon {
  width: 24px;
  height: 24px;
}

.product__spec-text {
  font-size: 16px;
  color: var(--bg-dark);
}

/* Кнопка */
.product__button {
  padding: 20px;
  background-color: var(--accent);
  color: var(--bg-light);
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.button__back {
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.product__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}
.gallery__thumb-item {
  margin: 0 !important;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 1200px) {
  .product__content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
  }

  .gallery {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .product__info {
    align-items: center;
    gap: 20px;
    padding-top: 0;
    text-align: center;
  }

  .product__specs {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .gallery__thumb {
    height: 70px;
  }

  .product__title {
    font-size: 28px;
    line-height: 30px;
  }

  .product__button {
    width: 100%;
    text-align: center;
  }
}
