/* ═══════════════════════════════════════════════════
   menu.css
═══════════════════════════════════════════════════ */

/* Menu banner uses the shared yellow-dots pop-art treatment from base.css.
   (Old dark override removed.) */

/* ── Menu Category icon (image, was emoji) — used by tabs + item breadcrumb ── */
.cat-icon {
  width: 1.4em; height: 1.4em;
  object-fit: contain;
  vertical-align: middle;
  margin-inline-end: .3em;
  display: inline-block;
}

/* ── TABS ──
   White pop-art halftone background (matches #vibes on the home page). */
#menu-section {
  background-color: #fff;
  background-image: radial-gradient(circle, rgba(0,0,0,.13) 1.5px, transparent 1.6px);
  background-size: 14px 14px;
  padding-bottom: 5rem;
}

.menu-tabs {
  display: flex; justify-content: center; flex-wrap: wrap;
  padding: 2.5rem 1rem 0; margin-bottom: 2.5rem;
}
.menu-tab {
  font-family: var(--font-head); font-size: 1.05rem; letter-spacing: 2px;
  background: transparent; color: #555;
  border: 2px solid #2a2a2a; padding: .7rem 1.6rem;
  cursor: pointer; transition: .2s; margin: 0 -1px;
}
.menu-tab:hover { background: #1a1a1a; color: var(--yellow); }
.menu-tab.active { background: var(--red); color: var(--yellow); border-color: var(--red); z-index: 1; }

/* ── PANELS ── */
.menu-panel { display: none; }
.menu-panel.active { display: block; }

/* ── GRID ── */
.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px,1fr));
  gap: 1.5rem; max-width: 1200px; margin: 0 auto; padding: 0 2rem;
}

/* ── CARD ──
   Flex column so every card stretches to the same height regardless of
   description length — the body grows, the price sticks to the bottom. */
.menu-card {
  background: #161616; border: 2px solid #2a2a2a;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.menu-card__full-link {
  display: flex; flex-direction: column;
  flex: 1;
  color: inherit; text-decoration: none;
}
.menu-card:hover {
  transform: translateY(-5px);
  border-color: var(--yellow);
  box-shadow: 0 8px 0 var(--red);
}

/* Card image area */
.menu-card__img {
  height: 168px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: repeating-linear-gradient(45deg,#1c1c1c 0,#1c1c1c 10px,#161616 10px,#161616 20px);
}
.menu-card__img img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .4s;
}
.menu-card:hover .menu-card__img img { transform: scale(1.06); }

/* Emoji fallback */
.menu-card__img-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,214,0,.06) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
}
.menu-card__emoji { position: relative; z-index: 1; font-size: 4rem; line-height: 1; }

/* ── Badges ─────────────────────────────────────────────────────────
   Sticker-style: rotated a touch, dropped shadow, label pulled straight
   from MenuItemBadge in constants/enums.py via `item.get_badge_display`.
   Adding a new badge → enum entry + a `.badge--<key>` rule below. */
.badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: inline-block;
  font-family: var(--font-head);
  font-size: .75rem; letter-spacing: 1.5px; line-height: 1.4;
  padding: 3px 10px;
  border: 2px solid;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-3deg);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .35);
  /* Neutral fallback so an unknown badge key still renders cleanly. */
  background: var(--black); color: var(--white); border-color: var(--white);
}
/* The card already has a hover lift — match its motion so the badge
   "snaps" with the card instead of floating on a static plane. */
.menu-card:hover .badge { transform: rotate(-3deg) scale(1.05); }

/* ── Variants ───────────────────────────────────────────────────────
   Colours map loosely to what each tag *means*: heat for spicy / grilled,
   gold for bestseller, fresh green for healthy, comic-yellow for cheesy,
   etc. Each variant only sets its three colours — geometry comes from
   `.badge`. */

/* NEW — bright, jumps off the card. Soft pulse to attract the eye. */
.badge--new {
  background: var(--yellow); color: var(--red); border-color: var(--red);
  text-shadow: 0 0 1px var(--red);
  animation: badge-new-pulse 1.4s ease-in-out infinite;
}
@keyframes badge-new-pulse {
  0%, 100% { box-shadow: 2px 2px 0 rgba(0,0,0,.35), 0 0 0  0   rgba(232,0,29,.45); }
  50%      { box-shadow: 2px 2px 0 rgba(0,0,0,.35), 0 0 0 10px rgba(232,0,29, 0 ); }
}

/* SPICY — fire-red with a warm glow. */
.badge--spicy {
  background: linear-gradient(135deg, #ff3018 0%, #c10000 100%);
  color: var(--yellow); border-color: var(--yellow);
  box-shadow: 2px 2px 0 rgba(0,0,0,.35), 0 0 12px rgba(255, 80, 0, .55);
}

/* OFFER — looks like a price tag: hot pink-red, white text, more tilt. */
.badge--offer {
  background: #e8001d; color: #fff; border-color: #fff;
  transform: rotate(-6deg);
}
.menu-card:hover .badge--offer { transform: rotate(-6deg) scale(1.05); }

/* GRILLED — charred brown with ember-orange text. */
.badge--grilled {
  background: linear-gradient(135deg, #6b2c0f 0%, #3b1502 100%);
  color: #ffaa33; border-color: #ffaa33;
  box-shadow: 2px 2px 0 rgba(0,0,0,.35), 0 0 8px rgba(255, 120, 0, .35);
}

/* CRISPY — gold gradient, deep-red text. */
.badge--crispy {
  background: linear-gradient(135deg, #ffe14d 0%, #f7a700 100%);
  color: #a8000d; border-color: #a8000d;
}

/* BESTSELLER — gold-medal sticker. Black bg, gold border + halo, yellow text. */
.badge--bestseller {
  background: var(--black); color: var(--yellow);
  border-color: var(--yellow);
  box-shadow:
    2px 2px 0 rgba(0,0,0,.35),
    0 0 0 1px var(--black),
    0 0 12px rgba(255, 214, 0, .6);
}

/* FAMILY — warm terracotta, friendly. */
.badge--family {
  background: linear-gradient(135deg, #e07a4a 0%, #b04a1c 100%);
  color: #fff; border-color: #fff;
}

/* HEALTHY — fresh leaf-green. */
.badge--healthy {
  background: linear-gradient(135deg, #3fb05c 0%, #1e7a3a 100%);
  color: #fff; border-color: #fff;
}

/* CHEESY — buttery yellow with melted orange border. */
.badge--cheesy {
  background: linear-gradient(135deg, #ffe14d 0%, #ffc11a 100%);
  color: #6b3a00; border-color: #c87800;
}

/* Honour reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .badge, .badge--new, .menu-card:hover .badge,
  .menu-card:hover .badge--offer { animation: none; transition: none; }
}

/* Card body — flex column so the price docks at the bottom of the card. */
.menu-card__body {
  padding: 1.1rem 1.4rem;
  flex: 1;
  display: flex; flex-direction: column;
}
.menu-card__name  { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: 2px; color: var(--yellow); margin-bottom: .35rem; }

/* Description clamped to 3 lines — cards stay uniform height. */
.menu-card__desc {
  font-size: .8rem; color: var(--white); line-height: 1.5;
  margin-bottom: .35rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "Read more" hint — only rendered server-side when the description is long
   enough to be visibly cut. Inherits the card link, so tapping it navigates
   to the item-detail page. */
.menu-card__more {
  font-family: var(--font-head);
  font-size: .75rem; letter-spacing: 1px;
  color: var(--yellow);
  margin-bottom: .7rem;
  align-self: flex-start;
  border-bottom: 1px solid transparent;
  transition: border-bottom-color .15s, color .15s;
}
.menu-card:hover .menu-card__more {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* Price pinned to the bottom of the body. */
.menu-card__price {
  font-family: var(--font-display);
  font-size: 1.7rem; color: var(--yellow); letter-spacing: 1px;
  margin-top: auto;
}

/* Unavailable state */
.menu-card[data-available="false"] { opacity: .5; pointer-events: none; }

.menu-empty {
  grid-column: 1/-1; text-align: center; padding: 3rem;
  color: #555; font-family: var(--font-head); font-size: 1.4rem; letter-spacing: 3px;
}
.menu-empty--full {
  max-width: 600px; margin: 3rem auto; display: block;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .menu-grid { grid-template-columns: 1fr; }
  .menu-tab  { padding: .6rem 1rem; font-size: .9rem; }
}
