.product-variants {
  position: relative;
  width: 100%;
  height: 600px;
  background-color: #e6e1dc;
  background-size: contain;
  bottom: 25px;
}

.product-variants__background {
  position: absolute;
  inset: 0;
  background-color: #e6e1dc;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  height: 600px;
  width: 100%;
}

.product-variants__content {
  position: relative;
  height: 100%;
  width: 100%;
}

.product-variants__description {
  position: absolute;
  width: 874px;
  height: 153px;
  left: 60px;
  top: 25px;
  font-family: "IvyPresto Headline";
  font-style: normal;
  font-weight: 600;
  font-size: 45px;
  line-height: 56px;
  /* or 124% */
  letter-spacing: -0.151389px;
  color: #000000;
  white-space: pre-line;
  margin-bottom: 40px;
  z-index: 2;
}

.product-variants__button {
  position: absolute;
  left: 60px;
  bottom: 25px;
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background-color: transparent;
  border: 1px solid #000;
  border-radius: 50px;
  font-size: 16px;
  color: #000;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 2;
}

.product-variants__button:hover {
  background-color: var(--black);
  color: var(--white);
}

/* Modal Component */
.modal {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.modal.is-open {
  display: block;
}

.fullscreen-modal {
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.modal__overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  width: 100%;
  height: 100%;
}

.modal__container {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__close {
  position: absolute;
  top: 25px;
  right: 125px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 5;
}

/* Product Variants Slider */
.product-variants-slider {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 60px;
  /* Spazio per il contatore in basso */
}

.product-variants-slider__container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 80%;
  max-height: 75%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
  user-select: none;
  touch-action: pan-y;
}

.product-variants-slider__slides {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.3s ease;
}

.product-variants-slider__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-variants-slider__slide.active {
  opacity: 1;
  z-index: 1;
}

.product-variants-slider__slide.dragging {
  cursor: grabbing !important;
}

.product-variants-slider__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
  /* Prevent image dragging */
}

.product-variants-slider__nav {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  padding: 0;
}

.product-variants-slider .product-variants-slider__nav {
  background-color: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  padding: 0;
}

.product-variants-slider .product-variants-slider__nav:hover {
  opacity: 0.7;
}

.product-variants-slider .product-variants-slider__nav svg {
  width: 30px;
  height: 30px;
}

.product-variants-slider__nav--prev {
  left: 20px;
}

.product-variants-slider__nav--next {
  right: 20px;
}

.product-variants-slider__counter {
  position: relative;
  bottom: 30px;
  left: 0;
  width: 100%;
  color: #fff;
  font-size: 16px;
  z-index: 10;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 15%;
  box-sizing: border-box;
}

.product-variants-slider__counter-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
}

.product-variants-slider__pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 300px;
  overflow: hidden;
}

.product-variants-slider__pagination-line {
  width: 30px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.5);
  transition: background-color 0.3s ease, width 0.3s ease;
  cursor: pointer;
  flex-shrink: 1;
}

.product-variants-slider__pagination-line.active {
  background-color: #fff;
  width: 90px;
  flex-shrink: 0;
}

.pagination-many-items .product-variants-slider__pagination-line {
  width: 20px;
}

.pagination-many-items .product-variants-slider__pagination-line.active {
  width: 60px;
}

.pagination-very-many-items .product-variants-slider__pagination-line {
  width: 15px;
}

.pagination-very-many-items .product-variants-slider__pagination-line.active {
  width: 45px;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 1024px) {
  .product-variants {
    height: 500px;
  }

  .product-variants__background {
    height: 500px;
    background-size: cover;
  }

  .product-variants__description {
    width: calc(100% - 40px);
    max-width: 600px;
    left: 20px;
    font-size: 36px;
    line-height: 46px;
    height: auto;
  }

  .product-variants__button {
    left: 20px;
  }

  .product-variants-slider__nav {
    width: 40px;
    height: 40px;
  }

  .product-variants-slider__container {
    max-width: 90%;
  }

  .product-variants-slider__counter {
    padding: 0 10%;
  }
}

@media screen and (max-width: 768px) {
  .product-variants {
    height: 450px;
  }

  .product-variants__background {
    height: 450px;
  }

  .product-variants__description {
    font-size: 30px;
    line-height: 38px;
    top: 15px;
  }

  .product-variants-slider__counter {
    bottom: 20px;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    padding: 0;
  }

  .product-variants-slider__nav--prev {
    left: 10px;
  }

  .product-variants-slider__nav--next {
    right: 10px;
  }

  .product-variants-slider__container {
    max-width: 90%;
    max-height: 70%;
  }

  .modal__close {
    top: 25px;
    right: 25px;
    width: 30px;
    height: 30px;
    font-size: 24px;
  }

  .fullscreen-modal,
  .modal__overlay,
  .modal__container,
  .modal__content {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .product-variants-slider__nav {
    display: none;
    /* Nasconde le frecce di navigazione su mobile */
  }
}

@media screen and (max-width: 480px) {
  .product-variants {
    height: 400px;
  }

  .product-variants__background {
    height: 400px;
  }

  .product-variants__description {
    font-size: 24px;
    line-height: 32px;
    max-width: 100%;
    top: 20px;
  }

  .product-variants__button {
    bottom: 20px;
    padding: 10px 20px;
    font-size: 14px;
  }

  .product-variants-slider {
    padding-bottom: 80px;
  }

  .product-variants-slider__counter {
    bottom: 10px;
    width: 85%;
    margin: 0 auto;
    left: 0;
    right: 0;
    text-align: center;
    display: flex;
    justify-content: center;
  }

  .product-variants-slider__pagination-line {
    width: 30px;
  }

  .product-variants-slider__container {
    max-width: 85%;
  }
}