/* =========================================================
   PDP — BLOQUE 2 · GALERÍA HERO
   Objetivo:
   - Confirmación visual
   - Sin efecto card
   - Sin zoom en mobile
   - Control real de altura vía flex-viewport
   ========================================================= */

.lq-custom-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.lq-btn-buy-now,
.lq-btn-add-cart {
  width: 100%;
  height: 54px;
  border-radius: 27px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.lq-btn-buy-now {
  background: #000;
  color: #fff;
}

.lq-btn-buy-now:hover {
  background: #222;
  transform: translateY(-1px);
}

.lq-btn-add-cart {
  background: #fff;
  color: #000;
  border: 1.5px solid #000;
}

.lq-btn-add-cart:hover {
  background: #f9f9f9;
  transform: translateY(-1px);
}

.lqsp-gallery .flex-control-thumbs {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 10px;
  padding: 10px 0;
}

.lqsp-gallery .flex-control-thumbs li {
  flex: 0 0 auto !important;
  width: 70px !important;
  scroll-snap-align: start;
  list-style: none !important;
}

/* NATIVE CAROUSEL REINFORCEMENT (CSS Snap) */
.lqsp-gallery .flex-viewport {
  overflow: visible !important;
  width: 100% !important;
}

.lqsp-gallery .woocommerce-product-gallery__wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ocultamos la barra de scroll */
.lqsp-gallery .woocommerce-product-gallery__wrapper::-webkit-scrollbar {
  display: none;
}

.lqsp-gallery .woocommerce-product-gallery__image {
  flex: 0 0 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  scroll-snap-align: start;
  margin: 0 !important;
}

.lqsp-gallery .woocommerce-product-gallery__image img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain;
}

.lqsp-gallery .flex-control-thumbs li {
  flex: 0 0 auto !important;
  width: 70px !important;
  list-style: none !important;
}

/* =========================================
   PDP EDIT — ELIMINAR LUPA / ZOOM TRIGGER GLOBALMENTE
   ========================================= */

body.single-product .lqsp-gallery .woocommerce-product-gallery__trigger {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* =========================================
   PDP EDIT — DOTS DE PAGINACIÓN (APPLE STYLE)
   ========================================= */

/* Unificamos los dots (nativos de Woo y personalizados de loq-tw) */
.lqsp-gallery .flex-control-nav.flex-control-paging,
.lq-dots {
  position: relative !important;
  margin: 15px auto 5px !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 10px;
  z-index: 30;
  width: auto !important;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

.lqsp-gallery .flex-control-nav.flex-control-paging li,
.lq-dot {
  margin: 0;
  padding: 0;
  border: 0;
}

/* El punto individual */
.lqsp-gallery .flex-control-nav.flex-control-paging a,
.lq-dot {
  display: block !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2) !important;
  text-indent: -9999px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

/* Punto Activo (Cápsula Apple) */
.lqsp-gallery .flex-control-nav.flex-control-paging a.flex-active,
.lq-dot[aria-current="true"] {
  background: var(--brand, #5a4bde) !important;
  width: 14px !important;
  border-radius: 10px;
}

/* Badge del contador (ej: 2 / 6) — OCULTO por diseño minimalista */
.lqsp-gallery .lq-counter {
  display: none !important;
}

/* =========================================
   PDP EDIT — ICONO DE ACCESORIO SOBRE LA IMAGEN
   ========================================= */

.woocommerce-product-gallery__image {
  position: relative !important;
}

.lqsp-gallery__accessory {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 20;
  width: 100px;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  display: block;
  box-shadow: none;
  pointer-events: none;
  animation: loqAccFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

@keyframes loqAccFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translate(15px, 15px);
  }
  to {
    opacity: 1;
    transform: scale(1) translate(0, 0);
  }
}

.lqsp-gallery__accessory-icon {
  width: 100% !important;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.12));
}

@media (min-width: 1024px) {
  .lqsp-gallery__accessory {
    bottom: 50px;
    right: 50px;
    width: 150px;
  }
}


/* ---------------------------------------------------------
   CONTENEDOR GENERAL
   --------------------------------------------------------- */

.lqsp-gallery {
  margin-top: 0;
  margin-bottom: 0;
  background: transparent;
}


/* ---------------------------------------------------------
   RESET VISUAL WOO (no card, no sombra)
   --------------------------------------------------------- */

.lqsp-gallery .woocommerce-product-gallery,
.lqsp-gallery .woocommerce-product-gallery__image {
  background: transparent;
}

.lqsp-gallery img {
  background: #fff;
  /* continuidad con PDP */
  border-radius: 0;
  box-shadow: none;
  display: block;
  margin: 0 auto;
}


/* ---------------------------------------------------------
   MOBILE FIRST — CONTROL REAL DEL HERO
   (Woo setea height inline en .flex-viewport)
   --------------------------------------------------------- */

@media (max-width: 980px) {

  /* 1. MATAR ZOOM (clave) */
  .lqsp-gallery .zoomImg {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* 2. CONTROL DE ALTURA REAL (viewport manda) */
  .lqsp-gallery .flex-viewport {
    height: auto !important;
    /* pisa inline */
    max-height: 58vh;
    /* 👈 control del hero */
    overflow: hidden;
  }

  .lqsp-gallery .woocommerce-product-gallery__wrapper {
    height: auto !important;
  }

  /* 3. IMAGEN SE ADAPTA AL VIEWPORT */
  .lqsp-gallery img {
    max-height: 35vh;
    width: auto;
    object-fit: contain;
  }

  /* 4. AIRE MOBILE */
  .lqsp-gallery {
    margin-top: 0;
    margin-bottom: 0;
  }
}


/* ---------------------------------------------------------
   DESKTOP — CONTROL DEL HERO
   --------------------------------------------------------- */

@media (min-width: 981px) {

  .lqsp-gallery .flex-viewport,
  .lqsp-gallery img {
    max-height: 70vh;
    /* Para que nunca obligue al usuario a scrollear demasiado */
  }

  .lqsp-gallery img {
    max-width: 100%;
    /* Achica la foto respecto al ancho total de su columna 1.2fr */
    object-fit: contain;
  }
}

.lqsp-gallery img {
  max-height: 70vh;
  /* Para que nunca obligue al usuario a scrollear demasiado */
}

.lqsp-gallery img {
  max-width: 100%;
  /* Achica la foto respecto al ancho total de su columna 1.2fr */
  object-fit: contain;
}