
/* Cart Modal Styles */
.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.cart-modal-overlay.cart-modal-open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.cart-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.cart-modal-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 450px;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-modal-open .cart-modal-panel {
    transform: translateX(0);
}

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

.cart-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.cart-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.cart-modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

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

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

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

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #333;
}

.cart-item-price {
    font-size: 0.9rem;
    color: #f59e0b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.quantity-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.quantity-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.quantity {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.remove-item {
    background: #dc3545;
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.remove-item:hover {
    background: #c82333;
}

.cart-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.total-amount {
    color: #f59e0b;
}

.cart-actions {
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
}

.cart-actions .btn {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.empty-cart {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-cart-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-cart p {
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-modal-panel {
        max-width: 100%;
        width: 100%;
    }
    
    .cart-modal-header {
        padding: 1rem;
    }
    
    .cart-items-container {
        padding: 0.75rem;
    }
    
    .cart-item {
        padding: 0.75rem 0;
    }
    
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    
    .cart-modal-footer {
        padding: 1rem;
    }
}

/* Cart Badge Animation */
.cart-badge {
    animation: cartBadgePulse 0.3s ease;
}

@keyframes cartBadgePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}
