/* ========================================
   HH Ver - Premium Menu
   Southern Saudi Design
   Mobile-First | RTL
   ======================================== */

:root {
    --bg-primary: #0B1F1C;
    --bg-secondary: #132E28;
    --bg-card: #1A3D35;
    --bg-card-hover: #1F4A40;
    --accent-primary: #C8956E;
    --accent-gold: #D4A574;
    --accent-green: #3A7D72;
    --accent-green-light: #4A9B8E;
    --accent-terracotta: #B8704A;
    --text-primary: #F5F0EB;
    --text-secondary: #B8C5C0;
    --text-muted: #7A9690;
    --price-color: #6ECF63;
    --calories-color: #E8A838;
    --border-subtle: rgba(200, 149, 110, 0.15);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-ar: 'Tajawal', 'Almarai', 'Graphik Arabic', Arial, sans-serif;
    --font-en: 'Syne', 'Tajawal', Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body, html {
    margin: 0; padding: 0; height: 100%;
    overflow-x: hidden;
    font-family: var(--font-ar);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

body { transition: opacity ease-in 0.2s; }
body[unresolved] { opacity: 0; display: block; overflow: hidden; position: relative; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-green); border-radius: 4px; }

/* ======== Splash Screen ======== */
.splash-screen {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999; display: flex;
    justify-content: center; align-items: center;
    background-color: var(--bg-primary); overflow: hidden;
}
.splash-screen img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 768px) {
    .splash-screen img { object-fit: contain; width: auto; height: auto; max-width: 100%; max-height: 100%; }
}

/* ======== Header ======== */
header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--accent-green) 0%, #2D6B60 100%);
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 2px solid var(--accent-gold);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
header .logo { width: 90px; height: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); transition: var(--transition); }
header .logo:hover { transform: scale(1.05); }
header .menu { font-size: 20px; font-weight: 700; color: var(--accent-gold); text-decoration: none; margin-left: 12px; font-family: var(--font-en); letter-spacing: 1px; text-transform: uppercase; }
.icon { color: var(--accent-gold); font-size: 42px; cursor: pointer; transition: var(--transition); padding: 6px 8px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.icon:hover { transform: scale(1.15); color: var(--text-primary); }
.site-name { font-size: 24px !important; font-weight: 800 !important; color: var(--text-primary) !important; font-family: var(--font-ar) !important; text-shadow: 1px 1px 3px rgba(0,0,0,0.3); }

@media (max-width: 768px) {
    header { padding: 6px 16px; }
    header .logo { width: 65px; }
    .site-name { font-size: 18px !important; }
}
@media (max-width: 400px) {
    header .logo { width: 55px; }
    .site-name { font-size: 15px !important; }
}

/* ======== Sidebar ======== */
.sidebar {
    display: none; position: fixed; top: 0; right: 0;
    width: 280px; height: 100%;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 24px 20px; z-index: 9999; overflow-y: auto;
    border-left: 3px solid var(--accent-gold);
    box-shadow: -5px 0 30px rgba(0,0,0,0.5);
}
.sidebar a, .sidebar-link {
    display: flex; align-items: center; justify-content: space-between;
    color: var(--text-primary); text-decoration: none;
    margin-bottom: 4px; font-family: var(--font-ar);
    font-size: 16px; font-weight: 500;
    padding: 12px 16px; border-radius: var(--radius-md);
    transition: var(--transition); border-right: 3px solid transparent;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.sidebar a:hover, .sidebar-link:hover {
    background: rgba(200,149,110,0.1); border-right-color: var(--accent-gold);
    color: var(--accent-gold); padding-right: 20px;
}
.sidebar-header { display: flex; justify-content: center; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-subtle); }
.sidebar-logo { width: 90px; height: auto; }
.contact-button {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-light) 100%);
    color: white; border: none; border-radius: var(--radius-lg);
    padding: 14px 24px; font-family: var(--font-ar); font-size: 16px; font-weight: 700;
    text-align: center; text-decoration: none; display: block; margin-top: 24px;
    transition: var(--transition); box-shadow: 0 4px 15px rgba(58,125,114,0.3);
}
.contact-button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(58,125,114,0.4); }

.scroll-up-button {
    position: fixed; bottom: 24px; right: 24px; padding: 0;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-terracotta) 100%);
    color: white; border: none; border-radius: 50%; font-size: 20px;
    cursor: pointer; z-index: 10000; width: 48px; height: 48px;
    display: none; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(200,149,110,0.4); transition: var(--transition);
    font-family: var(--font-ar);
}
.scroll-up-button:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(200,149,110,0.5); }
@media (max-width: 768px) { .sidebar { width: 260px; } }

/* ======== Banner ======== */
.banner { position: relative; width: 100%; height: 420px; overflow: hidden; }
.banner::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 80px;
    background: linear-gradient(transparent, var(--bg-primary)); z-index: 2; pointer-events: none;
}
.banner img { position: absolute; width: 100%; height: 100%; object-fit: cover; top: 0; left: 100%; transition: left 1s cubic-bezier(0.4,0,0.2,1); }
.banner img.active { left: 0; }
@media (max-width: 768px) { .banner { height: 240px; } }
@media (max-width: 480px) { .banner { height: 200px; } }

/* ======== Category Nav Buttons ======== */
.button-container { text-align: center; margin-top: 16px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nav-button {
    display: inline-flex; flex-direction: column; align-items: center;
    padding: 10px 20px; background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-xl);
    text-align: center; text-decoration: none; cursor: pointer;
    font-family: var(--font-ar); font-size: 14px; font-weight: 500;
    transition: var(--transition); white-space: nowrap;
}
.nav-button:hover { background: var(--bg-card-hover); border-color: var(--accent-gold); transform: translateY(-2px); }
.nav-button.active {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-light) 100%);
    color: white; border-color: var(--accent-gold); box-shadow: 0 4px 15px rgba(58,125,114,0.3);
}
@media (max-width: 768px) { .button-container { padding: 10px 12px; gap: 6px; } .nav-button { padding: 8px 16px; font-size: 13px; } }

/* ======== Menu Section ======== */
.one-food-menu { padding: 16px; max-width: 1200px; margin: 0 auto; }
.ofm-controls { position: sticky; top: 52px; background: var(--bg-primary); z-index: 100; padding: 12px 0; margin-bottom: 8px; }
.ofm-category-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 8px; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ofm-category-tabs::-webkit-scrollbar { display: none; }

.ofm-cat-tab {
    background: var(--bg-card); color: var(--text-secondary);
    border: 1px solid var(--border-subtle); padding: 10px 22px;
    border-radius: var(--radius-xl); cursor: pointer;
    transition: var(--transition); font-family: var(--font-ar);
    font-size: 14px; font-weight: 500; flex-shrink: 0;
}
.ofm-cat-tab:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--accent-gold); }
.ofm-cat-tab.active {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-light) 100%);
    color: white; border-color: transparent; box-shadow: 0 4px 15px rgba(58,125,114,0.3);
}

/* Category Title with Southern Decorative */
.ofm-category__title {
    color: var(--text-primary); font-size: 22px; font-weight: 800;
    margin: 28px 0 20px; text-align: center; position: relative;
    padding-bottom: 16px; font-family: var(--font-ar);
}
.ofm-category__title::after {
    content: '\25C6  \25C7  \25C6';
    display: block; margin-top: 10px;
    font-size: 10px; color: var(--accent-gold); letter-spacing: 6px; opacity: 0.7;
}

/* Product Grid */
.ofm-category__items { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
@media (max-width: 768px) { .ofm-category__items { grid-template-columns: 1fr; gap: 12px; } }

/* Product Card - Horizontal Layout */
.ofm-product {
    background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden;
    color: var(--text-primary); transition: var(--transition);
    border: 1px solid var(--border-subtle); display: flex; flex-direction: row; position: relative;
}
.ofm-product:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: rgba(200,149,110,0.3); }

.image-container { width: 130px; min-width: 130px; height: 130px; overflow: hidden; flex-shrink: 0; }
.product-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.ofm-product:hover .product-image { transform: scale(1.08); }
@media (max-width: 480px) { .image-container { width: 110px; min-width: 110px; height: 110px; } }

.ofm-product__info { padding: 12px 16px; display: flex; flex-direction: column; justify-content: space-between; flex: 1; min-width: 0; }
.ofm-product__title { font-size: 16px; font-weight: 700; margin: 0 0 4px; line-height: 1.4; font-family: var(--font-ar); color: var(--text-primary); }
.ofm-product__title span { font-size: 12px !important; color: var(--text-muted) !important; font-weight: 400; font-family: var(--font-en); }
.ofm-product__desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ofm-product__desc span { font-size: 11px !important; color: var(--text-muted) !important; }

/* Tags */
.ofm-product__tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.ofm-tag { display: inline-block; background: rgba(200,149,110,0.15); color: var(--accent-gold); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 500; border: 1px solid rgba(200,149,110,0.2); }

/* Calories */
.ofm-product__calories { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--calories-color); font-weight: 500; margin: 4px 0; padding: 3px 0; }
.calories-icon { font-size: 13px; }

/* Price & Size */
.ofm-product__options { margin-top: auto; padding-top: 6px; }
.ofm-product__options-item { display: flex; justify-content: space-between; align-items: center; }
.ofm-product__size { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.ofm-price { font-size: 17px; font-weight: 800; color: var(--price-color); font-family: var(--font-ar); white-space: nowrap; }
.ofm-text-sm { font-size: 13px; }
.ofm-text-lg { font-size: 17px; }

/* ======== Footer ======== */
footer {
    background: linear-gradient(180deg, var(--accent-green) 0%, #2D6B60 50%, var(--bg-secondary) 100%);
    color: var(--text-primary); padding: 48px 20px 32px;
    text-align: center; margin-top: 48px; position: relative;
}
footer::before {
    content: '\25C6 \25C7 \25C6 \25C7 \25C6 \25C7 \25C6 \25C7 \25C6 \25C7 \25C6';
    display: block; text-align: center; color: var(--accent-gold);
    font-size: 10px; letter-spacing: 4px; margin-bottom: 24px; opacity: 0.5;
}
footer .container { max-width: 600px; margin: 0 auto; }
footer .footer-logo { width: 150px; height: auto; margin-bottom: 24px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3)); }
footer p { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 12px 0; font-size: 15px; }
footer a { color: var(--text-primary); text-decoration: none; transition: var(--transition); font-weight: 500; }
footer a:hover { color: var(--accent-gold); }
footer img { width: 28px; height: 28px; vertical-align: middle; border-radius: 6px; transition: var(--transition); margin-right: 0; }
footer img:hover { transform: scale(1.15); }

.review-button {
    background: var(--text-primary); color: var(--accent-green);
    padding: 16px 24px; border: none; border-radius: var(--radius-xl);
    width: 85%; max-width: 400px; margin: 28px auto; cursor: pointer;
    transition: var(--transition); box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.review-button:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(0,0,0,0.3); }
.review-button a { text-decoration: none; color: var(--accent-green); font-family: var(--font-ar); font-size: 18px; font-weight: 800; }

footer iframe { width: 100%; height: 180px; border: none; margin-top: 24px; border-radius: var(--radius-lg); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

/* ======== Responsive ======== */
@media (max-width: 768px) {
    .one-food-menu { padding: 12px; }
    .ofm-controls { top: 48px; padding: 8px 0; }
    .ofm-cat-tab { padding: 8px 16px; font-size: 13px; }
    .ofm-category__title { font-size: 20px; margin: 20px 0 16px; }
    .banner { height: 240px; }
    header .logo { width: 70px; }
    .sidebar { width: 260px; }
    footer .footer-logo { width: 120px; }
    footer { padding: 36px 16px 24px; }
    .nav-button { font-size: 13px; padding: 8px 14px; }
}
@media (max-width: 400px) {
    .one-food-menu { padding: 8px; }
    .ofm-product__title { font-size: 15px; }
    .ofm-price { font-size: 15px; }
    .ofm-product__desc { font-size: 12px; }
    footer .footer-logo { width: 100px; }
}

/* Utilities */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.ofm-line-clamp { overflow: hidden; text-overflow: ellipsis; }

/* ======== Product Detail Modal ======== */
.clickable-product { cursor: pointer; }

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.92);
    z-index: 10000; justify-content: center; align-items: center;
    overflow-y: auto; padding: 20px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.modal-container {
    position: relative;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-radius: var(--radius-xl); max-width: 700px; width: 100%;
    max-height: 92vh; overflow-y: auto; padding: 0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: modalSlideIn 0.35s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid var(--border-subtle);
}
@keyframes modalSlideIn {
    from { transform: translateY(30px) scale(0.97); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-close {
    position: absolute; top: 12px; right: 12px; font-size: 28px; color: white;
    cursor: pointer; z-index: 10001; transition: var(--transition);
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.5); border-radius: 50%; line-height: 1;
    backdrop-filter: blur(4px);
}
.modal-close:hover { background: rgba(200,149,110,0.8); color: white; transform: rotate(90deg); }
.modal-body { display: flex; flex-direction: column; }
.modal-product-image { width: 100%; max-height: 350px; object-fit: cover; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.modal-details { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-product-title { font-size: 26px; font-weight: 800; color: var(--text-primary); margin: 0; line-height: 1.4; font-family: var(--font-ar); }
.modal-product-title span { color: var(--text-muted) !important; }
.modal-product-description { font-size: 15px; color: var(--text-secondary); line-height: 1.8; margin: 0; white-space: pre-wrap; }
.modal-product-description span { color: var(--text-muted) !important; }
.modal-product-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-product-tags .ofm-tag { background: rgba(200,149,110,0.15); color: var(--accent-gold); padding: 6px 16px; border-radius: 20px; font-size: 13px; border: 1px solid rgba(200,149,110,0.2); }

.modal-product-calories {
    display: flex; align-items: center; gap: 6px;
    font-size: 15px; color: var(--calories-color); font-weight: 600;
    padding: 8px 16px; background: rgba(232,168,56,0.1);
    border-radius: var(--radius-md); border: 1px solid rgba(232,168,56,0.15); width: fit-content;
}

.modal-product-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.modal-product-size { font-size: 15px; color: var(--text-secondary); font-weight: 500; }
.modal-product-price {
    font-size: 24px; color: var(--price-color); font-weight: 800;
    background: rgba(110,207,99,0.1); padding: 8px 20px;
    border-radius: var(--radius-md); border: 1px solid rgba(110,207,99,0.15);
}

@media (min-width: 768px) {
    .modal-body { flex-direction: row; }
    .modal-product-image { width: 45%; max-height: 500px; border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
    .modal-details { flex: 1; padding: 28px; }
}
@media (max-width: 768px) {
    .modal-container { max-height: 95vh; border-radius: var(--radius-lg); }
    .modal-product-image { max-height: 280px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    .modal-product-title { font-size: 22px; }
    .modal-product-description { font-size: 14px; }
    .modal-product-price { font-size: 20px; padding: 6px 16px; }
    .modal-details { padding: 20px; gap: 12px; }
}
