.product-item {
  width: 100%;
  height: 100%;
  /* overflow: hidden; */
  position: relative;
  max-width: 375px;

  display: flex;
  row-gap: 15px;
  flex-direction: column;

  @media screen and (max-width: 1025px) {
    row-gap: 8px;
  }
  @media screen and (max-width: 640px) {
    max-width: none;
  }
}
.page-category .product-item {
  @media screen and (max-width: 640px) {
    width: calc(50vw - var(--container-offset) - 9px);
  }
}

.product-item__top {
  width: 100%;
  max-height: 485px;
  aspect-ratio: 168 / 247;
  position: relative;
  background-color: var(--primary-accent10);
}
.product-item__top:has(.product-item__image-slider) {
  background-color: transparent;
}

.product-item__image {
  width: 100%;
  height: 100%;
  overflow: hidden;

  @media screen and (max-width: 1025px) {
    padding-bottom: 10px;
  }
}
.product-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-item__image:has(.product-item__image-slider) {
  padding-bottom: 10px;
}

.product-item__image-slider {
  position: relative;
  background-color: var(--primary-accent10);
}
.product-item__image-slider, .product-item__image-slider * {
  height: 100%;
}
.product-item__image-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-item__image-slider .swiper:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
}
.product-item__image-slider .swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) {
  display: none;
}
.swiper .product-item__image-slider .swiper-slide:first-child {
  width: 100% !important;
}
.swiper .product-item__image-slider .swiper-slide:not(:first-child) {
  display: none !important;
}
.product-item__image-slider .swiper-pagination {
  --swiper-pagination-bottom: -10px;
  --swiper-pagination-bullet-width: 60px;
  --swiper-pagination-bullet-border-radius: 0;
  --swiper-pagination-bullet-horizontal-gap: 2px;
  --swiper-pagination-bullet-inactive-opacity: 1;
  --swiper-pagination-bullet-inactive-color: var(--primary-opacity6);

  flex-wrap: wrap;
  row-gap: 2px;
  height: auto;

  @media screen and (max-width: 1025px) {
    --swiper-pagination-bullet-width: 30px;
  }
}
.swiper .product-item__image-slider .swiper-pagination {
  display: none !important;
}
.product-item__image-slider .swiper-pagination-bullet {
  font-size: 0;
  height: 2px;
}
.product-item__image-slider .swiper-pagination-bullet-active {
  --swiper-pagination-color: var(--primary-accent2);
}

.product-item__buy {
  z-index: 1;
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;

  display: flex;
  column-gap: 0;
  align-items: center;
  justify-content: space-between;

  max-width: calc(100% - 36px);
  margin-left: auto;
  width: 46px;
  height: 46px;
  padding: 7px;
  border-radius: 62px;
  background-color: var(--primary-color);
  transition: width .3s ease;

  @media screen and (max-width: 1025px) {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: calc(100% - 20px);
  }
}
.product-item__image:has(.product-item__image-slider) .product-item__buy {
  bottom: 28px;
  
  @media screen and (max-width: 1025px) {
    bottom: 20px;
  }
}
.product-item__buy:hover {
  width: 100%;
}
.product-item__sizes {
  opacity: 0;
  width: 0;
  padding-right: 0;
  overflow: hidden;
  transition: .3s ease, opacity .3s .2s ease;

  @media screen and (max-width: 1025px) {
    opacity: 1;
    width: 100%;
    padding-right: 12px;
  }
}
.product-item__sizes .filter-sizes__size {
  min-width: 32px;
  width: max-content;
  height: 32px;
  padding: 0 4px;
  white-space: nowrap;
  color: var(--primary-accent);
  border-color: transparent;
  background-color: var(--primary-opacity9);
}
.product-item__sizes .filter-sizes__size:hover {
  color: var(--primary-accent2);
}
.product-item__sizes .filter-sizes__size[data-offer-checked="Y"] {
  color: var(--primary-accent2);
  background-color: var(--primary-accent);
}
.product-item__buy:hover .product-item__sizes {
  opacity: 1;
  width: 100%;
  padding-right: 24px;
}
.product-item__addcart {
  margin-left: auto;
}

.product-item__stiсkers {
  z-index: 1;
  position: absolute;
  left: 18px;
  top: 18px;

  @media screen and (max-width: 1025px) {
    left: 10px;
    top: 10px;
  }
}

.product-item__buttons {
  z-index: 1;
  position: absolute;
  right: 18px;
  top: 18px;

  display: flex;
  column-gap: 8px;
  align-items: center;

  @media screen and (max-width: 1025px) {
    right: 10px;
    top: 10px;
  }
}

.product-item .add-basket {
  --icon-size: 22px;
  --icon-fill: var(--primary-accent);
  --button-width: 32px;
  --button-height: 32px;
  --button-color: var(--primary-accent);
  --button-background: transparent;
  --button-background-hover: transparent;
}
.product-item .add-basket:hover {
  --icon-fill: var(--primary-accent2);
}
.product-item :is(.add-wishlist, .delete-wishlist) {
  --icon-size: 22px;
  --button-width: 40px;
  --button-height: 40px;
  
  @media screen and (max-width: 1025px) {
    --icon-size: 16px;
    --button-width: 30px;
    --button-height: 30px;
  }
}
.product-item .delete-wishlist {
  --icon-fill: var(--primary-accent);
  --button-background: var(--primary-accent2);
}
.product-item .add-wishlist:hover {
  --icon-fill: var(--primary-accent);
  --button-background-hover: var(--primary-accent2);
}
.product-item .delete-wishlist:hover {
  --icon-fill: var(--primary-color);
  --button-background-hover: var(--primary-accent);
}
.product-item .add-wishlist:focus {
  --icon-fill: var(--primary-color);
  --button-background: var(--primary-accent);
  --button-background-hover: var(--primary-accent);
}
.product-item .delete-wishlist:focus {
  --icon-fill: var(--primary-accent);
  --button-background: var(--primary-accent2);
  --button-background-hover: var(--primary-accent2);
}

.product-item__collection {
  --link-color: var(--primary-accent2);
  font-weight: 600;
  font-size: calc(12px + 0 * var(--window-resize));
  z-index: 1;
  position: relative;
}

.product-item__info {
  display: flex;
  column-gap: 15px;
  align-items: baseline;
  justify-content: space-between;
}
.product-item__name .link {
  font-weight: 600;
  font-size: calc(14px + 0 * var(--window-resize));
}
.product-item__name .link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}

.product-item__end {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 2px;
}

.product-item__prices {
  display: flex;
  column-gap: 10px;
  align-items: center;
  white-space: nowrap;
  
  @media screen and (max-width: 1025px) {
    flex-direction: column;
    align-items: start;
  }
}
.product-item__price {
  font-weight: 700;
  font-size: calc(18px + 5 * var(--window-resize));
  color: var(--primary-color);
}
.product-item__oldprice {
  font-weight: 600;
  font-size: calc(14px + 0 * var(--window-resize));
  color: var(--primary-accent4);
  text-decoration: line-through;
}
.product-item__discount {
  font-weight: 600;
  font-size: calc(14px + 0 * var(--window-resize));
  color: var(--primary-accent2);

  @media screen and (max-width: 1025px) {
    display: none;
  }
}