/**
 * Nutri Product Gallery — Rev 10 (CleanLab)
 * -----------------------------------------
 * - Estética clínica: borde duotono, vidrio suave, sombras ligeras.
 * - Scroll-snap fluido sin flechas. Dots + progreso.
 * - Thumbs grandes (capsule-less, sobrias).
 * - Reset local de botones; oculta por completo la UI nativa (incl. lupa).
 */

:root{
  --nutri-primary:#0b3557;
  --nutri-secondary:#007b9e;
  --nutri-surface:#ffffff;
  --nutri-ring: rgba(0,123,158,.35);
}

/* Ocultar UI nativa cuando activamos la moderna */
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target.nutri-gallery-modern-enabled .woocommerce-product-gallery__wrapper,
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target.nutri-gallery-modern-enabled .flex-control-nav,
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target.nutri-gallery-modern-enabled .woocommerce-product-gallery__trigger{
  display:none!important;
}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target.nutri-gallery-modern-enabled [hidden]{display:none!important}

/* Reset de botones sólo dentro del componente (evita button:hover global) */
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-gallery-modern button{
  appearance:none;-webkit-appearance:none;background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;line-height:1;text-align:inherit;
}

/* ===== Contenedor ===== */
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-gallery-modern{
  display:grid;grid-template-rows:auto auto auto;gap:12px;width:100%;
}

/* ===== Track CleanLab ===== */
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-track{
  position:relative;border-radius:16px;overflow:hidden;background:var(--nutri-surface);
  box-shadow:0 10px 40px rgba(11,53,87,.08);
}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-track::after{
  /* Borde duotono sutil */
  content:"";position:absolute;inset:0;border-radius:16px;pointer-events:none;
  box-shadow:inset 0 0 0 1px rgba(11,53,87,.10), inset 0 0 0 2px rgba(0,123,158,.06);
}

.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-track__inner{
  position:relative;z-index:1;
  display:grid;grid-auto-flow:column;grid-auto-columns:100%;gap:10px;
  overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;
}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-track__inner::-webkit-scrollbar{display:none}

.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-slide{
  position:relative;scroll-snap-align:center;scroll-snap-stop:always;
  display:grid;place-items:center;aspect-ratio:var(--nutri-aspect,auto);
  background:var(--nutri-surface);
}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-slide img,
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-slide video,
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-slide iframe{
  width:100%;height:100%;object-fit:contain;display:block;
}

/* Zoom inside (sólo desktop y si hay resolución) */
@media (hover:hover) and (pointer:fine){
  .single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-slide--image img{
    will-change:transform;transform-origin:var(--nutri-ox,50%) var(--nutri-oy,50%);transition:transform .18s ease;
  }
  .single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-slide--image.is-zooming img{transform:scale(1.45)}
}

/* Badge de vídeo discreto */
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-slide--video::after{
  content:"▶";position:absolute;right:10px;top:10px;width:28px;height:28px;border-radius:999px;display:grid;place-items:center;
  font-size:13px;color:#fff;background:linear-gradient(135deg,var(--nutri-primary),var(--nutri-secondary));
  box-shadow:0 6px 18px rgba(0,0,0,.18);
}

/* ===== Progreso + dots ===== */
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-progress{
display:none;  height:3px;background:rgba(11,53,87,.08);border-radius:999px;overflow:hidden;
}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-progress__bar{
  height:100%;width:0%;
  background: linear-gradient( 45deg, var(--gradient-color-1, #54A89C), var(--gradient-color-2, #3B8278), var(--gradient-color-1, #54A89C) );
  transition:width .2s ease;
}

.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-dots{
  display:flex;gap:6px;justify-content:center;
}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-dot{
  width:10px;height:10px;border-radius:999px;background:rgba(11,53,87,.22);
  transition:transform .15s ease,background .15s ease;
}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-dot.is-active{
  background:#56AA9D;transform:scale(1.2);
}

/* ===== Thumbs ===== */
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-thumbs{
  display:flex;gap:12px;overflow-x:auto;padding: 8px 0px 0px;scrollbar-width:thin;
}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-thumbs::-webkit-scrollbar{height:8px}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-thumbs::-webkit-scrollbar-thumb{background:rgba(0,0,0,.16);border-radius:10px}

.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-thumb{
  position:relative;flex:0 0 auto;width:92px;height:92px;border-radius:14px;
  border:2px solid rgba(11,53,87,.12);background:#fff;overflow:hidden;cursor:pointer;
  box-shadow:0 8px 24px rgba(11,53,87,.06);
  transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease;
}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-thumb:hover{transform:translateY(-1px)}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-thumb.is-active{
  border-color:var(--nutri-secondary);box-shadow:0 10px 28px rgba(0,123,158,.22);
}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-thumb img{width:100%;height:100%;object-fit:cover}
.single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-thumb[data-type="video"]::after{
  content:"▶";position:absolute;right:8px;bottom:8px;width:22px;height:22px;border-radius:999px;display:grid;place-items:center;
  background:linear-gradient(135deg,var(--nutri-primary),var(--nutri-secondary));color:#fff;font-size:11px;line-height:1;box-shadow:0 3px 10px rgba(0,0,0,.25)
}

/* Responsive */
@media (max-width:1024px){ .single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-thumb{width:78px;height:78px} }
@media (max-width:640px){  .single-product div.product .woocommerce-product-gallery.nutri-gallery-target .nutri-thumb{width:66px;height:66px} }
