body.single-product .reno-gallery-hidden-featured {
  display: none !important;
}

body.single-product .elementor-widget-jet-woo-product-gallery-grid {
  width: 100% !important;
}

body.single-product .jet-woo-product-gallery__content.reno-product-gallery-carousel {
  border: 1px solid #87A996;
  position: relative;
  width: 100%;
}

body.single-product .reno-product-gallery-carousel .jet-woo-product-gallery-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.single-product .reno-product-gallery-carousel .jet-woo-product-gallery-grid::-webkit-scrollbar {
  display: none;
}

body.single-product .reno-product-gallery-carousel .jet-woo-product-gallery__image-item {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  padding: 0 !important;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

body.single-product .reno-product-gallery-carousel .jet-woo-product-gallery__image,
body.single-product .reno-product-gallery-carousel .jet-woo-product-gallery__image-link {
  display: block;
  width: 100%;
}

/* Blocco CSS del lightbox Elementor come layer aggiuntivo */
body.single-product .reno-product-gallery-carousel .jet-woo-product-gallery__image-link {
  pointer-events: none;
  cursor: default;
}

/* Zoom wrapper: nasconde l'overflow quando l'immagine si espande */
body.single-product .reno-zoom-wrapper {
  overflow: hidden;
}

body.single-product .reno-product-gallery-carousel .jet-woo-product-gallery__image img {
  aspect-ratio: 4 / 5;
  background: #fff;
  display: block;
  height: auto;
  max-height: min(78vh, 760px);
  object-fit: contain;
  transition: transform 500ms ease;
  width: 100%;
}

/* Zoom al passaggio del mouse — transform-origin viene impostato via JS */
body.single-product .reno-product-gallery-carousel .jet-woo-product-gallery__image img.reno-zoom-active {
  transform: scale(1.4);
  cursor: zoom-in;
}

body.single-product .reno-product-gallery-nav {
  align-items: center;
  appearance: none;
  background: rgba(36, 32, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 24px;
  height: 44px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 160ms ease, opacity 160ms ease;
  width: 44px;
  z-index: 20;
}

body.single-product .reno-product-gallery-nav:hover,
body.single-product .reno-product-gallery-nav:focus-visible {
  background: #fff;
  color: #24201c;
  opacity: 1;
  outline: none;
}

body.single-product .reno-product-gallery-nav[disabled] {
  cursor: default;
  opacity: 0.35;
}

body.single-product .reno-product-gallery-nav--prev {
  left: 12px;
}

body.single-product .reno-product-gallery-nav--next {
  right: 12px;
}

/* Strip di thumbnail — appesa al widget (fuori da content) */
body.single-product .elementor-widget-jet-woo-product-gallery-grid > .reno-product-gallery-thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  padding: 0 4px;
  flex-wrap: wrap;
}

body.single-product .reno-product-gallery-thumb {
  appearance: none;
  background: #fff;
  border: 2px solid #e0d9d0;
  border-radius: 4px;
  cursor: pointer;
  flex: 0 0 auto;
  height: 64px;
  overflow: hidden;
  padding: 0;
  transition: border-color 160ms ease;
  width: 64px;
}

body.single-product .reno-product-gallery-thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

body.single-product .reno-product-gallery-thumb.is-active {
  border: 3px solid #87A996 !important;
  outline: 1px solid #87A996;
  outline-offset: 1px;
}

body.single-product .reno-product-gallery-thumb:hover:not(.is-active) {
  border-color: #87A996;
}

@media (max-width: 767px) {
  body.single-product .reno-product-gallery-carousel .jet-woo-product-gallery__image img {
    max-height: 68vh;
  }

  body.single-product .reno-product-gallery-nav {
    height: 38px;
    width: 38px;
  }

  body.single-product .reno-product-gallery-nav--prev {
    left: 8px;
  }

  body.single-product .reno-product-gallery-nav--next {
    right: 8px;
  }

  /* Zoom disabilitato su mobile (touch ha pinch nativo) */
  body.single-product .reno-product-gallery-carousel .jet-woo-product-gallery__image img.reno-zoom-active {
    transform: none;
    cursor: default;
  }

  body.single-product .reno-product-gallery-thumb {
    height: 52px;
    width: 52px;
  }
}
