/* =========================================
   PRODUCT QUICK VIEW MODAL COMPONENT
   ========================================= */

/* 1. Backdrop - Glassmorphism Effect */
.modal-backdrop.show {
    opacity: 0.6 !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1040 !important;
}

#productQuickViewModal {
    z-index: 1050 !important;
}

/* 2. Modal Dialog - Centered & Responsive */
#productQuickViewModal .modal-dialog {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 1rem auto !important;
    max-width: 330px !important;
    width: 90% !important;
    min-height: calc(100vh - 2rem) !important;
    pointer-events: none !important;
    background: transparent !important;
    border: none !important;
}

/* 3. Modal Content - Transparent Wrapper */
#productQuickViewModal .modal-content {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: auto !important;
    overflow: visible !important;
}

/* 4. Modal Body - Content Container */
#productQuickViewModal .modal-body {
    background: transparent !important;
    padding: 0 !important;
}

/* 5. Row Styling - Glass Container */
.product-modal-row {
    background: transparent !important;
    border: 1px dashed #ff69b4 !important;
    border-radius: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 8px !important;
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2) !important;
}

/* 6. Image Container - Blur Background */
.product-modal-image-container {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2) !important;
    height: 160px !important;
    position: relative !important;
}

.modal-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    padding: 0 !important;
}

/* 7. Details Container - Glassmorphism */
.product-modal-details {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 15px !important;
    padding: 12px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2) !important;
}

/* 8. Close Button - Floating Orb */
.super-close-btn {
    position: absolute !important;
    top: -10px !important;
    left: -10px !important;
    right: auto !important;
    width: 36px !important;
    height: 36px !important;
    background: #b71c1c !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    z-index: 1060 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
    opacity: 1 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
    background-size: 50% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.super-close-btn:hover {
    transform: scale(1.1) !important;
    background-color: #d32f2f !important;
}

/* 9. Attributes Styling */
#modalProductAttributes {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#modalProductAttributes::-webkit-scrollbar {
    display: none;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.attribute-item:last-child {
    border-bottom: none;
}

.attribute-label {
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
    flex-grow: 1;
    margin-right: 10px;
}

/* Custom Checkbox/Radio */
.attribute-input-field {
    display: none;
}

.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    flex-shrink: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 1.5px solid #d32f2f;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.attribute-input-field[type="radio"] + .custom-checkbox .checkmark {
    border-radius: 50%;
}

.attribute-input-field:checked + .custom-checkbox .checkmark {
    background-color: #d32f2f;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.attribute-input-field:checked + .custom-checkbox .checkmark:after {
    display: block;
}

/* 10. Navigation Buttons */
.nav-btn {
    flex: 1;
    padding: 8px;
    border-radius: 50px;
    border: none;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nav-btn-back {
    background-color: #e9ecef;
    color: #2c3e50;
}

.nav-btn-next {
    background-color: #d32f2f;
    color: white;
}

/* 11. Add to Cart Button */
#modalAddToCartBtn {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%) !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 10px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4) !important;
    transition: all 0.2s ease !important;
}

#modalAddToCartBtn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.5) !important;
}

/* 12. Modal Step Indicator */
.modal-step-indicator-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
    margin-bottom: 8px;
}

.modal-step-indicator {
    font-weight: 800;
    color: #d32f2f;
    font-size: 0.8rem;
}

.modal-step-name {
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.85rem;
}

/* 13. Responsive Adjustments */
@media (max-width: 576px) {
    #productQuickViewModal .modal-dialog {
        max-width: 310px !important;
    }
    
    .product-modal-image-container {
        height: 140px !important;
    }
    
    #modalProductTitle {
        font-size: 1rem !important;
    }
    
    #modalAddToCartBtn {
        font-size: 0.9rem !important;
    }
    
    .super-close-btn {
        width: 32px !important;
        height: 32px !important;
    }
}
