/* Shopping Cart Styles */

.cart-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.cart-table table {
    width: 100%;
    table-layout: fixed;
}

/* تحسين توزيع عرض الأعمدة */
.cart-table th:nth-child(1),
.cart-table td:nth-child(1) {
    width: 35%;
}

.cart-table th:nth-child(2),
.cart-table td:nth-child(2) {
    width: 18%;
}

.cart-table th:nth-child(3),
.cart-table td:nth-child(3) {
    width: 20%;
}

.cart-table th:nth-child(4),
.cart-table td:nth-child(4) {
    width: 17%;
}

.cart-table th:nth-child(5),
.cart-table td:nth-child(5) {
    width: 10%;
}

.cart-table th {
    background: #F26722;
    color: #000;
    padding: 10px 7px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    text-align: center;
}

.cart-table td {
    padding: 10px 6px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    color: #000;
    text-align: center;
}

.cart-table td h5 {
    color: #000;
    font-weight: 600;
}

.cart-table td strong {
    color: #000;
}

.cart-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* Product info in cart */
.cart-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: right;
    width: 100%;
}

.cart-product-details {
    flex: 1;
    min-width: 0;
}

.cart-product-details h6 {
    margin: 0 0 3px 0;
    font-size: 15px;
    font-weight: 600;
    color: #000;
    line-height: 1.3;
    word-wrap: break-word;
    white-space: normal;
}

.cart-product-details p {
    margin: 0;
    font-size: 11px;
    color: #666;
    line-height: 1.3;
    white-space: normal;
    text-align: center;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.quantity-control button {
    width: 24px;
    height: 24px;
    border: 2px solid #F26722;
    background: white;
    color: #000;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 12px;
}

.quantity-control button:hover {
    background: #F26722;
    color: white;
}

.quantity-control input {
    width: 36px;
    text-align: center;
    border: 2px solid #f0f0f0;
    border-radius: 5px;
    padding: 4px 3px;
    font-weight: 600;
    color: #000;
    background: #fff;
    font-size: 11px;
}

.remove-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    white-space: nowrap;
}

.remove-btn:hover {
    background: #cc0000;
}

.cart-summary {
    background: #ffffff;
    color: #000000;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.cart-summary h3,
.summary-row span {
    color: #000000;
}

.cart-summary h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #F26722;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px;
}

.summary-row.total {
    font-size: 20px;
    font-weight: bold;
    color: #F26722;
    border-top: 2px solid #f0f0f0;
    margin-top: 15px;
    padding-top: 15px;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: #F26722;
    color: #000;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}

.checkout-btn:hover {
    background: #d9531a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(242, 103, 34, 0.4);
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart i {
    font-size: 80px;
    color: #ddd;
    margin-bottom: 20px;
}

.continue-shopping {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: #F26722;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
}

.continue-shopping:hover {
    background: #d9531a;
    color: #000;
}

/* Product name styling */
.product-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: #000;
}

/* Mobile cart items - hidden by default */
.mobile-cart-items {
    display: none;
}

/* ============================================
   MOBILE RESPONSIVE - تصميم الهاتف المصغر 30%
   ============================================ */
@media (max-width: 576px) {

    /* إخفاء الجدول وإظهار التصميم المتجاوب */
    .cart-table table {
        display: none !important;
    }

    .mobile-cart-items {
        display: block !important;
    }

    /* كارت المنتج - تصغير الفريم فقط 30% */
    .mobile-cart-item {
        background: white;
        border-radius: 6px;
        padding: 7px 8px !important;
        margin-bottom: 6px !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
        border: 1px solid #f0f0f0;
    }

    .mobile-cart-item .product-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 5px;
    }

    /* صورة المنتج - حجم أكبر */
    .mobile-cart-item .cart-item-img {
        width: 60px !important;
        height: 60px !important;
        flex-shrink: 0;
        border-radius: 5px;
        object-fit: cover;
        background-color: #f8f9fa;
        border: 1px solid #e9ecef;
    }

    .mobile-cart-item .product-info {
        flex: 1;
        min-width: 0;
    }

    /* اسم المنتج */
    .mobile-cart-item .product-name-mobile {
        margin: 0;
        font-size: 13px;
        font-weight: 700;
        color: #000;
        line-height: 1.2;
        word-wrap: break-word;
        display: block;
        width: 100%;
    }

    /* وصف المنتج */
    .mobile-cart-item .product-desc-mobile {
        font-size: 10px;
        color: #000;
        margin-bottom: 5px;
        line-height: 1.3;
        display: block;
        text-align: center;
    }

    .mobile-cart-item .controls-row {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding-top: 5px;
        border-top: 1px solid #f0f0f0;
        gap: 15px;
    }

    .mobile-cart-item .price-info-mobile {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1px;
    }

    /* سعر الوحدة */
    .mobile-cart-item .unit-price {
        font-size: 10px;
        color: #888;
    }

    /* السعر الإجمالي */
    .mobile-cart-item .total-price {
        font-size: 14px;
        font-weight: 700;
        color: #F26722;
        margin-right: 5px;
    }

    .mobile-cart-item .quantity-control {
        display: flex;
        align-items: center;
        gap: 3px;
    }

    /* أزرار الكمية */
    .mobile-cart-item .quantity-control button {
        width: 36px;
        height: 22px;
        border: 1px solid #F26722;
        background: white;
        color: #000;
        border-radius: 50%;
        font-size: 11px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    /* حقل الكمية */
    .mobile-cart-item .quantity-control input {
        width: 49px;
        height: 22px;
        text-align: center;
        border: 1px solid #ddd;
        border-radius: 3px;
        font-size: 11px;
        font-weight: 600;
        background: #fdfdfd;
    }

    /* زر الحذف */
    .mobile-cart-item .remove-btn {
        background: #ff4d4d;
        color: white;
        border: none;
        padding: 5px 12px;
        border-radius: 4px;
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
        margin-right: auto;
    }

    /* رسالة السلة الفارغة */
    .empty-cart {
        text-align: center;
        padding: 30px 15px;
    }

    .empty-cart i {
        font-size: 50px;
    }

    .empty-cart h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .empty-cart p {
        font-size: 12px;
        margin-bottom: 15px;
    }
}

/* Tablet responsive */
@media (max-width: 768px) and (min-width: 577px) {
    .cart-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cart-table table {
        min-width: 700px;
    }

    .cart-table th,
    .cart-table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .cart-item-img {
        width: 50px;
        height: 50px;
    }

    .cart-product-info {
        gap: 8px;
    }

    .cart-product-details h6 {
        font-size: 13px;
    }
}

/* ============================================
   Customer Info Form
   ============================================ */
.customer-info {
    background: #ffffff;
    color: #000000;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
}

.customer-info h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #F26722;
    color: #000;
}

.form-group {
    margin-bottom: 12px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
}

.form-group.half-width {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #000;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #f0f0f0;
    border-radius: 5px;
    font-size: 14px;
    color: #000;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #F26722;
    outline: none;
}

.address-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.address-btn {
    flex: 1;
    padding: 10px;
    background: #f8f9fa;
    border: 2px solid #F26722;
    color: #000;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.address-btn:hover {
    background: #F26722;
    color: #000;
}

.payment-btn {
    width: 100%;
    padding: 10px;
    background: #f8f9fa;
    border: 2px solid #F26722;
    color: #000;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.payment-btn:hover {
    background: #F26722;
}

.selected-payment {
    display: none;
    padding: 6px;
    background: #e8f5e8;
    border: 1px solid #28a745;
    border-radius: 5px;
    color: #28a745;
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
}

.selected-payment:not(:empty) {
    display: block;
}

#customer-notes {
    resize: vertical;
    min-height: 80px;
}

#customer-notes::placeholder {
    color: #999;
    font-style: italic;
}

/* ============================================
   Modals
   ============================================ */
.payment-modal,
.area-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.payment-modal-content,
.area-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.payment-modal-content h3,
.area-modal-content h3 {
    margin-bottom: 20px;
    color: #000;
}

.payment-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.payment-option {
    flex: 1;
    padding: 20px;
    border: 2px solid #F26722;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    color: #000;
}

.payment-option:hover {
    background: #F26722;
    transform: translateY(-2px);
}

.payment-option i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.area-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.area-option {
    padding: 15px 20px;
    border: 2px solid #F26722;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    color: #000;
    font-size: 16px;
    font-weight: 500;
}

.area-option:hover {
    background: #F26722;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(242, 103, 34, 0.3);
}

.close-modal {
    padding: 10px 20px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.close-modal:hover {
    background: #5a6268;
}

/* ============================================
   Cart Summary Bar - Floating
   ============================================ */
.cart-summary-bar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    direction: rtl;
    max-width: 500px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.cart-summary-bar:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.cart-summary-bar.show {
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideUpFade 0.4s ease-out;
}

.cart-summary-info {
    display: flex;
    align-items: center;
    gap: 20px;
    direction: rtl;
}

.cart-item-count {
    background: #F26722;
    color: #000;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    min-width: 60px;
    text-align: center;
    direction: rtl;
    unicode-bidi: normal;
}

.cart-total-price {
    font-size: 16px;
    font-weight: bold;
    color: #F26722;
    direction: ltr;
    unicode-bidi: embed;
}

.cart-view-btn {
    background: #F26722;
    color: #000;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 14px;
}

.cart-view-btn:hover {
    background: #d9531a;
    color: #000;
    text-decoration: none;
    transform: translateY(-2px);
}

.cart-view-btn i,
.cart-summary-info i {
    margin-left: 5px;
    font-size: 16px;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(100px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cart Summary Bar - Mobile */
@media (max-width: 768px) {
    .cart-summary-bar {
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 12px 15px;
        border-radius: 12px;
    }

    .cart-summary-info {
        gap: 15px;
    }

    .cart-item-count {
        padding: 4px 10px;
        font-size: 12px;
        min-width: 50px;
    }

    .cart-total-price {
        font-size: 14px;
    }

    .cart-view-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Cart Summary Bar - Desktop */
@media (min-width: 769px) {
    .cart-summary-bar {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 450px;
    }

    .cart-summary-bar:hover {
        transform: translateX(-50%) translateY(-3px);
    }
}

/* ============================================
   Quantity Input Fix
   ============================================ */
.quantity-control input,
.mobile-cart-item .quantity-input,
.quantity-input {
    font-family: 'Arial', sans-serif !important;
}
/* ============================================
   Delivery Areas Modal - Mobile Responsive
   ============================================ */

/* تحسين عرض مناطق التوصيل على الهاتف */
@media (max-width: 768px) {
    .area-modal-content {
        max-width: 95% !important;
        padding: 20px 15px !important;
        max-height: 85vh !important;
    }

                                                                                                                                /* حقل البحث على الموبايل */
                                                                                                                                #zone-search-input {
                                                                                                                                    padding: 10px 12px !important;
                                                                                                                                    font-size: 14px !important;
                                                                                                                                    margin-bottom: 15px !important;
                                                                                                                                    /* Prevent zoom on iOS */
                                                                                                                                    font-size: 16px !important;
                                                                                                                                    touch-action: manipulation !important;
                                                                                                                                }
                                                                
                                                                                                                                .area-options,
                                                                                                                                #zones-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 15px !important;
    }

                                                                                                                                .area-option,
                                                                                                                                .zone-item {
                                                                                                                                    padding: 12px 8px !important;
                                                                                                                                    font-size: 13px !important;
                                                                                                                                    min-height: 55px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        border-radius: 6px !important;
        line-height: 1.3 !important;
            word-break: break-word !important;
    }

    .area-option span {
        font-size: 11px !important;
        line-height: 1.2 !important;
        margin-bottom: 2px !important;
        font-weight: bold !important;
    }

    .area-option small {
        font-size: 9px !important;
        opacity: 0.8 !important;
    }
                                                                                                                                /* رسالة عدم وجود نتائج */
                                                                                                                                #no-zones-message {
                                                                                                                                    font-size: 14px !important;
                                                                                                                                    padding: 15px !important;
                                                                                                                                }
}

/* تحسين عرض مناطق التوصيل على الشاشات المتوسطة */
@media (min-width: 769px) and (max-width: 1024px) {
    .area-options,
        #zones-grid {
            grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }

                                                                .area-option,
                                                                .zone-item {
                                                                    padding: 14px 10px !important;
        font-size: 14px !important;
    }
                                                                #zone-search-input {
                                                                    font-size: 15px !important;
                                                                }
}

/* تحسين عرض مناطق التوصيل على الشاشات الكبيرة */
@media (min-width: 1025px) {
    .area-options,
        #zones-grid {
            grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }
                                                                #zone-search-input {
                                                                    font-size: 16px !important;
                                                                }
                                                                }
                                
                                                                /* ============================================
                                   Zone Hidden Class - MUST BE LAST
                                   ============================================ */
                                                                /* This must come after all other zone styles to override them */
                                                                .zone-item.zone-hidden,
                                                                .area-option.zone-hidden {
                                                                    display: none !important;
}