
    .cart-icon-hover {
        font-size: 1.5rem;
        color: #212529;
        cursor: pointer;
        transition: all 0.3s;
        position: relative; /* مهم عشان #cart-count يتمركز نسبة ليها */
        display: inline-block;
    }
    
    .cart-icon-hover:hover {
        color: #4361ee;
    }
    .cart-icon-hover:hover {
    color: #4361ee;
}
 
/* حاوية الأيقونة */
.cart-wrapper {
    position: relative;
    display: inline-block;
}

/* أيقونة العربة */
.cart-icon-hover {
    font-size: 1.8rem; /* حجم مناسب */
    color: #212529;
    cursor: pointer;
    transition: all 0.3s;
}
 

    .product-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }
     
    .product-thumbnail {
        width: 100%;
        height: 220px;
        object-fit: contain;
        border-radius: 8px;
        margin-bottom: 15px;
        transition: transform 0.3s;
    } 
    
    .product-title {
        font-size: 1.1rem;
        margin: 10px 0;
        color: #212529;
        font-weight: 600;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .product-price {
        font-size: 1.2rem;
        color: #4361ee;
        margin: 10px 0;
        font-weight: bold;
    }
    
    .cursor-pointer {
        cursor: pointer;
    }
    
    .product-item.selected {
        border: 2px solid #28a745;
        background-color: #f8fff9;
    }
    
    .quantity-input {
        width: 80px;
        margin: 10px auto 0;
        text-align: center;
    }
    
    .modal-content {
        border-radius: 15px;
        overflow: hidden;
        border: none;
    }
    
    .modal-header {
        background: linear-gradient(135deg, #0048BE, #0047AB);
        color: white;
        border-bottom: none;
    }
    
    .modal-title {
        font-weight: 700;
    }
    
    .modal-body {
        padding: 2rem;
    }
    
    @media (max-width: 768px) {
        .product-thumbnail {
            height: 180px;
        }
        
        .modal-body {
            padding: 1.5rem;
        }
    }
    
    .btn {
        font-weight: 600;
        padding: 20px 14px;
        border-radius: 30px;
        color: #ffffff;
        background: #2f2f2f;
        border-color: #2f2f2f;
    }
    
    /* Styles for preview modal */
    #previewOrderModal .modal-dialog {
        max-width: 800px;
    }
    
    #previewOrderModal .table {
        margin-bottom: 0;
    }
    
    #previewOrderModal .table th {
        border-top: none;
    }
    
    #previewOrderModal .modal-footer {
        justify-content: space-between;
    }
    
    /* Success message */
    .order-success {
        display: none;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: white;
        padding: 30px;
        border-radius: 10px;
        box-shadow: 0 0 20px rgba(0,0,0,0.2);
        z-index: 9999;
        text-align: center;
    }
    
    .order-success.show {
        display: block;
    }

    /* حاوية الأيقونة */
.cart-wrapper {
    position: relative;
    display: inline-block;
}

/* أيقونة العربة */
.cart-icon-hover {
    font-size: 1.8rem; 
    color: #212529;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.cart-icon-hover:hover {
    color: #4361ee;
}

/* البادج (عداد السلة) */
#cart-count {
    position: absolute;
    top: -6px;             
    right: -10px;          
    background: #e63946;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

/* المنتج */
.product-item {
    transition: all 0.3s;
}
.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.product-item.selected {
    border: 2px solid #28a745;
    background-color: #f8fff9;
}

/* صورة المنتج */
.product-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

/* اسم المنتج */
.product-title {
    font-size: 1.1rem;
    margin: 10px 0;
    color: #212529;
    font-weight: 600;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* سعر المنتج */
.product-price {
    font-size: 1.2rem;
    color: #4361ee;
    margin: 10px 0;
    font-weight: bold;
}

/* الكمية */
.quantity-input {
    width: 80px;
    margin: 10px auto 0;
    text-align: center;
}

/* المودال */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
}
.modal-header {
    background: linear-gradient(135deg, #0048BE, #0047AB);
    color: white;
    border-bottom: none;
}
.modal-title {
    font-weight: 700;
}
.modal-body {
    padding: 2rem;
}

/* مودال العرض */
#previewOrderModal .modal-dialog {
    max-width: 800px;
}
#previewOrderModal .table {
    margin-bottom: 0;
}
#previewOrderModal .table th {
    border-top: none;
}
#previewOrderModal .modal-footer {
    justify-content: space-between;
}

/* زرار */
.btn {
    font-weight: 600;
    padding: 14px 20px;
    border-radius: 30px;
    color: #ffffff;
    background: #2f2f2f;
    border-color: #2f2f2f;
}

/* رسالة نجاح الطلب */
.order-success {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    z-index: 9999;
    text-align: center;
}
.order-success.show {
    display: block;
}

/* استجابة الشاشات المختلفة */
@media (max-width: 992px) {
    .product-thumbnail {
        height: 200px;
    }
}
@media (max-width: 768px) {
    .product-thumbnail {
        height: 180px;
    }
    .modal-body {
        padding: 1.5rem;
    }
    #previewOrderModal .modal-dialog {
        max-width: 95%;
    }
}
@media (max-width: 576px) {
    .cart-icon-hover {
        font-size: 1.5rem;
    }
    #cart-count {
        top: -5px;
        right: -8px;
        font-size: 0.65rem;
        min-width: 16px;
        height: 16px;
    }
    .product-thumbnail {
        height: 150px;
    }
    .product-title {
        font-size: 1rem;
        min-height: auto;
    }
    .product-price {
        font-size: 1rem;
    }
    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* === العناصر العامة === */
.cart-wrapper {
    position: relative;
    display: inline-block;
}

.cart-icon-hover {
    font-size: 1.8rem;
    color: #212529;
    cursor: pointer;
    transition: all 0.3s;
    position: relative; /* ضروري لوضع عداد السلة */
    display: inline-block;
}

.cart-icon-hover:hover {
    color: #4361ee;
}

/* === عداد السلة === */
#cart-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #e63946;
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* === منتجات === */
.product-item {
    transition: all 0.3s;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.product-item.selected {
    border: 2px solid #28a745;
    background-color: #f8fff9;
}

.product-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

.product-title {
    font-size: 1.1rem;
    margin: 10px 0;
    color: #212529;
    font-weight: 600;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-price {
    font-size: 1.2rem;
    color: #4361ee;
    margin: 10px 0;
    font-weight: bold;
    text-align: center;
}

.quantity-input {
    width: 80px;
    margin: 10px auto 0;
    text-align: center;
    padding: 6px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
}

/* === أزرار === */
.btn {
    font-weight: 600;
    padding: 14px 20px;
    border-radius: 30px;
    color: #ffffff;
    background: #2f2f2f;
    border-color: #2f2f2f;
    transition: background 0.2s, transform 0.2s;
}

.btn:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    transform: translateY(-2px);
}

/* === مودالات === */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, #0048BE, #0047AB);
    color: white;
    border-bottom: none;
    padding: 1.25rem 2rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-body {
    padding: 2rem;
}

/* === مودال معاينة الطلب === */
#previewOrderModal .modal-dialog {
    max-width: 800px;
    margin: 1.75rem auto;
}

#previewOrderModal .table {
    margin-bottom: 0;
}

#previewOrderModal .table th {
    border-top: none;
}

#previewOrderModal .modal-footer {
    justify-content: space-between;
    padding: 1.5rem 2rem;
}

/* === رسالة النجاح === */
.order-success {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.order-success.show {
    display: block;
}

/* === استجابة الشاشات === */
@media (max-width: 992px) {
    .product-thumbnail {
        height: 200px;
    }
    .modal-content 
     {
        border-radius: 15px;
        overflow: hidden;
        border: none;
        font-size: 5px;
    }
}

@media (max-width: 768px) {
    .product-thumbnail {
        height: 180px;
    }
    .modal-body {
        padding: 1.5rem;
    }
    .modal-content 
     {
        border-radius: 15px;
        overflow: hidden;
        border: none;
        font-size: 5px;
    }
    #previewOrderModal .modal-dialog {
        max-width: 95%;
        margin: 1rem;
    }
    .modal-header {
        padding: 1rem 1.5rem;
    }
    .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .cart-icon-hover {
        font-size: 1.5rem;
    }

    #cart-count {
        top: -5px;
        right: -8px;
        font-size: 0.65rem;
        min-width: 16px;
        height: 16px;
    }
    .modal-content {
        border-radius: 15px;
        overflow: hidden;
        border: none;
        font-size: 4px;
    }
    .product-thumbnail {
        height: 150px;
    }

    .product-title {
        font-size: 1rem;
        min-height: auto;
    }

    .product-price {
        font-size: 1rem;
    }

    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }
}
