/* =============================================================
   Shazeeda's Brews & Bites — styles
   Brand palette pulled from the logo:
     deep olive-brown background, gold script, cream, warm brown.
   Mobile-first; scales up cleanly on tablet/desktop.
   ============================================================= */

:root {
  --bg:        #29261b;  /* deep olive-brown (logo background) */
  --bg-soft:   #322e21;  /* slightly lighter panel */
  --card:      #34301f;  /* menu card */
  --card-line: #4a4430;  /* hairline / dividers */
  --gold:      #d2a02a;  /* "Shazeeda's" script gold */
  --gold-soft: #e6c468;
  --cream:     #e9dab8;  /* cup / outline cream */
  --brown:     #6d4a30;  /* "BREWS & BITES" brown */
  --text:      #f3ead2;  /* main readable text */
  --text-dim:  #b9ad8e;  /* descriptions / muted */

  --maxw: 640px;
  --radius: 16px;
  --shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px; /* keep anchored sections clear of sticky nav */
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(120% 60% at 50% -10%, #34301f 0%, var(--bg) 55%);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Header ---------- */
.header {
  padding: calc(env(safe-area-inset-top) + 28px) 20px 22px;
  text-align: center;
}
.header__inner { max-width: var(--maxw); margin: 0 auto; }

.header__logo {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: var(--shadow);
  background: var(--bg);
}
.header__name {
  font-family: "Pacifico", cursive;
  font-weight: 400;
  color: var(--gold);
  font-size: clamp(1.9rem, 8vw, 2.8rem);
  margin: 14px 0 2px;
  line-height: 1.1;
}
.header__tagline {
  margin: 0;
  color: var(--cream);
  font-style: italic;
  letter-spacing: 0.06em;
  font-size: 0.98rem;
}

/* ---------- Menu ---------- */
.menu {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 16px 28px;
}

.category { margin-top: 26px; }

.category__title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 12px;
}
.category__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--card-line), transparent);
}

.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 15px 16px;
}
.item + .item { border-top: 1px solid var(--card-line); }

.item__icon {
  font-size: 1.6rem;
  line-height: 1.4;
  flex-shrink: 0;
  width: 34px;
  text-align: center;
}
.item__body { flex: 1; min-width: 0; }

.item__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.item__name {
  font-weight: 600;
  font-size: 1.04rem;
  color: var(--text);
}
.item__price {
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.item__desc {
  margin: 3px 0 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ---------- Loading / empty / error states ---------- */
.state {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 20px;
}
.spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 14px;
  border: 3px solid var(--card-line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.footer {
  margin-top: 10px;
  padding: 26px 20px calc(env(safe-area-inset-bottom) + 34px);
  background: var(--bg-soft);
  border-top: 1px solid var(--card-line);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}
.footer__note {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0 0 12px;
}
.footer__halal {
  color: var(--gold-soft);
  font-size: 0.92rem;
  font-weight: 500;
}
.footer__thanks {
  color: var(--cream);
  font-weight: 500;
  margin: 16px 0 6px;
}
.footer__brand {
  font-family: "Pacifico", cursive;
  color: var(--gold);
  font-size: 1.1rem;
  margin: 4px 0 0;
}

/* ---------- Status badge (Open / Closed) ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.status-badge.is-open {
  color: #b9f6c0;
  background: rgba(60, 160, 80, 0.15);
  border-color: rgba(120, 210, 140, 0.4);
}
.status-badge.is-closed {
  color: #f0c0a8;
  background: rgba(170, 80, 50, 0.15);
  border-color: rgba(210, 130, 100, 0.4);
}
.status-badge__detail { font-weight: 400; opacity: 0.85; }

/* ---------- Sticky controls (search + category tabs) ---------- */
.controls {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(41, 38, 27, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-line);
}
.controls__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 16px;
}

.search { position: relative; }
.search__icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.7;
  pointer-events: none;
}
.search__input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border-radius: 12px;
  border: 1px solid var(--card-line);
  background: var(--card);
  color: var(--text);
  font-size: 16px; /* >=16px stops iOS zoom-on-focus */
  font-family: inherit;
}
.search__input::placeholder { color: var(--text-dim); }
.search__input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(210, 160, 42, 0.18);
}

.catnav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: 10px;
  padding-bottom: 2px;
}
.catnav::-webkit-scrollbar { display: none; }
.catnav:empty { display: none; }
.catnav__btn {
  flex: 0 0 auto;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--card-line);
  background: var(--card);
  color: var(--text-dim);
  font: 600 0.85rem/1 "Poppins", sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.catnav__btn.is-active {
  background: var(--gold);
  color: #221f15;
  border-color: var(--gold);
}

/* ---------- Item tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(210, 160, 42, 0.12);
  border: 1px solid rgba(210, 160, 42, 0.3);
  border-radius: 6px;
  padding: 2px 8px;
}

/* ---------- Info card (contact / hours) ---------- */
.info {
  max-width: var(--maxw);
  margin: 4px auto 0;
  padding: 0 16px;
}
.info__inner {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
}
.actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 10px;
}
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1px solid var(--card-line);
  background: var(--bg-soft);
  color: var(--text);
  font: 600 0.78rem/1.1 "Poppins", sans-serif;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s, border-color 0.12s;
}
.action:active { transform: scale(0.96); }
.action:hover { border-color: var(--gold); }
.action__icon { font-size: 1.35rem; }

.info__address {
  margin: 14px 0 0;
  text-align: center;
  color: var(--cream);
  font-size: 0.9rem;
}

.hours { margin-top: 14px; }
.hours summary {
  cursor: pointer;
  color: var(--gold-soft);
  font-weight: 600;
  font-size: 0.9rem;
  list-style: none;
  text-align: center;
}
.hours summary::-webkit-details-marker { display: none; }
.hours__list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.hours__row {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px;
  font-size: 0.88rem;
  color: var(--text-dim);
  border-top: 1px solid var(--card-line);
}
.hours__row.is-today {
  color: var(--text);
  font-weight: 600;
}
.hours__note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  z-index: 30;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #221f15;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 24px);
  transform: translate(-50%, 20px);
  z-index: 40;
  background: #1d1b13;
  color: var(--text);
  border: 1px solid var(--card-line);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* Tablet / desktop niceties */
@media (min-width: 700px) {
  .header__logo { width: 150px; height: 150px; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner { animation: none; }
  .action, .catnav__btn, .toast { transition: none; }
}
