/* Custom Local Fonts */
@font-face {
  font-family: 'LinotypeAroma';
  src: url('fonts/LinotypeAroma-Bold.ttf') format('truetype');
  font-weight: 700;
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LinotypeAroma';
  src: url('fonts/LinotypeAroma-Light.ttf') format('truetype');
  font-weight: 300;
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GESS Two';
  src: url('fonts/GE SS Two Bold.otf') format('opentype');
  font-weight: 700;
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GESS Two';
  src: url('fonts/GE SS Two Light.otf') format('opentype'),
       url('fonts/GE SS Two Bold.otf') format('opentype');
  font-weight: 300;
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Google Fonts Fallback / Supplements */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&family=Montserrat:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400&family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  /* Exact Brand Colors */
  --color-food: #7C6C59;
  --color-desserts: #B7989A;
  --color-drinks: #709697;
  --color-gold: #C5A059;

  /* Neutrals */
  --bg-page: #FFFFFF;
  --bg-subtle: #FAF8F5;
  --text-main: #2C2C2C;
  --text-title: #2B2A29;
  --text-desc-en: #55514D;
  --text-desc-ar: #55514D;
  --border-color: #ECE7E1;

  /* Typography variables */
  --font-en: 'LinotypeAroma', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ar: 'GESS Two', 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-img: 16px;
  --radius-full: 9999px;
  --container-max: 860px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  width: 100%;
  overflow-x: clip; /* Modern CSS that prevents horizontal overflow without breaking position: sticky */
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-en);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Classes */
.lang-en {
  font-family: var(--font-en);
}

.lang-ar {
  font-family: var(--font-ar);
}

/* Site Header */
.site-header {
  background: #FFFFFF;
  padding: 24px 16px 14px;
  text-align: center;
  width: 100%;
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.brand-logo-wrap {
  display: inline-block;
  max-width: 220px;
  width: 100%;
}

.brand-logo-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Sticky Navigation Multi-Tier Header */
.sticky-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 950;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  width: 100%;
}

.sticky-category-nav {
  padding: 8px 12px 4px;
  width: 100%;
  box-sizing: border-box;
}

.nav-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.nav-pill {
  border: 1px solid transparent;
  background: var(--bg-subtle);
  padding: 6px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  color: #666666;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.nav-pill .en-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.1;
  font-family: var(--font-en);
}

.nav-pill .ar-sub {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 1px;
  font-family: var(--font-ar);
}

.nav-pill.food:hover, .nav-pill.food.active {
  background: #F4EFEA;
  border-color: #D6C7B8;
  color: var(--color-food);
}

.nav-pill.desserts:hover, .nav-pill.desserts.active {
  background: #FAF0F2;
  border-color: #E2CDD0;
  color: var(--color-desserts);
}

.nav-pill.drinks:hover, .nav-pill.drinks.active {
  background: #EEF6F6;
  border-color: #C3DBDC;
  color: var(--color-drinks);
}

/* Tier 2: Subcategory Horizontal Quick Scroll Strip */
.subcat-nav-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 12px 8px;
  max-width: 860px;
  margin: 0 auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
}

.subcat-nav-strip::-webkit-scrollbar {
  display: none;
}

.subcat-chip {
  border: 1px solid #ECE7E1;
  background: #FFFFFF;
  padding: 5px 13px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  color: #555555;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-family: var(--font-en);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.subcat-chip:hover {
  border-color: #CBD5E1;
  color: #111111;
}

.subcat-chip.active {
  background: var(--active-theme-color, #7C6C59);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Floating Back To Top Button Overlay */
.back-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 18px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-gold);
  color: #1A1A1A;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(197, 160, 89, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: #B28F49;
  transform: translateY(-2px) scale(1.05);
}

.back-to-top-btn:active {
  transform: translateY(1px) scale(0.96);
}

/* Main Container */
.main-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px 12px 60px;
  width: 100%;
  box-sizing: border-box;
}

/* Main Category Section Headers (FOOD / DESSERTS / DRINKS) */
.category-hero-section {
  text-align: center;
  padding: 32px 12px 12px;
  width: 100%;
}

.category-hero-title-en {
  font-size: clamp(34px, 7vw, 54px);
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.1;
  text-transform: uppercase;
  font-family: var(--font-en);
}

.category-hero-title-ar {
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2px;
  font-family: var(--font-ar);
}

.hero-divider {
  width: 70px;
  height: 2px;
  margin: 14px auto 8px;
  border: none;
}

/* Subcategory Section */
.subcategory-block {
  margin-bottom: 44px;
  scroll-margin-top: 110px;
  width: 100%;
}

.subcategory-header {
  text-align: center;
  margin-bottom: 14px;
}

.subcategory-title-en {
  font-size: clamp(22px, 4.5vw, 32px);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--font-en);
}

.subcategory-title-ar {
  font-size: clamp(19px, 4vw, 28px);
  font-weight: 700;
  margin-top: 2px;
  font-family: var(--font-ar);
}

/* ==========================================================================
   ALLERGEN LEGEND STRIP (Under Section Titles)
   ========================================================================== */
.allergen-legend-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 10px auto 26px;
  padding: 8px 10px;
  max-width: 650px;
  background: transparent;
  width: 100%;
}

.legend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.legend-icon-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-label-box {
  background: #FFFFFF;
  border: 1px solid #ECE7E1;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #333333;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  font-family: var(--font-en);
}

/* ==========================================================================
   2-COLUMN BALANCED DISHES GRID (Horizontally Aligned Rows)
   ========================================================================== */
.dishes-feed {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 14px;
  width: 100%;
  box-sizing: border-box;
  align-items: start;
}

.dish-item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.dish-item-card.text-only-card {
  padding: 4px 2px;
}

/* Square Cropped Image (1:1) */
.dish-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-img);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  background: linear-gradient(135deg, #F8F5EE 0%, #EDE7DC 100%);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dish-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.dish-image-wrap:hover img {
  transform: scale(1.04);
}

.dish-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #A0988E;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  padding: 10px;
  text-align: center;
}

/* Dish Content Area */
.dish-content {
  width: 100%;
  padding: 0 4px;
}

.dish-price {
  font-size: 13.5px;
  font-weight: 700;
  color: #4A443E;
  margin-bottom: 3px;
  letter-spacing: 0.5px;
  font-family: var(--font-en);
}

.dish-name-en {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-title);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.25;
  font-family: var(--font-en);
}

.dish-name-ar {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-title);
  margin-top: 2px;
  margin-bottom: 4px;
  line-height: 1.25;
  font-family: var(--font-ar);
}

.dish-desc-en {
  font-size: 10.5px;
  font-weight: 300;
  color: var(--text-desc-en);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.35;
  margin-top: 3px;
  font-family: var(--font-en);
}

.dish-desc-ar {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-desc-ar);
  line-height: 1.35;
  margin-top: 2px;
  font-family: var(--font-ar);
}

/* Inline Allergen Badges on Dish */
.dish-allergens-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
  min-height: 20px;
}

.dish-allergens-row.empty-spacer {
  visibility: hidden;
}

.allergy-spacer-dot {
  display: inline-block;
  width: 20px;
  height: 20px;
}

.allergy-badge-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  cursor: default;
  font-family: var(--font-en);
}

/* Footer */
.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  padding: 40px 16px 36px;
  text-align: center;
  width: 100%;
}

.footer-container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-loc-en {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: var(--font-en);
}

.footer-loc-ar {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-ar);
}

.footer-contact-link {
  color: #555;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-en);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  margin-top: 4px;
  font-family: var(--font-en);
}

/* ==========================================================================
   TABLET & DESKTOP ENHANCEMENTS
   ========================================================================== */
@media (min-width: 600px) {
  .dishes-feed {
    gap: 36px 22px;
  }
  .dish-price {
    font-size: 15px;
  }
  .dish-name-en {
    font-size: 16px;
  }
  .dish-name-ar {
    font-size: 17px;
  }
  .dish-desc-en {
    font-size: 12px;
  }
  .dish-desc-ar {
    font-size: 12.5px;
  }
  .allergy-badge-circle {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
  .legend-icon-circle {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .legend-label-box {
    font-size: 11.5px;
    padding: 3px 8px;
  }
}

/* ==========================================================================
   ADMIN PORTAL & LOGIN STYLES (/admin.html)
   ========================================================================== */
.admin-body {
  background: #F4F6F8;
  color: #1E293B;
  min-height: 100vh;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at top, #FAF8F5 0%, #E8E2D9 100%);
}

.login-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 36px 28px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  text-align: center;
  border: 1px solid var(--border-color);
}

.login-logo {
  max-width: 170px;
  margin: 0 auto 16px;
}

.login-title {
  font-size: 20px;
  font-weight: 800;
  color: #1E1E1E;
  margin-bottom: 6px;
}

.login-desc {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 20px;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 15px;
  text-align: center;
  letter-spacing: 2px;
  outline: none;
  transition: var(--transition);
  margin-bottom: 14px;
}

.login-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}

.login-btn {
  width: 100%;
  background: var(--color-gold);
  color: #1E1E1E;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.login-btn:hover {
  background: #B28F49;
}

/* Admin Dashboard */
.admin-navbar {
  background: #1E1E1E;
  color: #FFFFFF;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}

.admin-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid #444;
  background: #2D2D2D;
  color: #FFF;
  transition: var(--transition);
}

.btn-nav:hover {
  background: #444;
}

.admin-main-container {
  max-width: 1000px;
  margin: 24px auto 60px;
  padding: 0 16px;
}

.admin-card {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
}

.admin-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
}

/* Allergen Position Switcher Radio Option */
.allergen-pos-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.pos-radio-card {
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pos-radio-card:hover {
  border-color: var(--color-gold);
  background: #FAF8F5;
}

.pos-radio-card.active {
  border-color: var(--color-gold);
  background: #FFFDF9;
}

.pos-radio-card input {
  margin-top: 3px;
  accent-color: var(--color-gold);
}

/* Modal Form Styles */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #334155;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

.allergy-checkboxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.allergy-check-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #F8FAFC;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.allergy-check-card input {
  accent-color: var(--color-gold);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #1E293B;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border-left: 4px solid var(--color-gold);
}

@media (max-width: 600px) {
  .allergen-pos-options {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}
