:root {
  --primary: #D6111C;
  --primary-dark: #a50d15;
  --primary-glow: rgba(214, 17, 28, 0.35);
  --bg: #0B0D0C;
  --surface: #161818;
  --surface2: #1e2020;
  --border: rgba(255,255,255,0.08);
  --text: #f5f5f5;
  --text-muted: rgba(255,255,255,0.5);
  --text-dim: rgba(255,255,255,0.3);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --container: 1160px;
  --header-h: 64px;
  --wa: #25D366;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ── CONTAINER ── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── HEADER ── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background .3s, backdrop-filter .3s, box-shadow .3s;
}
#header.scrolled {
  background: rgba(11,13,12,0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--border);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.header-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}
.header-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.header-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
}
.header-sub {
  font-size: .72rem;
  color: var(--text-muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.cart-btn, .nav-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background .2s;
}
.cart-btn:hover, .nav-toggle:hover { background: var(--surface); }
.cart-badge {
  position: absolute;
  top: -4px; left: -4px;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-badge.hidden { display: none; }

/* ── DRAWER ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.nav-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 280px;
  height: 100%;
  background: var(--surface);
  z-index: 201;
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  gap: 1.25rem;
  overflow-y: auto;
}
.nav-drawer.open { transform: translateX(0); }
.drawer-close {
  align-self: flex-start;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.drawer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}
.drawer-brand span { font-weight: 700; font-size: 1rem; }
.drawer-links { display: flex; flex-direction: column; gap: .25rem; }
.drawer-links li a {
  display: block;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .9rem;
  transition: background .2s, color .2s;
}
.drawer-links li a:hover { background: var(--surface2); color: var(--text); }
.drawer-info {
  padding-top: .75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.drawer-info p {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.drawer-info i { color: var(--primary); width: 14px; }
.drawer-wa {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: auto;
}
.wa-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem 1rem;
  background: var(--wa);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: .85rem;
  transition: opacity .2s;
}
.wa-link:hover { opacity: .88; }

/* ── HERO ── */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11,13,12,0) 0%, rgba(11,13,12,.8) 60%, var(--bg) 100%),
    url('assets/chicken_mushroom_cream.jpeg.720x540_q87.jpg') center/cover no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(214,17,28,0.12) 0%, transparent 70%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-h) + 2rem) 1.25rem 3rem;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.hero-logo-wrap {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  overflow: hidden;
  box-shadow: 0 0 30px var(--primary-glow);
}
.hero-logo { width: 100%; height: 100%; object-fit: cover; }
.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,.8);
  line-height: 1.1;
}
.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}
.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  padding: .3rem .7rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}
.hero-badges span i { color: var(--primary); }
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-pill);
  margin-top: .5rem;
  box-shadow: 0 4px 24px var(--primary-glow);
  transition: transform .2s, box-shadow .2s;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 30px var(--primary-glow); }

/* ── SECTION TITLE ── */
.section-title {
  font-size: 1.7rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 1.75rem;
  color: var(--text);
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin: .4rem auto 0;
}

/* ── MENU SECTION ── */
#menu { padding: 4rem 0 3rem; }

/* ── TABS ── */
.tabs-wrapper {
  overflow-x: auto;
  margin-bottom: 2rem;
  scrollbar-width: none;
}
.tabs-wrapper::-webkit-scrollbar { display: none; }
.tabs {
  display: flex;
  gap: .5rem;
  width: max-content;
  padding: .25rem .25rem;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
  cursor: pointer;
}
.tab-btn:hover { color: var(--text); border-color: rgba(255,255,255,.15); }
.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.tab-emoji { font-size: 1em; }

/* ── ITEMS GRID ── */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.1rem;
}

/* ── ITEM CARD ── */
.item-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
.item-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--surface2);
}
.item-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.item-body {
  padding: .85rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.item-name {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.item-desc {
  font-size: .76rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}
.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .5rem;
}
.item-price {
  font-size: .88rem;
  font-weight: 700;
  color: var(--primary);
}
.add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, background .2s;
  flex-shrink: 0;
}
.add-btn:hover { background: var(--primary-dark); transform: scale(1.1); }

/* ── BRANCHES ── */
#branches {
  padding: 3rem 0 4rem;
  background: var(--surface);
}
.branches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: .5rem;
}
.branch-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}
.branch-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: .25rem;
}
.branch-card h3 { font-size: 1.05rem; font-weight: 700; }
.branch-card p { font-size: .82rem; color: var(--text-muted); }
.branch-phone { display: flex; align-items: center; gap: .35rem; }
.branch-phone i { color: var(--primary); }
.branch-wa {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--wa);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius-pill);
  margin-top: .4rem;
  transition: opacity .2s;
}
.branch-wa:hover { opacity: .85; }

/* ── CART PANEL ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  height: 100%;
  background: var(--surface);
  z-index: 301;
  transform: translateX(-100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cart-panel.open { transform: translateX(0); }
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-size: 1.05rem; font-weight: 700; }
.cart-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.cart-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: .75rem;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: .85rem; font-weight: 600; }
.cart-item-price { font-size: .78rem; color: var(--primary); margin-top: .15rem; }
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .35rem;
}
.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.qty-btn:hover { background: var(--primary); }
.qty-val { font-size: .82rem; font-weight: 700; min-width: 16px; text-align: center; }
.cart-item-del {
  color: var(--text-dim);
  font-size: .8rem;
  padding: .2rem;
  transition: color .2s;
}
.cart-item-del:hover { color: var(--primary); }
.cart-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.cart-footer.hidden { display: none; }
.cart-total { font-size: .9rem; color: var(--text-muted); }
.cart-total strong { color: var(--text); font-size: 1rem; }
.cart-branch-select p { font-size: .82rem; color: var(--text-muted); margin-bottom: .5rem; }
.wa-order-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: 100%;
  padding: .65rem;
  background: var(--wa);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: .4rem;
  transition: opacity .2s;
}
.wa-order-btn:hover { opacity: .88; }
.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: var(--text-dim);
}
.cart-empty i { font-size: 2.5rem; }
.cart-empty p { font-size: .88rem; }

/* ── FOOTER ── */
#footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}
.footer-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.footer-copy { font-size: .8rem; color: var(--text-muted); }
.footer-powered { font-size: .72rem; color: var(--text-dim); }
.footer-powered a { color: var(--primary); font-weight: 600; }
.footer-powered a:hover { text-decoration: underline; }

/* ── PRELOADER ── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.preloader-logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: 0 0 40px var(--primary-glow);
  animation: preloader-pulse 1.2s ease-in-out infinite;
}
@keyframes preloader-pulse {
  0%, 100% { box-shadow: 0 0 30px var(--primary-glow); transform: scale(1); }
  50%       { box-shadow: 0 0 55px rgba(214,17,28,.55); transform: scale(1.05); }
}
.preloader-bar {
  width: 120px;
  height: 3px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  overflow: hidden;
}
.preloader-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 2px;
  animation: preloader-load 1.4s ease forwards;
}
@keyframes preloader-load {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero-content h1 { font-size: 2.4rem; }
}
@media (max-width: 900px) {
  .items-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 640px) {
  .hero-content h1 { font-size: 2rem; }
  .items-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .cart-panel { width: 100%; }
  .item-body { padding: .65rem .75rem .75rem; }
  .item-name { font-size: .85rem; }
}
@media (max-width: 400px) {
  .items-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 1.75rem; }
}
