.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 100%;
    height: 100vh;
    background: var(--white);
    z-index: 2500;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transition: right 0.4s var(--ease-out-expo);
}

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

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2400;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--gray-100);
    background: var(--white);
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
}

.cart-header h3 i {
    color: var(--primary);
    font-size: 1.25rem;
}

.cart-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    color: var(--gray-600);
    font-size: 1.125rem;
    transition: var(--transition);
}

.cart-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
    transform: rotate(90deg);
}

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

.cart-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    background: var(--gray-50);
    margin-bottom: 1rem;
    position: relative;
    transition: var(--transition);
    border: 1px solid transparent;
}

.cart-item:hover {
    background: var(--white);
    border-color: var(--gray-200);
    box-shadow: var(--shadow-md);
}

.cart-item-image {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
    line-height: 1.4;
}

.cart-item-shop {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 0.625rem;
}

.cart-item-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-top: 0.75rem;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.875rem;
    transition: var(--transition);
}

.cart-qty-btn:hover {
    background: var(--gradient-1);
    border-color: transparent;
    color: var(--white);
}

.cart-item-qty {
    font-weight: 700;
    min-width: 36px;
    text-align: center;
    color: var(--gray-900);
    font-size: 1rem;
}

.cart-item-remove {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-full);
    color: var(--gray-400);
    font-size: 0.875rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.cart-item-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 3rem 2rem;
}

.cart-empty i {
    font-size: 5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    opacity: 0.4;
}

.cart-empty h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.cart-empty p {
    color: var(--gray-500);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid var(--gray-100);
    background: linear-gradient(to top, var(--gray-50), var(--white));
}

.cart-summary {
    margin-bottom: 1.75rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.875rem;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.summary-row.total {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gray-900);
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--gray-200);
    letter-spacing: -0.02em;
}

.cart-footer .btn {
    margin-bottom: 0.875rem;
}

.cart-footer .btn:last-child {
    margin-bottom: 0;
}

.cart-footer .btn-primary {
    padding: 1rem;
    font-size: 1rem;
}

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.125rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 420px;
    animation: slideInRight 0.4s var(--ease-out-expo);
    border-left: 4px solid var(--primary);
}

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

.toast.toast-success {
    border-left-color: var(--success);
}

.toast.toast-error {
    border-left-color: var(--error);
}

.toast.toast-warning {
    border-left-color: var(--warning);
}

.toast.toast-info {
    border-left-color: var(--info);
}

.toast-icon {
    font-size: 1.375rem;
}

.toast.toast-success .toast-icon {
    color: var(--success);
}

.toast.toast-error .toast-icon {
    color: var(--error);
}

.toast.toast-warning .toast-icon {
    color: var(--warning);
}

.toast.toast-info .toast-icon {
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.toast-close {
    color: var(--gray-400);
    font-size: 1.125rem;
    padding: 0.25rem;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--gray-600);
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-header {
        padding: 1.25rem 1.5rem;
    }
    
    .cart-items {
        padding: 1rem;
    }
    
    .cart-item {
        padding: 1rem;
        gap: 1rem;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
    
    .cart-footer {
        padding: 1.5rem;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}
