/* ═══════════════════════════════════════════════════════════════════
   Modal de Vista rápida (quick-view + quick-add) — estilo marketplace.
   Foto grande + thumbnails + talles con stock + cantidad + promos.
   ═══════════════════════════════════════════════════════════════════ */
.vm-qv-modal {
    position: fixed;
    inset: 0;
    z-index: 20020;
    display: none;
    align-items: center;
    justify-content: center;
}
.vm-qv-modal.open { display: flex; }
.vm-qv-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.vm-qv-dialog {
    position: relative;
    background: #fff;
    border-radius: 20px;
    width: min(860px, 96vw);
    max-height: 94vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    animation: qv-pop .22s cubic-bezier(.2, 1.1, .3, 1);
}
@keyframes qv-pop {
    from { opacity: 0; transform: scale(.96) translateY(8px); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .vm-qv-dialog { animation: none; } }

.vm-qv-close {
    position: absolute;
    top: 10px; right: 12px;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .92);
    border: none; border-radius: 50%;
    font-size: 1.5rem; line-height: 1;
    color: #333; cursor: pointer; z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
body.vm-qv-lock { overflow: hidden; }

.qv-loading { padding: 80px; text-align: center; color: #888; }

/* ── Layout ── */
.qv-card { display: flex; gap: 22px; padding: 22px; }
@media (max-width: 640px) { .qv-card { flex-direction: column; gap: 14px; padding: 14px; } }

/* ── Galería ── */
.qv-gallery { flex: 0 0 46%; max-width: 46%; }
@media (max-width: 640px) { .qv-gallery { flex: none; max-width: 100%; } }

.qv-img {
    position: relative;
    aspect-ratio: 3 / 4;
    background: #f4f3f1;
    border-radius: 14px;
    overflow: hidden;
}
.qv-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qv-img-ph { position: absolute; inset: 0; display: grid; place-items: center; color: #bbb; font-size: 2rem; }

.qv-off-flag {
    position: absolute; top: 12px; left: 12px; z-index: 3;
    background: #e11d48; color: #fff;
    font-size: .82rem; font-weight: 800; letter-spacing: .01em;
    border-radius: 8px; padding: 5px 11px;
    box-shadow: 0 2px 8px rgba(225, 29, 72, .35);
}

.qvx-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 3;
    width: 40px; height: 52px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: none; color: #1c1a18;
    font-size: 1.3rem; cursor: pointer;
}
.qvx-nav i { text-shadow: 0 0 6px rgba(255, 255, 255, .95), 0 1px 2px rgba(0, 0, 0, .25); }
.qvx-prev { left: 2px; }
.qvx-next { right: 2px; }
.qvx-nav:active { transform: translateY(-50%) scale(.85); transition: transform 90ms ease; }

.qv-img-counter {
    position: absolute; bottom: 10px; left: 10px; z-index: 3;
    font-size: .68rem; font-weight: 600;
    padding: 3px 9px; border-radius: 999px;
    background: rgba(0, 0, 0, .5); color: #fff;
    pointer-events: none;
}

.qv-thumbs {
    display: flex; gap: 8px; margin-top: 10px;
    overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.qv-thumbs::-webkit-scrollbar { display: none; }
.qv-thumb {
    flex: 0 0 auto;
    width: 54px; height: 68px;
    padding: 0; border: 2px solid transparent;
    border-radius: 9px; overflow: hidden;
    background: #f4f3f1; cursor: pointer;
}
.qv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qv-thumb-active { border-color: #1c1a18; }

/* ── Info ── */
.qv-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qv-store { font-size: .72rem; color: #9a948b; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.qv-name { font-size: 1.25rem; font-weight: 700; line-height: 1.25; margin: 4px 0 10px; color: #1c1a18; }

.qv-price { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 12px; }
.qv-now { font-size: 1.7rem; font-weight: 800; color: #e11d48; letter-spacing: -.01em; }
.qv-old { text-decoration: line-through; color: #9a948b; font-size: 1rem; }
.qv-off { background: #fde2e8; color: #e11d48; border-radius: 7px; padding: 2px 8px; font-size: .82rem; font-weight: 800; }

/* Sin descuento: precio en negro */
.qv-price:not(:has(.qv-old)) .qv-now { color: #1c1a18; }

.qv-promos { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.qv-promo {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .76rem; font-weight: 600; color: #16a34a;
    background: #f0faf2; border: 1px solid #d5f0dd;
    border-radius: 8px; padding: 4px 9px;
}
.qv-promo-hot { color: #e11d48; background: #fef2f4; border-color: #fcd9e0; }

.qv-talles-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.qv-talles-label { font-size: .82rem; font-weight: 700; color: #1c1a18; }
.qv-guia { font-size: .74rem; color: #6d28d9; text-decoration: none; }
.qv-guia:hover { text-decoration: underline; color: #6d28d9; }

.qv-talles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.qv-talle {
    position: relative;
    min-width: 46px; min-height: 44px;
    padding: 6px 12px;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1px;
    border: 1.5px solid #ddd; background: #fff;
    border-radius: 11px; cursor: pointer;
    font-size: .9rem; font-weight: 600; color: #1c1a18;
    transition: border-color .12s, background .12s, transform .09s;
}
.qv-talle:active { transform: scale(.94); }
.qv-talle-tag { font-size: .58rem; font-weight: 700; color: #e11d48; text-transform: uppercase; letter-spacing: .02em; }
.qv-talle-active { border-color: #1c1a18; background: #1c1a18; color: #fff; }
.qv-talle-active .qv-talle-tag { color: #ffb3c1; }
.qv-talle:disabled { opacity: .38; cursor: not-allowed; }
.qv-talle:disabled .qv-talle-code { text-decoration: line-through; }

/* ── Cantidad ── */
.qv-qty-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.qv-qty-label { font-size: .82rem; font-weight: 700; color: #1c1a18; }
.qv-qty { display: inline-flex; align-items: center; border: 1.5px solid #ddd; border-radius: 12px; overflow: hidden; }
.qv-qty-btn {
    width: 44px; height: 44px;
    border: none; background: #fff; color: #1c1a18;
    font-size: 1.3rem; line-height: 1; cursor: pointer;
    display: grid; place-items: center;
}
.qv-qty-btn:active:not(:disabled) { background: #f2f0ed; }
.qv-qty-btn:disabled { color: #ccc; cursor: not-allowed; }
.qv-qty-val {
    width: 46px; height: 44px; text-align: center;
    border: none; border-left: 1.5px solid #eee; border-right: 1.5px solid #eee;
    font-size: 1rem; font-weight: 700; color: #1c1a18;
    background: #fff; pointer-events: none;
}

/* ── CTAs ── */
.qv-add {
    width: 100%;
    border: none; border-radius: 14px;
    padding: 15px; margin-top: auto;
    background: #1c1a18; color: #fff;
    font-weight: 700; font-size: 1rem; cursor: pointer;
    box-shadow: 0 6px 18px rgba(28, 26, 24, .22);
    transition: transform .09s;
}
.qv-add:active:not(:disabled) { transform: scale(.98); }
.qv-add:disabled { background: #bbb; box-shadow: none; cursor: not-allowed; }

.qv-probar {
    display: flex; align-items: center; justify-content: center;
    width: 100%; margin-top: 10px; padding: 13px;
    border-radius: 14px; font-weight: 700; font-size: .95rem;
    text-decoration: none; color: #6d28d9;
    background: rgba(109, 40, 217, .08); border: 1.5px solid rgba(109, 40, 217, .22);
}
.qv-probar:hover { background: rgba(109, 40, 217, .15); color: #6d28d9; }

.qv-desc {
    margin: 14px 0 0; font-size: .85rem; line-height: 1.55; color: #6b6560;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.qv-detail { display: inline-block; margin-top: 12px; font-size: .85rem; font-weight: 600; color: #6d28d9; text-decoration: none; }
.qv-detail:hover { text-decoration: underline; color: #6d28d9; }

/* ═══════════════════════════════════════════════════════════════════
   PEEK (mantener presionado) + CANDADO slide-to-lock
   El candado aparece durante el hold; si el dedo se arrastra sobre él
   (sin soltar), al soltar el quick view queda FIJADO.
   ═══════════════════════════════════════════════════════════════════ */
.vm-qv-lockhint {
    position: fixed;
    left: 50%;
    bottom: calc(30px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 20030;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
}
.vm-qv-lockhint.show { opacity: 1; }

.vm-qv-lock-btn {
    width: 62px; height: 62px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(28, 26, 24, .92);
    color: #fff; font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    transition: transform .18s cubic-bezier(.2, 1.3, .3, 1), background .15s;
}
.vm-qv-lock-btn .bi-lock-fill { display: none; }

/* "Armado": el dedo está sobre el candado → al soltar queda fijado */
.vm-qv-lockhint.armed .vm-qv-lock-btn {
    transform: scale(1.18);
    background: #6d28d9;
}
.vm-qv-lockhint.armed .vm-qv-lock-btn .bi-unlock-fill { display: none; }
.vm-qv-lockhint.armed .vm-qv-lock-btn .bi-lock-fill { display: block; }

.vm-qv-lock-label {
    font-size: .72rem; font-weight: 700; color: #fff;
    background: rgba(28, 26, 24, .82);
    padding: 4px 12px; border-radius: 999px;
    white-space: nowrap;
}
.vm-qv-lockhint.armed .vm-qv-lock-label { background: #6d28d9; }

/* Flecha guía animada que sube hacia el candado */
.vm-qv-lock-arrow {
    color: rgba(255, 255, 255, .7); font-size: 1.1rem;
    animation: qv-lock-bounce 1.1s ease-in-out infinite;
}
@keyframes qv-lock-bounce {
    0%, 100% { transform: translateY(3px); opacity: .5; }
    50% { transform: translateY(-3px); opacity: 1; }
}
.vm-qv-lockhint.armed .vm-qv-lock-arrow { display: none; }
@media (prefers-reduced-motion: reduce) { .vm-qv-lock-arrow { animation: none; } }

/* Mientras está en modo peek (sin fijar), el diálogo ignora toques: el
   gesto lo maneja card-peek.js. Al fijar se quita esta clase. */
.vm-qv-modal.peeking .vm-qv-dialog { pointer-events: none; }
.vm-qv-modal.peeking .vm-qv-close { display: none; }
