/* ============================================
   Shopping Cart Page - Modern & Clean Design
   ============================================ */

/* Container & Wrapper */
.cart-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 200px);
}

.cart-wrapper {
    width: 100%;
}

/* Numeric Typography (match product detail) */
.cart-count,
.qty-input,
.cart-item-price .price,
.cart-item-price .original-price,
.item-total-price .total-value,
.price-value,
#subtotal-value,
#product-discount-value,
#discount-value,
#total-value {
    font-family: var(--font-number);
    font-feature-settings: 'ss01' on;
    font-variant-numeric: tabular-nums;
}

/* Alert Message */
.cart-alert {
    background: #fff;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-right: 4px solid;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-alert--info {
    border-right-color: #3B82F6;
    background: #EFF6FF;
}

.cart-alert--success {
    border-right-color: #10B981;
    background: #F0FDF4;
}

.cart-alert--warning {
    border-right-color: #F59E0B;
    background: #FFFBEB;
}

.cart-alert--error {
    border-right-color: #EF4444;
    background: #FEF2F2;
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.cart-alert--info .alert-icon {
    color: #3B82F6;
}

.cart-alert--success .alert-icon {
    color: #10B981;
}

.cart-alert--warning .alert-icon {
    color: #F59E0B;
}

.cart-alert--error .alert-icon {
    color: #EF4444;
}

.alert-content {
    flex: 1;
    line-height: 1.6;
    white-space: pre-line;
}

.alert-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.alert-close:hover {
    background: rgba(0,0,0,0.05);
    color: #6B7280;
}

.cart-reservation-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #bfdbfe;
    border-right: 3px solid #2563eb;
    border-radius: 8px;
    background: #f8fbff;
    color: #1e3a8a;
}

.cart-reservation-notice__icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 14px;
}

.cart-reservation-notice__content {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    font-size: 14px;
    line-height: 1.7;
}

.cart-reservation-notice__content strong {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af;
}

.cart-reservation-notice__content span {
    color: #334155;
}

/* Cart Header */
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #E5E7EB;
    flex-wrap: wrap;
    gap: 1rem;
}

.cart-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    color: #6B7280;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6B7280;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.continue-shopping:hover {
    color: #111827;
}

.continue-shopping svg {
    transition: transform 0.2s ease;
}

.continue-shopping:hover svg {
    transform: translateX(3px);
}

/* Empty Cart State */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1rem;
    min-height: 400px;
}

.empty-cart-icon {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-cart-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.empty-cart-text {
    font-size: 1rem;
    color: #6B7280;
    margin: 0 0 2rem 0;
}

.btn-primary-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

/* Cart Content Grid */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.25rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #D1D5DB;
}

/* Remove animation on delete */
.cart-item.removing {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

/* Removed item style (disabled but visible) */
.cart-item.removed {
    opacity: 0.5;
    background: #F3F4F6;
    border-color: #E5E7EB;
    position: relative;
}

.cart-item.removed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
    pointer-events: none;
}

.cart-item.removed .cart-item-image,
.cart-item.removed .cart-item-details {
    pointer-events: none;
}

.removed-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    z-index: 2;
}

.removed-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #9CA3AF;
}

.removed-retention-note {
    max-width: 180px;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.7;
    text-align: center;
}

.btn-restore {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-restore:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-restore svg {
    width: 16px;
    height: 16px;
}

/* Cart Item Image */
.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: #F9FAFB;
    flex-shrink: 0;
}

.cart-item-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item-image:hover img {
    transform: scale(1.05);
}

/* Cart Item Details */
.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.cart-item-name {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-name:hover {
    color: #3B82F6;
}

.cart-item-brand {
    font-size: 0.875rem;
    color: #6B7280;
    font-weight: 500;
}

.cart-item-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.cart-item-attributes .attribute {
    display: inline-flex;
    align-items: center;
    font-size: 0.8125rem;
    color: #6B7280;
    background: #F3F4F6;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

.cart-item-price {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cart-item-price .price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.cart-item-price .price.discounted {
    color: #10B981;
}

.cart-item-price .original-price {
    font-size: 0.875rem;
    color: #9CA3AF;
    text-decoration: line-through;
}

.cart-item-price .discount-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Discount Info */
.cart-item-discount-info {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ECFDF5;
    color: #047857;
    font-size: 0.8125rem;
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 8px;
}

.cart-item-discount-info svg {
    color: #10B981;
    flex-shrink: 0;
}

.cart-item-discount-info strong {
    color: #059669;
}

/* Cart Item Actions */
.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    min-width: 180px;
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.qty-btn:hover {
    background: #E5E7EB;
    color: #111827;
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-btn:disabled:hover {
    background: transparent;
}

.qty-input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Item Total Price */
.item-total-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.item-total-price .total-label {
    font-size: 0.75rem;
    color: #9CA3AF;
    font-weight: 500;
}

.item-total-price .total-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

/* Remove Button */
.btn-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    border: none;
    color: #DC2626;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: #FEE2E2;
}

.btn-remove svg {
    flex-shrink: 0;
}

/* Stock Warning */
.stock-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #F59E0B;
    background: #FEF3C7;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    font-weight: 500;
    margin-top: 0.25rem;
}

.stock-warning svg {
    flex-shrink: 0;
}

/* Order Summary */
.order-summary {
    position: sticky;
    top: 2rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Discount Code Section */
.discount-code-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.discount-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.discount-input-group {
    display: flex;
    gap: 0.5rem;
}

.discount-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.discount-input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-apply-discount {
    padding: 0.75rem 1.25rem;
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    color: #374151;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.btn-apply-discount:hover {
    background: #E5E7EB;
    border-color: #9CA3AF;
}

.discount-message {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    display: none;
}

.discount-message.success {
    display: block;
    background: #D1FAE5;
    color: #065F46;
}

.discount-message.error {
    display: block;
    background: #FEE2E2;
    color: #991B1B;
}

/* Price Breakdown */
.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
}

.price-label {
    color: #6B7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-value {
    color: #111827;
    font-weight: 600;
}

.shipping-note {
    font-size: 0.8125rem;
    color: #9CA3AF;
    font-weight: 500;
}

.discount-row .price-label {
    color: #10B981;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.discount-row .price-label svg {
    flex-shrink: 0;
}

.product-discount-row {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    padding: 0.625rem 0.75rem;
    margin: 0.25rem -0.75rem;
    border-radius: 8px;
}

.discount-value {
    color: #10B981 !important;
    font-weight: 600;
}

.remove-discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #FEE2E2;
    color: #DC2626;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-discount:hover {
    background: #FCA5A5;
}

.divider {
    height: 1px;
    background: #E5E7EB;
    margin: 0.5rem 0;
}

.total-row {
    padding-top: 0.5rem;
}

.total-row .price-label {
    color: #111827;
    font-weight: 700;
    font-size: 1rem;
}

.total-row .total-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
}

/* Checkout Button */
.btn-checkout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    font-family: inherit;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.btn-checkout svg {
    transition: transform 0.2s ease;
}

.btn-checkout:hover svg {
    transform: translateX(-3px);
}

/* Trust Badges */
.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: #6B7280;
    font-weight: 500;
}

.trust-badge svg {
    flex-shrink: 0;
}

/* Per-item stock feedback */
.cart-item.out-of-stock {
    border: 1px solid #FECACA;
    box-shadow: 0 10px 30px rgba(248, 113, 113, 0.15);
}

.cart-item .stock-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 12px;
    background: #FEF2F2;
    color: #B91C1C;
    font-size: 0.85rem;
    border-radius: 10px;
    border: 1px solid #FCA5A5;
}

.cart-item .stock-error svg {
    width: 16px;
    height: 16px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 48px;
    height: 48px;
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    border: 4px solid #E5E7EB;
    border-top-color: #3B82F6;
    border-right-color: #93C5FD;
    border-bottom-color: #E5E7EB;
    border-radius: 50%;
    transform-origin: 50% 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Checkout Transition Overlay */
.checkout-transition {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(1200px 800px at 85% -10%, rgba(96, 165, 250, 0.25), transparent 60%),
        radial-gradient(1000px 700px at -10% 90%, rgba(16, 185, 129, 0.18), transparent 60%),
        rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(6px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.checkout-transition.active {
    display: flex;
    opacity: 1;
}

.checkout-transition__panel {
    width: min(92vw, 460px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
    padding: 26px 24px;
    text-align: center;
    transform: translateY(12px) scale(0.98);
    animation: checkoutPanelIn 0.35s ease forwards;
}

.checkout-transition__brand-dot {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: conic-gradient(from 20deg, #0ea5e9, #10b981, #3b82f6, #0ea5e9);
    position: relative;
    animation: checkoutDotSpin 1.2s linear infinite;
}

.checkout-transition__brand-dot::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: white;
}

.checkout-transition__title {
    margin: 0;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 800;
}

.checkout-transition__subtitle {
    margin: 10px 0 16px;
    color: #475569;
    font-size: 0.95rem;
    min-height: 1.4em;
}

.checkout-transition__progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.checkout-transition__progress-fill {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    animation: checkoutProgressSweep 1.1s ease-in-out infinite;
}

@keyframes checkoutPanelIn {
    to {
        transform: translateY(0) scale(1);
    }
}

@keyframes checkoutDotSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes checkoutProgressSweep {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(300%);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cart-content {
        grid-template-columns: 1fr 340px;
        gap: 1.5rem;
    }
    
    .cart-item {
        grid-template-columns: 100px 1fr auto;
        gap: 1rem;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .cart-container {
        padding: 1.5rem 1rem;
    }
    
    .cart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-title {
        font-size: 1.5rem;
    }
    
    .cart-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .order-summary {
        position: static;
        order: 2;
    }
    
    .cart-items {
        order: 1;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 0.875rem;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 0.75rem;
        border-top: 1px solid #F3F4F6;
        min-width: auto;
    }
    
    .item-total-price {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .item-total-price .total-label {
        font-size: 0.875rem;
    }
    
    .item-total-price .total-value {
        font-size: 1rem;
    }
    
    .btn-remove {
        margin-right: auto;
    }

    .checkout-transition__panel {
        border-radius: 16px;
        padding: 22px 18px;
    }

    .checkout-transition__title {
        font-size: 1rem;
    }

    .checkout-transition__subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .cart-container {
        padding: 1rem 0.75rem;
    }
    
    .cart-title {
        font-size: 1.25rem;
    }
    
    .cart-item {
        padding: 1rem;
    }
    
    .cart-item-name {
        font-size: 0.9375rem;
    }
    
    .discount-input-group {
        flex-direction: column;
    }
    
    .btn-apply-discount {
        width: 100%;
    }
    
    .total-row .total-value {
        font-size: 1.25rem;
    }
}

/* RTL Support (for Persian/Arabic) */
[dir="rtl"] .continue-shopping svg {
    transform: scaleX(-1);
}

[dir="rtl"] .btn-checkout svg {
    transform: scaleX(-1);
}

[dir="rtl"] .continue-shopping:hover svg {
    transform: scaleX(-1) translateX(3px);
}

[dir="rtl"] .btn-checkout:hover svg {
    transform: scaleX(-1) translateX(-3px);
}

/* Smooth transitions for all interactive elements */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
/* ============================================
   Cart Item States
   ============================================ */

/* Deactivated/Removed Item */
.cart-item.deactivated {
    opacity: 0.5;
    background: #F9FAFB;
    border-style: dashed;
    position: relative;
}

.cart-item.deactivated::after {
    content: 'حذف شده';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
}

.cart-item.deactivated .cart-item-image img {
    filter: grayscale(100%);
}

.cart-item.deactivated .quantity-control {
    pointer-events: none;
    opacity: 0.3;
}

/* Updated Item Animation */
.cart-item.updated {
    animation: itemUpdated 0.5s ease;
}

@keyframes itemUpdated {
    0%, 100% {
        background: white;
    }
    50% {
        background: #ECFDF5;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    }
}

/* Restore Button */
.btn-restore {
    background: #10B981 !important;
    color: white !important;
    border-color: #10B981 !important;
}

.btn-restore:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

/* Loading state on buttons */
.qty-btn.loading {
    pointer-events: none;
    opacity: 0.5;
}

.qty-btn.loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
