/* ============================================================
   Digital Menu v3 — Premium 2026
   40% Uber Eats · 30% Talabat · 20% Apple · 10% Stripe
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Cairo:wght@400;500;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --brand:     var(--brand-color, #0F766E);
  --brand-2:   #14B8A6;
  --accent:    #FFB000;
  --success:   #10B981;
  --danger:    #EF4444;

  --bg:        #F8FAFC;
  --surf:      #FFFFFF;
  --text:      #111827;
  --text-2:    #374151;
  --muted:     #6B7280;
  --dim:       #9CA3AF;
  --border:    #E5E7EB;
  --ghost:     #F3F4F6;

  --r-card:    20px;
  --r-chip:    999px;
  --r-sheet:   28px;

  --sh-card:   0 2px 12px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.03);
  --sh-lift:   0 10px 36px rgba(0,0,0,.13), 0 0 0 1px rgba(0,0,0,.04);
  --sh-sheet:  0 -6px 40px rgba(0,0,0,.14);
  --sh-brand:  0 8px 28px rgba(15,118,110,.32);

  --font:    'Poppins', sans-serif;
  --font-ar: 'Cairo', sans-serif;

  --spring:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-o:  cubic-bezier(0.33, 1, 0.68, 1);

  --hero-h:  280px;
  --tab-h:   48px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img  { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a    { color: inherit; text-decoration: none; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overscroll-behavior-y: contain;
}
[lang="ar"] * { font-family: var(--font-ar); }

/* ── App root ───────────────────────────────────────────────── */
.dm { position: relative; }
.dm-page { padding-bottom: env(safe-area-inset-bottom, 24px); }

/* ── Splash ─────────────────────────────────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 999;
  background: var(--surf);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 1.5rem;
  transition: opacity .5s var(--ease-o), transform .5s var(--ease-o);
}
.splash--gone { opacity: 0; transform: scale(.97); pointer-events: none; }
.splash-icon {
  width: 72px; height: 72px; border-radius: 18px;
  background: rgba(15,118,110,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  overflow: hidden;
}
.splash-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.splash-dots { display: flex; gap: 5px; }
.splash-dots i {
  display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
  animation: dotPop 1.1s var(--spring) infinite;
}
.splash-dots i:nth-child(2) { animation-delay: .13s; }
.splash-dots i:nth-child(3) { animation-delay: .26s; }

/* ── Hero image (full-bleed, Toters-style) ──────────────────── */
.hero {
  position: relative;
  height: var(--hero-h);
  background: var(--brand);
  overflow: visible;
}
.hero-cover {
  position: absolute; inset: 0;
  overflow: hidden;
  will-change: transform;
}
.hero-cover img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-cover--plain {
  background: linear-gradient(140deg, var(--brand) 0%, var(--brand-2) 100%);
}
/* Very light bottom gradient — just to soften the edge */
.hero-grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.0) 50%, rgba(0,0,0,.08) 100%);
  pointer-events: none;
}

/* Action buttons — top corners */
.hero-actions {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 10;
}
.glass-btn {
  height: 36px; min-width: 36px; padding: 0 12px;
  border-radius: var(--r-chip);
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-size: .78rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: background .18s;
  letter-spacing: .02em;
}
.glass-btn svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.glass-btn:hover { background: rgba(255,255,255,.32); }
.hero-actions-left  { display: flex; gap: 8px; }
.hero-actions-right { display: flex; gap: 8px; }

/* ── Restaurant info card (Toters white card overlapping hero) ── */
.rest-card {
  background: var(--surf);
  border-radius: 24px 24px 0 0;
  padding: 18px 16px 14px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--ghost);
  margin-top: -28px;
  position: relative; z-index: 10;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.rest-logo {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--ghost);
  overflow: hidden;
}
.rest-logo img { width: 100%; height: 100%; object-fit: cover; }
.rest-logo-ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.rest-info { flex: 1; min-width: 0; }
.rest-name {
  font-size: 1.1rem; font-weight: 800; color: var(--text);
  letter-spacing: -.02em; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rest-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 5px; }
.rest-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; color: var(--muted); font-weight: 500;
}
.rest-tag--open { color: var(--success); font-weight: 600; }
.rest-tag--open::before { content: '●'; font-size: .55rem; }

/* ── Sticky nav ─────────────────────────────────────────────── */
.sticky-nav {
  position: sticky; top: 0; z-index: 200;
}

/* Search overlay (shown when search active, replaces cats bar) */
.search-overlay {
  display: none;
  align-items: center; gap: 10px;
  background: var(--surf);
  padding: 10px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border-bottom: 1px solid var(--ghost);
}
.search-overlay--open { display: flex; }
.search-field {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--ghost);
  border: 1.5px solid transparent;
  border-radius: var(--r-chip);
  padding: 0 14px;
  transition: border-color .2s, box-shadow .2s;
}
.search-field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,118,110,.1);
  background: var(--surf);
}
.search-field svg { width: 15px; height: 15px; stroke: var(--muted); flex-shrink: 0; fill: none; stroke-width: 2; stroke-linecap: round; }
#searchInput {
  flex: 1; border: none; background: transparent;
  font-family: inherit; font-size: .9rem; color: var(--text);
  padding: .65rem 0; outline: none;
}
#searchInput::placeholder { color: var(--dim); }
.search-cancel {
  font-size: .85rem; font-weight: 600; color: var(--brand);
  padding: .5rem 0; flex-shrink: 0;
}

/* Category bar */
.cats-bar {
  background: var(--surf);
  border-bottom: 1px solid var(--ghost);
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}
.cats-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cats-scroll::-webkit-scrollbar { display: none; }
.cats-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  min-width: 100%;
  position: relative;
}
.cat-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 18px;
  border-radius: var(--r-chip);
  background: var(--ghost);
  border: 1.5px solid transparent;
  font-size: .88rem; font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.cat-btn--active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 3px 12px rgba(15,118,110,.28);
}
.cat-btn:not(.cat-btn--active):hover {
  background: #e8f5f4;
  color: var(--brand);
  border-color: rgba(15,118,110,.2);
}
.cat-btn:active { transform: scale(.93); }
.cat-emoji { font-size: 1rem; line-height: 1; }

/* Indicator hidden — pills replace the underline */
.cat-indicator { display: none; }

/* ── Menu body ──────────────────────────────────────────────── */
.menu-body { padding: 0 0 2rem; }
.menu-body--search { padding-top: 4px; }

/* ── Skeleton (horizontal) ──────────────────────────────────── */
.skel-grid {
  display: flex; flex-direction: column;
  gap: 1px;
  padding: 16px 0 0;
  background: var(--ghost);
}
.skel-card {
  background: var(--surf);
  display: flex; align-items: center;
  padding: 14px 16px; gap: 14px;
}
.skel-img  {
  flex-shrink: 0; width: 90px; height: 90px;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--ghost) 25%, #e9ebee 50%, var(--ghost) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
}
.skel-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skel-line {
  height: 9px; border-radius: 4px;
  background: linear-gradient(90deg, var(--ghost) 25%, #e9ebee 50%, var(--ghost) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
}
.skel-line--sm  { width: 55%; }
.skel-line--xs  { width: 30%; height: 12px; }

/* ── Menu sections ──────────────────────────────────────────── */
.menu-section {
  padding: 24px 0 0;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--spring), transform .5s var(--spring);
}
.menu-section--in { opacity: 1; transform: translateY(0); }

.section-head {
  font-size: 1.1rem; font-weight: 800;
  color: var(--text); letter-spacing: -.02em;
  margin-bottom: 0;
  padding: 0 16px;
  line-height: 1.3;
}

/* ── Card list ──────────────────────────────────────────────── */
.cards-grid {
  display: flex; flex-direction: column;
  background: var(--ghost);
  gap: 1px;
  border-radius: 0;
  overflow: hidden;
}

/* ── Food card (horizontal Uber Eats style) ─────────────────── */
.card {
  background: var(--surf);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity   .38s var(--spring),
    transform .38s var(--spring),
    background .15s;
  -webkit-tap-highlight-color: transparent;
  outline: 2px solid transparent;
  outline-offset: -2px;
}
.card--in      { opacity: 1; transform: translateX(0); }
.card:hover    { background: #f9fffe; }
.card:active   { background: var(--ghost) !important; transition-duration: .08s; }
.card:focus-visible { outline-color: var(--brand); }

/* card text block — left side */
.card-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.card-name {
  font-size: .97rem; font-weight: 700; color: var(--text);
  line-height: 1.3; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-desc {
  font-size: .78rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  line-height: 1.5;
}
.card-foot { margin-top: 6px; }
.card-price {
  font-size: .97rem; font-weight: 800; color: var(--brand);
  letter-spacing: -.015em;
}

/* card thumbnail — right side */
.card-img {
  flex-shrink: 0;
  width: 100px; height: 100px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #e8f5f4 0%, #d1ede9 100%);
}
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s var(--ease-o), opacity .3s;
  opacity: 0;
}
.card-img img.loaded { opacity: 1; }
.card:hover .card-img img { transform: scale(1.06); }
.card-img-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--brand); opacity: .35;
}

/* Toters-style + button on thumbnail corner */
.card-add {
  position: absolute;
  bottom: 6px; right: 6px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 1.2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
  transition: transform .18s var(--spring), background .15s;
  pointer-events: auto;
}
[dir="rtl"] .card-add { right: auto; left: 6px; }
.card:hover .card-add { transform: scale(1.12); background: var(--brand-2); }
.card:active .card-add { transform: scale(.9); }

/* RTL: image on the left */
[dir="rtl"] .card { flex-direction: row-reverse; }

/* ── Item detail bottom sheet ───────────────────────────────── */
.backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.52);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-o);
}
.backdrop--on { opacity: 1; pointer-events: auto; }

.item-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 640px; margin: 0 auto;
  z-index: 400;
  background: var(--surf);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--sh-sheet);
  max-height: 88dvh;
  display: flex; flex-direction: column;
  transform: translateY(110%);
  transition: transform .42s var(--spring);
  will-change: transform;
}
.item-sheet--open { transform: translateY(0); }

/* drag handle — hidden */
.sheet-drag { display: none; }
.sheet-handle {
  width: 38px; height: 4px;
  border-radius: var(--r-chip);
  background: var(--border);
}

/* sheet image */
.sheet-img-wrap {
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: var(--ghost);
  /* Rounded only at top because sheet is already rounded */
  border-radius: calc(var(--r-sheet) - 1px) calc(var(--r-sheet) - 1px) 0 0;
}
.sheet-img-wrap::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(to top, rgba(255,255,255,.95), transparent);
  pointer-events: none;
}
#sheetImg {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  transition: opacity .3s;
}
.sheet-no-img {
  width: 100%; aspect-ratio: 16/10;
  display: none;
  align-items: center; justify-content: center;
  font-size: 5rem; color: var(--brand); opacity: .25;
  background: linear-gradient(135deg, #f0fffe, #e4f5f3);
}
.sheet-close {
  position: absolute; top: 10px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.38);
  color: rgba(255,255,255,.95); font-size: .75rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  z-index: 5;
}
[dir="rtl"] .sheet-close { right: auto; left: 14px; }
.sheet-close:hover { background: rgba(0,0,0,.55); }

/* scrollable content */
.sheet-scroll {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  flex: 1; min-height: 0;
}
.sheet-body { padding: 18px 20px 36px; }

.sheet-meta {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.sheet-name {
  font-size: 1.25rem; font-weight: 800; color: var(--text);
  letter-spacing: -.025em; line-height: 1.2; flex: 1;
}
.sheet-price {
  font-size: 1.2rem; font-weight: 800; color: var(--brand);
  letter-spacing: -.02em; flex-shrink: 0;
}
.sheet-desc {
  font-size: .88rem; color: var(--muted); line-height: 1.65;
}

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 4rem 2rem;
  text-align: center; gap: .8rem;
}
.empty-emoji { font-size: 3.5rem; line-height: 1; }
.empty-state h3 { font-size: 1.05rem; font-weight: 700; }
.empty-state p  { font-size: .88rem; color: var(--muted); }

/* ── Footer ─────────────────────────────────────────────────── */
.menu-footer {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  padding: 1.5rem 1rem 1rem;
}
.f-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: .65rem 1.4rem; border-radius: var(--r-chip);
  font-size: .86rem; font-weight: 600;
  transition: opacity .2s, transform .15s;
}
.f-btn:active { opacity: .85; transform: scale(.97); }
.f-btn--wa   { background: #25D366; color: #fff; }
.f-btn--maps { background: #4285F4; color: #fff; }
.f-btn--wa svg, .f-btn--maps svg { width: 17px; height: 17px; fill: currentColor; }
.menu-hours  { width: 100%; text-align: center; font-size: .77rem; color: var(--dim); }
.powered-by  { width: 100%; text-align: center; font-size: .67rem; color: #C7C7CC; letter-spacing: .05em; }

/* ── Item badges (on cards) ─────────────────────────────────── */
.item-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: var(--r-chip);
  font-size: .68rem; font-weight: 700; letter-spacing: .01em;
  margin-bottom: 4px; line-height: 1.6;
}
.item-badge--popular { background: rgba(255,176,0,.14); color: #92600A; }
.item-badge--new     { background: rgba(20,184,166,.12); color: #0F766E; }
.item-badge--sold_out{ background: rgba(239,68,68,.1);  color: #B91C1C; }

/* sold-out card */
.card--sold-out { opacity: .6; }
.card--sold-out .card-price { text-decoration: line-through; color: var(--dim); }
.card--sold-out .card-add   { background: var(--dim) !important; cursor: not-allowed; }

/* ── Dietary icons (on cards) ───────────────────────────────── */
.dietary-row { display: flex; gap: 4px; margin-top: 5px; }
.diet-icon   { font-size: .82rem; line-height: 1; opacity: .8; }

/* ── Table badge (in rest-card) ─────────────────────────────── */
.table-badge {
  display: none;
  align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-chip);
  background: rgba(15,118,110,.1); color: var(--brand);
  font-size: .75rem; font-weight: 700;
  margin-left: auto; flex-shrink: 0;
}
[dir="rtl"] .table-badge { margin-left: 0; margin-right: auto; }

/* ── Fullscreen item view ────────────────────────────────────── */
.fs-view {
  position: fixed; inset: 0; z-index: 600;
  background: #000;
  display: flex; flex-direction: column;
  transform: translateY(105%);
  transition: transform .45s var(--spring);
  will-change: transform;
  overscroll-behavior: contain;
}
.fs-view--open { transform: translateY(0); }

/* hero image */
.fs-img {
  flex: 1; position: relative; overflow: hidden; min-height: 0;
}
.fs-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .35s;
}
.fs-grad {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.9)  0%,
    rgba(0,0,0,.35) 45%,
    rgba(0,0,0,.1)  100%
  );
  pointer-events: none;
}
.fs-no-img {
  width: 100%; height: 100%;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 6rem; opacity: .3;
}

/* top controls */
.fs-topbar {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: 14px; right: 14px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 10;
}
.fs-close {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s;
}
.fs-close:hover { background: rgba(0,0,0,.6); }

/* swipe dots */
.fs-dots {
  display: flex; gap: 5px; align-items: center;
}
.fs-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.35);
  transition: background .2s, transform .2s;
}
.fs-dot--active { background: #fff; transform: scale(1.4); }

/* content area floating over gradient */
.fs-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 20px calc(env(safe-area-inset-bottom, 0px) + 28px);
  z-index: 5;
}
.fs-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px; border-radius: var(--r-chip);
  font-size: .72rem; font-weight: 700;
  margin-bottom: 10px;
}
.fs-badge--popular { background: var(--accent); color: #000; }
.fs-badge--new     { background: var(--brand-2); color: #fff; }
.fs-badge--sold_out{ background: var(--danger);  color: #fff; }

.fs-name {
  font-size: 1.75rem; font-weight: 800; color: #fff;
  letter-spacing: -.03em; line-height: 1.15; margin-bottom: 6px;
}
.fs-desc {
  font-size: .88rem; color: rgba(255,255,255,.7);
  line-height: 1.6; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fs-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.fs-price {
  font-size: 1.5rem; font-weight: 800; color: var(--accent);
  letter-spacing: -.025em;
}
.fs-dietary {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
.fs-diet-chip {
  font-size: 1.25rem; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}

/* desktop prev/next arrows */
.fs-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 10; transition: background .18s;
}
.fs-nav:hover { background: rgba(255,255,255,.28); }
.fs-nav--prev { left: 14px; }
.fs-nav--next { right: 14px; }
@media (max-width: 640px) { .fs-nav { display: none; } }

/* ── Cart FAB ───────────────────────────────────────────────── */
.cart-fab {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  left: 50%; transform: translateX(-50%) translateY(24px);
  z-index: 500;
  height: 54px; min-width: 190px;
  padding: 0 22px;
  border-radius: var(--r-chip);
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 8px 28px rgba(15,118,110,.38);
  font-size: .95rem; font-weight: 700;
  opacity: 0; pointer-events: none;
  transition: transform .38s var(--spring), opacity .3s;
  white-space: nowrap;
}
.cart-fab--visible {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.cart-fab-icon { font-size: 1.1rem; }
.cart-fab-badge {
  background: var(--accent); color: #000;
  min-width: 22px; height: 22px; border-radius: 999px;
  padding: 0 5px;
  font-size: .72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.cart-fab-sep { opacity: .35; font-weight: 300; }
.cart-fab-total { font-size: .9rem; opacity: .92; }

/* ── Cart sheet ─────────────────────────────────────────────── */
.cart-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 640px; margin: 0 auto;
  z-index: 550;
  background: var(--surf);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  box-shadow: var(--sh-sheet);
  max-height: 82dvh;
  display: flex; flex-direction: column;
  transform: translateY(110%);
  transition: transform .42s var(--spring);
  will-change: transform;
}
.cart-sheet--open { transform: translateY(0); }

.cart-handle-bar {
  width: 38px; height: 4px; border-radius: 999px;
  background: var(--border);
  margin: 10px auto 0;
  flex-shrink: 0;
}
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--ghost);
  flex-shrink: 0;
}
.cart-header h3 { font-size: 1rem; font-weight: 800; }
.cart-close-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ghost); color: var(--muted);
  font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}

.cart-items { overflow-y: auto; flex: 1; min-height: 0; padding: 6px 0; }

.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: .9rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-item-price { font-size: .82rem; font-weight: 700; color: var(--brand); margin-top: 2px; }

.cart-qty-ctrl { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.cart-qty-btn {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ghost); color: var(--text);
  font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.cart-qty-btn:hover { background: var(--border); }
.cart-qty-num {
  width: 28px; text-align: center;
  font-size: .9rem; font-weight: 700;
}

.cart-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: .6rem; padding: 2.5rem 1rem; color: var(--muted);
  font-size: .88rem;
}
.cart-empty span { font-size: 2.5rem; }

.cart-footer {
  padding: 14px 20px calc(env(safe-area-inset-bottom, 0px) + 16px);
  border-top: 1px solid var(--ghost);
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.cart-total-row {
  display: flex; justify-content: space-between; align-items: center;
}
.cart-total-label { font-size: .9rem; color: var(--muted); font-weight: 500; }
.cart-total-value { font-size: 1.15rem; font-weight: 800; color: var(--text); }

.cart-wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #25D366; color: #fff;
  padding: .9rem; border-radius: var(--r-chip);
  font-size: .95rem; font-weight: 700;
  transition: opacity .2s, transform .15s;
}
.cart-wa-btn:active { opacity: .85; transform: scale(.98); }
.cart-wa-btn svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

/* ── Add to Order button in fullscreen view ─────────────────── */
.fs-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 14px;
  padding: .85rem;
  border-radius: var(--r-chip);
  background: var(--accent); color: #000;
  font-size: .95rem; font-weight: 800;
  transition: transform .15s var(--spring), opacity .15s;
}
.fs-add-btn:active { transform: scale(.97); opacity: .9; }
.fs-add-btn--in-cart { background: var(--success); color: #fff; }

/* ── Card qty badge (replaces + when item in cart) ──────────── */
.card-qty {
  position: absolute; bottom: 6px; right: 6px;
  height: 28px; min-width: 28px; padding: 0 7px;
  border-radius: 999px;
  background: var(--brand); color: #fff;
  font-size: .78rem; font-weight: 800;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
  pointer-events: none;
}
.card-qty--visible { display: flex; }
[dir="rtl"] .card-qty { right: auto; left: 6px; }

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes dotPop {
  0%, 80%, 100% { transform: scale(.55) translateY(0); opacity: .5; }
  40%            { transform: scale(1)   translateY(-7px); opacity: 1; }
}

/* ── Responsive (tablet / desktop) ─────────────────────────── */
@media (min-width: 640px) {
  :root { --hero-h: 340px; }
  .hero-name    { font-size: 1.5rem; }
  .hero-logo    { width: 68px; height: 68px; }
  .section-head { font-size: 1.05rem; }
  .card         { padding: 18px 20px; }
  .card-img     { width: 110px; height: 110px; }
}

@media (min-width: 768px) {
  .dm-page     { max-width: 640px; margin: 0 auto; }
}

/* ── RTL overrides ──────────────────────────────────────────── */
[dir="rtl"] .cat-indicator { right: 0; left: auto; }

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
