/* Product Modal Styles */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.85) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    padding: 20px !important;
    overflow-y: auto !important;
}

.modal-overlay.active {
    display: flex !important;
}

/* Fallback for old modal class */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.85) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    padding: 20px !important;
}

.modal-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%) !important;
    border-radius: 15px !important;
    max-width: 600px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    animation: modalSlideUp 0.3s ease-out !important;
    border: 2px solid #ffd700 !important;
    position: relative !important;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1.5rem !important;
    border-bottom: 1px solid #ffd700 !important;
}

.modal-header h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    color: #ffd700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-modal {
    background: none !important;
    border: none !important;
    font-size: 1.5rem !important;
    color: #ffd700 !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.close-modal:hover {
    background: #ffd700 !important;
    color: #000 !important;
}

.modal-body {
    padding: 1.5rem;
}

.product-image {
    text-align: center;
    margin-bottom: 2rem;
}

.product-image img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.product-image img.loading {
    opacity: 0.5;
}

.product-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-weight: 600;
    color: #e0e0e0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-group select,
.option-group input {
    padding: 0.75rem;
    border: 2px solid #ffd700;
    border-radius: 8px;
    font-size: 1rem;
    background: #2d2d2d;
    color: #e0e0e0;
    transition: border-color 0.3s ease;
}

.option-group select:focus,
.option-group input:focus {
    outline: none;
    border-color: #ffed4e;
}

.option-group select {
    cursor: pointer;
}

.price-display {
    text-align: center !important;
    padding: 1rem !important;
    background: #1a1a1a !important;
    border-radius: 10px !important;
    border: 2px solid #ffd700 !important;
}

.price-display .price {
    font-size: 2rem !important;
    font-weight: bold !important;
    color: #ffd700 !important;
    font-family: 'Oswald', sans-serif !important;
}

.quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quantity-selector input {
    width: 100px;
}

.add-to-cart-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    font-family: 'Oswald', sans-serif;
}

.add-to-cart-btn:hover {
    background: linear-gradient(45deg, #ffed4e, #fff176);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Color Swatches */
.color-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #e1e5e9;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: #007bff;
}

.color-swatch.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.color-swatch::after {
    content: attr(data-color);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #6c757d;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-swatch:hover::after {
    opacity: 1;
}

/* Size Options */
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.size-option {
    padding: 0.5rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.size-option:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.size-option.selected {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .price-display .price {
        font-size: 1.5rem;
    }
    
    .color-options {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    }
    
    .color-swatch {
        width: 35px;
        height: 35px;
    }
}