/* ==========================================================================
   Sensei Panda — digital menu
   Mobile first. Cream page, burgundy chrome, gold accents.
   ========================================================================== */

:root {
  /* Brand, taken from the printed QR card and the logo */
  --burgundy:       #5c0a0a;
  --burgundy-deep:  #3d0708;
  --burgundy-light: #7a0f14;
  --gold:           #d4a437;
  --gold-soft:      #e8c26a;
  --gold-dim:       rgba(212, 164, 55, .28);
  --cream:          #f6f1e7;
  --cream-card:     #fffdf8;
  --ink:            #141414;
  --ink-soft:       #5b524a;
  --ink-faint:      #8b8078;
  --bamboo:         #2f9e44;
  --line:           rgba(92, 10, 10, .12);

  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 1px 2px rgba(61, 7, 8, .06), 0 6px 18px rgba(61, 7, 8, .07);
  --shadow-lg:  0 -6px 28px rgba(61, 7, 8, .16);

  --sans:  "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --header-h:  60px;
  --nav-h:     66px;
  --safe-b:    env(safe-area-inset-bottom, 0px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Room for the sticky order bar so the last row is never trapped under it */
  padding-bottom: calc(72px + var(--safe-b));
}

img { max-width: 100%; display: block; }

button { font: inherit; color: inherit; cursor: pointer; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--burgundy); color: var(--cream);
  padding: 10px 16px; text-decoration: none; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }


/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
  border-bottom: 1px solid rgba(212, 164, 55, .35);
}

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; min-width: 0;
}
.brand-logo {
  width: 36px; height: auto; flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--gold-dim);
}
.brand-wordmark {
  /* The wordmark is black-on-transparent artwork; on burgundy it needs the
     gold edge lifted out of it, so it gets a warm glow rather than a filter
     that would flatten the gold in the lettering. */
  width: auto; height: 24px;
  filter: drop-shadow(0 0 1px rgba(232, 194, 106, .9))
          drop-shadow(0 1px 2px rgba(0, 0, 0, .4));
}

.cart-button {
  position: relative; flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--cream);
  transition: background .18s ease;
}
.cart-button:hover { background: rgba(255, 255, 255, .14); }
.cart-button svg {
  width: 21px; height: 21px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.cart-count {
  position: absolute; top: -3px; right: -3px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--gold); color: var(--burgundy-deep);
  font-size: 11px; font-weight: 700; line-height: 1;
  border-radius: 10px;
  transform: scale(0); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1);
}
body.has-cart .cart-count { transform: scale(1); }


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

.hero {
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(212, 164, 55, .16) 0%, transparent 60%),
    linear-gradient(160deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
  color: var(--cream);
  padding: 22px 18px 24px;
}
.hero-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
}
.hero-text { flex: 1 1 auto; min-width: 0; }

.hero-kicker {
  margin: 0 0 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-soft);
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 7.4vw, 44px);
  font-weight: 600; line-height: 1.08; letter-spacing: .01em;
}
.hero-location {
  margin: 8px 0 0;
  font-size: 13px; color: rgba(246, 241, 231, .82);
}
.hero-hours {
  margin: 3px 0 0;
  font-size: 12.5px; color: var(--gold-soft);
}
.hero-how {
  margin: 12px 0 0;
  max-width: 44ch;
  font-size: 12.5px; line-height: 1.55;
  color: rgba(246, 241, 231, .66);
}
.hero-mascot {
  flex: none;
  width: clamp(88px, 26vw, 132px); height: auto;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .35));
}


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

.category-nav {
  position: sticky; top: var(--header-h); z-index: 35;
  background: rgba(246, 241, 231, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.category-nav-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; gap: 7px;
  padding: 9px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.category-nav-inner::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: flex; align-items: center; gap: 7px;
  padding: 6px 13px 6px 7px;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.chip img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip.active {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--cream);
}


/* -------------------------------------------------------------------- menu */

.menu { max-width: 1120px; margin: 0 auto; padding: 6px 14px 30px; }

.loading, .load-error {
  padding: 56px 16px; text-align: center; color: var(--ink-faint);
}
.load-error h2 {
  font-family: var(--serif); font-size: 26px; color: var(--ink); margin: 0 0 8px;
}
.load-error p { max-width: 36ch; margin: 0 auto 18px; }
.load-error .btn-wa { display: inline-flex; width: auto; padding: 12px 22px; }

.section { padding-top: 26px; scroll-margin-top: calc(var(--header-h) + var(--nav-h) - 8px); }

.section-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--gold-dim);
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(23px, 5.6vw, 31px);
  font-weight: 600; line-height: 1.1;
  color: var(--burgundy);
}
.section-tagline {
  margin: 0; font-size: 12.5px; font-style: italic; color: var(--ink-faint);
}


/* -------------------------------------------------------------------- grid */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  gap: 12px;
}

.card {
  display: flex; flex-direction: column;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(61,7,8,.08), 0 14px 30px rgba(61,7,8,.1); }
.card.in-cart { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-dim), var(--shadow); }

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #fbf7ef 0%, #f1e9db 100%);
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .card-media img { transform: scale(1.04); }

/* No photo yet: the category illustration is artwork on a transparent ground,
   not a picture of the dish, so it is centred with room around it rather than
   cropped to fill.

   It keeps the same 4:3 box as a photographed card. An earlier version gave it
   a shorter band, which looked better in isolation but broke the grid: a row
   holding one photographed dish and one illustrated one came out ragged, with
   the two titles at different heights. Most dishes have photos now, so the
   illustration is the exception — and the exception should fit the row. */
.card.no-photo .card-media {
  background:
    radial-gradient(80% 120% at 50% 120%, rgba(212, 164, 55, .14) 0%, transparent 70%),
    linear-gradient(160deg, #fbf7ef 0%, #f3ecdf 100%);
  border-bottom: 1px solid var(--gold-dim);
}
/* Deliberately no mix-blend-mode: the artwork already has a transparent
   ground, so blending buys nothing visually and costs a composited layer on
   every one of ~90 cards. */
.card-media img.is-placeholder {
  object-fit: contain;
  padding: 14px 16px;
  opacity: .85;
}
.card:hover .card-media img.is-placeholder { transform: scale(1.03); }

.badge {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #fff;
  background: var(--burgundy);
}
.badge-new        { background: var(--burgundy); }
.badge-spicy      { background: #c0392b; }
.badge-vegan      { background: var(--bamboo); }
.badge-bestseller { background: var(--gold); color: var(--burgundy-deep); }
/* The house signatures, starred on the printed menu. Gold on burgundy so they
   read as a mark of quality rather than as another coloured label. */
.badge-signature {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: var(--burgundy-deep);
  box-shadow: 0 1px 3px rgba(61, 7, 8, .35);
}

.card-body {
  display: flex; flex-direction: column; flex: 1 1 auto;
  gap: 6px;
  padding: 11px 12px 12px;
}

.card-title { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.card-title h3 {
  margin: 0;
  font-size: 14.5px; font-weight: 700; line-height: 1.25;
  letter-spacing: -.005em;
}
.pieces {
  flex: none;
  padding: 1px 6px;
  background: var(--gold-dim);
  border-radius: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  color: #7a5a12;
  white-space: nowrap;
}

.card-desc {
  margin: 0;
  font-size: 11.5px; line-height: 1.45;
  color: var(--ink-faint);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc.open { -webkit-line-clamp: unset; }

.card-foot {
  margin-top: auto; padding-top: 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.price {
  font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  color: var(--burgundy);
}


/* ----------------------------------------------------------------- stepper */

.stepper { flex: none; }
.stepper .qty { display: none; }
.stepper.active .btn-add { display: none; }
.stepper.active .qty { display: flex; }

.btn-add {
  padding: 7px 15px;
  background: var(--burgundy);
  color: var(--cream);
  border: none; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  transition: background .18s ease, transform .12s ease;
}
.btn-add:hover  { background: var(--burgundy-light); }
.btn-add:active { transform: scale(.94); }

/* Used both inside a card's stepper and on its own in the cart. The stepper
   hides it until the item is in the order; on its own it is always shown. */
.qty {
  display: flex; align-items: center; gap: 2px;
  background: var(--burgundy);
  border-radius: 999px;
  padding: 2px;
}
.qty-btn {
  width: 27px; height: 27px;
  display: grid; place-items: center;
  background: transparent; border: none; border-radius: 50%;
  color: var(--cream);
  font-size: 16px; font-weight: 600; line-height: 1;
  transition: background .15s ease;
}
.qty-btn:hover  { background: rgba(255, 255, 255, .16); }
.qty-btn:active { background: rgba(255, 255, 255, .26); }
.qty-n {
  min-width: 20px; text-align: center;
  font-size: 13px; font-weight: 700;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}


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

.site-footer {
  margin-top: 24px;
  padding: 30px 18px 34px;
  background: linear-gradient(160deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
  color: rgba(246, 241, 231, .7);
  text-align: center;
}
.footer-logo {
  width: 52px; height: auto; margin: 0 auto 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--gold-dim);
}
.footer-name {
  margin: 0;
  font-family: var(--serif); font-size: 21px; font-weight: 600;
  color: var(--cream);
}
.footer-location { margin: 3px 0 0; font-size: 12.5px; }
.footer-links {
  margin: 14px 0 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 12.5px; font-weight: 600;
}
.footer-links a { color: var(--gold-soft); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-note { margin: 16px 0 0; font-size: 11px; color: rgba(246, 241, 231, .42); }


/* ------------------------------------------------------- sticky order bar */

.cart-bar {
  position: fixed; z-index: 45;
  left: 12px; right: 12px; bottom: calc(12px + var(--safe-b));
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  color: var(--cream);
  box-shadow: 0 8px 26px rgba(61, 7, 8, .3);
  transform: translateY(calc(100% + 24px));
  opacity: 0;
  transition: transform .28s cubic-bezier(.3, 1.1, .5, 1), opacity .2s ease;
}
body.has-cart .cart-bar { transform: translateY(0); opacity: 1; }
body.cart-open .cart-bar { transform: translateY(calc(100% + 24px)); opacity: 0; }

.cart-bar-left, .cart-bar-right {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600;
}
.cart-bar-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 164, 55, .25);
}
.cart-bar-cta {
  padding: 5px 12px;
  background: var(--gold); color: var(--burgundy-deep);
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
}


/* ------------------------------------------------------------ cart drawer */

.cart-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20, 8, 8, .5);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
body.cart-open .cart-backdrop {
  opacity: 1; pointer-events: auto;
}

.cart {
  position: fixed; z-index: 55;
  left: 0; right: 0; bottom: 0;
  max-height: 86vh;
  display: flex; flex-direction: column;
  background: var(--cream);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(101%);
  transition: transform .3s cubic-bezier(.32, .72, 0, 1);
  visibility: hidden;
}
body.cart-open .cart { transform: translateY(0); visibility: visible; }

.cart-head {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 {
  margin: 0;
  font-family: var(--serif); font-size: 24px; font-weight: 600;
  color: var(--burgundy);
}
.cart-close {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 50%;
  font-size: 20px; line-height: 1; color: var(--ink-soft);
}
.cart-close:hover { background: rgba(92, 10, 10, .06); }

.cart-lines {
  flex: 1 1 auto; overflow-y: auto;
  padding: 6px 18px;
  -webkit-overflow-scrolling: touch;
}
.cart-empty {
  padding: 40px 8px; text-align: center;
  font-size: 13px; color: var(--ink-faint);
}

.cart-line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cart-line:last-child { border-bottom: none; }
.cart-line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-line-name { font-size: 13.5px; font-weight: 600; }
.cart-line-price { font-size: 12.5px; font-weight: 700; color: var(--burgundy); }

.cart-foot {
  flex: none;
  padding: 14px 18px calc(18px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--cream-card);
}
.cart-total-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}
.cart-total-row strong {
  font-size: 21px; font-weight: 700; color: var(--burgundy);
}

.btn-wa {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px;
  background: #25d366; color: #06301a;
  border: none; border-radius: 999px;
  font-size: 15px; font-weight: 700; letter-spacing: .01em;
  text-decoration: none;
  transition: background .18s ease, transform .12s ease;
}
.btn-wa svg { width: 21px; height: 21px; fill: currentColor; }
.btn-wa:hover:not(:disabled)  { background: #1fbe5a; }
.btn-wa:active:not(:disabled) { transform: scale(.985); }
.btn-wa:disabled {
  background: #d8d2c6; color: #8b8078; cursor: not-allowed;
}

.btn-clear {
  width: 100%; margin-top: 8px; padding: 9px;
  background: transparent; border: none;
  font-size: 12.5px; font-weight: 600; color: var(--ink-faint);
  text-decoration: underline;
}
.btn-clear:hover { color: var(--burgundy); }

.cart-fineprint {
  margin: 12px 0 0; text-align: center;
  font-size: 11px; line-height: 1.45; color: var(--ink-faint);
}


/* -------------------------------------------------------------- responsive */

@media (min-width: 560px) {
  body { font-size: 15.5px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
  .menu { padding-inline: 20px; }
  .hero { padding: 34px 20px 36px; }
  .category-nav-inner { padding-inline: 20px; }
  .card-title h3 { font-size: 15.5px; }
  .card-desc { font-size: 12px; }
  .price { font-size: 17px; }
}

@media (min-width: 900px) {
  :root { --header-h: 68px; }
  .site-header { padding-inline: 28px; }
  .brand-wordmark { height: 28px; }
  .hero { padding: 52px 28px 56px; }
  .hero-inner { gap: 40px; }
  .hero-mascot { width: clamp(150px, 18vw, 210px); }
  .hero-how { font-size: 13.5px; }
  .menu { padding-inline: 28px; }
  .category-nav-inner { padding-inline: 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 20px; }
  .section { padding-top: 40px; }

  /* Cart becomes a right-hand drawer; the sticky bottom bar is redundant
     next to the header's cart button, so it steps aside. */
  .cart {
    top: 0; left: auto; right: 0; bottom: 0;
    width: 400px; max-height: none;
    border-radius: 0;
    transform: translateX(101%);
  }
  body.cart-open .cart { transform: translateX(0); }
  .cart-bar { display: none; }
  body { padding-bottom: 0; }
}

@media (min-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}


/* ------------------------------------------------------------ preferences */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .card:hover { transform: none; }
  .card:hover .card-media img { transform: none; }
}

@media print {
  .site-header, .category-nav, .cart, .cart-bar, .cart-backdrop, .hero-mascot { display: none; }
  body { padding: 0; background: #fff; }
  .card { break-inside: avoid; box-shadow: none; }
}
