/* متغيرات الألوان المعدلة لصفحة السلة */
:root {
    --sugar-white: #FFF5F5;
    --primary-color: #FF6B35;
    --secondary-color: #004E89;
    --accent-color: #FFD166;
    --success-color: #06D6A0;
    --dark-bg: #2D3047;
    --text-light: #F8F9FA;
    --text-dark: #333333;
    --border-radius: 25px;
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* إصلاح: هيكل الصفحة الكامل */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--sugar-white) !important;
    background-image: radial-gradient(circle at 15% 50%, rgba(255, 107, 53, 0.05) 0%, transparent 20%), radial-gradient(circle at 85% 30%, rgba(0, 78, 137, 0.05) 0%, transparent 20%), radial-gradient(circle at 50% 80%, rgba(6, 214, 160, 0.05) 0%, transparent 20%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 80px;
    display: flex;
    flex-direction: column;
}

/* الحاوية الرئيسية */
.cart-container {
    flex: 1;
    padding-bottom: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* تنسيقات للسلة الفارغة */
.empty-cart {
    padding: 60px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    margin: 20px 0;
    box-shadow: var(--shadow-medium);
}

    .empty-cart i {
        color: var(--primary-color);
        opacity: 0.5;
        margin-bottom: 20px;
    }

    .empty-cart h4 {
        color: var(--secondary-color);
        margin-bottom: 10px;
        font-weight: 600;
    }

    .empty-cart p {
        color: #666;
        margin-bottom: 25px;
    }

    .empty-cart .btn {
        background: linear-gradient(135deg, var(--primary-color), #FF8B5C);
        border: none;
        color: white;
        padding: 12px 30px;
        border-radius: 12px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

        .empty-cart .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(255, 107, 53, 0.3);
        }

/* ========== تنسيقات الجدول ========== */
.cart-table-container {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    margin-bottom: 20px;
}

.table {
    margin-bottom: 0;
}

    .table thead {
        background: linear-gradient(135deg, var(--primary-color), #FF8B5C);
        color: white;
    }

    .table th {
        border: none;
        padding: 15px;
        font-weight: 600;
        text-align: center;
    }

    .table td {
        padding: 15px;
        vertical-align: middle;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .table tbody tr:last-child td {
        border-bottom: none;
    }

/* ========== تنسيقات عداد الكمية ========== */
.quantity-control {
    width: 120px;
    margin: 0 auto;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
}

    .quantity-btn:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
    }

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 1rem;
}

/* ========== تنسيقات ملخص الطلب ========== */
.order-summary {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 20px;
}

    .order-summary h5 {
        color: var(--secondary-color);
        font-weight: 700;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--primary-color);
    }

.total-items {
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    color: white;
    padding: 10px 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
}

    .total-items .h4 {
        font-weight: 800;
        margin: 0;
    }

.phone-input-group {
    margin-bottom: 20px;
}

    .phone-input-group label {
        font-weight: 600;
        color: var(--secondary-color);
        margin-bottom: 8px;
        display: block;
    }

    .phone-input-group input {
        border: 2px solid rgba(0, 78, 137, 0.2);
        border-radius: 12px;
        padding: 12px 15px;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

        .phone-input-group input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
            outline: none;
        }

.export-btn {
    background: linear-gradient(135deg, var(--success-color), #06D6A0);
    border: none;
    color: white;
    padding: 15px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    width: 100%;
}

    .export-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(6, 214, 160, 0.3);
    }

.continue-shopping {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 15px;
    border-radius: 15px;
    font-weight: 700;
    transition: all 0.3s ease;
    width: 100%;
}

    .continue-shopping:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-3px);
    }

/* ========== إشعار المعلومات ========== */
.info-notice {
    background: linear-gradient(135deg, rgba(0, 78, 137, 0.1), rgba(6, 214, 160, 0.1));
    border: 1px solid rgba(0, 78, 137, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
}

    .info-notice i {
        color: var(--secondary-color);
        margin-right: 10px;
    }

/* ========== تنسيقات الجوال ========== */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .cart-container {
        padding: 10px !important;
    }

    /* تحسينات للسلة الفارغة في الجوال */
    .empty-cart {
        padding: 40px 15px;
        margin: 10px;
        border-radius: 20px;
    }

        .empty-cart .fa-4x {
            font-size: 3em !important;
        }

        .empty-cart h4 {
            font-size: 1.2rem !important;
        }

        .empty-cart p {
            font-size: 0.9rem !important;
        }

        .empty-cart .btn {
            padding: 10px 20px !important;
            font-size: 0.9rem !important;
        }

    /* تحويل الجدول إلى عرض عمودي في الجوال */
    .cart-table-container {
        border-radius: 20px;
        overflow: hidden;
    }

    .table {
        display: block;
        width: 100%;
    }

        .table thead {
            display: none;
        }

        .table tbody, .table tr, .table td {
            display: block;
            width: 100%;
        }

        .table tr {
            margin-bottom: 15px;
            border: 1px solid rgba(0, 0, 0, 0.1);
            border-radius: 15px;
            padding: 15px;
            background: white;
            position: relative;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        }

        .table td {
            text-align: left !important;
            padding: 10px 0;
            border: none;
            position: relative;
            padding-left: 45%;
        }

    [dir="rtl"] .table td {
        text-align: right !important;
        padding-left: 0;
        padding-right: 45%;
    }

    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(45% - 20px);
        font-weight: 700;
        color: var(--secondary-color);
        text-align: left;
    }

    [dir="rtl"] .table td::before {
        left: auto;
        right: 15px;
        text-align: right;
    }

    /* استثناء: الزر لا يحتاج إلى التنسيق العمودي */
    .table td:last-child {
        padding-left: 0;
        text-align: center !important;
    }

    [dir="rtl"] .table td:last-child {
        padding-right: 0;
    }

    .table td:last-child::before {
        display: none;
    }

    /* تنسيقات الكمية في الجوال */
    .quantity-control {
        width: 100%;
        max-width: 150px;
    }

    .quantity-input {
        width: 50px;
    }

    /* تنسيقات ملخص الطلب في الجوال */
    .order-summary {
        position: static;
        margin-top: 20px;
        border-radius: 20px;
    }

    .export-btn, .continue-shopping {
        padding: 12px !important;
        font-size: 1rem !important;
    }

    .info-notice {
        font-size: 0.85rem;
        padding: 12px;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 60px;
    }

    .cart-container {
        padding: 5px !important;
    }

    .empty-cart {
        padding: 30px 10px;
        margin: 5px;
        border-radius: 15px;
    }

        .empty-cart .fa-4x {
            font-size: 2.5em !important;
        }

    .table tr {
        padding: 10px;
        margin-bottom: 10px;
    }

    .table td {
        padding-left: 50%;
        font-size: 0.85rem;
    }

    [dir="rtl"] .table td {
        padding-right: 50%;
    }

    .table td::before {
        width: calc(50% - 15px);
        font-size: 0.8rem;
    }

    .quantity-control {
        max-width: 130px;
    }

    .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .quantity-input {
        width: 40px;
        font-size: 0.9rem;
    }

    .btn-danger {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }

    .order-summary {
        padding: 15px;
    }

        .order-summary h5 {
            font-size: 1.1rem;
            margin-bottom: 15px;
        }
}

@media (max-width: 375px) {
    .table td {
        padding-left: 55%;
    }

    [dir="rtl"] .table td {
        padding-right: 55%;
    }

    .table td::before {
        width: calc(55% - 15px);
    }
}

/* ========== تنسيقات الفوتر ========== */
.cart-footer {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #3A3D5D 100%);
    border-top: 2px solid var(--primary-color);
    padding: 10px 0 5px 0 !important;
    margin-top: auto;
    width: 100%;
}

    .cart-footer .container {
        padding: 0 15px;
    }

    .cart-footer .row {
        margin: 0;
    }

    .cart-footer .col-12 {
        padding: 0;
    }

    .cart-footer .small {
        font-size: 0.75rem !important;
        color: #AAAAAA !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }

    .cart-footer a.small {
        display: block !important;
        margin-top: 3px !important;
        color: #AAAAAA !important;
        text-decoration: none !important;
        transition: color 0.3s ease;
    }

        .cart-footer a.small:hover {
            color: #FFFFFF !important;
        }

    /* إخفاء جميع أقسام الفوتر ما عدا الحقوق */
    .cart-footer .row > div:not(:last-child) {
        display: none !important;
    }

    .cart-footer .social-icons,
    .cart-footer h5,
    .cart-footer .text-white:not(.cart-footer .row > div:last-child .text-white),
    .cart-footer hr {
        display: none !important;
    }

    /* تنسيق قسم الحقوق فقط */
    .cart-footer .row > div:last-child {
        width: 100% !important;
        text-align: center !important;
        padding: 5px 0 !important;
    }

/* ========== رسائل التحذير ========== */
.cart-alert {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    z-index: 9999;
    max-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

[dir="rtl"] .cart-alert {
    right: auto;
    left: 20px;
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== شريط التحميل ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

    .loading-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 107, 53, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* تحسين شريط التمرير */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--sugar-white);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #ff5a1f;
    }
/* تنسيقات خاصة بعداد الكمية المعدل */
.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.quantity-input {
    width: 60px;
    margin: 0 5px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px;
    transition: all 0.3s ease;
}

    .quantity-input:focus {
        border-color: var(--secondary-color);
        box-shadow: 0 0 0 3px rgba(0, 78, 137, 0.2);
        outline: none;
    }

/* تنسيقات رسائل التنبيه */
.cart-alert {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideDown 0.3s ease-out;
}

[dir="rtl"] .cart-alert {
    right: auto;
    left: 20px;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* تأثير عند تحديث السلة */
.cart-updating {
    position: relative;
}

    .cart-updating::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.8);
        z-index: 10;
    }

/* تنسيقات للجوال */
@media (max-width: 768px) {
    .quantity-control {
        max-width: 140px !important;
    }

    .quantity-input {
        width: 50px;
        font-size: 1rem;
        padding: 6px;
    }

    .cart-alert {
        top: 70px;
        right: 10px;
        left: 10px;
        min-width: unset;
    }
}

/* أنماط إضافية للتحكم في الكمية */
.quantity-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
    outline: none;
}

/* تنبيهات السلة */
.cart-alert {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideDown 0.3s ease-out;
    border-radius: 10px;
}

[dir="rtl"] .cart-alert {
    right: auto;
    left: 20px;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .cart-alert {
        top: 80px;
        right: 10px;
        left: 10px;
        min-width: unset;
    }

    .quantity-control {
        max-width: 130px !important;
    }

    .quantity-input {
        width: 50px;
        font-size: 1rem;
    }
}

/* تحسينات لحقول الإدخال */
.name-input-group,
.phone-input-group {
    margin-bottom: 1.5rem;
}

    .name-input-group .form-label,
    .phone-input-group .form-label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--text-color);
    }

.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
    }

.form-text {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* تحسين زر التصدير */
.export-btn {
    border-radius: 10px;
    padding: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
}

    .export-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    }

/* تحسينات الرسائل */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.4s ease-out;
    font-size: 1rem;
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border-left: 6px solid #f44336;
    color: #b71c1c;
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-left: 6px solid #4caf50;
    color: #1b5e20;
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-left: 6px solid #2196f3;
    color: #0d47a1;
}

.alert .btn-close {
    opacity: 0.7;
    padding: 0.75rem;
    font-size: 0.75rem;
}

    .alert .btn-close:hover {
        opacity: 1;
        transform: scale(1.1);
    }

.alert i {
    font-size: 1.2em;
    vertical-align: middle;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* رسائل Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    min-width: 300px;
}

.toast-message {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-left: 5px solid;
    animation: slideInRight 0.4s ease-out;
    max-width: 400px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast-success {
    border-left-color: #4caf50;
    background: linear-gradient(to right, rgba(232, 245, 233, 0.9), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.toast-error {
    border-left-color: #f44336;
    background: linear-gradient(to right, rgba(255, 235, 238, 0.9), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.toast-info {
    border-left-color: #2196f3;
    background: linear-gradient(to right, rgba(227, 242, 253, 0.9), rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(33, 150, 243, 0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-message .btn-close-sm {
    padding: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.5;
}

    .toast-message .btn-close-sm:hover {
        opacity: 1;
    }

/* تحسينات عامة */
.cart-container {
    max-width: 1200px;
    margin: 0 auto;
}

.empty-cart {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 4rem 2rem;
    border: 2px dashed #dee2e6;
}

.empty-cart-icon {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.cart-table-container {
    border-radius: 12px;
    overflow: hidden;
}

.order-summary {
    border-radius: 12px;
    overflow: hidden;
}

.total-items {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* تحسينات حقول الإدخال */
.name-input-group .form-label,
.phone-input-group .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    display: flex;
    align-items: center;
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

    .form-control:focus {
        border-color: #4caf50;
        box-shadow: 0 0 0 0.3rem rgba(76, 175, 80, 0.25);
        transform: translateY(-2px);
    }

.input-group-text {
    border-radius: 10px 0 0 10px;
    border: 2px solid #e0e0e0;
    border-right: none;
    background: #f8f9fa;
}

.form-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.4;
}

/* تحسين الأزرار */
.export-btn {
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    letter-spacing: 0.5px;
}

    .export-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(40, 167, 69, 0.4);
        background: linear-gradient(135deg, #218838, #1e9e8a);
    }

.btn-outline-primary {
    border-radius: 12px;
    padding: 1rem;
    font-weight: 500;
    border-width: 2px;
}

    .btn-outline-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(13, 110, 253, 0.2);
    }

/* تحسينات الجدول */
.table {
    margin-bottom: 0;
}

    .table th {
        font-weight: 600;
        color: #495057;
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
    }

.table-hover tbody tr:hover {
    background-color: rgba(76, 175, 80, 0.05);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.quantity-control {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    color: #495057;
    font-weight: bold;
    transition: all 0.2s;
}

    .quantity-btn:hover {
        background: #e9ecef;
        color: #212529;
    }

.quantity-input {
    width: 60px;
    border: none;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 1rem;
}

/* الشارات */
.badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
    .alert {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .toast-message {
        max-width: 300px;
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
        right: 10px;
        top: 10px;
    }

    .form-control {
        padding: 0.6rem 0.8rem;
        font-size: 0.95rem;
    }

    .export-btn {
        padding: 0.8rem;
        font-size: 1rem;
    }

    .table td {
        padding: 0.75rem 0.5rem;
    }

    .quantity-control {
        max-width: 130px;
    }

    .quantity-btn {
        width: 35px;
        height: 35px;
    }

    .quantity-input {
        width: 50px;
    }
}

/* للشاشات الصغيرة جداً */
@media (max-width: 576px) {
    .cart-container {
        padding: 0 10px;
    }

    .empty-cart {
        padding: 3rem 1rem;
    }

    .table-responsive {
        border-radius: 10px;
        border: 1px solid #dee2e6;
    }

    .table td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        color: #495057;
        margin-bottom: 0.25rem;
    }
}
.empty-space {
    flex: 1;
    min-height: 20px;
    display: block;
}


.order-summary-wrapper {
    position: relative;
}

.order-summary {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-medium);
    position: sticky;
    top: 100px;
}

.sticky-spacer {
    height: 0;
    display: none;
}

/* عندما يلتصق order-summary، أظهر المساحة */
.order-summary.is-sticky + .sticky-spacer {
    display: block;
    height: 300px; /* ارتفاع كافي */
}