/* Каталог Каталог Каталог Каталог Каталог  */

.catalog {
  margin-top: 30px;
  display: flex;
  padding: 50px 56px;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  align-self: stretch;
  background: transparent;
  overflow: hidden;
}

.catalog__slider.swiper {
  overflow: visible;
  width: 100%;
}

.catalog__slider .swiper-wrapper {
  display: flex;
  gap: 25px;
}

.catalog__slider .swiper-slide {
  width: 290px;
  max-width: 290px;
  flex-shrink: 0;
  margin: unset !important;
}

body.single-product .catalog__slider .catalog__item {
  width: 290px;
  max-width: 290px;
}

@media (max-width: 480px) {
  .catalog__slider .swiper-slide {
    width: calc((100vw - 52px) / 2) !important;
    max-width: calc((100vw - 52px) / 2) !important;
  }

  body.single-product .catalog__slider .swiper-wrapper {
    gap: 12px;
  }

  body.single-product .catalog__slider .catalog__item {
    width: calc((100vw - 52px) / 2) !important;
    max-width: calc((100vw - 52px) / 2) !important;
  }

  body.single-product .catalog__slider .card__img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
  }

  body.single-product .catalog__slider .card__caption {
    align-items: center !important;
    text-align: center !important;
    padding: 0 !important;
  }

  .catalog__slider.swiper {
    overflow: visible;
  }
}

.catalog__heading {
  display: flex;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 36px;
  font-style: normal;
  font-weight: 350;
  line-height: normal;
}

.catalog__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.card__link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.card__media {
  display: block;
  position: relative;
}

.card__media--has-hover .card__img--hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

.card__media--has-hover:hover .card__img--hover,
.catalog__item:hover .card__media--has-hover .card__img--hover {
  opacity: 1;
}

.card__media--has-hover .card__img--primary {
  transition: opacity .35s ease;
}

.card__media--has-hover:hover .card__img--primary,
.catalog__item:hover .card__media--has-hover .card__img--primary {
  opacity: 0;
}

.card__caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  padding: 0 4px;
}

.card__img {
  width: 100%;
  height: 400px !important;
  border-radius: 25px;
  object-fit: cover;
  object-position: top;
}

.card__name {
  color: var(--TextColor, #171717);
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: normal;
  font-weight: 350;
  line-height: normal;
}

.card__price {
  color: rgba(23, 23, 23, 0.7);
  font-family: "SegoeUIWeb";
  font-size: 16px;
  font-style: normal;
  font-weight: 350;
  line-height: normal;
}

.card__price del,
.card__price ins {
  display: block;
}

.card__price del {
  color: rgba(23, 23, 23, 0.45);
  margin: 0 0 2px;
}

.card__price ins {
  text-decoration: none;
}

@media (max-width: 480px) {
  body.post-type-archive-product .catalog__container,
  body.tax-product_cat .catalog__container,
  body.page-template-page-wishlist .catalog__container,
  body.page-wishlist .catalog__container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: stretch !important;
    gap: 24px 12px !important;
  }

  body.post-type-archive-product .catalog__item,
  body.tax-product_cat .catalog__item,
  body.page-template-page-wishlist .catalog__item,
  body.page-wishlist .catalog__item {
    width: 100% !important;
    max-width: 100% !important;
    justify-self: stretch !important;
  }

  body.post-type-archive-product .card__img,
  body.tax-product_cat .card__img,
  body.page-template-page-wishlist .card__img,
  body.page-wishlist .card__img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 2 / 3 !important;
    border-radius: 16px !important;
  }

  body.post-type-archive-product .card__caption,
  body.tax-product_cat .card__caption,
  body.page-template-page-wishlist .card__caption,
  body.page-wishlist .card__caption {
    align-items: center !important;
    text-align: center !important;
    gap: 4px !important;
    padding: 0 !important;
  }

  body.post-type-archive-product .card__name,
  body.tax-product_cat .card__name,
  body.page-template-page-wishlist .card__name,
  body.page-wishlist .card__name {
    color: var(--TextColor, #171717) !important;
    font-family: "SegoeUIWeb" !important;
    font-size: 14px !important;
    font-style: normal !important;
    font-weight: 350 !important;
    line-height: 1.25 !important;
  }

  body.post-type-archive-product .card__price,
  body.tax-product_cat .card__price,
  body.page-template-page-wishlist .card__price,
  body.page-wishlist .card__price {
    color: rgba(23, 23, 23, 0.7) !important;
    font-family: "SegoeUIWeb" !important;
    font-size: 14px !important;
    font-style: normal !important;
    font-weight: 350 !important;
    line-height: 1.25 !important;
  }


  
  .product__description .wishlist-tooltip {
    right: 60px !important;
  }
}

.product__description .card__wishlist {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.product {
  margin-top: 30px;
  display: flex;
  flex-direction: row;
  gap: 15px;
  justify-content: space-between;
}
.product__img {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  align-items: start;
  grid-auto-rows: 1fr;
  grid-auto-rows: min-content;
}

.product__img > img {
  width: 100%;
  height: 686px;
  object-fit: cover;
  border-radius: 15px;
  transition: height 0.3s ease-in-out;
  display: block;
}

.product__description {
  min-width: 360px;
  width: 360px;
  border-radius: 15px;
  background-color: #fbfbfb;
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 40px;
}

.product__description__heading {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product__description__heading > .product__heading {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 15px;
  justify-content: space-between;
}
.product__title {
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 24px;
  font-style: normal;
  font-weight: 350;
  line-height: normal;
}

.product__description__heading > .product__heading > .card__wishlist {
  position: relative;
  top: unset;
  right: unset;
  
  /* Исправляем для белого фона страницы товара */
  background: rgba(23, 23, 23, 0.08);
  border: 1px solid rgba(23, 23, 23, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.product__description__heading > .product__heading > .card__wishlist:hover {
  background: rgba(23, 23, 23, 0.12);
  border-color: rgba(23, 23, 23, 0.25);
}

.product__description__heading > .product__heading > .card__wishlist svg use {
  stroke: #171717;
}

.product__description__heading > .product__heading > .card__wishlist.active svg use {
  fill: #e84545;
  stroke: #e84545;
}

@media (max-width: 980px) {
  .product__description__heading > .product__heading > .card__wishlist {
    display: flex;
  }
}
.product__option-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product__materials {
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 14px;
  font-style: normal;
  font-weight: 350;
  line-height: normal;
}

.product__materials + .product__colors,
.product__materials + .product__sizes {
  margin-top: 0 !important;
}

.product__price {
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: light;
  font-weight: 350;
  line-height: normal;
}

.product__colors {
  display: flex;
  padding: 0 !important;
  margin-top: 0 !important;
  align-items: center;
  gap: 20px;
}

.color-option {
  width: 28px;
  height: 28px;
  padding: 3px; /* создаёт внутренний отступ для цвета */
  border: 1px solid #dcdcdc;
  background-color: transparent;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Внутренний цвет */
.color-option span {
  width: 100%;
  height: 100%;
  border-radius: 2px;
}

/* Активная кнопка */
.color-option.active {
  border-color: #171717; /* черная рамка */
  border-width: 1px;
  padding: 2px; /* чтобы цвет внутри не вылез за рамку */
}

/* Наведение — мягкое */
.color-option:hover {
  border-color: #171717;
}

.product__sizes {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0 !important;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.size-option {
  padding: 6px 12px;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

/* Наведение */
.size-option:hover {
  border-color: #171717;
}

/* Выбранный размер */
.size-option.active {
  background: #171717;
  color: #fff;
}

.product__size-chart {
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
}

.product__installment {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
}

.product__installment > img,
.product__dolyami {
  display: block;
  width: 105px;
  height: auto;
  flex-shrink: 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.product__installment > span {
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.product__add-to-cart {
  display: flex;
  width: 100%;
  padding: 15px 30px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  border-radius: 15px;
  background: #171717;
  color: #fff;
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.product__text {
  display: flex;
  flex-direction: column;
  gap: 25px;
  color: rgba(23, 23, 23, 0.8);
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.accordion__item {
  border-bottom: 1px solid #dcdcdc;
}

.accordion__header {
  width: 100%;
  padding: 25px 0;
  font-size: 18px;
  font-family: "SegoeUIWeb";
  color: #171717;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

.accordion__header::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  transition: transform 0.2s;
}

.accordion__item.active .accordion__header::after {
  content: "−";
}

.accordion__body {
  height: 0;
  overflow: hidden;
  transition: height 0.35s ease;
}

.accordion__content {
  padding: 10px 0;
}

@media (max-width: 1366px) {
  .product__img > img {
    height: 40vw;
  }
}

@media (max-width: 980px) {
  .product {
    flex-direction: column;
  }
  .product__img > img {
    height: 100%;
  }

  .product__description {
    width: 100%;
    min-width: auto;
    /* overflow: hidden; */
    padding: 15px 20px;
  }

  .catalog {
    padding: 15px 20px;
  }

  .catalog__slider .swiper-slide {
    width: 260px;
  }

  .card__img {
    width: 100%;
    height: 360px !important;
  }

  .catalog__heading {
    font-size: 24px;
  }
}

.product__pagination {
  display: none;
}

/* Мобилка — показываем слайдер, выключаем grid */
@media (max-width: 480px) {

  .breadcrumbs { 
    display: none !important;
  }

  .product__img {
    position: relative;
    display: block;
    width: 100%;
  }

  .product__img img {
    width: 100%;
    height: 450px; /* под твой скрин */
    object-fit: cover;
    border-radius: 20px;
    display: block;
  }

  .product__pagination {
    display: block;
    position: absolute;
    bottom: 25px !important;
    z-index: 1;
    left: 50% !important;
    transform: translateX(-50%);
    text-align: center;
  }

  .product__pagination .swiper-pagination-bullet {
    background: #ffffff30;
    opacity: 1;
  }
  .product__pagination .swiper-pagination-bullet-active {
    background: #ffffff;
  }

  .product__installment {
    gap: 12px;
    align-items: center;
  }

  .product__dolyami {
    width: 105px;
    min-width: 105px;
    max-width: 105px;
    height: auto;
  }
}

/* === Single-product: блоки рекомендаций (.catalog после .product) ===
   Выравниваем секции "Будет сочетаться с" / "Также вам понравится" по той же
   сетке 1235px (4*290 + 3*25), что и каталог + хлебные крошки. Карточки в
   слайдере уже 290px — здесь только обёртка. */
@media (min-width: 981px) {
  body.single-product .breadcrumbs__container {
    max-width: 1235px;
    margin: 0 auto;
  }

  body.single-product section.catalog {
    padding: 30px 0 50px;
    max-width: 1235px;
    margin: 30px auto 0;
  }
}
