/* ========== RESET & BASE ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800;900&family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  --brown: #5C3D2E;
  --brown-dark: #3E2518;
  --amber: #D4A017;
  --amber-light: #E8C547;
  --amber-glow: rgba(212, 160, 23, 0.15);
  --cream: #FFF8E7;
  --cream-dark: #F5EDDA;
  --charcoal: #2C1810;
  --charcoal-soft: #3D2A1E;
  --bg: #FFF8E7;
  --card: #FFFFFF;
  --text: #2C1810;
  --text-light: #8B7355;
  --text-warm: #6B4D3A;
  --border: #E8DCC8;
  --success: #25d366;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(44, 24, 16, 0.08);
  --shadow-lg: 0 8px 30px rgba(44, 24, 16, 0.12);
  --max-w: 480px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ========== LAYOUT ========== */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

.container {
  padding: 0 16px;
  padding-bottom: 100px;
}

/* ========== OTTOMAN PATTERN (CSS-only) ========== */
.ottoman-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    /* Star pattern */
    radial-gradient(circle at 25% 25%, var(--amber) 2px, transparent 2px),
    radial-gradient(circle at 75% 25%, var(--amber) 2px, transparent 2px),
    radial-gradient(circle at 50% 50%, var(--amber) 2px, transparent 2px),
    radial-gradient(circle at 25% 75%, var(--amber) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, var(--amber) 2px, transparent 2px),
    /* Diamond lines */
    linear-gradient(45deg, var(--amber) 1px, transparent 1px),
    linear-gradient(-45deg, var(--amber) 1px, transparent 1px),
    linear-gradient(45deg, transparent 49%, var(--amber) 49%, var(--amber) 51%, transparent 51%),
    linear-gradient(-45deg, transparent 49%, var(--amber) 49%, var(--amber) 51%, transparent 51%);
  background-size:
    60px 60px,
    60px 60px,
    60px 60px,
    60px 60px,
    60px 60px,
    30px 30px,
    30px 30px,
    60px 60px,
    60px 60px;
  pointer-events: none;
}

/* ========== HOME HERO ========== */
.hero {
  position: relative;
  height: 380px;
  background: var(--charcoal);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    /* Geometric diamond pattern */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 20px,
      rgba(212, 160, 23, 0.03) 20px,
      rgba(212, 160, 23, 0.03) 21px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 20px,
      rgba(212, 160, 23, 0.03) 20px,
      rgba(212, 160, 23, 0.03) 21px
    ),
    /* Radial accents */
    radial-gradient(ellipse at 20% 80%, rgba(212, 160, 23, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(92, 61, 46, 0.15) 0%, transparent 50%),
    /* Base warm gradient */
    linear-gradient(170deg, #3D2A1E 0%, #2C1810 40%, #1A0F09 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(44, 24, 16, 0.95) 0%,
    rgba(44, 24, 16, 0.5) 40%,
    rgba(44, 24, 16, 0.2) 70%,
    rgba(44, 24, 16, 0.3) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px;
  color: white;
  text-align: center;
}

.hero-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brown) 0%, var(--charcoal) 100%);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  margin: 0 auto 14px;
  border: 3px solid var(--amber);
  font-family: var(--font-heading);
  box-shadow: 0 4px 20px rgba(212, 160, 23, 0.3);
}

.hero-content h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-family: var(--font-heading);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-content .tagline {
  font-size: 15px;
  opacity: 0.9;
  margin-top: 6px;
  font-style: italic;
  color: var(--amber);
  font-family: var(--font-heading);
  letter-spacing: 1px;
}

/* Decorative divider under tagline */
.hero-divider {
  width: 60px;
  height: 2px;
  background: var(--amber);
  margin: 12px auto 0;
  border-radius: 1px;
  position: relative;
}
.hero-divider::before,
.hero-divider::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--amber);
  transform: rotate(45deg);
}
.hero-divider::before { left: -12px; }
.hero-divider::after { right: -12px; }

/* ========== RESTAURANT INFO BAR ========== */
.info-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 14px 16px;
  background: var(--brown);
  color: rgba(255, 248, 231, 0.8);
  font-size: 12px;
  font-weight: 600;
}
.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.info-item svg {
  width: 14px;
  height: 14px;
  fill: var(--amber);
}

/* ========== SECTION HEADINGS ========== */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--charcoal);
  padding: 24px 4px 16px;
  font-family: var(--font-heading);
  text-align: center;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--amber);
  margin: 8px auto 0;
  border-radius: 2px;
}

/* ========== CATEGORY SCROLL (HORIZONTAL) ========== */
.cat-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 16px 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.cat-scroll::-webkit-scrollbar { display: none; }

.cat-card {
  flex-shrink: 0;
  width: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  scroll-snap-align: start;
}
.cat-card:active { transform: scale(0.97); }
.cat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.cat-card-visual {
  height: 100px;
  background: linear-gradient(135deg, var(--brown) 0%, var(--charcoal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  position: relative;
  overflow: hidden;
}
.cat-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(212, 160, 23, 0.05) 8px, rgba(212, 160, 23, 0.05) 9px);
}

.cat-card-text {
  padding: 12px 14px;
}
.cat-card-text h3 {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--charcoal);
}
.cat-card-text span {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}

/* ========== VIEW MENU BUTTON (HOME) ========== */
.view-menu-btn {
  display: block;
  margin: 8px auto 16px;
  padding: 14px 44px;
  background: linear-gradient(135deg, var(--brown) 0%, var(--charcoal) 100%);
  color: var(--amber);
  border: 2px solid var(--amber);
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 15px rgba(92, 61, 46, 0.3);
  transition: all 0.2s;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
}
.view-menu-btn:hover {
  background: var(--charcoal);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(92, 61, 46, 0.4);
}

/* ========== SPECIALTIES SECTION ========== */
.specialties {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 0 16px 24px;
}
.specialty-item {
  text-align: center;
  padding: 16px 8px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.specialty-item .spec-emoji {
  font-size: 32px;
  margin-bottom: 6px;
  display: block;
}
.specialty-item .spec-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--charcoal);
  font-family: var(--font-heading);
}
.specialty-item .spec-price {
  font-size: 12px;
  color: var(--amber);
  font-weight: 700;
  margin-top: 2px;
}

/* ========== MENU PAGE HEADER ========== */
.menu-header {
  background: linear-gradient(135deg, var(--brown) 0%, var(--charcoal) 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 160, 23, 0.3);
  background: rgba(255,255,255,0.08);
  color: var(--amber);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
  text-decoration: none;
}
.back-btn:hover { background: rgba(255,255,255,0.15); }
.menu-header-info h1 {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-heading);
}
.menu-header-info p {
  font-size: 12px;
  color: var(--amber);
  font-family: var(--font-body);
  font-weight: 600;
}

/* ========== CATEGORY TABS ========== */
.cat-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  background: var(--cream);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 68px;
  z-index: 99;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 25px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}
.cat-tab.active {
  background: var(--brown);
  color: var(--amber);
  border-color: var(--brown);
}

/* ========== MENU SECTION ========== */
.menu-section { margin-top: 20px; }
.menu-section h2 {
  font-size: 18px;
  font-weight: 700;
  padding: 8px 4px;
  color: var(--charcoal);
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu-section h2::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--amber), transparent);
}

/* ========== DISH CARD ========== */
.dish-card {
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  gap: 12px;
  transition: transform 0.15s;
  border: 1px solid var(--border);
  border-left: 4px solid var(--amber);
  position: relative;
}
.dish-card:active { transform: scale(0.98); }

.dish-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: var(--amber-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  border: 1px solid rgba(212, 160, 23, 0.2);
}

.dish-info { flex: 1; min-width: 0; }
.dish-info h3 {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--charcoal);
}
.dish-info .dish-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dish-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--brown);
  white-space: nowrap;
  font-family: var(--font-body);
}

.dish-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-family: var(--font-body);
}
.qty-btn.add {
  background: var(--brown);
  color: var(--amber);
}
.qty-btn.add:hover { background: var(--charcoal); }
.qty-btn.remove {
  background: var(--cream-dark);
  color: var(--text);
}
.qty-btn.remove:hover { background: var(--border); }
.qty-display {
  font-size: 15px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* ========== CART BAR ========== */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  background: linear-gradient(135deg, var(--brown) 0%, var(--charcoal) 100%);
  color: white;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  z-index: 200;
  transition: transform 0.3s;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(44, 24, 16, 0.2);
}
.cart-bar.hidden { transform: translateX(-50%) translateY(100%); }
.cart-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-count {
  background: var(--amber);
  color: var(--charcoal);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}
.cart-bar-label { font-weight: 600; font-size: 15px; }
.cart-bar-total { font-weight: 700; font-size: 17px; color: var(--amber); }

/* ========== CART MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 24, 16, 0.6);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.cart-modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: var(--max-w);
  background: var(--cream);
  border-radius: 20px 20px 0 0;
  z-index: 301;
  max-height: 85vh;
  overflow-y: auto;
  transition: transform 0.35s ease;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
.cart-modal.open { transform: translateX(-50%) translateY(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--cream);
  z-index: 1;
}
.cart-header h2 {
  font-size: 18px;
  font-family: var(--font-heading);
  color: var(--charcoal);
}
.cart-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--cream-dark);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.cart-items { padding: 12px 20px; }

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info h4 { font-size: 14px; font-weight: 700; font-family: var(--font-heading); }
.cart-item-info span { font-size: 12px; color: var(--text-light); }
.cart-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-footer {
  padding: 16px 20px;
  border-top: 2px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--cream);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  font-family: var(--font-heading);
}
.cart-total .total-price { color: var(--brown); }

.cart-note {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 12px;
  resize: none;
  font-family: var(--font-body);
  background: var(--card);
}
.cart-note:focus { outline: none; border-color: var(--amber); }

.whatsapp-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--radius);
  background: #25d366;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
  font-family: var(--font-body);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}
.whatsapp-btn:hover { background: #1ebe57; }
.whatsapp-btn svg { width: 22px; height: 22px; }

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
  font-size: 15px;
}

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-light);
  font-size: 12px;
  border-top: 2px solid var(--border);
  margin-top: 20px;
}
.footer-brand {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 4px;
}
.footer-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.footer a {
  color: var(--brown);
  text-decoration: none;
  font-weight: 600;
}

/* ========== LANGUAGE SWITCHER ========== */
.lang-switch {
  display: flex;
  gap: 4px;
  justify-content: center;
  padding: 8px 0;
}
.lang-switch-dark {
  position: absolute;
  top: 14px;
  right: 14px;
  left: auto;
  z-index: 10;
  padding: 0;
}
[dir="rtl"] .lang-switch-dark {
  right: auto;
  left: 14px;
}
.lang-switch-header {
  padding: 0;
}
.lang-switch-header .lang-btn {
  padding: 4px 8px;
  font-size: 10px;
}
.lang-btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1.5px solid rgba(212, 160, 23, 0.3);
  background: rgba(44, 24, 16, 0.5);
  color: rgba(255, 248, 231, 0.7);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  font-family: var(--font-body);
}
.lang-btn:hover { background: rgba(44, 24, 16, 0.7); color: white; }
.lang-btn.active {
  background: var(--amber);
  color: var(--charcoal);
  border-color: var(--amber);
}

/* ========== RESPONSIVE ========== */
@media (min-width: 481px) {
  .container { padding: 0 24px; padding-bottom: 100px; }
  .hero { height: 420px; }
  .hero-content h1 { font-size: 36px; }
  .cat-scroll { gap: 16px; }
  .dish-card { padding: 16px; }
  .specialties { gap: 14px; }
}
