/* ======================================================
   STM QUICK VIEW (Premium)
   File: inc/features/quickview/assets/quickview.css
====================================================== */

/* Scroll lock when modal open */
html.stm-qv-open,
html.stm-qv-open body{
  overflow:hidden;
}

/* ======================================================
   PRODUCT LOOP: Hover button overlay (performance-safe)
   - button black
   - text 1 line
   - cursor pointer
====================================================== */

/* Ensure media can hold overlay */
.stm-pl__media{
  position: relative;
  overflow: hidden;
}

/* Show shade only on hover */
.stm-pl:hover .stm-pl__media::before,
.stm-pl__media:hover::before{
  opacity: 1;
}

/* Quick View trigger inside media */
.stm-pl__media .stm-qv-trigger{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%, -50%);
  z-index: 3;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;

  background:#000;             /* ✅ black */
  color:#fff;                  /* ✅ white text */
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;         /* ✅ one line */
  cursor: pointer;             /* ✅ cursor change */

  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
}

/* Show on hover */
.stm-pl:hover .stm-pl__media .stm-qv-trigger,
.stm-pl__media:hover .stm-qv-trigger{
  opacity: 1;
}

/* Optional hover feedback */
.stm-pl__media .stm-qv-trigger:hover{
  filter: brightness(.92);
}

/* Hide on touch (mobile/tablet) for performance + UX */
@media (hover: none){
  .stm-pl__media::before{ display:none; }
  .stm-pl__media .stm-qv-trigger{ display:none; }
}

/* ======================================================
   MODAL (your existing CSS, kept)
====================================================== */

/* Overlay */
.stm-qv-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:9999;

  background:rgba(15,23,42,.55);
  backdrop-filter:saturate(140%) blur(6px);
}

.stm-qv-overlay.is-open{ display:flex; }

/* Dialog */
.stm-qv-dialog{
  width:min(1000px,96vw);
  background:#fff;
  border-radius:18px;
  box-shadow:0 40px 120px rgba(0,0,0,.35);
  position:relative;

  display:grid;
  grid-template-columns:1fr 1.1fr;
  gap:22px;
  padding:22px;
}

/* Close */
.stm-qv-close{
  position:absolute;
  top:10px;
  right:12px;
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  background:#fff;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.stm-qv-close:hover{ filter:brightness(.96); }

/* Back */
.stm-qv-back{
  position:absolute;
  top:10px;
  left:12px;
  height:36px;
  border-radius:10px;
  border:1px solid #e5e7eb;
  background:#fff;
  padding:0 12px;
  font-weight:800;
  cursor:pointer;
}
.stm-qv-back:hover{ filter:brightness(.96); }

/* Left column */
.stm-qv-left{ display:grid; gap:12px; }

/* Main image */
.stm-qv-media{
  aspect-ratio:1/1;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#f8fafc;
  display:grid;
  place-items:center;
  overflow:hidden;
}
.stm-qv-media img{
  width:100%;
  height:100%;
  object-fit:contain;
}

/* Thumbs */
.stm-qv-thumbs{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:8px;
}
.stm-qv-thumb{
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
  overflow:hidden;
  cursor:pointer;
  height:64px;

  display:grid;
  place-items:center;
}
.stm-qv-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
  image-rendering:auto;
}
.stm-qv-thumb.is-active{
  outline:2px solid #111827;
  outline-offset:0;
}

/* Right column */
.stm-qv-right{
  display:grid;
  gap:10px;
  align-content:start;
}

.stm-qv-brand{
  display:inline-block;
  font-weight:800;
  font-size:12px;
  border:1px solid #e5e7eb;
  border-radius:999px;
  padding:6px 10px;
  max-width:max-content;
  background:#f9fafb;
}

.stm-qv-title{
  font-size:26px;
  line-height:1.2;
  margin:0;
  font-weight:900;
  color:#0f172a;
}

/* Meta line */
.stm-qv-meta{
  display:flex;
  gap:16px;
  align-items:center;
  color:#6b7280;
  font-size:13px;
}

.stm-qv-stars{
  display:flex;
  gap:6px;
  align-items:center;
}
.stm-qv-stars .stm-qv-star{
  font-size:16px;
  line-height:1;
}

.stm-qv-price{
  font-size:22px;
  font-weight:900;
  display:flex;
  gap:10px;
  align-items:baseline;
}
.stm-qv-price del{
  color:#9ca3af;
  font-weight:700;
}
.stm-qv-price ins{
  text-decoration:none;
  color:#111827;
}

/* Stock */
.stm-qv-stock{ font-weight:800; }
.stm-qv-stock.is-in{
  color:#047857;
  background:#ecfdf5;
  border:1px solid #a7f3d0;
  display:inline-block;
  border-radius:999px;
  padding:6px 10px;
}
.stm-qv-stock.is-out{
  color:#7c2d12;
  background:#fef3c7;
  border:1px solid #fcd34d;
  display:inline-block;
  border-radius:999px;
  padding:6px 10px;
}

.stm-qv-short{
  color:#374151;
  margin:4px 0 6px;
}

/* Buttons */
.stm-qv-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:6px;
}
.stm-qv-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  padding:12px 16px;
  font-weight:800;
  text-decoration:none;
  border:1px solid #e5e7eb;
  cursor:pointer;
}
.stm-qv-btn.primary{
  background:#111827;
  color:#fff;
  border-color:#111827;
}
.stm-qv-btn.primary[aria-disabled="true"]{
  background:#d1d5db;
  border-color:#d1d5db;
  color:#6b7280;
  cursor:not-allowed;
}
.stm-qv-btn.ghost{
  background:#fff;
  color:#111827;
}

/* Responsive */
@media (max-width: 900px){
  .stm-qv-dialog{
    grid-template-columns:1fr;
    gap:16px;
    padding:16px;
  }
  .stm-qv-media{ aspect-ratio:4/3; }
}

/* Desktop-only behavior (extra safety)
   JS also blocks it if enabled */
@media (max-width: 1023.98px){
  .stm-qv-overlay{ display:none !important; }
}
