/* ============================================================
   clon-qa.css  —  Ajustes QA del clon estático AcousticPlant
   Cargado en todas las páginas de producto (y portafolio).
   Marca: verde #249150
   Cubre: P4-visual (miniaturas), P1/P4 (galería custom),
          P3 (swatches color), P10 (productos relacionados),
          PF1 (vídeos portafolio).
   ============================================================ */

/* ---------- P1 / P4 : Galería tipo Amazon (client-side) ---------- */
.cqa-gallery{
  display:flex;
  gap:16px;
  align-items:flex-start;
  width:100%;
}
.cqa-gallery__thumbs{
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:0 0 76px;
  max-height:520px;
  overflow-y:auto;
  overflow-x:hidden;
  padding:2px;
}
.cqa-thumb{
  width:72px;
  height:72px;
  border:2px solid #e3e3e3;
  border-radius:6px;
  padding:0;
  background:#fff;
  cursor:pointer;
  overflow:hidden;
  flex:0 0 auto;
  transition:border-color .15s ease;
}
.cqa-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.cqa-thumb:hover{ border-color:#b7b7b7; }
.cqa-thumb.is-active{ border-color:#249150; }

.cqa-stage{
  position:relative;
  flex:1 1 auto;
  min-width:0;
  background:#fff;
  border:1px solid #ececec;
  border-radius:8px;
  overflow:hidden;
}
.cqa-stage__frame{
  position:relative;
  width:100%;
  height:520px;
  cursor:zoom-in;
  overflow:hidden;
}
.cqa-stage__img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  transition:opacity .15s ease;
}
/* Lente de zoom al pasar el ratón */
.cqa-stage__frame.is-zooming .cqa-stage__img{ opacity:0; }
.cqa-stage__zoom{
  position:absolute;
  inset:0;
  background-repeat:no-repeat;
  background-color:#fff;
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease;
}
.cqa-stage__frame.is-zooming .cqa-stage__zoom{ opacity:1; }
.cqa-stage__hint{
  position:absolute;
  right:10px;
  bottom:10px;
  background:rgba(0,0,0,.55);
  color:#fff;
  font-size:11px;
  line-height:1;
  padding:6px 9px;
  border-radius:20px;
  pointer-events:none;
  letter-spacing:.02em;
}

/* ---------- P1 : Lightbox pantalla completa ---------- */
.cqa-lb{
  position:fixed;
  inset:0;
  z-index:100000;
  background:rgba(15,15,15,.92);
  display:none;
  align-items:center;
  justify-content:center;
}
.cqa-lb.is-open{ display:flex; }
.cqa-lb__img{
  max-width:92vw;
  max-height:90vh;
  object-fit:contain;
  user-select:none;
  -webkit-user-drag:none;
}
.cqa-lb__btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:52px;
  height:52px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:26px;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .15s ease;
}
.cqa-lb__btn:hover{ background:rgba(255,255,255,.28); }
.cqa-lb__btn--prev{ left:24px; }
.cqa-lb__btn--next{ right:24px; }
.cqa-lb__close{
  position:absolute;
  top:20px;
  right:24px;
  width:44px;
  height:44px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.14);
  color:#fff;
  font-size:22px;
  cursor:pointer;
}
.cqa-lb__close:hover{ background:rgba(255,255,255,.28); }
.cqa-lb__count{
  position:absolute;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  color:#fff;
  font-size:13px;
  letter-spacing:.03em;
  background:rgba(0,0,0,.4);
  padding:5px 12px;
  border-radius:20px;
}
body.cqa-lb-open{ overflow:hidden; }

@media (max-width:768px){
  .cqa-gallery{ flex-direction:column-reverse; }
  .cqa-gallery__thumbs{
    flex-direction:row;
    max-height:none;
    flex:0 0 auto;
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
  }
  .cqa-stage__frame{ height:380px; cursor:default; }
  .cqa-stage__hint{ display:none; }
  .cqa-lb__btn{ width:44px; height:44px; font-size:22px; }
  .cqa-lb__btn--prev{ left:8px; }
  .cqa-lb__btn--next{ right:8px; }
}

/* ---------- P3 : Círculo de color en el desplegable "Color" ---------- */
.cqa-swatch-select{ position:relative; }
.cqa-swatch-trigger{
  display:flex !important;
  align-items:center;
  gap:10px;
  width:100%;
  min-height:42px;
  padding:6px 34px 6px 12px !important;
  border:1px solid #cfcfcf !important;
  border-radius:4px !important;
  background:#fff !important;
  background-image:none !important;
  font-size:14px !important;
  font-weight:400 !important;
  letter-spacing:normal !important;
  text-transform:none !important;
  color:#333 !important;
  cursor:pointer;
  text-align:left;
  position:relative;
  box-shadow:none !important;
  line-height:1.3 !important;
}
.cqa-swatch-trigger:hover{
  background:#fff !important;
  color:#333 !important;
  border-color:#b7b7b7 !important;
}
.cqa-swatch-trigger:after{
  content:"";
  position:absolute;
  right:14px;
  top:50%;
  width:8px;
  height:8px;
  border-right:2px solid #777;
  border-bottom:2px solid #777;
  transform:translateY(-70%) rotate(45deg);
}
.cqa-dot{
  flex:0 0 auto;
  width:16px;
  height:16px;
  border-radius:50%;
  border:1px solid rgba(0,0,0,.18);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.15);
}
.cqa-swatch-menu{
  position:absolute;
  z-index:9000;
  top:calc(100% + 4px);
  left:0;
  right:0;
  max-height:280px;
  overflow-y:auto;
  background:#fff;
  border:1px solid #cfcfcf;
  border-radius:6px;
  box-shadow:0 8px 24px rgba(0,0,0,.14);
  padding:4px;
  display:none;
}
.cqa-swatch-select.is-open .cqa-swatch-menu{ display:block; }
.cqa-swatch-opt{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:4px;
  font-size:14px;
  color:#333;
  cursor:pointer;
}
.cqa-swatch-opt:hover{ background:#f2f7f4; }
.cqa-swatch-opt.is-selected{ background:#e9f4ee; font-weight:600; }
.cqa-swatch-opt[data-empty="1"] .cqa-dot{
  background:
    linear-gradient(45deg,transparent 45%,#c0392b 45%,#c0392b 55%,transparent 55%),
    #fff;
}

/* ---------- P10 : Productos relacionados (imagen completa) ----------
   Las imágenes del listado son retrato (768×1024) pero la plantilla original
   (post-179.css) les fija height:350px en una caja apaisada, lo que las
   recortaba/deformaba. Liberamos la altura para que la caja siga la
   proporción real de la imagen: se ve completa, sin recorte ni barras
   blancas laterales. Válido en escritorio (3 col) y móvil (1 col). */
.jet-listing-grid__item .imga img,
.related.products .imga img{
  height:auto !important;
  width:100% !important;
  object-fit:contain !important;
  background:#fff;
}

/* ---------- PF1 : Vídeos del portafolio ---------- */
.cqa-video-fix .elementor-video,
.cqa-video-fix video,
.cqa-video-fix iframe{
  display:block;
  width:100%;
  max-width:720px;
  height:auto;
  margin:0 auto;
}
.cqa-video-fix .e-hosted-video{ text-align:center; }
