/* ============================================================
   Alareesha — digital menu page
   Uses the same tokens as style.css (loaded before this file).
   ============================================================ */

/* ---------- top bar ---------- */

.menu-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--pad-x);
  background: rgba(250, 246, 237, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.menu-topbar .back-link {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--stone);
  white-space: nowrap;
}

.menu-topbar .back-link:hover { color: var(--ink); }

.topbar-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.lang-link {
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--gold-d);
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  padding: 0.4rem 1.05rem;
  transition: background 140ms ease, color 140ms ease;
}

.lang-link:hover {
  background: var(--gold);
  color: var(--ink);
}

/* ---------- hero ---------- */

.menu-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(2.6rem, 7vw, 4.5rem) var(--pad-x) clamp(1.8rem, 4vw, 2.6rem);
}

/* dish photos from the homepage marquee as a slow-moving backdrop */
.menu-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  direction: ltr;
}

.menu-hero-track {
  display: flex;
  height: 100%;
  width: max-content;
  animation: hero-scroll 120s linear infinite;
}

.menu-hero-track img {
  height: 100%;
  width: auto;
  object-fit: cover;
}

.menu-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(250, 246, 237, 0.9),
    rgba(250, 246, 237, 0.82) 55%,
    var(--paper)
  );
}

@keyframes hero-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .menu-hero-track { animation: none; }
}

.menu-hero .ghost-word {
  bottom: auto;
  top: -1.5rem;
  inset-inline-start: 50%;
  transform: translateX(50%);
  font-size: clamp(6rem, 18vw, 11rem);
  -webkit-text-stroke: 1px rgba(201, 153, 43, 0.18);
}

.menu-hero-inner { position: relative; z-index: 1; }

/* ---------- category chip nav ---------- */

.cat-nav {
  position: sticky;
  top: 3.55rem;
  z-index: 30;
  background: rgba(250, 246, 237, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.cat-nav-track {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.65rem var(--pad-x);
  scroll-padding-inline: var(--pad-x);
}

.cat-nav-track::-webkit-scrollbar { display: none; }

.cat-nav a {
  flex: 0 0 auto;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--stone);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.cat-nav a:hover { color: var(--ink); border-color: var(--gold-d); }

.cat-nav a.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

/* ---------- sections ---------- */

.menu-section {
  padding: clamp(2.4rem, 6vw, 4rem) var(--pad-x);
  scroll-margin-top: 7.5rem;
}

.menu-section:nth-of-type(even) { background: var(--cream); }

.menu-section .section-head { margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }

.section-head .head-ar {
  display: block;
  font-family: var(--font-arabic);
  font-size: 1.05rem;
  color: var(--gold-d);
  margin-top: 0.5rem;
}

.dish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.9rem clamp(2rem, 5vw, 4.5rem);
  max-width: 68rem;
}

@media (max-width: 760px) {
  .dish-grid { grid-template-columns: 1fr; gap: 1.6rem; }
}

/* ---------- dish ---------- */

.dish-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.dish-head h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
}

.dish-head .name-ar {
  font-family: var(--font-arabic);
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--gold-d);
  white-space: nowrap;
}

.dish-head .leader {
  flex: 1;
  min-width: 1.2rem;
  border-bottom: 1px dotted rgba(38, 33, 25, 0.35);
  transform: translateY(-0.3em);
}

.dish-head .price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}

.dish-desc {
  color: var(--stone);
  font-size: 0.98rem;
  line-height: 1.55;
  margin-top: 0.35rem;
  max-width: 32rem;
}

.dish-desc-ar {
  font-size: 0.9rem;
  color: var(--stone);
  opacity: 0.85;
  line-height: 1.7;
  margin-top: 0.15rem;
  max-width: 32rem;
}

/* ---------- footer ---------- */

.menu-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: clamp(2.2rem, 5vw, 3.2rem) var(--pad-x);
}

.menu-footer .footer-emblem {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 0.9rem;
}

.menu-footer p { color: var(--stone); font-size: 0.98rem; }

.menu-footer .menu-footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.3rem;
}

.menu-footer .btn { display: inline-block; }

/* ---------- dish photo (items added from the admin app) ---------- */

.dish-photo {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.6rem;
}

/* ---------- scheduled popup ad ---------- */

.ad-pop-bg {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(38, 33, 25, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.ad-pop {
  position: relative;
  background: var(--paper);
  border-radius: 16px;
  max-width: 26rem;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: 0 18px 50px rgba(38, 33, 25, 0.35);
}

.ad-pop-close {
  position: absolute;
  top: 0.5rem;
  inset-inline-end: 0.6rem;
  z-index: 1;
  background: rgba(250, 246, 237, 0.92);
  border: none;
  border-radius: 50%;
  width: 2.1rem;
  height: 2.1rem;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.ad-pop-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 16px 16px 0 0;
}

.ad-pop-body { padding: 1.1rem 1.3rem 1.4rem; text-align: center; }

.ad-pop-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--gold-d);
  background: var(--cream);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  margin-bottom: 0.6rem;
}

.ad-pop-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1.25;
}

.ad-pop-text { color: var(--stone); margin-top: 0.5rem; }

/* ---------- reveal (mirrors style.css behaviour, safe fallback) ---------- */

@media (prefers-reduced-motion: reduce) {
  .cat-nav a, .menu-topbar .back-link { transition: none; }
}
