/* Cart Component Styles - COMPLETE WITH GRADIENTS */
/* =================================================== */

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 90%;
    height: 100%;
    background: white;
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

/* Cart Header with Gradient */
.cart-header {
    padding: 20px;
    background: linear-gradient(135deg, #BA0909 0%, #8B0000 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

.cart-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header h3 i {
    font-size: 20px;
}

.cart-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.cart-close:hover {
    background: white;
    color: #BA0909;
    transform: rotate(90deg);
}

/* Cart Body */
.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fafafa;
}

/* Empty Cart State with Style */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.cart-empty i {
    font-size: 72px;
    color: #e5e7eb;
    margin-bottom: 20px;
    display: block;
    opacity: 0.6;
}

.cart-empty p {
    font-size: 18px;
    margin: 0 0 10px 0;
    font-weight: 500;
    color: #777;
}

.cart-empty .text-muted {
    font-size: 14px;
    margin-bottom: 25px;
    color: #999;
}

.cart-empty .btn-browse {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #BA0909 0%, #8B0000 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(186, 9, 9, 0.3);
}

.cart-empty .btn-browse:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(186, 9, 9, 0.4);
}

/* Cart Items */
.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    gap: 15px;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: #BA0909;
}

/* Cart Item Image */
.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #f5f5f5;
    background: #f9f9f9;
    flex-shrink: 0;
}

/* Cart Item Details */
.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    color: #BA0909;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 12px;
}

/* Cart Item Quantity */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: bold;
    color: #555;
}

.quantity-btn:hover {
    background: linear-gradient(135deg, #BA0909 0%, #8B0000 100%);
    color: white;
    border-color: #BA0909;
    transform: scale(1.1);
}

.quantity-btn.decrease {
    color: #ff4444;
}

.quantity-btn.increase {
    color: #25D366;
}

.quantity-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Cart Item Remove Button with Gradient */
.cart-item-remove {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.3);
}

.cart-item-remove:hover {
    background: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}

.cart-item-remove i {
    font-size: 16px;
}

/* Cart Footer with Gradient */
.cart-footer {
    padding: 25px 20px;
    border-top: 2px solid #f0f0f0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px dashed #BA0909;
}

.cart-total span:first-child {
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

.cart-total span:last-child {
    font-weight: 800;
    color: #BA0909;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(186, 9, 9, 0.1);
}

/* Checkout Button with Gradient */
.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #BA0909 0%, #8B0000 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(186, 9, 9, 0.3);
}

.cart-checkout-btn:hover {
    background: linear-gradient(135deg, #8B0000 0%, #660000 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(186, 9, 9, 0.4);
}

.cart-checkout-btn:active {
    transform: translateY(-1px);
}

.cart-checkout-btn i {
    font-size: 20px;
}

/* Cart Badge on Icon with Gradient */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(37, 211, 102, 0.4);
    border: 3px solid white;
    animation: pulse 2s infinite;
}

/* Animations */
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateX(30px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-badge.bounce {
    animation: cartBounce 0.3s ease;
}

.cart-item {
    animation: slideIn 0.3s ease forwards;
}

/* NOTIFICATION STYLES */
.cart-notification {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background: linear-gradient(135deg, #25D366 0%, #1DA851 100%) !important;
    color: white !important;
    padding: 15px 25px !important;
    border-radius: 12px !important;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    z-index: 100000 !important;
    animation: slideInRight 0.3s ease !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    border: 2px solid white !important;
}

.cart-notification i {
    font-size: 20px !important;
}

@keyframes slideInRight {
    from { 
        transform: translateX(100%) !important;
        opacity: 0 !important;
    }
    to { 
        transform: translateX(0) !important;
        opacity: 1 !important;
    }
}

@keyframes slideOutRight {
    from { 
        transform: translateX(0) !important;
        opacity: 1 !important;
    }
    to { 
        transform: translateX(100%) !important;
        opacity: 0 !important;
    }
}

/* SCROLLBAR STYLING */
.cart-body::-webkit-scrollbar {
    width: 8px;
}

.cart-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cart-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #BA0909 0%, #8B0000 100%);
    border-radius: 4px;
}

.cart-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8B0000 0%, #660000 100%);
}

/* RESPONSIVE STYLES */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100% !important;
        right: -100% !important;
    }
    
    .cart-header {
        padding: 15px;
    }
    
    .cart-header h3 {
        font-size: 18px;
    }
    
    .cart-close {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .cart-body {
        padding: 15px;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .cart-item-image {
        width: 140px;
        height: 140px;
        margin-bottom: 15px;
    }
    
    .cart-item-details {
        width: 100%;
    }
    
    .cart-item-title {
        font-size: 17px;
        margin-bottom: 10px;
    }
    
    .cart-item-price {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .cart-item-quantity {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .cart-item-remove {
        width: 100%;
        height: 45px;
        border-radius: 10px;
        margin-top: 10px;
    }
    
    .cart-footer {
        padding: 20px 15px;
    }
    
    .cart-total {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .cart-checkout-btn {
        padding: 16px;
        font-size: 16px;
    }
}
/* MOBILE-SPECIFIC STYLES */
@media (max-width: 767px) {
    .cart-sidebar {
        width: 100% !important;
        right: -100% !important;
    }
    
    .cart-header {
        padding: 15px !important;
    }
    
    .cart-header h3 {
        font-size: 18px !important;
    }
    
    .cart-close {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
    
    .cart-body {
        padding: 15px !important;
    }
    
    .cart-item {
        flex-direction: column !important;
        text-align: center !important;
        padding: 15px !important;
    }
    
    .cart-item-image {
        width: 120px !important;
        height: 120px !important;
        margin-bottom: 10px !important;
    }
    
    .cart-item-details {
        width: 100% !important;
    }
    
    .cart-item-title {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }
    
    .cart-item-price {
        font-size: 20px !important;
        margin-bottom: 15px !important;
    }
    
    .cart-item-quantity {
        justify-content: center !important;
        margin-bottom: 15px !important;
    }
    
    .cart-item-remove {
        width: 100% !important;
        height: 45px !important;
        border-radius: 10px !important;
        margin-top: 10px !important;
    }
    
    .cart-footer {
        padding: 20px 15px !important;
    }
    
    .cart-total {
        padding: 15px !important;
        margin-bottom: 20px !important;
    }
    
    .cart-total span:first-child {
        font-size: 16px !important;
    }
    
    .cart-total span:last-child {
        font-size: 20px !important;
    }
    
    .cart-checkout-btn {
        padding: 16px !important;
        font-size: 16px !important;
    }
    
    /* Empty cart mobile */
    .cart-empty {
        padding: 40px 20px !important;
    }
    
    .cart-empty i {
        font-size: 60px !important;
    }
    
    .cart-empty p {
        font-size: 16px !important;
    }
    
    .btn-browse {
        padding: 12px 25px !important;
        font-size: 16px !important;
    }
}