/* خط احترافي */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

/* إعدادات عامة */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Bitter';
    background: linear-gradient(135deg, #3A1C00 0%, #6F4E37 100%);
    color: #333;
    overflow-x: hidden;
}

/* الهيدر */
.header {
    background: linear-gradient(135deg, #3A1C00 0%, #6F4E37 100%);
    padding: 20px 0;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 15px #D2B48C4D;
}

.header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

/* الفوتر */
.footer {
    background: linear-gradient(135deg, #3A1C00 0%, #6F4E37 100%);
    text-align: center;
    padding: 25px;
    color: #fff;
    font-size: 14px;
    margin-top: auto;
}

/* ============================= */
/*      صفحة حجز الانتظار        */
/* ============================= */

.waiting-page .container {
    width: 90%;
    max-width: 520px;
    margin: 40px auto;
    background: #fff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px #D2B48C4D;
    border: 2px solid #D2B48C;
}

.waiting-page .form-group {
    margin-bottom: 20px;
}

.waiting-page label {
    display: block;
    margin-bottom: 8px;
    color: #D2B48C;
    font-weight: 600;
    font-size: 15px;
}

.waiting-page input,
.waiting-page select,
.booking-page select {
    width: 100%;
    padding: 13px;
    border: 2px solid #A0522D33;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 15px;
    background: #f8f9ff;
    transition: 0.3s;
}

.waiting-page input:focus,
.waiting-page select:focus,
.booking-page select:focus {
    border-color: #D2B48C;
    background: #fff;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.waiting-page button {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #3A1C00 0%, #6F4E37 100%);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s;
}

.waiting-page button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.waiting-page .success-message {
    background: linear-gradient(135deg, #3A1C00 0%, #6F4E37 100%);
    color: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    display: none;
}

.waiting-page .success-message.show {
    display: block;
}

.waiting-page .waiting-number {
    font-size: 60px;
    font-weight: 900;
    margin: 20px 0;
}

.waiting-page .waiting-info {
    font-size: 16px;
    margin: 20px 0;
    opacity: 0.9;
}

.waiting-page .back-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #fff;
    transition: 0.3s;
}

.waiting-page .back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================= */
/*      صفحة قائمة الطعام        */
/* ============================= */

.menu-page .container {
    width: 95%;
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.menu-page .menu-section h3 {
    font-size: 22px;
    font-weight: 700;
    color: #D2B48C;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
}

.menu-page .menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-page .menu-item {
    display: grid;
    grid-template-columns: 110px auto 90px;
    gap: 15px;
    background: #fafaff;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #A0522D33;
    margin-bottom: 20px;
    align-items: center;
}

.menu-page .menu-item-image {
    width: 110px;
    height: 110px;
    border-radius: 12px;
    overflow: hidden;
    background: #A0522D33;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-page .menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-page .menu-item-info {
    display: flex;
    flex-direction: column;
}

.menu-page .menu-item-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.menu-page .menu-item-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.menu-page .menu-item-price {
    font-size: 20px;
    font-weight: 900;
    color: #D2B48C;
    text-align: end;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .menu-page .menu-item {
        grid-template-columns: 80px auto 70px;
        padding: 15px;
    }

    .menu-page .menu-item-image {
        width: 80px;
        height: 80px;
    }

    .menu-page .menu-item-name {
        font-size: 16px;
    }

    .menu-page .menu-item-price {
        font-size: 16px;
    }
}

/* ============================= */
/*      صفحة حجز الموعد          */
/* ============================= */

.booking-page .container {
    width: 90%;
    max-width: 520px;
    margin: 40px auto;
    background: #fff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px #D2B48C4D;
    border: 2px solid #D2B48C;
}

.booking-page .form-group {
    margin-bottom: 20px;
}

.booking-page label {
    display: block;
    margin-bottom: 8px;
    color: #D2B48C;
    font-weight: 600;
    font-size: 15px;
}

.booking-page input,
.booking-page select {
    width: 100%;
    padding: 13px;
    border: 2px solid #A0522D33;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 15px;
    background: #f8f9ff;
    transition: 0.3s;
}

.booking-page input:focus,
.booking-page select:focus {
    border-color: #D2B48C;
    background: #fff;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.booking-page button {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #3A1C00 0%, #6F4E37 100%);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s;
}

.booking-page button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.booking-page .success-message {
    background: linear-gradient(135deg, #3A1C00 0%, #6F4E37 100%);
    color: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    display: none;
}

.booking-page .success-message.show {
    display: block;
}

.booking-page .reservation-code {
    font-size: 40px;
    font-weight: 900;
    margin: 20px 0;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    display: block;
}

@media (max-width: 480px) {
    .booking-page .reservation-code {
        font-size: 32px;
    }
}

.booking-page .reservation-info {
    font-size: 16px;
    margin: 20px 0;
    opacity: 0.9;
}

.booking-page .back-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #fff;
    transition: 0.3s;
}

.booking-page .back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================= */
/*      صفحة التحقق من الحجز     */
/* ============================= */

.check-page .container {
    width: 90%;
    max-width: 520px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px #D2B48C4D;
    border: 2px solid #D2B48C;
}

.check-page h2 {
    text-align: center;
    color: #D2B48C;
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: 700;
}

.check-page .msg {
    background: #A0522D33;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-right: 5px solid #D2B48C;
    color: #D2B48C;
    font-size: 15px;
    font-weight: 500;
}

.check-page .box {
    background: #fafaff;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #A0522D33;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.check-page .box h3 {
    margin-bottom: 15px;
    color: #D2B48C;
    font-size: 20px;
    font-weight: 700;
}

.check-page .highlight {
    font-weight: 700;
    font-size: 18px;
    color: #D2B48C;
}

.check-page .highlight-big {
    font-weight: 900;
    font-size: 28px;
    color: #D2B48C;
}

.check-page .tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #A0522D33;
}

.check-page .tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #D2B48C;
    transition: 0.3s;
}

.check-page .tab-btn.active {
    border-bottom-color: #D2B48C;
    color: #D2B48C;
}

.check-page .form-group {
    margin-bottom: 18px;
}

.check-page label {
    display: block;
    margin-bottom: 8px;
    color: #D2B48C;
    font-weight: 600;
    font-size: 15px;
}

.check-page input {
    width: 100%;
    padding: 13px;
    border: 2px solid #A0522D33;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 15px;
    background: #f8f9ff;
    transition: 0.3s;
}

.check-page input:focus {
    border-color: #D2B48C;
    background: #fff;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.check-page button {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #3A1C00 0%, #6F4E37 100%);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s;
}

.check-page .status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin: 10px 0;
}

.status-scheduled { background: #e3f2fd; color: #1976d2; }
.status-pending   { background: #fff3e0; color: #f57c00; }
.status-done      { background: #e8f5e9; color: #388e3c; }
.status-cancelled { background: #ffebee; color: #c62828; }
.status-waiting   { background: #fffde7; color: #f9a825; }

@media (max-width: 768px) {
    .check-page .container {
        width: 95%;
        padding: 20px;
        margin: 20px auto;
    }

    .check-page h2 {
        font-size: 22px;
    }

    .check-page input {
        font-size: 16px;
    }

    .check-page button {
        padding: 12px;
        font-size: 15px;
    }
}

/* ============================= */
/*        الصفحة الرئيسية         */
/* ============================= */

.home-page .container {
    width: 90%;
    max-width: 520px;
    margin: 40px auto;
    background: #fff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px #D2B48C4D;
    border: 2px solid #D2B48C;
    text-align: center;
}

.home-page .home-title {
    font-size: 28px;
    font-weight: 700;
    color: #D2B48C;
    margin-bottom: 10px;
}

.home-page .home-subtitle {
    color: #777;
    font-size: 16px;
    margin-bottom: 25px;
}

.home-page .home-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.home-page .home-links a {
    display: block;
    padding: 15px;
    background: linear-gradient(135deg, #3A1C00 0%, #6F4E37 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    transition: 0.3s;
}

.home-page .home-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

@media (max-width: 768px) {
    .home-page .container {
        width: 95%;
        padding: 25px;
    }

    .home-page .home-title {
        font-size: 24px;
    }

    .home-page .home-links a {
        font-size: 16px;
        padding: 12px;
    }
}

.hide {
    display: none !important;
}

.card-box {
    background: #fafaff;
    border: 2px solid #A0522D33;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    margin: 0;
    font-size: 22px;
    color: #D2B48C;
    font-weight: 700;
}

.card-code {
    background: #D2B48C;
    color: #fff;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.card-row span {
    color: #666;
    font-size: 15px;
}

.card-row strong {
    font-size: 16px;
    color: #333;
}

.back-home {
    text-align: center;
    margin: 15px 0;
}

.btn-home {
    display: inline-block;
    background-color: #D2B48C;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: 0.3s;
}

.btn-home:hover {
    background-color: #556cd6;
}


/* ============================= */
/*      أنماط البنرات الإعلانية    */
/* ============================= */

/*
 * يعرض الإعلان بعرض نافذة الجهاز مهما كان عرض الحاوية المحيطة به.
 * لا نستخدم ارتفاعاً ثابتاً أو object-fit: cover، حتى لا تُقص الصورة.
 */
.banner-ad {
    width: 100vw;
    max-width: 100vw;
    margin: 15px calc(50% - 50vw);
    overflow: visible;
    background: #fff;
}

.banner-ad a {
    display: block;
    width: 100%;
    text-decoration: none;
}

.banner-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
}

/* إلغاء التكبير عند المرور لأنه قد يقطع أطراف الصورة بصرياً. */
.banner-ad:hover .banner-img {
    transform: none;
}

.banner-ad-header {
    margin-top: 0;
    margin-bottom: 20px;
}

.banner-ad-footer {
    margin-top: 20px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .banner-ad {
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .banner-ad {
        margin-top: 8px;
        margin-bottom: 8px;
    }
}

/* Pro Fixes for شوكولاتة داكنة */
.home-links a {
    display: block;
    background: #fff;
    color: #D2B48C;
    padding: 18px;
    margin-bottom: 15px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: 0.3s;
    border: 2px solid #D2B48C33;
    text-align: center;
}
.home-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px #D2B48C4D;
    background: #D2B48C;
    color: #fff;
}
.header-img {
    max-width: 150px;
    margin-bottom: 15px;
    border-radius: 10px;
}
