:root {
    --bg-dark: #050505;
    --gold-gradient: linear-gradient(45deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    --gold-solid: #D4AF37;
    --glass-bg: rgba(10, 10, 10, 0.9);
    --glass-border: rgba(212, 175, 55, 0.3);
    --text-light: #f5f5f5;
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Cairo', sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; font-size: 16px; }
body { background: var(--bg-dark); color: var(--text-light); font-family: var(--font-ar); line-height: 1.6; overflow-x: hidden; }
body.lang-en { font-family: var(--font-en); direction: ltr; }

/* Utilities */
.gold-text { background: var(--gold-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900; }
.gold-bg { background: var(--gold-gradient); color: #000; border: none; font-weight: bold; }
.glassmorphism { background: var(--glass-bg); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border: 0.5px solid var(--glass-border); }
.hidden { display: none !important; }

/* Layout Sections */
.split-section { display: grid; grid-template-columns: 1fr 1fr; min-height: 80vh; height: auto; background: var(--bg-dark); align-items: stretch; overflow: hidden; }
.split-section.reverse { direction: ltr; }
.split-section.reverse .owner-text { direction: rtl; text-align: right; }
body.lang-en .split-section.reverse .owner-text { direction: ltr; text-align: left; }

.story-text, .owner-text { padding: 80px 10%; display: flex; flex-direction: column; justify-content: center; }
.main-desc { font-size: 1.15rem; line-height: 2; color: #ccc; margin-bottom: 30px; text-align: justify; }
.quote-footer { font-style: italic; font-size: 1.5rem; font-weight: 700; border-right: 4px solid var(--gold-solid); padding: 5px 25px; margin-top: 20px; }
body.lang-en .quote-footer { border-right: none; border-left: 4px solid var(--gold-solid); }

.parallax-img { width: 100%; min-height: 500px; background-size: cover; background-position: center; }

/* Navigation */
.glass-nav { position: fixed; top: 0; width: 100%; z-index: 1000; padding: 1.5rem 0; transition: 0.4s var(--ease); }
.glass-nav.scrolled { background: rgba(5, 5, 5, 0.95); padding: 0.8rem 0; border-bottom: 1px solid var(--glass-border); }
.nav-container { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 5%; }
.nav-links a { color: #fff; text-decoration: none; margin: 0 1.2rem; font-size: 0.9rem; font-weight: 700; transition: 0.3s; }

/* Menu Grid */
.menu-container { padding: 100px 5%; max-width: 1400px; margin: 0 auto; }
.category-tabs { display: flex; gap: 15px; overflow-x: auto; padding: 20px 0; margin-bottom: 30px; scrollbar-width: none; }
.category-btn { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.1); padding: 10px 25px; border-radius: 30px; cursor: pointer; white-space: nowrap; transition: 0.3s; }
.category-btn.active { background: var(--gold-gradient); color: #000; border: none; font-weight: 700; }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.menu-card { background: rgba(20, 20, 20, 0.7); border-radius: 24px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); transition: 0.4s; }
.card-img { width: 100%; height: 250px; object-fit: cover; }
.card-info { padding: 20px; }

/* Cart Components */
.cart-drawer { position: fixed; top: 0; right: 0; width: 450px; height: 100%; z-index: 2000; transform: translateX(100%); transition: 0.5s var(--ease); visibility: hidden; display: flex; flex-direction: column; padding: 40px; }
.cart-drawer.active { transform: translateX(0); visibility: visible; }
.fac-pill { position: fixed; bottom: 110px; right: 30px; padding: 15px 30px; border-radius: 50px; cursor: pointer; z-index: 900; box-shadow: 0 10px 30px rgba(0,0,0,0.8); }

/* Mobile UI */
@media (max-width: 992px) {
    .split-section { grid-template-columns: 1fr; height: auto; }
    .split-section.reverse { direction: unset; }
    .story-image, .owner-image { height: 350px; order: -1; }
    .story-text, .owner-text { padding: 40px 6%; }
    .mobile-bottom-nav { position: fixed; bottom: 20px; left: 5%; right: 5%; height: 75px; border-radius: 40px; display: flex; justify-content: space-around; align-items: center; z-index: 1500; }
    .desktop-only { display: none; }
    .cart-drawer { width: 100%; }
}

/* === PATCH: Menu + Cart + Hero fixes === */

.hero{
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-media{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 35%, rgba(0,0,0,0.85) 100%);
}
.hero-content{
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 18px;
  max-width: 980px;
}
.hero-title{
  letter-spacing: .4px;
  text-shadow: 0 10px 40px rgba(0,0,0,0.65);
}
.hero-subtitle{
  letter-spacing: .25px;
  text-shadow: 0 10px 40px rgba(0,0,0,0.55);
}

/* Menu hover */
.menu-card:hover{
  transform: translateY(-8px);
  border-color: rgba(212,175,55,0.4);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* Cart badge + pill interaction */
#fac-pill:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
}
#fac-pill:active{
  transform: translateY(0px) scale(0.99);
}

/* Cart steps */
.cart-steps{ padding: 14px 16px 0; }
.cart-step{ display: none; }
.cart-step.active{ display: block; }
.cart-step-actions{
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.cart-step-actions .glass-btn{ flex: 1; }

.field-label{
  display: block;
  margin: 10px 0 6px;
  font-weight: 700;
  opacity: .95;
}
#cust-name, #cust-address, #cust-maps{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  color: var(--text-light);
  outline: none;
}
#cust-name:focus, #cust-address:focus, #cust-maps:focus{
  border-color: rgba(212,175,55,0.55);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}

.info-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 520px){
  .info-actions{ grid-template-columns: 1fr; }
}

.cart-empty{
  margin: 10px 0 14px;
  opacity: .85;
}
.cart-line{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  margin-bottom: 10px;
}
.cart-line .meta{ display:flex; flex-direction:column; gap:6px; }
.cart-line .title{ font-weight: 800; }
.cart-line .sub{ opacity:.85; font-size: 14px; }
.cart-line .controls{ display:flex; align-items:center; gap:8px; justify-content:flex-end; flex-wrap:wrap; }
.cart-qty{
  display:flex; align-items:center; gap:8px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.20);
}
.qty-btn{
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text-light);
  cursor: pointer;
}
.qty-btn:active{ transform: scale(0.98); }
.note-input{
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.20);
  color: var(--text-light);
}

.wa-preview{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.22);
  padding: 14px 14px;
  white-space: pre-wrap;
  line-height: 1.7;
}

/* Toast */
.toast{
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--glass-bg);
  color: var(--text-light);
  padding: 16px 24px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
}
.toast.show{
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Skip link */
.skip-link{
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--gold-solid);
  color: #000;
  padding: 12px 20px;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus{
  top: 0;
}

/* Desktop justify for long text blocks */
@media (min-width: 992px){
  #story .text-content,
  #owner .text-content{
    text-align: justify;
    text-justify: inter-word;
  }
}

/* Mobile: prevent clipping */
@media (max-width: 992px){
  .split-section{ overflow: visible; }
}

/* Very small screens: menu cards */
@media (max-width: 360px){
  .menu-grid{
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}

/* EN (LTR) edge cases */
body.lang-en .quote-footer{
  border-left: 4px solid var(--gold-solid);
  border-right: 0;
  padding: 5px 5px 5px 25px;
}
body.lang-en .cart-drawer{
  right: auto;
  left: 0;
  transform: translateX(-100%);
}
body.lang-en .cart-drawer.active{
  transform: translateX(0);
}

/* Buttons */
.glass-btn{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--text-light);
  padding: 12px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.glass-btn:hover{ border-color: rgba(212,175,55,0.35); box-shadow: 0 16px 40px rgba(0,0,0,0.45); }
.glass-btn:active{ transform: scale(0.99); }
.icon-btn{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--text-light);
  cursor: pointer;
}

/* Overlay */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 998;
}
.overlay.active{
  opacity: 1;
  visibility: visible;
}

/* Cart drawer base (if missing in original CSS) */
.cart-drawer{
  position: fixed;
  top: 0;
  right: 0;
  width: 450px;
  max-width: 92vw;
  height: 100vh;
  background: rgba(10,10,10,0.92);
  border-left: 1px solid rgba(255,255,255,0.10);
  transform: translateX(100%);
  transition: transform .28s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
}
.cart-drawer.active{ transform: translateX(0); }
.cart-header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cart-footer{
  margin-top: auto;
  padding: 12px 16px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.cart-total-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

/* FAC pill */
.fac-pill{
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(12px);
  color: var(--text-light);
  cursor: pointer;
  z-index: 997;
}

/* Menu states */
.loading-state, .error-state{
  grid-column: 1 / -1;
  padding: 26px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  text-align: center;
}
.error-state i{ font-size: 22px; margin-bottom: 10px; color: var(--gold-solid); }
.error-state h3{ margin: 0 0 8px; }
.error-state p{ margin: 0 0 14px; opacity: .9; }

/* Menu card actions */
.card-actions{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.menu-add-btn{
  padding: 10px 14px;
  border-radius: 999px;
}
.price-label{
  font-weight: 700;
  opacity: .9;
}


/* Footer branches */
.footer-branches{ margin-top: 10px; }
.footer-branches-list{
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}
.footer-link{
  color: var(--text-light);
  text-decoration: none;
  opacity: .9;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer-link:hover{ opacity: 1; }


/* --- FIX: Hero container class mismatch + media sizing --- */
.hero-section{
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-section .hero-media{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- FIX: Brand logo image in top nav --- */
.brand-logo{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark{
  display: inline-flex;
  align-items: center;
}
.brand-mark img{
  display: block;
  width: auto;
  height: 44px;
}

/* --- FIX: Story/Owner images should render on mobile & CSP-safe --- */
.parallax-img{
  position: relative;
  overflow: hidden;
}
.parallax-img img{
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-image,
.owner-image{
  min-height: 520px;
}
@media (max-width: 992px){
  .story-image,
  .owner-image{
    min-height: 300px;
  }
  .parallax-img img{
    height: 300px;
  }
}
