/* =========================================
   PRODUCT QUICK VIEW MODAL COMPONENT (CLEAN & FAST)
   ========================================= */

/* 1. Backdrop - Crisp & Fast without Blur */
.modal-backdrop.show {
    opacity: 0.55 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: rgba(0, 0, 0, 0.6) !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: 0.5rem auto !important;
    max-width: 320px !important;
    width: 92% !important;
    min-height: calc(100vh - 1rem) !important;
    pointer-events: none !important;
    background: transparent !important;
    border: none !important;
}

/* 3. Modal Content - Clean White Card */
#productQuickViewModal .modal-content {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2) !important;
    pointer-events: auto !important;
    overflow: hidden !important;
    padding: 0 !important;
}

/* 4. Modal Body */
#productQuickViewModal .modal-body {
    background: #ffffff !important;
    padding: 12px !important;
}

/* 5. Row Styling - Clean Container without Dashed Border or Blur */
.product-modal-row {
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* 6. Image Container - Clean Solid Background */
.product-modal-image-container {
    background: #f8f9fa !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #eef0f2 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: none !important;
    height: 150px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.modal-product-img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    padding: 4px !important;
}

/* 7. Details Container - Clean White */
.product-modal-details {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 4px 2px !important;
    box-shadow: none !important;
}

/* 8. Close Button */
.super-close-btn {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    width: 30px !important;
    height: 30px !important;
    background: #dc3545 !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    z-index: 1060 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !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: 45% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    transition: transform 0.15s ease !important;
    cursor: pointer !important;
}

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

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

#modalProductAttributes::-webkit-scrollbar {
    width: 4px;
}

#modalProductAttributes::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px;
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.15s ease;
}

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

.attribute-label {
    font-weight: 600;
    cursor: pointer;
    font-size: 0.88rem;
    color: #333;
    flex-grow: 1;
    margin-right: 8px;
}

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

.custom-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 8px;
    flex-shrink: 0;
    cursor: pointer;
}

.checkmark {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #dc3545;
    border-radius: 6px;
    transition: all 0.15s ease;
}

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

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

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

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

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

.nav-btn-back {
    background-color: #f1f3f5;
    color: #495057;
}

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

/* 11. Add to Cart Button */
#modalAddToCartBtn {
    background: #dc3545 !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 11px 16px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;
    transition: background 0.15s ease !important;
}

#modalAddToCartBtn:hover {
    background: #c82333 !important;
}

/* 12. Modal Step Indicator */
.modal-step-indicator-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #f8f9fa;
    border: 1px solid #eef0f2;
    border-radius: 8px;
    margin-bottom: 8px;
}

.modal-step-indicator {
    font-weight: 800;
    color: #dc3545;
    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: 320px !important;
    }
    
    .product-modal-image-container {
        height: 150px !important;
    }
    
    #modalProductTitle {
        font-size: 1.05rem !important;
    }
}

.product-badge-popular {
    display: inline-flex;
    align-items: center;
    gap: 3.5px;
    background: #fef08a;
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
    color: #78350f;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 2px 7.5px;
    border-radius: 6px;
    border: 1px solid #fde047;
    box-shadow: 0 1px 3px rgba(234, 179, 8, 0.18);
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.product-badge-popular .badge-fire-icon {
    font-size: 0.8rem;
    line-height: 1;
    display: inline-block;
    transform: translateY(-0.5px);
}
