/* ===== Товар: карточка товара ===== */

.product {
  margin-bottom: 120px;
}

.product__grid {
  display: grid;
  grid-template-columns: 705px 1fr;
  column-gap: 105px;
  max-width: 1450px;
  margin-top: 40px;
}

/* --- Галерея --- */

.product-gallery__slider {
  height: 540px;    
  border: 1px solid #CBD3E3;
  border-radius: 30px;
}

.product-gallery__slide {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-gallery__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-gallery__badges {
  position: absolute;
  top: 36px;
  right: 27px;
  display: flex;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-gallery__badge {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 24px;
  border-radius: 20px;
  background-color: #fff;
  font-size: 18px;
  font-weight: 600;
  color: #272b33;
}

.product-gallery__arrow {
  position: absolute;
  top: 52%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 4px 16px rgba(39, 43, 51, 0.08);
  cursor: pointer;
}

.product-gallery__arrow--prev {
  left: 26px;
}

.product-gallery__arrow--next {
  right: 22px;
}

/* --- Миниатюры --- */

.product-thumbs {
  margin-top: 10px;
}

.product-thumbs .swiper-slide {
  position: relative;
  width: 93px;
  aspect-ratio: 1/1;
  border: 2px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
}

.product-thumbs .swiper-slide.is-active {
  border-color: var(--color-accent);
}

.product-thumbs__img {
  /* position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: 116px;
  max-width: none;
  pointer-events: none; */
  width: 100%;
  height: 100%;
}

/* --- Информация --- */

.product-info__title {
  margin: 0 0 30px;
  font-size: 48px;
  line-height: 1.2;
  font-weight: 500;
  color: #272b33;
}

.product-info__subtitle {
  margin: 0 0 24px;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 500;
  color: #272b33;
}

.product-info__text {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 27px;
  color: #7e848d;
}

.product-info__text.is-collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-info__text-name {
  color: #272b33;
  font-weight: 500;
}

.product-info__block--text {
  margin-bottom: 40px;
}

.product-info__more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: none;
  background: none;
  font-size: 16px;
  font-family: inherit;
  color: #272b33;
  cursor: pointer;
}

.product-info__more span:first-child {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.product-info__more-caret {
  transition: transform 0.25s;
}

.product-info__block.is-expanded .product-info__more-caret {
  transform: rotate(180deg);
}

.product-info__tariffs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px;
  font-size: 20px;
  font-weight: 600;
  color: #272b33;
}

.product-info__tariffs svg {
  flex-shrink: 0;
}

/* --- Характеристики --- */

.product-specs__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-specs__list.is-collapsed .product-specs__row:nth-child(n + 4) {
  display: none;
}

.product-specs__row {
  display: flex;
  align-items: end;
  padding: 7px 0;
  font-size: 16px;
  line-height: 22px;
}

.product-specs__label {
  color: #7e848d;
}

.product-specs__line {
  flex: 1;
  margin: 0 14px;
  border-bottom: 1px dashed #b9bdc1;
  transform: translateY(-4px);
}

.product-specs__value {
  font-weight: 600;
  color: #272b33;
  white-space: nowrap;
}

.product-info__block--specs .product-info__more {
  margin-top: 8px;
}

/* --- Форма заказа --- */

.order-form {
  margin-top: 40px;
  padding: 50px;
  border-radius: 24px;
  background-color: #fff;
}

.order-form__title {
  margin: 0 0 15px;
  font-size: 24px;
  line-height: 30px;
  font-weight: 500;
  color: #272b33;
}

.order-form__desc {
  margin: 0 0 40px;
  font-size: 18px;
  line-height: 26px;
  color: #7e848d;
}

.order-form__subtitle {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 30px;
  font-weight: 500;
  color: #272b33;
}

.order-form__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.order-option {
  position: relative;
  display: block;
  height: 115px;
  padding: 26px 30px 0;
  border: 1px solid transparent;
  border-radius: 16px;
  background-color: #f0f5f9;
  cursor: pointer;
}

.order-option:has(.order-option__input:checked) {
  border-color: var(--color-accent);
}

.order-option__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.order-option__marker {
  position: absolute;
  top: 11px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid #d5dbe2;
  border-radius: 50%;
  background-color: #fff;
}

.order-option__marker svg {
  opacity: 0;
}

.order-option__input:checked ~ .order-option__marker {
  border-color: var(--color-accent);
  background-color: var(--color-accent);
}

.order-option__input:checked ~ .order-option__marker svg {
  opacity: 1;
}

.order-option__label {
  display: block;
  font-size: 15px;
  line-height: 20px;
  color: #7e848d;
}

.order-option__price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.order-option__num {
  font-size: 32px;
  font-weight: 600;
  color: #272b33;
}



.order-option__unit {
  max-width: 48px;
  font-size: 18px;
  line-height: 15px;
  /* color: #7e848d; */
}
.period_price .order-option__unit {
  font-size: 16px;
}
.order-form__fields {
  display: grid;
  gap: 10px;
  margin-top: 40px;
}

.order-form__field {
  position: relative;
}

.order-form__input {
  width: 100%;
  height: 54px;
  padding: 0 24px;
  border: 1px solid #cbd2e2;
  border-radius: 12px;
  background-color: transparent;
  font-size: 15px;
  font-family: inherit;
  color: #272b33;
  outline: none;
}

.order-form__input:focus {
  border-color: var(--color-accent);
}

.order-form__ph {
  position: absolute;
  top: 50%;
  left: 24px;
  transform: translateY(-50%);
  font-size: 15px;
  color: #7e848d;
  pointer-events: none;
}

.order-form__req {
  font-style: normal;
  color: var(--color-accent);
}

.order-form__input:focus ~ .order-form__ph,
.order-form__input:not(:placeholder-shown) ~ .order-form__ph {
  display: none;
}

.order-form__agree {
  position: relative;
  display: flex;
  gap: 12px;
  margin-top: 33px;
  cursor: pointer;
}

.order-form__agree input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.order-form__checkbox {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 1px solid #cbd2e2;
  border-radius: 5px;
  background-color: #fff;
}

.order-form__checkbox svg {
  opacity: 0;
}

.order-form__agree input:checked ~ .order-form__checkbox {
  border-color: var(--color-accent);
  background-color: var(--color-accent);
}

.order-form__agree input:checked ~ .order-form__checkbox svg {
  opacity: 1;
}

.order-form__agree-text {
  font-size: 16px;
  line-height: 24px;
  color: #7e848d;
}

.order-form__agree-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.order-form__actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.order-form__submit {
  font-weight: 600;
  white-space: nowrap;
}

.order-form__login {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--color-accent);
  border-radius: 15px;
  background-color: #fff;
  font-size: 18px;
  font-weight: 600;
  color: #272b33;
}

.order-form__login svg {
  flex-shrink: 0;
}

/* --- Тёмная тема --- */

body.dark .product-info__title,
body.dark .product-info__subtitle,
body.dark .product-info__text-name,
body.dark .product-info__tariffs,
body.dark .product-specs__value,
body.dark .order-form__title,
body.dark .order-form__subtitle,
body.dark .order-option__num {
  color: var(--color-white);
}

body.dark .product-info__text,
body.dark .product-specs__label,
body.dark .order-form__desc,
body.dark .order-option__label,
body.dark .order-option__unit,
body.dark .order-form__ph,
body.dark .order-form__agree-text {
  color: #b4bac2;
}

body.dark .product-info__more {
  color: var(--color-white);
}

body.dark .product-specs__line {
  border-color: #454b52;
}

body.dark .order-form {
  background-color: #1e232b;
}

body.dark .order-option {
  background-color: #272b33;
}

body.dark .order-form__input {
  border-color: #454b52;
  color: var(--color-white);
}

body.dark .order-form__checkbox {
  border-color: #454b52;
  background-color: transparent;
}

body.dark .order-form__agree-text a {
  color: var(--color-white);
}

body.dark .order-form__login {
  background-color: transparent;
  color: var(--color-white);
}


@media(max-width:1500px){
    .product__grid{
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
        max-width:100%;
    }
    .product-gallery{
        max-width:500px;
    }
}

/* --- Адаптив: 641–1024 --- */

@media (max-width: 1024px) {
  .product {
    margin-top: 12px;
    margin-bottom: 80px;
  }

  .product__grid {
    grid-template-columns: minmax(0, 1fr); 
  }

  .product-gallery{
        max-width:initial;
    }

  .product-gallery__slider {
    height: 440px;
  }

  .product-thumbs .swiper-slide {
    width: calc((100% - 50px) / 6);
    height: 64px;
    border-radius: 12px;
  }

  .product-thumbs__img {
    height: 96px;
  }

  .product-info {
    margin-top: 48px;
  }

  .product-info__title {
    font-size: 34px;
    margin-bottom: 20px;
  }

  .product-info__subtitle {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 20px;
  }

  .order-form {
    margin-top: 40px;
    padding: 40px;
  }
}

/* --- Адаптив: ≤640 --- */

@media (max-width: 640px) {
  .product {
    margin-top: 8px;
    margin-bottom: 50px;
  }

  .product-gallery__slider {
    height: auto;
  }

  .product-gallery__slide {
    flex-direction: column;
    align-items: stretch;
  }

  .product-gallery__img {
    align-self: center;
    max-height: 180px;
  }

  .product-gallery__badges {
    position: static;
    order: -1;
    justify-content: flex-end;
    padding-right: 16px;
  }

  .product-gallery__badge {
    height: 44px;
    padding: 0 20px;
    border-radius: 22px;
    font-size: 14px;
  }

  .product-gallery__arrow {
    display: none;
  }

  .product-thumbs {
    margin-top: 44px;
  }

  .product-thumbs .swiper-slide {
    width: 50px;
    height: 50px;
    border-radius: 12px;
  }

  .product-thumbs__img {
    height: 70px;
  }

  .product-info {
    margin-top: 28px;
  }

  .product-info__title {
    font-size: 28px;
    line-height: 34px;
    margin-bottom: 16px;
  }

  .product-info__subtitle {
    font-size: 18px;
    line-height: 25px;
    margin-bottom: 18px;
  }

  .product-info__text {
    font-size: 16px;
    line-height: 24px;
  }

  .product-info__block--text {
    margin-bottom: 26px;
  }

  .product-info__more {
    font-size: 15px;
  }

  .product-info__tariffs {
    gap: 10px;
    margin-bottom: 26px;
    font-size: 18px;
  }

  .product-info__tariffs svg {
    width: 20px;
    height: 20px;
  }

  .product-specs__row {
    padding: 8px 0;
    font-size: 15px;
    line-height: 17px;
  }

  .product-specs__line {
    margin: 0 10px;
  }

  .product-info__block--specs .product-info__more {
    margin-top: 6px;
  }

  .order-form {
    margin-top: 28px;
    padding: 24px;
  }

  .order-form__title {
    font-size: 20px;
    line-height: 26px;
    margin-bottom: 14px;
  }

  .order-form__desc {
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 22px;
  }

  .order-form__subtitle {
    font-size: 20px;
    line-height: 26px;
    margin-bottom: 12px;
  }

  .order-form__options {
    gap: 12px;
  }

  .order-option {
    height: 104px;
    padding: 18px 20px 0;
    border-radius: 20px;
  }

  .order-option__marker {
    top: 10px;
    right: 10px;
  }

  .order-option__price {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .order-option__num,
  .order-option__num--sm {
    font-size: 24px;
  }

  .order-option__unit {
    max-width: none;
    line-height: 16px;
  }

  .order-form__fields {
    gap: 14px;
    margin-top: 28px;
  }

  .order-form__input {
    height: 44px;
    padding: 0 20px;
    border-radius: 14px;
  }

  .order-form__ph {
    left: 20px;
  }

  .order-form__agree {
    gap: 10px;
    margin-top: 22px;
  }

  .order-form__checkbox {
    margin-top: 2px;
  }

  .order-form__agree-text {
    font-size: 15px;
    line-height: 22px;
  }

  .order-form__actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 26px;
  }

  .order-form__submit {
    width: 100%;
    height: 56px;
    padding: 0;
    border-radius: 28px;
    font-size: 18px;
  }

  .order-form__login {
    width: 100%;
    height: 56px;
    border-width: 1.5px;
    border-radius: 28px;
    font-size: 18px;
  }

  .order-form__login svg {
    width: 22px;
    height: 22px;
  }
}