/* PRODUCT MODAL FORCE CSS - Consistent look & feel with index.html */
/* This file optimizes the product detail modal for all devices */

/* ===========================================
   DESKTOP STYLES (1024px+)
   =========================================== */
@media (min-width: 1024px) {
    /* Modal container optimization */
    .product-modal {
        background: rgba(0, 0, 0, 0.8) !important;
        z-index: 99999 !important;
    }
    
    .modal-content {
        background: white !important;
        border-radius: 16px !important;
        max-width: 1400px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
    }
    
    .premium-modal {
        gap: 3rem !important;
        padding: 2rem !important;
    }
    
    /* LEFT COLUMN - Images */
    .modal-left {
        flex: 1.2 !important; /* Make image column slightly bigger */
    }
    
    .main-image-container {
        width: 100% !important;
        max-width: 600px !important;
        height: 500px !important; /* Fixed height for consistency */
        margin-bottom: 1.5rem !important;
    }
    
    html body .main-product-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important; /* Fit entire image without cropping */
        border-radius: 12px !important;
        cursor: zoom-in !important;
        background: #f8f8f8 !important; /* Light background for transparent areas */
    }
    
    /* Image thumbnails */
    .image-thumbnails {
        display: flex !important;
        justify-content: center !important;
        gap: 12px !important;
        margin-top: 1rem !important;
        flex-wrap: wrap !important;
    }
    
    html body .thumbnail-image {
        width: 80px !important;
        height: 80px !important;
        object-fit: contain !important; /* Show full thumbnail image without cropping */
        background: #f8f8f8 !important; /* Light background for square images */
        border-radius: 8px !important;
        cursor: pointer !important;
        border: 2px solid transparent !important;
        transition: all 0.3s ease !important;
    }
    
    .thumbnail-image:hover,
    .thumbnail-image.active {
        border-color: #4b3c4e !important;
        transform: scale(1.05) !important;
    }
    
    /* RIGHT COLUMN - Product Info */
    .modal-right {
        flex: 1 !important;
        padding-left: 1rem !important;
    }
    
    .product-info-premium h1,
    .product-info-premium .product-title {
        font-family: 'League Spartan', sans-serif !important;
        font-size: 2rem !important;
        color: #333 !important;
        margin-bottom: 1rem !important;
        line-height: 1.2 !important;
    }
    
    .product-meta {
        margin-bottom: 1.5rem !important;
    }
    
    .product-meta span {
        color: #4b3c4e !important;
        font-weight: 600 !important;
        font-size: 0.9rem !important;
    }
    
    /* Pricing section */
    .price-section-premium {
        background: #f8f6ff !important;
        padding: 1.5rem !important;
        border-radius: 12px !important;
        margin-bottom: 2rem !important;
        border: 1px solid #e5d9ff !important;
    }
    
    .current-price {
        font-size: 2.2rem !important;
        color: #4b3c4e !important;
        font-weight: 700 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .original-price {
        font-size: 1.2rem !important;
        color: #999 !important;
        text-decoration: line-through !important;
    }
    
    .savings-badge {
        background: linear-gradient(135deg, #FFB6D5 0%, #F4C2C2 100%) !important;
        color: white !important;
        padding: 0.5rem 1rem !important;
        border-radius: 20px !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        margin-top: 0.5rem !important;
        display: inline-block !important;
    }
    
    /* Product features - HIDDEN FOR NOW */
    .product-features {
        display: none !important; /* Documented and hidden as requested */
    }
    
    .feature-badge {
        display: none !important; /* Hidden */
    }
    
    /* Quantity and Actions */
    .quantity-section {
        margin-bottom: 2rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 1rem !important; /* Quantity controls next to "Cantidad" label */
    }
    
    .quantity-label {
        font-weight: 600 !important;
        color: #333 !important;
        margin-right: 1rem !important;
    }
    
    .quantity-controls {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin-bottom: 0 !important; /* Remove bottom margin */
    }
    
    .quantity-btn {
        width: 40px !important;
        height: 40px !important;
        border: 2px solid #4b3c4e !important;
        background: white !important;
        color: #4b3c4e !important;
        border-radius: 8px !important;
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .quantity-btn:hover {
        background: #4b3c4e !important;
        color: white !important;
    }
    
    .quantity-input {
        width: 60px !important;
        height: 40px !important;
        text-align: center !important;
        border: 2px solid #e5d9ff !important;
        border-radius: 8px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
    }
    
    /* Action buttons - DESKTOP VERTICAL LAYOUT */
    .actions-section-premium {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .btn-add-cart-premium {
        width: 100% !important;
        background: linear-gradient(135deg, #DAC2F5 0%, #F4C2C2 100%) !important; /* Updated gradient */
        color: white !important;
        border: none !important;
        padding: 1rem 2rem !important;
        border-radius: 12px !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .btn-add-cart-premium:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 25px rgba(218, 194, 245, 0.4) !important;
    }
    
    .wishlist-modal-btn {
        width: 100% !important;
        background: white !important;
        color: #4b3c4e !important;
        border: 2px solid #4b3c4e !important;
        padding: 1rem !important;
        border-radius: 12px !important;
        font-size: 1.1rem !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .wishlist-modal-btn:hover {
        background: #4b3c4e !important;
        color: white !important;
    }
    
    .btn-secondary-premium {
        width: 100% !important;
        background: white !important;
        color: #4b3c4e !important;
        border: 2px solid #4b3c4e !important;
        padding: 1rem !important;
        border-radius: 12px !important;
        font-size: 1.1rem !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .btn-secondary-premium:hover {
        background: #4b3c4e !important;
        color: white !important;
    }
    
    /* Product description - DESKTOP WIDER (25% more than image) */
    .description-premium {
        width: 100% !important;
        max-width: 750px !important; /* 25% wider than 600px main-image-container */
        margin-top: 2rem !important;
        padding: 1.5rem !important;
        background: #f8f6ff !important;
        border-radius: 12px !important;
        border: 1px solid #e5d9ff !important;
    }
    
    .description-premium h3 {
        font-family: 'League Spartan', sans-serif !important;
        color: #4b3c4e !important;
        margin-bottom: 1rem !important;
    }
    
    .description-premium p {
        color: #666 !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Product tabs */
    .product-tabs-premium {
        margin-top: 2rem !important;
    }
    
    .tabs-nav {
        display: flex !important;
        border-bottom: 2px solid #e5d9ff !important;
        margin-bottom: 1.5rem !important;
    }
    
    .tab-btn {
        background: none !important;
        border: none !important;
        padding: 1rem 1.5rem !important;
        color: #666 !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        border-bottom: 2px solid transparent !important;
    }
    
    .tab-btn.active,
    .tab-btn:hover {
        color: #4b3c4e !important;
        border-bottom-color: #4b3c4e !important;
    }
    
    .tab-content {
        color: #666 !important;
        line-height: 1.6 !important;
    }
    
    /* Close button */
    .close-modal {
        position: absolute !important;
        top: 20px !important;
        right: 25px !important;
        font-size: 2rem !important;
        color: #999 !important;
        cursor: pointer !important;
        z-index: 1000 !important;
        transition: color 0.3s ease !important;
    }
    
    .close-modal:hover {
        color: #4b3c4e !important;
    }
}

/* ===========================================
   TABLET STYLES (768px - 1023px)
   =========================================== */
@media (min-width: 768px) and (max-width: 1023px) {
    .modal-content {
        max-width: 95% !important;
        margin: 2rem auto !important;
    }
    
    .premium-modal {
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .main-image-container {
        max-width: 400px !important;
        height: 400px !important; /* Square aspect ratio for tablet */
        margin: 0 auto !important;
    }
    
    .main-product-image {
        object-fit: contain !important; /* Fit entire image without cropping */
        background: #f8f8f8 !important;
    }
    
    /* Add more space for thumbnails in tablet */
    .image-thumbnails {
        margin-top: 3rem !important; /* Even more space from main image */
        padding-top: 1rem !important; /* Additional padding */
    }
    
    .product-info-premium h1 {
        font-size: 1.8rem !important;
    }
    
    .current-price {
        font-size: 2rem !important;
    }
    
    .description-premium {
        max-width: 500px !important; /* 25% wider than 400px tablet image */
        padding: 1rem !important;
        margin: 0 auto !important; /* Center it */
    }
    
    /* Product features - HIDDEN FOR TABLET */
    .product-features {
        display: none !important; /* Documented and hidden as requested */
    }
    
    .feature-badge {
        display: none !important; /* Hidden */
    }
    
    .actions-section-premium {
        flex-direction: column !important;
    }
    
    .btn-add-cart-premium {
        background: linear-gradient(135deg, #DAC2F5 0%, #F4C2C2 100%) !important; /* Updated gradient */
        width: 100% !important;
    }
    
    .wishlist-modal-btn,
    .btn-secondary-premium {
        width: 100% !important;
    }
    
    .quantity-section {
        display: flex !important;
        align-items: center !important;
        gap: 1rem !important;
    }
}

/* ===========================================
   MOBILE STYLES (max-width: 767px)
   =========================================== */
@media (max-width: 767px) {
    .product-modal {
        padding: 0 !important;
    }
    
    .modal-content {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .premium-modal {
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 1rem !important;
        height: 100% !important;
        overflow-y: auto !important;
    }
    
    .main-image-container {
        width: 100% !important;
        height: 300px !important;
        max-width: none !important;
    }
    
    html body .main-product-image {
        object-fit: contain !important; /* Fit entire image without cropping */
        background: #f8f8f8 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    html body .thumbnail-image {
        width: 60px !important;
        height: 60px !important;
        object-fit: contain !important; /* Show full thumbnail without cropping */
        background: #f8f8f8 !important;
    }
    
    .product-info-premium h1 {
        font-size: 1.5rem !important;
    }
    
    .current-price {
        font-size: 1.8rem !important;
    }
    
    .actions-section-premium {
        flex-direction: column !important;
        position: sticky !important;
        bottom: 0 !important;
        background: white !important;
        padding: 1rem !important;
        margin: 0 -1rem !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
    }
    
    .btn-add-cart-premium {
        background: linear-gradient(135deg, #DAC2F5 0%, #F4C2C2 100%) !important; /* Updated gradient */
    }
    
    .quantity-section {
        display: flex !important;
        align-items: center !important;
        gap: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .close-modal {
        top: 15px !important;
        right: 20px !important;
        font-size: 1.8rem !important;
    }
    
    .tabs-nav {
        flex-wrap: wrap !important;
    }
    
    .tab-btn {
        padding: 0.8rem 1rem !important;
        font-size: 0.9rem !important;
    }
}