/* ====================================================
   QR Menu - Public Stylesheet
   Modern, mobile-first, RTL-aware
   ==================================================== */
:root {
  --primary: #e74c3c;
  --primary-rgb: 231, 76, 60;
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
}
[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font, 'Poppins', 'Segoe UI', system-ui, sans-serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  transition: background .3s, color .3s;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ============== Header ============== */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.95), rgba(var(--primary-rgb), 0.75)), url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=1200&q=70') center/cover;
  color: #fff;
  padding: 40px 20px 80px;
  text-align: center;
}
.hero::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 30px;
  background: var(--bg);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}
.hero-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }
.hero .logo {
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 3px solid rgba(255,255,255,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  margin: 0 auto 14px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.hero .logo img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.5px; }
.hero .desc { opacity: 0.9; font-size: 14px; max-width: 500px; margin: 0 auto; }

.info-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex; gap: 14px;
  align-items: center; justify-content: center; flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}
.info-bar a, .info-bar span { display: inline-flex; align-items: center; gap: 4px; }
.info-bar .sep { opacity: 0.4; }
.lang-switcher { display: inline-flex; gap: 4px; background: var(--bg); padding: 3px; border-radius: 20px; }
.lang-switcher a {
  padding: 4px 10px; border-radius: 16px; font-size: 11px; font-weight: 600;
  transition: all .2s;
}
.lang-switcher a.active { background: var(--primary); color: #fff; }
.theme-toggle {
  background: var(--bg); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; transition: transform .3s;
}
.theme-toggle:hover { transform: rotate(20deg); }

/* ============== Sticky search + categories ============== */
.sticky-bar {
  position: sticky; top: 50px; z-index: 40;
  background: var(--bg);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
}
.search-wrap {
  max-width: 600px; margin: 0 auto 12px;
  position: relative;
}
.search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 14px;
  color: var(--text);
  transition: all .2s;
}
.search-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}
.search-wrap::before {
  content: '🔍'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 16px; opacity: 0.5;
}

.cat-nav {
  display: flex; gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 4px 8px;
  max-width: 100%;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  transition: all .2s;
  flex-shrink: 0;
}
.cat-pill:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.cat-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.cat-pill .icon { font-size: 16px; }

/* ============== Container ============== */
.container { max-width: 1100px; margin: 0 auto; padding: 24px 16px 100px; }

.featured-section { margin-bottom: 36px; }
.section-title {
  font-size: 20px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.section-title .badge-star { color: #f59e0b; }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  transition: all .2s;
}
.featured-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.featured-card .img {
  width: 100px; flex-shrink: 0;
  background: var(--bg);
  position: relative; overflow: hidden;
}
.featured-card .img img { width: 100%; height: 100%; object-fit: cover; }
.featured-card .body { padding: 12px 14px; flex: 1; min-width: 0; }
.featured-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.featured-card .price { color: var(--primary); font-weight: 700; font-size: 15px; }

/* ============== Category section ============== */
.category-section { margin-bottom: 40px; scroll-margin-top: 130px; }
.cat-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}
.cat-header .icon { font-size: 24px; }
.cat-header h2 { font-size: 22px; font-weight: 700; }

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  transition: all .25s;
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.product-card.unavailable { opacity: 0.55; }
.product-card .img-wrap {
  width: 110px; flex-shrink: 0;
  background: var(--bg);
  position: relative; overflow: hidden;
}
.product-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .body { padding: 12px 14px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.product-card h3 {
  font-size: 15px; font-weight: 600; margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.product-card .desc {
  color: var(--text-muted); font-size: 12.5px; line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .meta {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto;
  font-size: 11px; color: var(--text-muted);
}
.product-card .price-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 8px;
}
.product-card .price { font-size: 17px; font-weight: 700; color: var(--primary); }
.product-card .old-price {
  text-decoration: line-through; color: var(--text-muted);
  font-size: 12px; margin-left: 4px; font-weight: 500;
}

.tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 10.5px; font-weight: 500;
}
.tag.veg { background: #d1fae5; color: #065f46; }
.tag.vegan { background: #bbf7d0; color: #14532d; }
.tag.spicy { background: #fee2e2; color: #991b1b; }
.tag.gluten { background: #fef3c7; color: #92400e; }
.tag.new { background: #dbeafe; color: #1e40af; }
.tag.featured { background: #fde68a; color: #78350f; }

[data-theme="dark"] .tag.veg { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .tag.vegan { background: #14532d; color: #86efac; }
[data-theme="dark"] .tag.spicy { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .tag.gluten { background: #78350f; color: #fcd34d; }
[data-theme="dark"] .tag.new { background: #1e3a8a; color: #93c5fd; }
[data-theme="dark"] .tag.featured { background: #78350f; color: #fcd34d; }

/* ============== Modal ============== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .2s;
}
.modal-overlay.open { display: flex; }
@keyframes fadeIn { from {opacity:0} to {opacity:1} }
.modal {
  background: var(--surface);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  animation: slideUp .3s;
}
@keyframes slideUp { from {transform: translateY(100%)} to {transform: translateY(0)} }
@media (min-width: 600px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: 24px; max-height: 85vh; }
}
.modal-img {
  width: 100%; height: 220px;
  background: var(--bg);
  position: relative; overflow: hidden;
}
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(0,0,0,0.5); color: #fff;
  border: none; width: 36px; height: 36px;
  border-radius: 50%; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.modal-body { padding: 20px; }
.modal-body h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.modal-body .price { font-size: 24px; font-weight: 700; color: var(--primary); margin: 12px 0; }
.modal-body .desc { color: var(--text-muted); line-height: 1.6; font-size: 14px; margin-bottom: 16px; }
.modal-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.allergen-list {
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 13px;
}
.allergen-list strong { display: block; margin-bottom: 4px; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

/* ============== Floating waiter button ============== */
.fab {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 60;
  background: var(--primary);
  color: #fff;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.4);
  transition: transform .2s;
}
.fab:hover { transform: scale(1.1); }
.fab::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ============== Footer ============== */
.footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.footer a { color: var(--primary); font-weight: 500; }
.footer .socials { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.footer .socials a {
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: all .2s;
}
.footer .socials a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

/* ============== RTL ============== */
[dir="rtl"] .search-wrap::before { left: auto; right: 14px; }
[dir="rtl"] .search-wrap input { padding: 12px 42px 12px 16px; }
[dir="rtl"] .modal-close { right: auto; left: 14px; }

/* ============== No results ============== */
.no-results {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.no-results .icon { font-size: 64px; margin-bottom: 12px; opacity: 0.5; }

/* ============== Empty ============== */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }

/* ============== Table indicator ============== */
.table-banner {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.table-banner .num { font-size: 14px; margin-left: 4px; }

/* Responsive tweaks */
@media (max-width: 480px) {
  .hero { padding: 30px 16px 60px; }
  .hero h1 { font-size: 24px; }
  .hero .logo { width: 70px; height: 70px; font-size: 36px; }
  .featured-grid { grid-template-columns: 1fr; }
}
