/* ================= نظام المتغيرات اللونية (دعم الوضع المظلم والمضيء) ================= */
:root {
    --primary-color: #d32f2f;
    --secondary-color: #ff9800;
    --accent-yellow: #ffea00;
    --success-color: #2e7d32;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --tab-inactive: #e9ecef;
    --whatsapp-color: #25d366;
    --info-bg: #f1f3f5;
    --faq-bg: #f8f9fa;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #f8f9fa;
    --text-muted: #adb5bd;
    --border-color: #2d2d2d;
    --tab-inactive: #2b2b2b;
    --info-bg: #222222;
    --faq-bg: #1a1a1a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* ================= التنسيقات العامة ================= */
* {
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 120px;
    transition: background-color 0.3s, color 0.3s;
    scroll-behavior: smooth;
}

.allow-copy {
    user-select: text;
}

img {
    pointer-events: none;
    -webkit-user-drag: none;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 12px;
}

/* ================= الهيدر واللافتة ================= */
header {
    background: linear-gradient(135deg, #111111 0%, #3a0000 100%);
    color: white;
    text-align: center;
    padding: 30px 15px;
    box-shadow: var(--shadow-md);
    position: relative;
    border-bottom: 4px solid var(--secondary-color);
}

.brand-banner {
    width: 100%;
    max-width: 486px;
    border-radius: 12px;
    border: 2px solid rgba(255, 152, 0, 0.5);
    margin-bottom: 10px;
    box-shadow: var(--shadow-md);
}

header h1 {
    font-size: 2.2em;
    font-weight: 900;
    color: var(--accent-yellow);
    margin-bottom: 5px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
}

header p {
    font-size: 1.1em;
    font-weight: 700;
    color: #f8f9fa;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

.theme-toggle {
    display: block;
    margin: 0 auto 14px auto;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: bold;
    z-index: 10;
}
/* ================= إشعارات نفاد المخزون ================= */
.stockout-banner {
    background: linear-gradient(135deg, #1a0000 0%, #3d0000 100%);
    border: 1.5px solid #ff5252;
    border-radius: 16px;
    padding: 16px 18px;
    margin: 18px 0 6px 0;
    box-shadow: 0 4px 18px rgba(211, 47, 47, 0.25);
    animation: fadeIn 0.5s ease;
}

.stockout-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.stockout-icon {
    font-size: 1.3em;
    line-height: 1;
}

.stockout-title {
    font-size: 1em;
    font-weight: 900;
    color: #ff5252;
    flex: 1;
}

.stockout-date {
    font-size: 0.78em;
    font-weight: 700;
    color: #aaa;
    background: rgba(255, 255, 255, 0.07);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.stockouts {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.stockouts li {
    background: rgba(255, 82, 82, 0.12);
    border: 1px solid rgba(255, 82, 82, 0.35);
    color: #ff8a80;
    font-size: 0.88em;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 20px;
}

.stockouts li::before {
    content: "✕ ";
    font-size: 0.75em;
    opacity: 0.7;
}

.stockout-note {
    font-size: 0.8em;
    font-weight: 600;
    color: #888;
    margin: 0;
    border-top: 1px solid rgba(255, 82, 82, 0.15);
    padding-top: 10px;
}

@media (max-width: 600px) {
    .stockout-banner {
        padding: 13px 14px;
        border-radius: 12px;
        margin: 12px 0 4px 0;
    }

    .stockout-title {
        font-size: 0.92em;
    }

    .stockout-list li {
        font-size: 0.82em;
        padding: 4px 11px;
    }
}
/* ================= لوحة التحكم (البحث، الترتيب، الفئات) ================= */
.controls-section {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 10px;
    z-index: 100;
}

.search-bar {
    width: 100%;
    padding: 12px 15px;
    border-radius: 25px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.3s;
}

.search-bar:focus {
    border-color: var(--primary-color);
}

.filters-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.sort-select {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.9em;
    outline: none;
    cursor: pointer;
    min-width: 150px;
    -webkit-appearance: none;
    appearance: none;
}

.view-toggle {
    display: flex;
    background: var(--tab-inactive);
    border-radius: 25px;
    padding: 4px;
    flex: 1;
    min-width: 200px;
}

.view-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-color);
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85em;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    padding: 8px;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* ================= قائمة التصنيفات المنسدلة (Category Dropdown) ================= */
.category-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.category-dropdown label {
    font-weight: 800;
    font-size: 0.9em;
    color: var(--text-color);
    white-space: nowrap;
}

.category-select {
    flex: 1;
    padding: 10px 14px;
    border-radius: 25px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.9em;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 180px;
    -webkit-appearance: none;
    appearance: none;
}

.category-select:focus {
    border-color: var(--secondary-color);
}

/* ================= حاويات العرض ================= */
#image-menu-container {
    display: none;
    text-align: center;
    animation: fadeIn 0.4s;
}

.menu-img-wrapper {
    margin-bottom: 20px;
}

.menu-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
}

#text-menu-container {
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= تصميم الكروت والأكلات ================= */
.menu-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.menu-section h2 {
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 8px;
    margin-top: 0;
    font-size: 1.4em;
    font-weight: 900;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed var(--border-color);
    transition: opacity 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.item-details {
    flex: 1;
    padding-left: 10px;
}

.item-details h3 {
    margin: 0 0 5px;
    font-size: 1.1em;
    font-weight: 800;
    color: var(--text-color);
}

/* ================= العلامات الصحية والتسويقية ================= */
.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.75em;
    margin-top: 6px;
}

.badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-cal {
    background-color: #fff3e0;
    color: #e65100;
}

.badge-allergy {
    background-color: #ffebee;
    color: #c62828;
}

.badge-vegan {
    background-color: #e8f5e9;
    color: #2e7d32;
}

[data-theme="dark"] .badge-cal {
    background-color: #3e2723;
    color: #ffb74d;
}

[data-theme="dark"] .badge-allergy {
    background-color: #4a148c;
    color: #ef9a9a;
}

[data-theme="dark"] .badge-vegan {
    background-color: #1b5e20;
    color: #a5d6a7;
}

.item-right-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 105px;
}

.item-price {
    font-weight: 900;
    color: var(--primary-color);
    font-size: 1.25em;
    white-space: nowrap;
}

/* ================= أزرار الكميات ================= */
.quantity-controls {
    display: flex;
    align-items: center;
    background: var(--tab-inactive);
    border-radius: 20px;
    padding: 3px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-qty {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-qty:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.qty-val {
    font-weight: 800;
    font-size: 1em;
    min-width: 28px;
    text-align: center;
    color: var(--text-color);
}

/* ================= الأقسام التسويقية والمعلومات ================= */
.info-card {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 50px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    border-right: 5px solid var(--primary-color);
}

.info-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2em;
    font-weight: 800;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card p {
    font-size: 0.95em;
    color: var(--text-color);
    margin-bottom: 8px;
}

/* ================= التقييمات ================= */
.review-box {
    background: var(--info-bg);
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.review-text {
    font-style: italic;
    font-size: 0.95em;
    margin-bottom: 5px;
    color: var(--text-color);
}

.review-author {
    font-weight: 800;
    font-size: 0.85em;
    color: var(--secondary-color);
}

/* ================= الأسئلة الشائعة ================= */
.faq-item {
    background: var(--faq-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 12px 15px;
    font-weight: 800;
    font-size: 0.95em;
    background: var(--info-bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    color: var(--text-color);
}

.faq-question:hover {
    background: var(--border-color);
}

.faq-answer {
    padding: 12px 15px;
    display: none;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ================= اللوكيشن والتواصل ================= */
.details-img-container {
    text-align: center;
    margin: 15px 0;
}

.details-img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.action-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.btn-action {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 800;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.btn-action:hover {
    background: var(--primary-color);
    color: white;
}

.phones-grid {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.phone-link {
    background: var(--info-bg);
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.95em;
    border: 1px solid var(--border-color);
}

/* ================= شريط الفاتورة العائم ================= */
.cart-floating-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #111 0%, #3a0000 100%);
    color: white;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 0;
    z-index: 999;
    border-top: 3px solid var(--secondary-color);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

.cart-info {
    display: flex;
    flex-direction: column;
}

.cart-total {
    font-size: 1.3em;
    font-weight: 900;
    color: var(--accent-yellow);
}

.cart-count {
    font-size: 0.85em;
    font-weight: 700;
    color: #ddd;
}

.btn-submit-order {
    background: var(--whatsapp-color);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s;
}

.btn-submit-order:active {
    transform: scale(0.95);
}

/* ================= زر الرجوع للأعلى ================= */
#backToTop {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    font-size: 1.4em;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 998;
}

/* ================= استمارة الطلب متعددة الخطوات ================= */
.order-form-modal {
    background: var(--card-bg);
    color: var(--text-color);
    width: 100%;
    max-width: 540px;
    border-radius: 20px;
    padding: 22px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    margin: auto;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── شريط التقدم ── */
.form-progress-bar-wrapper {
    margin-bottom: 20px;
}

.form-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.step-label-text {
    font-size: 0.8em;
    font-weight: 700;
    color: var(--text-muted);
}

.step-title-text {
    font-size: 1em;
    font-weight: 900;
    color: var(--primary-color);
}

.form-progress-track {
    width: 100%;
    height: 6px;
    background: var(--tab-inactive);
    border-radius: 10px;
    overflow: hidden;
}

.form-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.4s ease;
}

/* ── حقول الاستمارة ── */
.form-step {
    animation: fadeIn 0.3s ease;
}

.form-step-note {
    background: var(--info-bg);
    border-right: 4px solid var(--secondary-color);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 0.88em;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 6px;
}

.required-star {
    color: var(--primary-color);
    margin-right: 2px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.form-divider {
    height: 1px;
    background: var(--border-color);
    margin: 18px 0;
    border-radius: 2px;
}

.pickup-unavailable-note {
    background: var(--info-bg);
    border: 1.5px solid var(--border-color);
    border-right: 4px solid var(--secondary-color);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.88em;
    font-weight: 800;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pickup-unavailable-note span {
    font-size: 0.82em;
    font-weight: 600;
    color: var(--primary-color);
}

/* ── أزرار التنقل ── */
.form-nav-btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    gap: 8px;
    flex-wrap: wrap;
}

.form-btn {
    border: none;
    border-radius: 30px;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    cursor: pointer;
    padding: 12px 20px;
    font-size: 0.95em;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
}

.form-btn:active {
    transform: scale(0.96);
}

.form-btn-cancel {
    background: var(--tab-inactive);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.form-btn-back {
    background: var(--info-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.form-btn-next {
    background: var(--primary-color);
    color: white;
    padding: 12px 28px;
}

.form-btn-send {
    background: var(--whatsapp-color);
    color: white;
    padding: 12px 22px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* ================= إصلاحات الاستجابة للجوال ================= */
@media (max-width: 600px) {
    header {
        padding: 20px 12px;
    }

    header h1 {
        font-size: 1.65em;
    }

    header p {
        font-size: 0.95em;
    }

    .theme-toggle {
        font-size: 0.78em;
        padding: 5px 10px;
    }

    .controls-section {
        padding: 12px 10px;
        margin: 12px 0;
        border-radius: 12px;
        top: 6px;
    }

    .search-bar {
        padding: 10px 14px;
        font-size: 0.9em;
        margin-bottom: 10px;
    }

    .filters-row {
        gap: 8px;
        margin-bottom: 10px;
    }

    .sort-select {
        min-width: 120px;
        font-size: 0.82em;
        padding: 8px 10px;
    }

    .view-toggle {
        min-width: 160px;
    }

    .view-btn {
        font-size: 0.78em;
        padding: 7px 5px;
    }

    .category-select {
        min-width: 140px;
        font-size: 0.84em;
        padding: 9px 12px;
    }

    .menu-section {
        padding: 14px 12px;
        border-radius: 12px;
    }

    .menu-section h2 {
        font-size: 1.2em;
    }

    .menu-item {
        padding: 12px 0;
    }

    .item-details h3 {
        font-size: 0.96em;
    }

    .item-right-panel {
        min-width: 90px;
    }

    .item-price {
        font-size: 1.1em;
    }

    .btn-qty {
        width: 28px;
        height: 28px;
        font-size: 1.1em;
    }

    .qty-val {
        min-width: 24px;
        font-size: 0.95em;
    }

    .info-card {
        padding: 14px 12px;
    }

    .info-card h3 {
        font-size: 1.05em;
    }

    .cart-floating-bar {
        padding: 10px 12px;
    }

    .cart-total {
        font-size: 1.1em;
    }

    .cart-count {
        font-size: 0.78em;
    }

    .btn-submit-order {
        padding: 10px 16px;
        font-size: 0.88em;
        gap: 5px;
    }

    .action-btns {
        gap: 8px;
    }

    .btn-action {
        padding: 7px 14px;
        font-size: 0.85em;
    }

    .phones-grid {
        gap: 8px;
    }

    .phone-link {
        font-size: 0.88em;
        padding: 7px 12px;
    }

    #backToTop {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
    }


    /* ================= أزرار مشاركة السوشيال ميديا ================= */
.social-share-section {
    margin-top: 20px;
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
}

.social-share-label {
    font-size: 0.88em;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 12px !important;
}

.social-share-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 0.95em;
    text-decoration: none;
    color: white;
    transition: opacity 0.2s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-btn:active {
    transform: scale(0.95);
}

.social-btn-fb  { background: #1877f2; }
.social-btn-wa  { background: #25d366; }
.social-btn-tt  { background: #010101; }
.social-btn-ig  { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }

@media (max-width: 600px) {
    .social-share-btns {
        gap: 8px;
    }
    .social-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}
    /* المودال على الجوال */
    .order-form-modal {
        padding: 16px 14px;
        border-radius: 16px;
        max-height: 94vh;
    }

    .form-btn {
        padding: 10px 16px;
        font-size: 0.88em;
    }

    .form-btn-next {
        padding: 10px 22px;
    }

    .form-input {
        padding: 11px 12px;
        font-size: 0.9em;
    }

    .step-title-text {
        font-size: 0.92em;
    }
}

@media (max-width: 380px) {
    header h1 {
        font-size: 1.35em;
    }

    header p {
        font-size: 0.88em;
    }

    .item-details h3 {
        font-size: 0.88em;
    }

    .item-right-panel {
        min-width: 80px;
    }

    .item-meta {
        font-size: 0.7em;
    }

    .badge {
        padding: 2px 6px;
    }

    .cart-floating-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .form-nav-btns {
        gap: 6px;
    }

    .form-btn-cancel {
        order: 3;
        width: 100%;
        text-align: center;
    }
}

/* ================= شريط السلة المُطوَّر ================= */

.cart-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    max-height: 96px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,152,0,0.4) transparent;
}

.cart-items-list::-webkit-scrollbar { display: none; }

.cart-item-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,152,0,0.3);
    border-radius: 20px;
    padding: 4px 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cart-pill-name {
    font-size: 0.8em;
    font-weight: 700;
    color: #f8f9fa;
}

.cart-pill-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85em;
    padding: 0;
    line-height: 1;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.cart-pill-remove:hover { opacity: 1; }

.cart-bar-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px 12px;
    gap: 10px;
    flex-wrap: wrap;
}

.cart-meta-hint {
    font-size: 0.72em;
    color: #aaa;
    font-weight: 600;
    display: block;
    margin-top: 3px;
}

.cart-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cart-btn-clear {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 30px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9em;
}

.cart-btn-save {
    background: rgba(255,255,255,0.12);
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 10px 14px;
    border-radius: 30px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.88em;
}

/* ================= Toast Notification ================= */
.toast-notif {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #323232;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.92em;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.35s, transform 0.35s;
    pointer-events: none;
    white-space: nowrap;
    max-width: 90vw;
    text-align: center;
}

.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success { background: #2e7d32; }
.toast-error   { background: #c62828; }
.toast-info    { background: #0277bd; }

/* ================= نجوم التقييم المرئية ================= */
.review-stars {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
}

.star {
    font-size: 1.25em;
    color: #ccc;
    line-height: 1;
}

.star.filled { color: #ffb300; }

.star-label {
    font-size: 0.8em;
    font-weight: 800;
    color: var(--text-muted);
    margin-right: 5px;
}

/* ================= بادج تاريخ التحديث ================= */
.menu-update-badge {
    text-align: center;
    font-size: 0.78em;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--info-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 16px;
    margin: 10px auto 16px;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

/* ================= كود الخصم: تغذية راجعة ================= */
.promo-feedback {
    font-size: 0.82em;
    font-weight: 700;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    display: block;
    min-height: 0;
}

.promo-valid   { background: #e8f5e9; color: #2e7d32; }
.promo-invalid { background: #ffebee; color: #c62828; }

[data-theme="dark"] .promo-valid   { background: #1b5e20; color: #a5d6a7; }
[data-theme="dark"] .promo-invalid { background: #4a0000; color: #ef9a9a; }


.promo-feedback { font-size: 0.85em; font-weight: 700; margin-top: 6px; min-height: 20px; }
.promo-valid    { color: #2e7d32; }
.promo-invalid  { color: #d32f2f; }
/* ================= شريط البحث + زر الفلتر ================= */
.search-filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.search-bar-inline {
    flex: 1;
    margin-bottom: 0;
}

.filter-toggle-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 11px 16px;
    border-radius: 25px;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 0.88em;
    cursor: pointer;
    white-space: nowrap;
    display: none;
}

/* ================= لوحة الفلاتر القابلة للطي ================= */
.filters-panel {
    display: block;
}

@media (max-width: 600px) {
    .filter-toggle-btn {
        display: block;
    }

    .filters-panel {
        display: none;
        overflow: hidden;
    }

    .filters-panel.filters-open {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .cart-bar-bottom {
        padding: 8px 12px 10px;
    }

    .cart-btn-save {
        font-size: 0.8em;
        padding: 9px 12px;
    }

    .toast-notif {
        font-size: 0.85em;
        padding: 10px 18px;
        bottom: 95px;
    }
}

/* ================= Google Drive Cards ================= */
.drive-links-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 4px;
}

.drive-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 28px 20px;
    border-radius: 18px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.drive-card:active { transform: scale(0.97); }

.drive-card-menu {
    background: linear-gradient(135deg, #0f4c81 0%, #1a73e8 100%);
    color: white;
    box-shadow: 0 6px 24px rgba(26,115,232,0.35);
}

.drive-card-meals {
    background: linear-gradient(135deg, #1b5e20 0%, #43a047 100%);
    color: white;
    box-shadow: 0 6px 24px rgba(67,160,71,0.35);
}

.drive-card-icon { font-size: 2.4em; line-height: 1; }

.drive-card-title {
    font-size: 1.25em;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.drive-card-sub {
    font-size: 0.88em;
    font-weight: 600;
    opacity: 0.88;
    max-width: 320px;
    line-height: 1.5;
}

.drive-card-badge {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    font-size: 0.78em;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

/* ================= Stockout Promo Banner Additions ================= */
.stockout-dismiss {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,82,82,0.3);
    color: #ff8a80;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.85em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
}

.stockout-count {
    background: rgba(255,82,82,0.2);
    color: #ff5252;
    font-size: 0.75em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 6px;
}

.stockout-wa-link {
    color: #69f0ae;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9em;
    display: inline-block;
    margin-top: 6px;
}

.stockout-divider {
    height: 1px;
    background: rgba(255,82,82,0.2);
    margin: 16px 0;
}

.promo-banner-section { padding-top: 4px; }

.promo-banner-header {
    font-size: 0.95em;
    font-weight: 900;
    color: #ffb300;
    margin-bottom: 8px;
}

.promo-banner-desc {
    font-size: 0.82em;
    font-weight: 600;
    color: #bbb;
    margin-bottom: 12px;
    line-height: 1.6;
}

.promo-codes-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.promo-code-chip {
    background: rgba(255,179,0,0.1);
    border: 1px solid rgba(255,179,0,0.35);
    border-radius: 12px;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 130px;
    flex: 1;
}

.promo-code-val {
    font-size: 1em;
    font-weight: 900;
    color: #ffb300;
    letter-spacing: 0.06em;
    direction: ltr;
    text-align: center;
}

.promo-code-desc {
    font-size: 0.75em;
    font-weight: 600;
    color: #aaa;
    text-align: center;
}

.promo-banner-note {
    font-size: 0.78em;
    font-weight: 600;
    color: #888;
    border-top: 1px solid rgba(255,152,0,0.15);
    padding-top: 10px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .drive-card { padding: 22px 16px; }
    .drive-card-title { font-size: 1.1em; }
    .drive-card-icon { font-size: 2em; }
    .promo-codes-row { gap: 6px; }
    .promo-code-chip { min-width: 100px; }
}

/* إصلاح select على iOS */
select.form-input,
select.sort-select,
select.category-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 32px;
}
