/* ╔══════════════════════════════════════════════════════════════════╗
   ║   Loongdingxuan — catalogue styles                                ║
   ║   Shared by menu.html, menu_ar.html and menu_zh.html.             ║
   ║   Language-specific type is set per page via --font-body /        ║
   ║   --font-display; direction is handled by body.rtl below.         ║
   ╚══════════════════════════════════════════════════════════════════╝ */

:root {
    --bg-main: #2B4B3E;
    --bg-sec: #1e3a2f;
    --bg-card: #244035;
    --accent: #D2A67A;
    --accent-light: #e8c8a0;
    --cream: #FDEBD2;
    --text-main: #F5EDD8;
    --text-muted: #b8a890;
    --border: rgba(210,166,122,0.22);
    --trans: all 0.4s cubic-bezier(0.25,0.8,0.25,1);
    --shadow: 0 15px 35px rgba(0,0,0,0.4);
    --gradient: linear-gradient(135deg, #D2A67A 0%, #b8865a 100%);
    --gradient-gold: linear-gradient(135deg, #f0d4a0 0%, #D2A67A 50%, #b8865a 100%);
    --green: #4ADE80;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-sec); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { background: var(--bg-main); color: var(--text-main); font-family: var(--font-body); overflow-x: hidden; line-height: 1.6; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: 1px; }
a { text-decoration: none; transition: var(--trans); color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; transition: var(--trans); }

/* PRELOADER */
#preloader { position: fixed; inset: 0; background: var(--bg-main); z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.6s ease, visibility 0.6s ease; }
#preloader.hidden { opacity: 0; visibility: hidden; }
.loader-dragon { display: flex; flex-direction: column; align-items: center; }
.loader-logo { width: 120px; height: auto; animation: pulseLogo 1.5s ease-in-out infinite; }
@keyframes pulseLogo { 0% { transform: scale(0.95); opacity: 0.6; } 50% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(0.95); opacity: 0.6; } }

/* LANG BAR */
.lang-bar { position: fixed; top: 0; left: 0; width: 100%; z-index: 1001; display: flex; justify-content: flex-end; padding: 6px 20px; gap: 6px; background: rgba(13,11,8,0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.lang-btn { padding: 4px 14px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; color: var(--text-muted); border: 1px solid var(--border); background: transparent; transition: var(--trans); }
.lang-btn:hover, .lang-btn.active { background: var(--gradient); color: #fff; border-color: transparent; }

/* NAV */
nav { position: fixed; top: 36px; width: 100%; padding: 18px 5%; display: flex; justify-content: space-between; align-items: center; z-index: 1000; transition: var(--trans); }
nav.scrolled { background: rgba(27,58,44,0.95); backdrop-filter: blur(15px); padding: 10px 5%; border-bottom: 1px solid var(--border); box-shadow: 0 5px 20px rgba(0,0,0,0.5); }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 40px; width: auto; object-fit: contain; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text-main); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--accent); transition: var(--trans); }
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--accent); }
.hamburger { display: none; font-size: 1.4rem; cursor: pointer; color: var(--text-main); z-index: 1001; }

/* HERO STRIP */
.menu-hero { padding: 140px 5% 60px; text-align: center; background: linear-gradient(rgba(13,11,8,0.55), rgba(43,75,62,1)), url('images/bg.jpg') center/cover no-repeat; position: relative; }
.menu-hero > span { display: block; color: var(--accent); font-size: 0.85rem; letter-spacing: 5px; text-transform: uppercase; font-weight: 700; margin-bottom: 12px; }
.menu-hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); margin-bottom: 14px; }
.menu-hero h1 em { font-style: normal; background: var(--gradient-gold); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.menu-hero p { color: var(--text-muted); font-size: 1rem; max-width: 560px; margin: 0 auto; }
.divider { width: 50px; height: 3px; background: var(--accent); margin: 18px auto 0; border-radius: 10px; }

/* MAIN CONTENT */
.menu-section { padding: 60px 5% 120px; max-width: 1200px; margin: 0 auto; }

/* CATEGORY TABS */
.menu-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 50px; }
.menu-tab { color: var(--text-muted); font-size: 0.88rem; font-weight: 700; text-transform: uppercase; padding: 11px 22px; border-radius: 50px; background: var(--bg-sec); border: 1px solid var(--border); transition: var(--trans); }
.menu-tab.active, .menu-tab:hover { color: #fff; background: var(--gradient); border-color: transparent; box-shadow: 0 5px 15px rgba(210,166,122,0.3); }

/* MENU GRID */
.menu-cat { display: none; animation: fadeIn 0.5s ease-out; }
.menu-cat.active { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

/* MENU CARD */
.menu-card { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 18px; background: var(--bg-card); border: 1px solid transparent; transition: var(--trans); }
.menu-card:hover { border-color: var(--border); transform: translateY(-4px); box-shadow: var(--shadow); }
.menu-card.in-cart { border-color: var(--accent); background: rgba(210,166,122,0.06); }
.menu-img-wrap { width: 90px; height: 90px; flex-shrink: 0; overflow: hidden; border-radius: 14px; background: var(--bg-sec); }
.menu-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.menu-card:hover .menu-img-wrap img { transform: scale(1.1); }
.menu-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; background: linear-gradient(135deg, var(--bg-sec), var(--bg-main)); }
.card-info { flex: 1; min-width: 0; }
.card-code { font-size: 0.66rem; font-weight: 700; letter-spacing: 1.5px; color: var(--accent); opacity: 0.75; margin-bottom: 2px; }
.card-name { font-size: 0.95rem; font-weight: 700; color: var(--text-main); margin-bottom: 2px; }
.card-native { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.card-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.45; margin-bottom: 6px; }
.card-price { font-size: 0.95rem; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 2px 7px; border-radius: 50px; }
.tag.veg { background: rgba(74,222,128,0.14); color: var(--green); border: 1px solid rgba(74,222,128,0.3); }
.tag.spicy { background: rgba(239,68,68,0.14); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.halal-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 7px 18px; border-radius: 50px; border: 1px solid var(--border); background: rgba(210,166,122,0.08); color: var(--accent-light); font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.card-actions { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.add-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--gradient); color: #fff; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; transition: var(--trans); box-shadow: 0 4px 12px rgba(210,166,122,0.3); }
.add-btn:hover { transform: scale(1.15); box-shadow: 0 6px 18px rgba(210,166,122,0.5); }
.qty-ctrl { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 28px; height: 28px; border-radius: 50%; background: rgba(210,166,122,0.14); border: 1px solid rgba(210,166,122,0.3); color: var(--accent); font-size: 0.9rem; display: flex; align-items: center; justify-content: center; transition: var(--trans); }
.qty-btn:hover { background: rgba(210,166,122,0.28); }
.qty-count { font-size: 0.9rem; font-weight: 700; min-width: 20px; text-align: center; color: var(--text-main); }

/* CART FLOATING BAR */
.cart-float { position: fixed; bottom: 0; left: 0; right: 0; z-index: 500; padding: 1rem 5%; background: rgba(27,58,44,0.97); backdrop-filter: blur(20px); border-top: 1px solid var(--border); transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.22,1,0.36,1); }
.cart-float.visible { transform: translateY(0); }
.cart-float-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cart-info { display: flex; flex-direction: column; gap: 2px; }
.cart-item-count { font-size: 0.88rem; font-weight: 600; }
.cart-item-count span { color: var(--accent); }
.cart-total-preview { font-size: 0.82rem; color: var(--text-muted); }
.checkout-btn { background: var(--gradient); color: #fff; border: none; border-radius: 50px; padding: 0.85rem 2.2rem; font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: var(--trans); white-space: nowrap; display: flex; align-items: center; gap: 0.5rem; }
.checkout-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(210,166,122,0.4); }
.cart-badge { background: var(--accent); color: #fff; width: 22px; height: 22px; border-radius: 50%; font-size: 0.72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* TOAST */
.toast { position: fixed; bottom: 6rem; left: 50%; transform: translateX(-50%) translateY(100px); background: rgba(27,58,44,0.98); backdrop-filter: blur(15px); border: 1px solid var(--border); border-radius: 50px; padding: 0.8rem 1.5rem; font-size: 0.88rem; font-weight: 500; z-index: 10000; transition: transform 0.4s cubic-bezier(0.22,1,0.36,1); white-space: nowrap; pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(210,166,122,0.4); color: var(--accent); }

/* BACK TO TOP */
.back-to-top { position: fixed; right: 25px; bottom: 80px; width: 45px; height: 45px; background: var(--gradient); color: #fff; display: flex; justify-content: center; align-items: center; border-radius: 50%; z-index: 400; box-shadow: 0 10px 20px rgba(0,0,0,0.3); transition: var(--trans); opacity: 0; visibility: hidden; transform: translateY(20px); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-5px) scale(1.1); }

/* RESPONSIVE */
@media (max-width: 992px) {
    .menu-cat.active { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (max-width: 768px) {
    nav { padding: 12px 5%; }
    .nav-links { position: fixed; top: 0; right: -100%; width: 82%; height: 100vh; background: var(--bg-sec); flex-direction: column; justify-content: center; transition: 0.6s cubic-bezier(0.77,0.2,0.05,1.0); box-shadow: -15px 0 40px rgba(0,0,0,0.7); z-index: 1000; }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.3rem; margin: 12px 0; }
    .hamburger { display: block; }
    .menu-hero { padding: 120px 5% 40px; }
    .menu-cat.active { grid-template-columns: 1fr; }
    .back-to-top { bottom: 90px; right: 18px; }
}
@media (max-width: 480px) {
    .menu-card { flex-direction: column; align-items: flex-start; }
    .menu-img-wrap { width: 100%; height: 160px; }
    .card-actions { flex-direction: row; width: 100%; justify-content: flex-end; }
}

/* ─── RIGHT-TO-LEFT (Arabic) ───────────────────────────────────────────
   Direction-aware rules only. Everything above is shared by all three
   language editions of the catalogue.                                   */
body.rtl { direction: rtl; text-align: right; }
body.rtl .lang-bar { flex-direction: row-reverse; justify-content: flex-start; }
body.rtl .menu-card { flex-direction: row-reverse; }
body.rtl .nav-links a::after { left: auto; right: 0; }
body.rtl .card-price { flex-direction: row-reverse; }
body.rtl .cart-float-inner { flex-direction: row-reverse; }
body.rtl .cart-info { text-align: right; }
body.rtl .back-to-top { right: auto; left: 25px; }
@media (max-width: 768px) {
    body.rtl .nav-links { right: auto; left: -100%; box-shadow: 15px 0 40px rgba(0,0,0,0.7); }
    body.rtl .nav-links.active { left: 0; }
    body.rtl .back-to-top { left: 18px; right: auto; }
}
@media (max-width: 480px) {
    body.rtl .menu-card { flex-direction: column; align-items: flex-end; }
    body.rtl .card-actions { justify-content: flex-start; }
}
