:root {
  --bg: #0c0a06;
  --surface: #1e180e;
  --surface2: #2a2214;
  --border: rgba(255,255,255,0.07);
  --text: #f3ede8;
  --muted: #a89070;
  --primary: #b8902a;
  --accent: #d4a83c;
  --primary-dim: rgba(184,144,42,0.15);
  --wa: #25D366;
  --header-h: 64px;
  --bottom-nav: 64px;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  direction: rtl;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
}

/* ===== Splash ===== */
#splash {
  position: fixed; inset: 0; z-index: 999;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 40px;
  transition: opacity .4s ease, visibility .4s ease;
}
#splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-inner {
  position: relative; width: 140px; height: 140px;
  display: flex; align-items: center; justify-content: center;
}
.splash-logo {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover; position: relative; z-index: 1;
  background: var(--surface2);
}
.splash-ring {
  position: absolute; inset: 0;
  border: 4px solid rgba(184,144,42,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.splash-choice {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  opacity: 0; transform: translateY(20px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}
.splash-choice.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.splash-label { color: rgba(243,237,232,0.7); font-size: 14px; font-weight: 500; }
.splash-btns { display: flex; gap: 12px; }
.splash-btn {
  padding: 14px 26px; border-radius: 999px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: var(--text); font-weight: 600; font-size: 15px;
  transition: background .2s ease;
}
.splash-btn:hover { background: rgba(255,255,255,0.14); }
.splash-btn-primary {
  background: var(--primary); border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(184,144,42,0.35);
}
.splash-btn-primary:hover { background: var(--accent); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,8,5,0.92); backdrop-filter: blur(10px);
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.header-inner {
  max-width: 1100px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
}
.header-logo { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: var(--surface2); }

.search-wrap { flex: 1; max-width: 460px; position: relative; }
.search-icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  opacity: .45; font-size: 18px; color: var(--muted);
}
.search-wrap input {
  width: 100%; padding: 10px 14px 10px 14px; padding-right: 40px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface2); color: var(--text);
  font-size: 14px; outline: none; font-family: inherit;
}
.search-wrap input::placeholder { color: var(--muted); }
.search-wrap input:focus { border-color: var(--primary); }

.cart-icon-btn {
  position: relative; font-size: 22px;
  cursor: pointer; flex-shrink: 0; color: var(--text);
  padding: 6px;
}
.badge {
  position: absolute; top: -4px; left: -6px;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.badge.hidden { display: none; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  min-height: 60vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 20px 80px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('assets/bg-red-texture.png') center / cover no-repeat;
  animation: heroKenBurns 16s ease-in-out infinite alternate;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,8,5,.45), rgba(10,8,5,.75));
}
@keyframes heroKenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}
.hero > * { position: relative; z-index: 1; }

.hero-logo, .hero-title, .hero-sub, .hero-cta {
  opacity: 0; transform: translateY(18px);
  animation: heroFadeUp .8s cubic-bezier(.22,1,.36,1) forwards;
}
.hero-logo {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; background: var(--surface2);
  box-shadow: 0 8px 28px rgba(0,0,0,.5);
  animation-delay: 1.4s;
}
.hero-title {
  font-size: 2.2rem; font-weight: 800; margin-top: 18px;
  animation-delay: 1.6s;
}
.hero-sub { color: var(--muted); margin-top: 8px; font-size: 14px; font-weight: 500; animation-delay: 1.8s; }
.hero-cta { animation-delay: 2s; }
@keyframes heroFadeUp { to { opacity: 1; transform: translateY(0); } }

.hero-cta {
  display: inline-block; margin-top: 22px; padding: 13px 30px;
  background: var(--primary); color: #fff; border-radius: 999px;
  font-weight: 700; font-size: 14px;
  box-shadow: 0 6px 20px rgba(184,144,42,0.4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hero-cta:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 26px rgba(184,144,42,.5); }
.hero-cta:active { transform: scale(.97); }

.hero-scroll-cue {
  position: absolute; left: 50%; bottom: calc(var(--bottom-nav) + 16px);
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: var(--primary);
  opacity: 0;
  animation: heroFadeUp .8s cubic-bezier(.22,1,.36,1) forwards 2.2s,
             bounce 1.8s ease-in-out infinite 3s;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ===== Category nav pills ===== */
.category-nav {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px;
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(10,8,5,0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }

.cat-pill {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface2);
  font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer;
  white-space: nowrap; transition: all .15s ease;
  display: inline-flex; align-items: center; gap: 5px;
}
.cat-pill .material-symbols-outlined { font-size: 15px; }
.cat-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cat-pill:not(.active):hover { border-color: var(--primary); color: var(--primary); }

/* ===== Menu ===== */
.menu-main { max-width: 1100px; margin: 0 auto; padding: 16px 16px 32px; }

.section-title {
  font-size: 20px; font-weight: 700; margin: 28px 0 14px; color: var(--primary);
  display: flex; align-items: center; gap: 8px;
  border-right: 3px solid var(--primary); padding-right: 12px;
}
.no-results { text-align: center; padding: 48px 0; color: var(--muted); font-size: 15px; }
.no-results.hidden { display: none; }

.card-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 600px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.card {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--primary); }

.card-img {
  width: 100%; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); font-size: 40px; overflow: hidden;
}
.card-img .material-symbols-outlined { font-size: 40px; color: var(--muted); opacity: .5; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }

.card-body { padding: 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-name { font-size: 14px; font-weight: 600; line-height: 1.4; }
.card-desc { font-size: 11px; color: var(--muted); line-height: 1.4; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 6px; }
.card-price { font-size: 12px; font-weight: 700; color: var(--primary); direction: ltr; }
.add-btn {
  background: var(--primary); color: #fff; border-radius: 999px;
  padding: 6px 13px; font-size: 12px; font-weight: 700; cursor: pointer;
  transition: background .15s ease;
}
.add-btn:hover { background: var(--accent); }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== Toast ===== */
.toast {
  position: fixed; top: -80px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  z-index: 200; transition: top .35s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  white-space: nowrap;
}
.toast.show { top: 76px; }
.toast-check { color: #4ADE80; }

/* ===== Cart drawer (bottom) ===== */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 90;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.cart-overlay.show { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  background: var(--surface); border-radius: 20px 20px 0 0;
  max-height: 82vh; display: flex; flex-direction: column;
  transform: translateY(110%); transition: transform .35s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 -8px 36px rgba(0,0,0,.5);
}
.cart-drawer.open { transform: translateY(0); }

.cart-handle { width: 40px; height: 4px; background: var(--surface2); border-radius: 999px; margin: 12px auto 4px; flex-shrink: 0; }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 12px; flex-shrink: 0;
}
.cart-header h2 { font-size: 18px; font-weight: 700; }
.cart-header button { font-size: 20px; cursor: pointer; color: var(--muted); }

.cart-items { overflow-y: auto; padding: 0 20px; flex: 1; }
.cart-empty { text-align: center; color: var(--muted); padding: 36px 0; font-size: 14px; }

.ci {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.ci-name { flex: 1; font-size: 14px; font-weight: 500; }
.ci-qty { display: flex; align-items: center; gap: 10px; }
.ci-qty button {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.ci-price { font-size: 12px; font-weight: 700; color: var(--primary); direction: ltr; min-width: 96px; text-align: left; }

.cart-footer { padding: 14px 20px 20px; border-top: 1px solid var(--border); flex-shrink: 0; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 14px; font-size: 15px; }
#cart-total { direction: ltr; color: var(--primary); }

.whatsapp-btn {
  width: 100%; padding: 15px; border-radius: 999px;
  background: linear-gradient(135deg, #25D366, #128C7E); color: #fff;
  font-weight: 700; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* Branch options */
.branch-option {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 16px; border-radius: 12px; margin-bottom: 10px;
  font-weight: 600; font-size: 15px; cursor: pointer;
  transition: border-color .15s ease;
}
.branch-option:hover { border-color: var(--wa); }

/* ===== Bottom nav ===== */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: var(--bottom-nav); background: var(--surface);
  border-top: 1px solid var(--border); display: flex;
  box-shadow: 0 -2px 12px rgba(0,0,0,.3);
}
.bn-link {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 20px; background: none; border: none; cursor: pointer;
  color: var(--muted); text-decoration: none; position: relative;
  transition: color .15s ease;
}
.bn-link:hover, .bn-link.active { color: var(--primary); }
.bn-link span:last-child { font-size: 10px; font-weight: 600; }
.bn-icon-wrap { position: relative; display: inline-flex; }
.bn-icon-wrap .badge { top: -4px; right: -6px; left: auto; }

/* Dine-in mode */
body.dine-in .add-btn,
body.dine-in .cart-icon-btn,
body.dine-in #nav-cart-btn,
body.dine-in .whatsapp-btn,
body.dine-in .cart-drawer { display: none !important; }

/* ===== Footer ===== */
.site-footer {
  text-align: center; padding: 36px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-bottom: var(--bottom-nav);
}
.footer-logo { width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 12px; background: var(--surface2); }
.footer-brand { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.footer-phones { display: flex; gap: 20px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.footer-phone {
  font-size: 14px; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; gap: 4px;
}
.footer-phone .material-symbols-outlined { font-size: 16px; }
.footer-tag { font-size: 12px; color: var(--muted); }
.powered-by {
  display: inline-block; margin-top: 14px;
  font-size: 12px; color: var(--muted);
  text-decoration: none; opacity: .6;
  transition: opacity .2s;
}
.powered-by:hover { opacity: 1; color: var(--primary); }

/* Cart badge pop on add */
@keyframes badgePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  70%  { transform: scale(.85); }
  100% { transform: scale(1); }
}
.badge.pop { animation: badgePop .35s ease; }

@media (min-width: 900px) {
  .bottom-nav { display: none; }
  .site-footer { margin-bottom: 0; }
}
