/* ══════════════════════════════════════════════════
   QUICKVIEW MODAL — Technistore
   Fuentes: Rubik (títulos) + Nunito Sans (cuerpo)
══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:opsz,wght@6..12,400;6..12,500;6..12,600;6..12,700&family=Rubik:wght@400;500;600;700&display=swap');

:root {
  --qv-accent:      #0EA5E9;
  --qv-accent-dark: #0284C7;
  --qv-primary:     #0F172A;
  --qv-bg:          #FFFFFF;
  --qv-surface:     #F8FAFC;
  --qv-border:      #E2E8F0;
  --qv-text:        #0F172A;
  --qv-text-muted:  #64748B;
  --qv-success:     #22C55E;
  --qv-radius:      16px;
  --qv-radius-sm:   10px;
  --qv-shadow:      0 40px 100px rgba(0,0,0,0.22), 0 10px 30px rgba(0,0,0,0.10);
  --qv-ease:        cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Overlay ── */
.qv-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(2,6,23,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center; justify-content: center;
  padding: 20px;
  overscroll-behavior: contain;
}
.qv-overlay.open {
  display: flex;
  animation: qvFadeIn 0.22s ease-out;
}
@keyframes qvFadeIn { from { opacity:0; } to { opacity:1; } }

/* ── Modal box ── */
.qv-modal {
  background: var(--qv-bg);
  border-radius: var(--qv-radius);
  box-shadow: var(--qv-shadow);
  width: 100%; max-width: 900px;
  height: min(92vh, 860px);
  max-height: 92vh;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  grid-template-rows: 1fr;
  position: relative;
  animation: qvSlideUp 0.30s var(--qv-ease);
  overflow: hidden;
}
@keyframes qvSlideUp {
  from { opacity:0; transform:translateY(24px) scale(0.97); }
  to   { opacity:1; transform:translateY(0)    scale(1); }
}

/* ── Close ── */
.qv-close {
  position: absolute; top: 14px; right: 14px; z-index: 20;
  width: 34px; height: 34px;
  background: rgba(15,23,42,0.07);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.18s, transform 0.22s;
}
.qv-close:hover { background: rgba(15,23,42,0.14); transform: scale(1.1) rotate(90deg); }
.qv-close:focus-visible { outline: 2px solid var(--qv-accent); outline-offset: 2px; }
.qv-close svg { width: 15px; height: 15px; stroke: var(--qv-text); stroke-width: 2.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ── Gallery (left) ── */
.qv-gallery {
  background: var(--qv-surface);
  padding: 32px 22px 24px;
  display: flex; flex-direction: column; gap: 16px;
  overflow-y: auto;
  min-height: 0;
}

.qv-main-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: crosshair;
  border: 1px solid var(--qv-border);
}
.qv-main-img {
  width: 100%; height: 100%;
  object-fit: contain; padding: 16px;
  transition: transform 0.50s var(--qv-ease);
  will-change: transform;
  display: block;
  transform-origin: center center;
}
.qv-main-wrap:hover .qv-main-img { transform: scale(1.55); }

/* Arrows */
.qv-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px;
  background: #fff; border: 1.5px solid var(--qv-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.09);
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.qv-arrow:hover {
  background: var(--qv-primary); border-color: var(--qv-primary);
  transform: translateY(-50%) scale(1.10);
}
.qv-arrow:hover svg { stroke: #fff; }
.qv-arrow svg { width: 13px; height: 13px; stroke: var(--qv-text); stroke-width: 2.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round; }
.qv-arrow--prev { left: 9px; }
.qv-arrow--next { right: 9px; }
.qv-arrow:disabled { opacity: 0.3; pointer-events: none; }
.qv-arrow:focus-visible { outline: 2px solid var(--qv-accent); }

/* Thumbs */
.qv-thumbs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.qv-thumb {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 8px; border: 2px solid var(--qv-border);
  object-fit: contain; padding: 4px; background: #fff;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s;
}
.qv-thumb:hover { transform: scale(1.06); }
.qv-thumb.active { border-color: var(--qv-accent); }

/* Dots */
.qv-dots { display: flex; justify-content: center; gap: 5px; }
.qv-dot {
  height: 6px; width: 6px;
  border-radius: 3px; border: none;
  background: var(--qv-border); cursor: pointer; padding: 0;
  transition: background 0.22s, width 0.28s var(--qv-ease);
}
.qv-dot.active { background: var(--qv-accent); width: 20px; }

/* ── Info (right) ── */
.qv-info {
  padding: 36px 32px 32px;
  display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin; scrollbar-color: var(--qv-border) transparent;
}
.qv-info::-webkit-scrollbar { width: 4px; }
.qv-info::-webkit-scrollbar-track { background: transparent; }
.qv-info::-webkit-scrollbar-thumb { background: var(--qv-border); border-radius: 4px; }

.qv-brand-badge {
  display: inline-flex; align-items: center;
  font-family: 'Rubik', sans-serif;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qv-accent);
  background: rgba(14,165,233,0.09);
  padding: 4px 12px; border-radius: 20px;
  align-self: flex-start;
}

.qv-title {
  font-family: 'Rubik', sans-serif;
  font-size: 21px; font-weight: 600; line-height: 1.25;
  color: var(--qv-text); letter-spacing: -0.025em;
}

.qv-divider { height: 1px; background: var(--qv-border); flex-shrink: 0; }

/* Description */
.qv-desc-block { display: flex; flex-direction: column; gap: 9px; }
.qv-desc-label {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--qv-accent);
}
.qv-desc-text {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 14px; line-height: 1.72; color: #334155; font-weight: 400;
}
.qv-desc-text p { margin: 0 0 6px; }
.qv-desc-text ul, .qv-desc-text ol { padding-left: 18px; }

.qv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.qv-tag {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 11px; font-weight: 700;
  background: #F1F5F9; color: #475569;
  border: 1px solid #CBD5E1;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}

/* Price */
.qv-price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.qv-price {
  font-family: 'Rubik', sans-serif;
  font-size: 30px; font-weight: 700; letter-spacing: -0.04em; color: var(--qv-text);
}
.qv-old-price {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 15px; color: var(--qv-text-muted); text-decoration: line-through;
}
.qv-discount-badge {
  font-family: 'Rubik', sans-serif;
  font-size: 11.5px; font-weight: 800;
  background: var(--qv-success); color: #fff;
  padding: 3px 10px; border-radius: 20px; letter-spacing: 0.02em;
}

/* Buttons */
.qv-actions { display: flex; flex-direction: column; gap: 10px; }

.qv-btn-cart {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--qv-primary); color: #fff;
  font-family: 'Rubik', sans-serif; font-size: 14.5px; font-weight: 600;
  padding: 15px 20px; border-radius: var(--qv-radius-sm);
  border: none; cursor: pointer; width: 100%;
  transition: background 0.20s, transform 0.18s, box-shadow 0.20s;
  letter-spacing: 0.01em;
}
.qv-btn-cart:hover {
  background: #1E293B; transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,23,42,0.28);
}
.qv-btn-cart:active { transform: translateY(0); }
.qv-btn-cart:focus-visible { outline: 2px solid var(--qv-accent); outline-offset: 2px; }
.qv-btn-cart svg { width: 17px; height: 17px; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.qv-btn-wsp {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: transparent; color: #128C7E;
  font-family: 'Rubik', sans-serif; font-size: 13.5px; font-weight: 600;
  padding: 13px 20px; border-radius: var(--qv-radius-sm);
  border: 1.5px solid #25D366; cursor: pointer; width: 100%;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.qv-btn-wsp:hover { background: #25D366; color: #fff; transform: translateY(-1px); }
.qv-btn-wsp svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

/* ── Accordion ── */
.qv-accordion { border: 1.5px solid var(--qv-border); border-radius: var(--qv-radius-sm); overflow: hidden; }
.qv-acc-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--qv-surface); border: none; cursor: pointer;
  font-family: 'Rubik', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--qv-text); gap: 8px;
  transition: background 0.18s; user-select: none;
}
.qv-acc-trigger:hover { background: #F1F5F9; }
.qv-acc-trigger:focus-visible { outline: 2px solid var(--qv-accent); outline-offset: -2px; }
.qv-acc-trigger-left { display: flex; align-items: center; gap: 8px; }
.qv-acc-count {
  font-size: 10.5px; font-weight: 700; color: var(--qv-text-muted);
  background: var(--qv-border); padding: 2px 7px; border-radius: 20px;
}
.qv-chevron {
  width: 16px; height: 16px; flex-shrink: 0;
  stroke: var(--qv-text-muted); stroke-width: 2.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.30s var(--qv-ease);
}
.qv-accordion.open .qv-chevron { transform: rotate(180deg); }

.qv-acc-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.38s var(--qv-ease), opacity 0.28s ease;
  opacity: 0;
}
.qv-accordion.open .qv-acc-body { max-height: 800px; opacity: 1; }

.qv-spec-row {
  display: flex; gap: 12px;
  padding: 10px 16px; border-top: 1px solid var(--qv-border);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 13px; line-height: 1.5;
}
.qv-spec-key { min-width: 115px; font-weight: 700; color: var(--qv-text-muted); flex-shrink: 0; }
.qv-spec-val { color: var(--qv-text); }

/* ── Responsive ── */
@media (max-width: 680px) {
  .qv-overlay { align-items: flex-end; padding: 0; }
  .qv-modal {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
    max-height: 96vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    align-self: flex-end; max-width: 100%;
  }
  .qv-gallery { overflow-y: visible; border-radius: 20px 20px 0 0; padding: 20px 18px 12px; }
  .qv-info { overflow-y: visible; padding: 20px 20px 32px; gap: 15px; }
  .qv-overlay.open { animation: qvSheetIn 0.32s var(--qv-ease); }
  @keyframes qvSheetIn {
    from { opacity:0; transform:translateY(48px); }
    to   { opacity:1; transform:translateY(0); }
  }
  .qv-main-wrap { aspect-ratio: 4/3; }
  .qv-title { font-size: 18px; }
  .qv-price { font-size: 26px; }
  .qv-close { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
