:root {
    --cart-primary-color: #6c63ff;
    --cart-secondary-color: #ff6584;
    --cart-dark-color: #1a1a2e;
    --cart-light-color: #f8f9fa;
    --cart-success-color: #28a745;
    --cart-danger-color: #dc3545;
    --cart-warning-color: #ffc107;
    --cart-info-color: #17a2b8;
}

body {
    background-color: var(--cart-light-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 80px;
}

/* Cart Container */
.cart-container {
    margin-bottom: 50px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cart Header */
.cart-header {
    background: linear-gradient(135deg, var(--cart-dark-color), #2d2b55);
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.cart-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1));
    border-radius: 0 0 0 100px;
}

/* Cart Items */
.cart-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-left: 4px solid var(--cart-primary-color);
    position: relative;
}

.cart-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #eaeaea;
    transition: transform 0.3s;
}

.cart-item:hover .cart-item-image {
    transform: scale(1.05);
}

.cart-item-title {
    color: var(--cart-dark-color);
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.cart-item-category {
    font-size: 0.85rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
}

/* Quantity Controls */
.quantity-input {
    width: 70px;
    text-align: center;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 5px;
    font-weight: 600;
    transition: border-color 0.3s;
}

.quantity-input:focus {
    border-color: var(--cart-primary-color);
    box-shadow: 0 0 0 0.2rem rgba(108, 99, 255, 0.25);
    outline: none;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.quantity-btn:hover {
    background: #5a52d5;
    transform: scale(1.1);
}

.quantity-btn:active {
    transform: scale(0.95);
}

/* Remove Button */
.remove-btn {
    background: transparent;
    border: 2px solid var(--cart-danger-color);
    color: var(--cart-danger-color);
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.remove-btn:hover {
    background: var(--cart-danger-color);
    color: white;
    transform: translateY(-2px);
}

/* Order Summary */
.summary-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
    border-top: 5px solid var(--cart-primary-color);
}

.summary-title {
    color: var(--cart-dark-color);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.summary-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--cart-primary-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #dee2e6;
    font-size: 0.95rem;
}

.summary-row:last-child {
    border-bottom: none;
}

.total-row {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cart-dark-color);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #dee2e6;
}

/* Buttons */
.checkout-btn {
    background: linear-gradient(135deg, var(--cart-primary-color), #8a84ff);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.checkout-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.checkout-btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.checkout-btn:hover {
    background: linear-gradient(135deg, #5a52d5, #6c63ff);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.checkout-btn:active {
    transform: translateY(-1px);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.empty-cart-icon {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Badges */
.cart-count-badge {
    background: var(--cart-secondary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 101, 132, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 101, 132, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 101, 132, 0); }
}

/* Discount Input */
.discount-input {
    border: 2px solid var(--cart-primary-color);
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.discount-input:focus {
    border-color: var(--cart-secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 101, 132, 0.25);
}

.discount-btn {
    background: var(--cart-secondary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s;
    font-weight: 600;
}

.discount-btn:hover {
    background: #ff4d6d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 101, 132, 0.3);
}

/* Progress Bar (Shipping) */
.shipping-progress {
    margin: 20px 0;
}

.progress-bar {
    background: linear-gradient(90deg, var(--cart-primary-color), var(--cart-secondary-color));
    border-radius: 10px;
    height: 8px;
}

/* Mobile Actions */
.mobile-cart-actions {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .cart-container {
        padding: 0 10px;
    }
    
    .cart-header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .cart-item {
        padding: 15px;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-title {
        font-size: 1rem;
    }
    
    .mobile-cart-actions {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 15px;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
        z-index: 1000;
        animation: slideUp 0.3s ease;
    }
    
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    
    .desktop-cart-actions {
        display: none;
    }
    
    .summary-card {
        position: static;
        margin-top: 20px;
        margin-bottom: 100px;
    }
    
    .quantity-input {
        width: 60px;
    }
    
    .quantity-btn {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 576px) {
    .cart-header h1 {
        font-size: 1.8rem;
    }
    
    .cart-item {
        padding: 12px;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
}

/* Notification Messages */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1050;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Continue Shopping Button */
.continue-shopping {
    background: var(--cart-primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    transition: all 0.3s;
    font-weight: 500;
}

.continue-shopping:hover {
    background: #5a52d5;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

/* Action Buttons */
.btn-update {
    background: var(--cart-primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-update:hover {
    background: #5a52d5;
    transform: translateY(-2px);
}

.btn-clear {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-clear:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Payment Icons */
.payment-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.payment-icons img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.payment-icons img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-3px);
}