/* =======================================================================
   PRODUCT SINGLE — SLIDERS + MODALS (clean)
   ======================================================================= */


/* =======================================================================
   1) TOP GALLERY (main + thumbs)
   ======================================================================= */

.slider__gallery{
  display:flex;
  gap:18px;
  align-items:flex-start;
}

/* thumbs column */
.thumbs-wrap{
  flex:0 0 110px;
  width:110px;
  height:520px;
  overflow:hidden;
}
.gallery-thumbs{ width:100%; height:100%; }

/* main swiper */
.swiper-top{
  flex:1 1 auto;
  min-width:0; /* important for flex + swiper */
  height:520px;
  position:relative;
  overflow:hidden;
  border-radius:12px;
}

.swiper-top .swiper-slide{
  width:100% !important;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* ✅ FIX: НЕ растягиваем картинку на весь блок (без апскейла) */
.slider__img{
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  display:block;
}

/* thumbs */
.gallery-thumbs .swiper-slide{
  width:auto !important;
  opacity:.7;
  cursor:pointer;
  border-radius:10px;
  overflow:hidden;
}
.gallery-thumbs .swiper-slide-thumb-active{ opacity:1; }

.slider__img-small{
  width:100%;
  height:78px;
  object-fit:cover;
  display:block;
}

/* nav over main slider */
.swiper-top .swiper-nav{
  position:absolute;
  left:12px;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  justify-content:space-between;
  z-index:20;
  pointer-events:none;
}
.swiper-top .swiper-button-next,
.swiper-top .swiper-button-prev{
  width:44px;
  height:44px;
  border-radius:999px;
  background:#FFA16B;
  pointer-events:auto;
  transition:.2s ease;
}
.swiper-top .swiper-button-next:hover,
.swiper-top .swiper-button-prev:hover{ background:#404040; }


/* =======================================================================
   2) DESCRIPTION SLIDER (desc-swiper)
   ======================================================================= */

.product__desc-slider{ margin-top:18px; }
.desc-swiper{ position:relative; }
.desc-swiper .swiper-wrapper{ align-items:stretch; }
.desc-swiper .swiper-slide{ width:auto !important; }

.desc-slide{
  display:block;
  height:200px;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  border:1px solid rgba(0,0,0,.06);
  cursor:zoom-in;
}
.desc-slide img{
  display:block;
  height:200px;
  width:auto;
  max-width:none;
  object-fit:cover;
  transition:transform .35s ease;
}
.desc-slide:hover img{ transform:scale(1.05); }

.desc-swiper-nav{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:10px;
}

.desc-swiper-prev,
.desc-swiper-next{
  width:42px;
  height:42px;
  border-radius:999px;
  background:#FFA16B;
  transition:.2s ease;
  display:flex;
  align-items:center;
  justify-content:center;
}
.desc-swiper-prev:hover,
.desc-swiper-next:hover{ background:#404040; }

.desc-swiper-prev.swiper-button-lock,
.desc-swiper-next.swiper-button-lock{ display:none !important; }

/* ✅ Возвращаем "нормальные" стрелки как раньше, но ДЕЛАЕМ ИХ БОЛЬШЕ */
.desc-swiper-prev::after,
.desc-swiper-next::after{
  content:'';
  width:28px;
  height:28px;
  display:block;
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
  transition:transform .25s ease;
}

/* те самые SVG из твоего раннего варианта */
.desc-swiper-prev::after{
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 5L8 12L15 19' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.desc-swiper-next::after{
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 5L16 12L9 19' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.desc-swiper-next:hover::after{ transform:translateX(4px); }
.desc-swiper-prev:hover::after{ transform:translateX(-4px); }


/* =======================================================================
   3) LIGHTBOX MODAL
   ======================================================================= */

.img-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
}
.img-modal.open{ display:block; }

.img-modal__overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.8);
  backdrop-filter:blur(3px);
}
.img-modal__content{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px 20px;
}
.img-modal__content img{
  max-width:95vw;
  max-height:90vh;
  border-radius:14px;
  background:#fff;
  box-shadow:0 30px 80px rgba(0,0,0,.45);
}
.img-modal__close{
  position:absolute;
  top:24px;
  right:24px;
  width:44px;
  height:44px;
  border-radius:12px;
  background:rgba(255,255,255,.15);
  border:none;
  cursor:pointer;
  transition:.2s ease;
}
.img-modal__close:hover{ background:rgba(255,255,255,.25); }
.img-modal__close::before,
.img-modal__close::after{
  content:'';
  position:absolute;
  top:50%;
  left:50%;
  width:18px;
  height:2px;
  background:#fff;
}
.img-modal__close::before{ transform:translate(-50%,-50%) rotate(45deg); }
.img-modal__close::after{  transform:translate(-50%,-50%) rotate(-45deg); }


.tab-list, p{
  margin: 0;
}

/* =======================================================================
   4) PRODUCT DESCRIPTION ACCORDION
   ======================================================================= */

.product__description-collapse {
  position: relative;
}

.product__description-content {
  position: relative;
}

.product__description-text > :last-child {
  margin-bottom: 0;
}

.product__description.is-collapsible .product__description-content {
  max-height: var(--description-collapsed-height, 44px);
  overflow: hidden;
  transition: max-height .55s cubic-bezier(.22, 1, .36, 1);
  will-change: max-height;
}

.product__description.is-collapsible:not(.is-open) .product__description-content {
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0,
    rgba(0, 0, 0, 1) 78%,
    rgba(0, 0, 0, .78) 88%,
    rgba(0, 0, 0, .38) 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0,
    rgba(0, 0, 0, 1) 78%,
    rgba(0, 0, 0, .78) 88%,
    rgba(0, 0, 0, .38) 96%,
    transparent 100%
  );
}

.product__description-toggle {
  width: fit-content;
  min-height: 40px;
  margin: 12px auto 0;
  padding: 7px 10px 7px 14px;
  border: 1px solid rgba(39, 49, 61, .18);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #27313D;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  transition: color .25s ease, background-color .25s ease,
    border-color .25s ease, transform .25s ease;
}

.product__description-toggle[hidden] {
  display: none;
}

.product__description-toggle:hover {
  border-color: rgba(255, 161, 107, .7);
  background: rgba(255, 161, 107, .08);
  color: #27313D;
  transform: translateY(-1px);
}

.product__description-toggle:focus-visible {
  outline: 3px solid rgba(0, 111, 166, .25);
  outline-offset: 3px;
}

.product__description-toggle-icon {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: rgba(255, 161, 107, .14);
  transition: background-color .25s ease, transform .45s cubic-bezier(.22, 1, .36, 1);
}

.product__description-toggle-icon::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 8px;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid #E98750;
  border-bottom: 1.5px solid #E98750;
  transform: rotate(45deg);
}

.product__description-toggle:hover .product__description-toggle-icon {
  background: rgba(255, 161, 107, .22);
}

.product__description.is-open .product__description-toggle-icon {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .product__description.is-collapsible .product__description-content,
  .product__description-toggle,
  .product__description-toggle-icon {
    transition-duration: .01ms;
  }
}

/* =======================================================================
   5) RESPONSIVE
   ======================================================================= */

@media (max-width:640px){
  .slider__gallery{
    flex-direction:column;
    gap:12px;
  }

  .swiper-top{
    width:100%;
    height:360px;
  }

  .thumbs-wrap{
    width:100%;
    height:96px;
    flex:0 0 auto;
  }

  .gallery-thumbs{
    width:100%;
    height:100%;
  }

  .gallery-thumbs .swiper-slide{
    width:auto !important;
    height:100%;
    display:flex;
    align-items:center;
  }

  .slider__img-small{
    height:96px;
    width:auto;
    min-width:96px;
    object-fit:cover;
  }

  .desc-slide{ height:180px; min-width:240px; }
  .desc-slide img{ height:180px; }
  .desc-swiper-nav{ justify-content:space-between; }

  .product__benefit{
    flex-direction: column;
    align-items: flex-start;
  }

  .product__description-toggle {
    width: fit-content;
    max-width: 100%;
    min-height: 40px;
    margin: 12px auto 0;
    padding: 7px 10px 7px 14px;
  }
}
