/* quick_view.css - Luxury Quick View Modal */

/* Backdrop */
.qv-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    z-index: 999999; /* Changed from 9999 to 999999 to be on top of navbar */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.qv-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal Container */
.qv-modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 900px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    overflow: hidden;
    position: relative;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    max-height: 90vh;
}

.qv-modal-backdrop.show .qv-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Close Button */
.qv-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
}

.qv-close-btn:hover {
    background: #ef4444;
    color: #fff;
    transform: rotate(90deg);
}

/* Layout */
.qv-image-section {
    width: 45%;
    background: #f1f5f9;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.qv-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-height: 400px;
}

.qv-info-section {
    width: 55%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 90vh;
}

/* Badges */
.qv-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.qv-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

.qv-badge.out-of-stock { background: #ef4444; }
.qv-badge.vip { background: linear-gradient(135deg, #d97706, #f59e0b); }
.qv-badge.fs-biasa { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.qv-badge.diskon { background: linear-gradient(135deg, #e11d48, #f43f5e); }
.qv-badge.terlaris { background: linear-gradient(135deg, #10b981, #34d399); }
.qv-badge.baru { background: linear-gradient(135deg, #6366f1, #818cf8); }

/* Typography */
.qv-brand {
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.qv-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 15px 0;
}

.qv-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

.qv-rating i {
    color: #fbbf24;
}

/* Pricing */
.qv-price-container {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
}

.qv-price-main {
    font-size: 32px;
    font-weight: 800;
    color: #d97706; /* Primary */
}

.qv-price-old {
    font-size: 16px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 600;
}

/* Description & Stock */
.qv-desc {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 15px;
}

.qv-qty-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.qv-qty-selector {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.qv-qty-selector button {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #64748b;
    cursor: pointer;
    transition: 0.2s;
}

.qv-qty-selector button:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.qv-qty-selector input {
    width: 40px;
    height: 36px;
    border: none;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    outline: none;
    -moz-appearance: textfield;
}
.qv-qty-selector input::-webkit-outer-spin-button,
.qv-qty-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qv-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.qv-meta-item {
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
}

.qv-meta-item i {
    color: #d97706;
}

/* Action Buttons */
.qv-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.qv-btn-cart {
    flex: 1;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    height: 56px;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.qv-btn-cart:hover {
    background: #fff;
    border-color: #0f172a;
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.qv-btn-buy {
    flex: 1;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    border: none;
    border-radius: 16px;
    height: 56px;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.4);
}

.qv-btn-buy:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(15, 23, 42, 0.5);
    color: #fff;
}

.qv-btn-disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    border: none !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* View Full Detail Link */
.qv-full-detail {
    text-align: center;
    margin-top: 20px;
}

.qv-full-detail a {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.qv-full-detail a:hover {
    color: #d97706;
}

/* Loading Skeleton */
.qv-skeleton {
    background: #e2e8f0;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 400% 100%;
    animation: qvSkeletonLoading 1.5s infinite;
    border-radius: 8px;
}

@keyframes qvSkeletonLoading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.qv-loading-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 5;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.qv-loading-state.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
    .qv-modal-backdrop {
        height: 100%;
        height: 100dvh;
    }
    
    .qv-modal-content {
        flex-direction: column;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        transform: translateY(100%);
    }

    .qv-modal-backdrop.show .qv-modal-content {
        transform: translateY(0);
    }

    .qv-image-section {
        width: 100%;
        padding: 0;
        height: 300px;
        flex: 0 0 300px;
    }

    .qv-product-image {
        min-height: auto;
        max-height: none;
        height: 100%;
    }

    .qv-info-section {
        width: 100%;
        padding: 25px 20px;
        flex: 1;
        border-radius: 30px 30px 0 0;
        background: #fff;
        margin-top: -30px;
        z-index: 2;
        box-shadow: 0 -10px 25px rgba(0,0,0,0.05);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 90px; /* Make space for fixed actions */
    }

    .qv-title {
        font-size: 22px;
    }

    .qv-price-main {
        font-size: 26px;
    }

    .qv-actions {
        flex-direction: row;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 15px 20px;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .qv-close-btn {
        top: 15px;
        right: 15px;
        background: rgba(255,255,255,0.9);
        backdrop-filter: blur(5px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        position: absolute; /* Changed from fixed */
        z-index: 9999;
    }
}
