/* ============================================================
   Ventova Store — Quick View Modal
   ============================================================ */

/* Overlay */
.vs-qv-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--vs-space-lg);
    animation: vsQvFadeIn 0.25s ease;
}

.vs-qv-overlay.active {
    display: flex;
}

@keyframes vsQvFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal */
.vs-qv-modal {
    background: var(--vs-bg-white);
    border-radius: var(--vs-radius-lg);
    max-width: 820px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: vsQvSlideUp 0.3s ease;
}

@keyframes vsQvSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.vs-qv-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2001;
    width: 36px;
    height: 36px;
    border-radius: var(--vs-radius-full);
    border: none;
    background: var(--vs-bg-dark);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--vs-transition-fast);
}

.vs-qv-close:hover {
    background: var(--vs-danger);
    transform: rotate(90deg);
}

/* Image Section */
.vs-qv-images {
    background: var(--vs-border-light);
    padding: var(--vs-space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: var(--vs-radius-lg) 0 0 var(--vs-radius-lg);
    overflow: hidden;
}

.vs-qv-main-img {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

/* Bug 5 fix: fallback when product has no image */
.vs-qv-no-img {
    width: 100%;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vs-border);
    font-size: 4rem;
}

.vs-qv-sale-badge {
    position: absolute;
    top: var(--vs-space-md);
    left: var(--vs-space-md);
    background: var(--vs-danger);
    color: #fff;
    padding: 4px 12px;
    border-radius: var(--vs-radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.vs-qv-gallery {
    position: absolute;
    bottom: var(--vs-space-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--vs-space-sm);
}

.vs-qv-gallery-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--vs-radius-sm);
    border: 2px solid transparent;
    object-fit: cover;
    cursor: pointer;
    transition: var(--vs-transition-fast);
    background: #fff;
}

.vs-qv-gallery-thumb:hover,
.vs-qv-gallery-thumb.active {
    border-color: var(--vs-primary);
}

/* Info Section */
.vs-qv-info {
    padding: var(--vs-space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--vs-space-md);
}

.vs-qv-category {
    color: var(--vs-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vs-qv-title {
    font-family: var(--vs-font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--vs-bg-dark);
    line-height: 1.3;
}

.vs-qv-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--vs-primary);
}

.vs-qv-price del {
    color: var(--vs-text-light);
    font-size: 1rem;
    font-weight: 400;
    margin-right: 6px;
}

.vs-qv-price ins {
    text-decoration: none;
    color: var(--vs-danger);
}

.vs-qv-stock {
    display: inline-flex;
    align-items: center;
    gap: var(--vs-space-xs);
}

.vs-qv-desc {
    color: var(--vs-text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    max-height: 100px;
    overflow-y: auto;
}

.vs-qv-actions {
    display: flex;
    gap: var(--vs-space-sm);
    margin-top: auto;
}

.vs-qv-buy-btn {
    flex: 1;
    text-align: center;
    font-size: 0.95rem;
    padding: 0.7rem 1.5rem;
}

/* Quick View Button on product cards */
.vs-quick-view-btn {
    position: absolute;
    top: var(--vs-space-sm);
    right: var(--vs-space-sm);
    width: 34px;
    height: 34px;
    border-radius: var(--vs-radius-full);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--vs-border);
    color: var(--vs-text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-6px);
    transition: var(--vs-transition);
    z-index: 5;
}

.woocommerce ul.products li.product:hover .vs-quick-view-btn {
    opacity: 1;
    transform: translateY(0);
}

.vs-quick-view-btn:hover {
    background: var(--vs-primary);
    color: #fff;
    border-color: var(--vs-primary);
}

/* Loading state */
.vs-qv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    grid-column: 1 / -1;
    color: var(--vs-text-muted);
    font-size: 0.9rem;
    gap: var(--vs-space-sm);
}

/* Responsive */
@media (max-width: 768px) {
    .vs-qv-modal {
        grid-template-columns: 1fr;
        max-height: 85vh;
    }

    .vs-qv-images {
        border-radius: var(--vs-radius-lg) var(--vs-radius-lg) 0 0;
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .vs-qv-overlay {
        padding: var(--vs-space-sm);
    }

    .vs-qv-images {
        max-height: 200px;
    }

    .vs-qv-info {
        padding: var(--vs-space-lg);
    }

    .vs-qv-title {
        font-size: 1.15rem;
    }

    .vs-qv-actions {
        flex-direction: column;
    }
}