@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    --primary-color: #00BFFF; /* DeepSkyBlue - Glow Color */
    --secondary-color: #222; /* Dark Gray */
    --background-color: #000000; /* Black */
    --text-color: #FFFFFF; /* White */
    --success-color: #00FF7F; /* SpringGreen */
    --card-bg: #111;
    --shadow: 0 0 15px rgba(0, 191, 255, 0.4); /* Blue Glow */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #1a1a1a; /* تغيير لون خلفية الصفحة للتمييز */
    color: var(--text-color);
    direction: ltr;
    line-height: 1.6;
    /* منع تحديد النص لزيادة صعوبة النسخ - مع دعم أوسع للمتصفحات */
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Safari, Chrome, Opera, Edge */
    -moz-user-select: none;      /* Old versions of Firefox */
    -ms-user-select: none;       /* Internet Explorer/Edge */
    user-select: none;           /* Standard syntax */
}

.site-container {
    width: 100%;
    max-width: 450px; /* تحديد أقصى عرض للموقع (شبيه بحجم شاشة الهاتف) */
    margin: 0 auto; /* لتوسيط الحاوية في الصفحة */
    background-color: var(--background-color);
    box-shadow: 0 0 25px rgba(0, 191, 255, 0.2); /* إضافة ظل متوهج */
    min-height: 100vh; /* لجعل الحاوية تملأ ارتفاع الشاشة على الأقل */
    position: relative; /* ضروري لعمل قسم الطلبات اللاصق بشكل صحيح */
    overflow-x: hidden; /* منع التمرير الأفقي داخل الموقع */
    padding-bottom: 80px; /* إضافة مساحة في الأسفل لمنع التداخل مع شريط التنقل */
}

.main-header {
    background: linear-gradient(180deg, var(--primary-color) 0%, rgba(0,0,0,1) 100%);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.logo {
    width: 150px; /* تكبير حجم اللوجو */
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px var(--primary-color)) drop-shadow(0 0 5px var(--primary-color)); /* تعزيز تأثير التوهج */
}

.main-header h1 {
    margin-bottom: 0.5rem;
    text-shadow: 0 0 8px var(--primary-color);
}

/* Search Bar */
.search-container {
    position: relative;
    margin: 1.5rem auto 0;
    width: 90%;
    max-width: 350px;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #888;
}

#search-bar {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border-radius: 25px;
    background-color: #222;
    color: white;
    border: 1px solid #444;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#search-bar:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 191, 255, 0.5);
}

.menu-section {
    padding: 2rem 0;
}

.menu-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
    font-size: 1.8rem;
}

.menu-section.hidden-by-search {
    display: none;
}

.swiper-container {
    width: 100%;
    height: 450px; /* تعديل الارتفاع ليتناسب مع حجم الكارت الجديد */
    padding-top: 20px;
    padding-bottom: 40px;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    /* تم نقل تأثير الانعكاس إلى الصورة */
    /* Swiper's card effect will handle the width/stacking */
}

.swiper-slide.hidden-by-search {
    display: none;
}

.product-card {
    background: var(--card-bg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid transparent;
    width: 90%; /* استخدام عرض نسبي ليكون متجاوبًا */
    max-width: 300px; /* تحديد أقصى عرض للكارت */
    border-radius: 15px;
}

.product-card.ordered {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 20px rgba(0, 255, 127, 0.6);
}

.product-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 25px rgba(0, 191, 255, 0.6);
}

.product-card img {
    width: 100%;
    height: 220px; /* زيادة ارتفاع الصورة قليلًا */
    object-fit: cover;
    /* إضافة تأثير انعكاس المرآة أسفل الصورة فقط */
    -webkit-box-reflect: below 1px linear-gradient(transparent 70%, #0004);
}

.product-info {
    padding: 1rem;
    text-align: center;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-info .price {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.order-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.order-btn:hover {
    background-color: #0099cc;
    box-shadow: 0 0 15px var(--primary-color);
}

.order-btn.ordered {
    background-color: var(--success-color);
    box-shadow: 0 0 15px var(--success-color);
}

/* Order Section */
.order-section {
    background-color: var(--card-bg); /* تغيير الخلفية للون الداكن */
    padding: 1.5rem;
    /* إزالة الخصائص التي تجعله لاصقًا في الأسفل */
    margin: 2rem 0; /* إضافة هامش ليفصله عن المحتوى */
    border-radius: 20px; /* جعل كل الزوايا دائرية */
    box-shadow: var(--shadow); /* استخدام نفس ظل الكروت للتناسق */
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out, opacity 0.5s ease;
    max-height: 1000px; /* ارتفاع أقصى للسماح بالظهور */
    opacity: 1;
    overflow: hidden;
}

.order-section.hidden {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    pointer-events: none; /* لمنع التفاعل مع القسم وهو مخفي */
}

.order-section h2, .order-section h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #333;
}

.order-item-details {
    display: flex;
    align-items: center;
    gap: 12px; /* مسافة بين الصورة والاسم */
    flex: 1; /* لجعل هذا الجزء يأخذ المساحة المتاحة */
    min-width: 0; /* لمنع النص الطويل من تجاوز الحاوية */
}

.order-item-img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0; /* لمنع الصورة من الانكماش */
}

.order-item-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quantity-controls {
    display: flex;
    align-items: center;
}

.quantity-btn {
    background: #333;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 28px;
    color: white;
}

.quantity {
    margin: 0 0.8rem;
    font-weight: bold;
}

.total-price-container {
    text-align: center;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 1.5rem 0;
    color: var(--text-color);
}

/* تنسيق موحد لجميع حقول الإدخال في الموقع */
#order-form input, #order-form textarea,
#reservation-form input, #reservation-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: 8px;    
    background-color: #222;
    color: white;
    border: 1px solid #444;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* تحسين مظهر حقول التاريخ والوقت */
input[type="date"],
input[type="time"] {
  position: relative;
  color: #999; /* جعل لون النص المبدئي أكثر سطوعًا ووضوحًا */
}

input[type="date"]:focus,
input[type="time"]:focus,
input[type="date"]:valid,
input[type="time"]:valid {
  color: var(--text-color); /* إرجاع اللون الأبيض عند اختيار قيمة */
}

/* تغيير لون أيقونة التقويم والساعة */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(0.8);
}

/* تأثير التوهج عند التركيز على حقل الإدخال */
#order-form input:focus, #order-form textarea:focus,
#reservation-form input:focus, #reservation-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 191, 255, 0.5);
}

.send-order-btn {
    width: 100%;
    padding: 1rem;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Social Footer */
.social-footer {
    text-align: center;
    padding: 2rem;
    background: #111;
    border-top: 1px solid #222;
}
.social-icons a {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin: 0 1rem;
    transition: color 0.3s;
}
.social-icons a:hover {
    color: #fff;
}

/* Custom Alert Modal */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.custom-alert-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.custom-alert-box {
    background: #222;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 320px;
    transform: scale(1);
    transition: transform 0.3s ease;    
    border: 1px solid var(--primary-color);
}

.custom-alert-overlay.hidden .custom-alert-box {
    transform: scale(0.9);
}

.custom-alert-box img {
    width: 100px;
    margin-bottom: 1rem;
}

.custom-alert-box p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.custom-alert-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.7rem 2.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

.close-modal-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: #888;
    font-size: 1.7rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal-btn:hover {
    color: white;
}

.custom-alert-box h3 {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
}

.modal-subtitle {
    margin-bottom: 1.5rem;
    color: #aaa;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    opacity: 1;
    visibility: visible;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo {
    width: 180px;
    animation: fadeInGlow 2s ease-in-out;
}

@keyframes fadeInGlow {
    0% {
        opacity: 0;
        transform: scale(0.8);
        filter: drop-shadow(0 0 5px var(--primary-color));
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px var(--primary-color));
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 20px var(--primary-color));
    }
}

.welcome-text {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeInText 2s ease-in-out 0.5s forwards;
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bottom Navbar */
.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 65px;
    background-color: rgba(17, 17, 17, 0.8); /* #111 with transparency */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #333;
    z-index: 1001;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-item:hover {
    color: var(--text-color);
}

.nav-item.active {
    color: var(--primary-color);
    transform: translateY(-3px);
    text-shadow: 0 0 8px var(--primary-color);
}

.nav-item i {
    font-size: 1.4rem;
}

.nav-text {
    font-size: 0.7rem;
    margin-top: 4px;
}

.nav-item.hidden {
    display: none;
}
