﻿body {
    background-color: white;
    color: #3a3d2a;
    margin: 0;
    font-family: Arial, sans-serif;
}

/* تنسيق الفورم ليكون عمودياً ويشغل كامل ارتفاع الصفحة */
form {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* تنسيق عنوان الأصناف */


/* تنسيق حاوية الفليدست */
fieldset {
    border: 2px solid #4CAF50;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 1200px;
    margin: 6.5em auto 20px auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #B2E8B2;
}

/* تنسيق شبكة الأزرار */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-items: center;
}

/* تنسيق حاوية الصورة */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 250px;
    height: 250px;
    cursor: pointer;
}

    /* تنسيق الصورة داخل الحاوية */
    .image-container img {
        width: 100%;
        height: 200px; /* ارتفاع ثابت */
        object-fit: cover; /* تغطية كاملة بدون تشويه */
        border-radius: 10px 10px 0 0;
        transition: transform 0.3s ease;
    }

    /* تأثير التحويم على الحاوية */
    /*.image-container:hover {
        transform: translateY(-10px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    }*/

    /* تأثير التحويم على الصورة */
    .image-container:hover img {
        transform: scale(1.05);
    }

.image-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
    background-color: #4a7c29;
    color: white;
    border-radius: 0 0 10px 10px;
}

/* تنسيق قسم تسجيل الدخول */
.login-section {
    text-align: center;
    margin: 20px auto;
}

/* تنسيق زر تسجيل الدخول */
.btn-custom {
    background-color: #4a7c29;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

    .btn-custom:hover {
        background-color: #3a6c25;
        opacity: 0.7;
    }

/* تنسيق نص تسجيل الدخول */
.login-text {
    font-size: 18px;
    color: #3a3d2a;
    margin-bottom: 10px;
    display: block;
}






/* استجابة تخطيط الشبكة */
@media (max-width: 992px) {
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .button-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (min-width: 991px) {
    .cart-container {
        top: 70px !important;
    }
}
@media (max-width: 991px) {
    .cart-container {
        display: none !important;
    }
}

/* تنسيقات عامة للجسم */
body {
    background-color: white;
    color: #3a3d2a;
    margin: 0;
    font-family: Arial, sans-serif;
}

/* تنسيق الفورم ليكون عمودياً ويشغل كامل ارتفاع الصفحة */
form {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* تنسيق عنوان الأصناف */
.title-container {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Georgia', serif;
    position: absolute;
    left: 50%;
    top: 30%;
    transform: translateX(-50%);
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* لون خلفية نصف شفاف */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
}

/* تنسيق حاوية الفليدست */
fieldset {
    border: 2px solid #4CAF50;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 1200px;
    margin: 6.5em auto 20px auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #B2E8B2;
}




/* تنسيق قسم تسجيل الدخول */
.login-section {
    text-align: center;
    margin: 20px auto;
}



/* تنسيق نص تسجيل الدخول */
.login-text {
    font-size: 18px;
    color: #3a3d2a;
    margin-bottom: 10px;
    display: block;
}

/* تنسيق شريط التنقل */
.navbar {
    background-color: #8FBC8F;
    padding: 10px;
    z-index: 1000;
}

/* تنسيق حاوية الأيقونات */
.icon-container {
    display: flex;
    gap: 15px;
}

/* تنسيق كل أيقونة */
.icon-item {
    text-align: center;
    color: white;
    padding: 10px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

    /* تنسيق أيقونة داخل العنصر */
    .icon-item i {
        font-size: 24px;
        margin-bottom: 5px;
    }

    /* تنسيق نص الأيقونة */
    .icon-item span {
        display: block;
        font-size: 14px;
    }

    /* تأثير التحويم على الأيقونات */
    .icon-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

/* استجابة تخطيط الشبكة */
@media (max-width: 992px) {


    .title-container {
        top: 20%;
    }
}

@media (max-width: 768px) {


    .title-container {
        top: 15%;
    }
}

/* تنسيق زر السلة داخل الكارد */


.btn-cart {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
}

.image-container {
    position: relative;
    padding-bottom: 10px; /* لإضافة مساحة لزر السلة */
    cursor: default;
}
/* إخفاء الزر افتراضيًا */
.cart-btn-container {
    position: absolute;
    top: 0;
    left: -100%; /* يبدأ خارج الحاوية من اليسار */
    transition: left 0.3s ease-in-out; /* تأثير الانتقال */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.cart-btn-container-view {
    position: absolute;
    top: 0;
    right: -100%; /* يبدأ خارج الحاوية من اليسار */
    transition: right 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.image-container:hover .cart-btn-container {
    left: 0; /* ينتقل إلى مكانه الطبيعي */
}

.image-container:hover .cart-btn-container-view {
    right: 0; /* ينتقل إلى مكانه الطبيعي */
}
.image-container a{
    background-color: white;
    color: black;
    padding: 5px;
}
/* حاوية السلة الرئيسية */
.cart-container {
    display: none;
    width: 50%;
    max-width: 1200px;
    margin: 2em auto;
    padding: 20px;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    right: 0;
    top: 30px;
    z-index: 1;
    max-height: 85%;
    overflow: auto;
}

/* عنوان السلة */
.cart-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 20px;
}

/* قائمة عناصر السلة */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* عنصر منتج في السلة */
.cart-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

/* صورة المنتج */
.cart-item-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-left: 1rem;
}

/* تفاصيل المنتج */
.cart-item-details {
    flex: 1;
    margin-left: 20px;
}

/* عنوان المنتج */
.cart-item-title {
    font-size: 20px;
    color: #333;
}

/* سعر المنتج */
.cart-item-price {
    font-size: 18px;
    color: #4CAF50;
    margin-bottom: 10px;
}

/* إجراءات المنتج (الكمية وإزالة المنتج) */
.cart-item-actions {
    justify-content: space-between;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
}

.cart-item-quantity {
    width: 60px;
    padding: 5px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.btn-remove {
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
}

    .btn-remove:hover {
        background-color: #e60000;
    }

/* ملخص السلة (المجموع والزر) */
.cart-summary {
    text-align: right;
    margin-top: 20px;
}

.total-price {
    font-size: 22px;
    font-weight: bold;
    color: #333;
}

.btn-checkout {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 18px;
    cursor: pointer;
}

    .btn-checkout:hover {
        background-color: #45a049;
    }

.btn-close-cart {
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    float: right;
    font-size: 18px;
}

    .btn-close-cart:hover {
        background-color: #e60000;
    }
.cart-summary {
    border: 1px solid #E1E1E1; /* حدود خفيفة */
    border-radius: 8px; /* زوايا دائرية */
    padding: 20px; /* مسافة داخلية */
    background-color: #f9f9f9; /* خلفية فاتحة */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* ظل خفيف */
}

.summary-title {
    font-size: 1.5rem; /* حجم خط أكبر */
    margin-bottom: 15px; /* مسافة أسفل العنوان */
    text-align: center; /* توسيط النص */
    color: #333; /* لون النص */
}

.total-price, .total-quantity {
    font-size: 1.2rem; /* حجم خط أكبر قليلاً */
    margin: 10px 0; /* مسافة فوق وتحت */
    text-align: right; /* محاذاة النص لليمين */
    color: #555; /* لون نص داكن */
}

.btn-checkout {
    display: block; /* جعل الزر يظهر ككتلة */
    width: 100%; /* عرض كامل */
    padding: 10px; /* مسافة داخلية */
    background-color: #4CAF50; /* لون خلفية الزر */
    color: white; /* لون النص */
    border: none; /* إزالة الحدود */
    border-radius: 5px; /* زوايا دائرية */
    font-size: 1.1rem; /* حجم خط أكبر */
    cursor: pointer; /* تغيير المؤشر عند المرور */
    transition: background-color 0.3s; /* تأثير الانتقال */
}

    .btn-checkout:hover {
        background-color: #45a049; /* تغيير اللون عند المرور */
    }
.cart-count {
    font-size: 0.8rem;
    padding: 0.2em 0.4em;
    border-radius: 50%;
    color: white;
    background-color: #dc3545; /* لون أحمر */
    transform: translate(-50%, -50%);
    top: 0;
    left: 100%;
}
/*Meal details*/

/* style.css */


.meal-container {
    display: flex;
    max-width: 900px;
    width: 100%;
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .meal-container:hover {
        transform: scale(1.02);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
    }

.meal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 400px;
}

.meal-details {
    padding: 25px;
    flex: 1;
}

h2 {
    color: #8FBC8F;
    font-size: 2rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h3 {
    color: #8FBC8F;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

p {
    font-size: 18px;
    margin: 8px 0;
    line-height: 1.6;
}



/* الحاوية الرئيسية للمكونات */
#componentsList {
    gap: 12px;
    max-height: 400px; /* ضبط ارتفاع الحاوية */
    overflow-y: auto; /* إضافة تمرير عمودي عند زيادة العناصر */
    padding: 12px;
    border: 1px solid #ccc; /* إضافة حد */
    border-radius: 8px; /* زوايا مستديرة */
    background-color: #fff; /* خلفية بيضاء */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* ظل خفيف */
}

.components-list {
    justify-content: center;
    display: flex;
    margin-top: 20px;
    flex-wrap: wrap; /* يسمح للمكونات بالتدفق إلى أسفل */
    gap: 12px; /* المسافة بين العناصر */
}

.component-item {
    justify-content: space-between;
    display: flex;
    align-items: center;
    padding: inherit;
    background-color: #f9f9f9; /* لون خلفية العناصر */
    border: 1px solid #e0e0e0; /* حد خفيف */
    border-radius: 8px; /* زوايا مستديرة */
    transition: background-color 0.3s ease, transform 0.2s ease;
    flex: 0 1 auto; /* يسمح لكل عنصر بأخذ حجمه الطبيعي */
}

    .component-item:hover {
        background-color: #e0f7fa; /* تغيير لون الخلفية عند المرور */
        transform: translateY(-2px); /* رفع العنصر قليلاً */
    }



    .component-item:hover {
        background-color: #eaf3ea;
        transform: scale(1.03);
    }

    .component-item input[type="checkbox"] {
        accent-color: #8FBC8F;
        width: 20px;
        height: 20px;
        cursor: pointer;
        margin-right: 0.5rem;
    }

    .component-item label {
        font-size: 1rem;
        color: #555;
        cursor: pointer;
        margin-bottom: 0;
    }

.add-to-cart {
    background-color: #8FBC8F;
    color: white;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease; /* تأثير الانتقال */
}

    .add-to-cart:hover {
        background-color: #76c4a5; /* لون الخلفية عند الهوفر */
        transform: scale(1.05); /* تكبير الزر قليلاً عند الهوفر */
        cursor: pointer; /* تغيير شكل المؤشر إلى اليد */
    }

.meal-price {
    font-size: 1.5rem; /* حجم خط أكبر للسعر */
    color: #8FBC8F; /* لون نص السعر */
    font-weight: bold; /* جعل النص عريض */
    margin-top: 15px; /* مسافة من الأعلى */
}

.meal-availability {
    font-size: 1.2rem; /* حجم خط مناسب */
    color: #333;
    font-weight: bold;
    margin-top: 10px; 
}

    .meal-availability span {
        padding: 5px 10px;
        background-color: #e0f7fa;
        border-radius: 5px;
        color: #00796b;
        font-weight: bold; 
    }


.cart-container {
    direction: rtl;
    text-align: right; /* Aligns text to the right */
}

.cart-item-details, .cart-summary, .cart-item-additions {
    text-align: right;
}

.cart-item-additions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.addition-item {
    background-color: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
}
