/* ============================================
   PREMIUM QUICK VIEW MODAL
   ============================================ */

/* Modal container overrides */
#quickViewModal .modal-dialog {
    max-width: 920px;
}

#quickViewModal .modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

#quickViewModal .modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 24px;
}

#quickViewModal .modal-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

#quickViewModal .modal-body {
    padding: 0;
}

#quickViewModal .btn-close {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

    #quickViewModal .btn-close:hover {
        opacity: 1;
    }

/* ==================== LOADING STATE ==================== */
.qv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 40px;
    gap: 16px;
}

.qv-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #e8e8e8;
    border-top-color: #0f0f0f;
    border-radius: 50%;
    animation: qv-spin 0.8s linear infinite;
}

@keyframes qv-spin {
    to {
        transform: rotate(360deg);
    }
}

.qv-loading-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

/* ==================== ERROR STATE ==================== */
.qv-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    gap: 12px;
    color: #6b7280;
    text-align: center;
}

    .qv-error i {
        font-size: 2rem;
        color: #c1272d;
    }

    .qv-error p {
        margin: 0;
        font-size: 0.9375rem;
    }

/* ==================== LAYOUT ==================== */
.qv-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 480px;
}

.qv-image-col {
    background: #fafafa;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qv-info-col {
    padding: 36px 36px 32px;
    display: flex;
    flex-direction: column;
}

/* ==================== MAIN IMAGE ==================== */
.qv-main-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

    .qv-main-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        padding: 20px;
        transition: opacity 0.3s ease;
    }

/* ==================== THUMBNAILS ==================== */
.qv-thumbnails {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qv-thumb {
    width: 60px;
    height: 60px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    padding: 4px;
    transition: border-color 0.2s ease;
    overflow: hidden;
}

    .qv-thumb:hover {
        border-color: #6b7280;
    }

    .qv-thumb.active {
        border-color: #0f0f0f;
        border-width: 2px;
    }

    .qv-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

/* ==================== INFO COLUMN ==================== */
.qv-brand {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.qv-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f0f0f;
    line-height: 1.25;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

/* Rating */
.qv-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.qv-stars {
    display: inline-flex;
    gap: 2px;
}

    .qv-stars i {
        color: #0f0f0f;
        font-size: 0.875rem;
    }

        .qv-stars i.bi-star {
            color: #d1d5db;
        }

.qv-rating-count {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Price */
.qv-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.qv-price-current {
    font-size: 1.625rem;
    font-weight: 700;
    color: #0f0f0f;
    letter-spacing: -0.02em;
}

.qv-price-old {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 400;
}

.qv-discount {
    background: #0f0f0f;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 2px;
    line-height: 1.5;
}

/* Stock */
.qv-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.qv-stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.qv-stock.in-stock {
    color: #2d7a3d;
}

    .qv-stock.in-stock .qv-stock-dot {
        background: #2d7a3d;
        box-shadow: 0 0 0 3px rgba(45, 122, 61, 0.15);
    }

.qv-stock.out-of-stock {
    color: #c1272d;
}

    .qv-stock.out-of-stock .qv-stock-dot {
        background: #c1272d;
        box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.15);
    }

/* Description */
.qv-description {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #2a2a2a;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

/* ==================== OPTIONS ==================== */
.qv-options {
    margin-bottom: 24px;
}

.qv-field {
    margin-bottom: 16px;
}

    .qv-field:last-child {
        margin-bottom: 0;
    }

.qv-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #0f0f0f;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

/* ── Option chips (colour & size) ── */
.qv-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qv-chip {
    padding: 7px 16px;
    border: 1.5px solid #e8e8e8;
    border-radius: 4px;
    background: #ffffff;
    color: #0f0f0f;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
    line-height: 1.3;
    white-space: nowrap;
}

    .qv-chip:hover:not(:disabled):not(.active) {
        border-color: #9ca3af;
    }

    .qv-chip.active {
        border-color: #0f0f0f;
        border-width: 2px;
        background: #0f0f0f;
        color: #ffffff;
    }

    .qv-chip.soldout,
    .qv-chip:disabled {
        opacity: 0.38;
        cursor: not-allowed;
        text-decoration: line-through;
    }

.qv-selected-val {
    font-weight: 600;
    font-size: 0.6875rem;
    color: #0f0f0f;
    text-transform: none;
    letter-spacing: 0;
}

/* Variation select */
.qv-select-wrap {
    position: relative;
}

.qv-select {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 11px 40px 11px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f0f0f;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

    .qv-select:hover {
        border-color: #6b7280;
    }

    .qv-select:focus {
        outline: none;
        border-color: #0f0f0f;
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    }

.qv-select-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #6b7280;
    pointer-events: none;
}

/* Quantity stepper */
.qv-quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.qv-qty-btn {
    background: #ffffff;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    color: #0f0f0f;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .qv-qty-btn:hover {
        background: #fafafa;
    }

    .qv-qty-btn:active {
        background: #f0f0f0;
    }

    .qv-qty-btn i {
        font-size: 0.875rem;
    }

.qv-qty-input {
    width: 48px;
    border: none;
    border-left: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f0f0f;
    padding: 9px 0;
    background: transparent;
    font-family: inherit;
}

    .qv-qty-input:focus {
        outline: none;
    }

    /* Hide number input spinners */
    .qv-qty-input::-webkit-outer-spin-button,
    .qv-qty-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .qv-qty-input[type=number] {
        -moz-appearance: textfield;
    }

/* ==================== ACTIONS ==================== */
.qv-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qv-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.02em;
    font-family: inherit;
    line-height: 1;
}

.qv-btn-primary {
    background: #0f0f0f;
    color: #ffffff;
    border-color: #0f0f0f;
}

    .qv-btn-primary:hover:not(:disabled) {
        background: #2d2d2d;
        border-color: #2d2d2d;
        color: #ffffff;
    }

    .qv-btn-primary:disabled {
        background: #f0f0f0;
        color: #9ca3af;
        border-color: #e8e8e8;
        cursor: not-allowed;
    }

    .qv-btn-primary i {
        font-size: 1rem;
    }

.qv-btn-success {
    background: #2d7a3d !important;
    border-color: #2d7a3d !important;
}

.qv-btn-secondary {
    background: #ffffff;
    color: #0f0f0f;
    border-color: #e8e8e8;
}

    .qv-btn-secondary:hover {
        border-color: #0f0f0f;
        color: #0f0f0f;
    }

    .qv-btn-secondary i {
        font-size: 0.875rem;
        transition: transform 0.2s ease;
    }

    .qv-btn-secondary:hover i {
        transform: translateX(3px);
    }

/* Button spinner */
.qv-btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: qv-spin 0.8s linear infinite;
}

/* ==================== TOAST ==================== */
.qv-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #0f0f0f;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-width: 240px;
    max-width: 90vw;
    letter-spacing: 0.01em;
}

    .qv-toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .qv-toast i {
        font-size: 1.125rem;
        flex-shrink: 0;
    }

.qv-toast-success i {
    color: #4ade80;
}

.qv-toast-error i {
    color: #ef4444;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 767px) {
    #quickViewModal .modal-dialog {
        margin: 12px;
        max-width: calc(100% - 24px);
    }

    .qv-wrap {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .qv-image-col {
        padding: 20px;
    }

    .qv-info-col {
        padding: 24px 20px;
    }

    .qv-title {
        font-size: 1.25rem;
    }

    .qv-price-current {
        font-size: 1.375rem;
    }

    .qv-thumb {
        width: 50px;
        height: 50px;
    }

    .qv-btn {
        padding: 13px 18px;
        font-size: 0.8125rem;
    }

    .qv-toast {
        top: 16px;
        font-size: 0.8125rem;
        padding: 12px 16px;
    }
}

@media (max-width: 575px) {
    .qv-image-col {
        padding: 16px;
    }

    .qv-info-col {
        padding: 20px 16px;
    }

    .qv-title {
        font-size: 1.125rem;
        margin-bottom: 12px;
    }

    .qv-price-current {
        font-size: 1.25rem;
    }

    .qv-thumbnails {
        gap: 6px;
    }

    .qv-thumb {
        width: 44px;
        height: 44px;
    }
}
