@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cart-title {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 900;
    text-align: center;
    color: white;
    margin-bottom: 30px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    color: white;
}

.empty-state h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 10px 30px rgba(102,126,234,0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(102,126,234,0.6);
}

.cart-items {
    display: grid;
    gap: 25px;
    margin-bottom: 40px;
}

.cart-item {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 25px;
    align-items: center;
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-img {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.cart-info h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.cart-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 20px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.quantity-input {
    width: 80px;
    height: 50px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
}

.quantity-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.btn-update {
    background: linear-gradient(45deg, #17a2b8, #20c997);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(23,162,184,0.3);
}

.btn-update:hover {
    transform: translateY(-2px);
}

.btn-remove {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    border: none;
    box-shadow: 0 5px 20px rgba(220,53,69,0.4);
    transition: all 0.3s ease;
}

.btn-remove:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220,53,69,0.6);
}

.subtotal {
    font-size: 1.4rem;
    font-weight: 900;
    color: #28a745;
    text-align: left;
}

.cart-summary {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    position: sticky;
    top: 20px;
}

.cart-summary h3 {
    font-size: 2rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.summary-total {
    font-size: 2.2rem;
    font-weight: 900;
    color: #28a745 !important;
    border-top: 3px solid #28a745;
    padding-top: 20px;
}

.btn-success {
    width: 100%;
    padding: 20px;
    font-size: 1.4rem;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 15px 40px rgba(40,167,69,0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(40,167,69,0.6);
}

.btn-secondary {
    width: 100%;
    margin-top: 15px;
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 10px 30px rgba(108,117,125,0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

.alert {
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 25px;
    font-weight: 600;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }

    .cart-img {
        width: 100%;
        max-width: 200px;
        height: 150px;
    }

    .cart-summary {
        position: static;
        margin-top: 30px;
    }

    .quantity-controls {
        flex-direction: column;
        gap: 10px;
    }
}

