/**
 * Shopping Cart Styles
 */

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.cart-notification.show {
    transform: translateX(0);
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    right: -500px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: white;
    z-index: 1000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-modal.active {
    right: 0;
}

.cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-modal.active ~ .cart-modal-overlay,
.cart-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.cart-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-modal-close:hover {
    background: #e2e8f0;
}

.cart-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: white;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.875rem;
    color: #0ea5e9;
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: background 0.2s;
    color: #64748b;
}

.qty-btn:hover {
    background: #f1f5f9;
    color: #0ea5e9;
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-item-remove:hover {
    background: #fecaca;
}

/* Cart Summary */
.cart-summary {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.cart-total strong {
    color: #0ea5e9;
    font-size: 1.5rem;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-primary-cart,
.btn-secondary-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary-cart {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-primary-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

.btn-secondary-cart {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-secondary-cart:hover {
    background: #f8fafc;
    color: #0ea5e9;
}

/* Mobile */
@media (max-width: 640px) {
    .cart-modal {
        max-width: 100%;
    }
}
