/* Cart Modal Styles */

.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.cart-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

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

.cart-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    font-family: 'Archivo Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem;
    max-height: 400px;
}

.empty-cart {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-details h4 {
    margin: 0;
    font-size: 1rem;
    color: #333;
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
}

.cart-item-price {
    margin: 0;
    color: #ff3366;
    font-weight: 600;
    font-size: 1.1rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-quantity {
    width: 60px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
}

.remove-from-cart {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.8rem;
}

.remove-from-cart:hover {
    background: #c82333;
}

.cart-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.cart-total-section {
    text-align: center;
    margin-bottom: 1rem;
}

.cart-total-section strong {
    font-size: 1.2rem;
    color: #333;
    font-family: 'Archivo', sans-serif;
}

.cart-total {
    color: #ff3366;
    font-size: 1.3rem;
}

.cart-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cart-actions .btn {
    flex: 1;
    max-width: 150px;
}

/* Cart Icon Styles */
#cart-icon {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

#cart-icon:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3366;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    display: none;
}

/* Add to Cart Button Styles */
.add-to-cart-btn {
    background: #ff3366;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Archivo', sans-serif;
    font-size: 0.9rem;
    width: 100%;
}

.add-to-cart-btn:hover {
    background: #e62e5c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.3);
}

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

/* Product Card Integration */
.product-card {
    position: relative;
}

.product-card .add-to-cart-btn {
    margin-top: 1rem;
}

.product-card:hover .add-to-cart-btn {
    background: #e62e5c;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .cart-modal-header,
    .cart-items,
    .cart-modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
        align-self: center;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-actions .btn {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .cart-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .cart-item-details h4 {
        font-size: 0.9rem;
    }
    
    .cart-item-price {
        font-size: 1rem;
    }
    
    .cart-total-section strong {
        font-size: 1.1rem;
    }
    
    .cart-total {
        font-size: 1.2rem;
    }
}

/* Animation for cart updates */
@keyframes cartBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.cart-updated {
    animation: cartBounce 0.6s ease-in-out;
}
