:root {
  --brand: #6f2f1e;
  --brand-dark: #4f1c13;
  --brand-light: #a54825;
  --accent: #ef8e2f;
  --green: #23704d;
  --pickup: #0b4a36;
  --platform-red: #c0262d;
  --paper: #fffdf8;
  --surface: #ffffff;
  --ink: #261712;
  --muted: #796055;
  --line: #eadfd5;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); color: var(--ink); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  font: 16px/1.5 "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}
a { color: inherit; text-decoration: none; }

/* Header */
.app-header {
  position: sticky; top: 0; z-index: 10;
  color: #fff;
  background: linear-gradient(120deg, var(--brand-dark), var(--brand) 62%, #973f22);
  box-shadow: 0 3px 18px rgba(52, 18, 8, .2);
}
.header-inner {
  max-width: 760px; margin: 0 auto; min-height: 72px; padding: 10px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { font-size: 29px; }
.brand strong { display: block; font-size: 20px; letter-spacing: .02em; }
.brand small { display: block; margin-top: 1px; color: #f6d7bd; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.header-links { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.header-links > span { color: #d9b6a4; font-size: 12px; }
.wholesale-top, .whatsapp-top { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 4px; color: #fff; font-size: 12px; font-weight: 700; }
.header-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.header-links a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.language-top { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; color: #fff; background: rgba(255,255,255,.1); font-size: 12px; font-weight: 700; white-space: nowrap; }

/* Hero: phone order, hours and address */
.hero {
  padding: 24px 20px 38px; text-align: center; color: #fff;
  background: radial-gradient(circle at 84% 14%, rgba(239,142,47,.42), transparent 31%),
    linear-gradient(145deg, #4f1c13 0%, #7d351f 54%, #b24e29 100%);
}
.hero-sub { color: #f7d9ba; font-size: 11px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.hero h1 { margin-top: 8px; font-size: clamp(30px, 7vw, 42px); line-height: 1.15; letter-spacing: -.03em; }
.call-hero {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 18px; min-height: 50px; padding: 0 24px; border-radius: 999px;
  background: #fff; color: var(--brand); font-weight: 900; box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.hero-backup { margin-top: 12px; color: #ffe9d2; font-size: 13px; }
.hero-backup a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.store-location { max-width: 650px; margin: 16px auto 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); text-align: center; }
.store-hours, .store-address { font-size: 15px; line-height: 1.65; }
.store-hours { color: #ffe9d2; font-weight: 700; }
.store-hours span { font-weight: 400; }
.store-address { display: block; margin-top: 2px; padding: 8px 0; color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); text-underline-offset: 4px; }
.store-address strong { white-space: nowrap; }

/* Pickup discount */
.offer {
  max-width: 728px; margin: -22px auto 0; position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  background: #fff7ec; border: 1px solid #f2d3a9; border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(80, 35, 18, .1);
}
.offer-badge {
  flex: 0 0 auto; width: 62px; height: 62px; display: grid; place-items: center;
  border-radius: 50%; background: var(--pickup); color: #fff; font-size: 13px; font-weight: 900; line-height: 1.2; text-align: center;
}
.offer strong { display: block; color: var(--pickup); font-size: 17px; line-height: 1.4; }
.offer .offer-example { margin-top: 4px; color: #3d3a32; font-size: 14px; line-height: 1.5; }
.offer-example b { color: var(--pickup); font-size: 16px; white-space: nowrap; }
.offer p { margin-top: 2px; color: #76553e; font-size: 12px; }
.offer-details summary { width: fit-content; min-height: 36px; padding-top: 6px; cursor: pointer; color: var(--brand); font-size: 13px; }
.offer-details p { margin-top: 8px; font-size: 13px; line-height: 1.6; }
.store-address:focus-visible, .whatsapp-secondary a:focus-visible, .offer-details summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Category tabs */
.cat-tabs {
  display: flex; gap: 8px; overflow-x: auto; max-width: 760px; margin: 0 auto;
  padding: 16px 16px 6px; scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: 0 0 auto; min-height: 40px; padding: 0 15px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: 13px; font-weight: 900;
}
.cat-tab.active { border-color: var(--brand); background: var(--brand); color: #fff; }

/* Menu cards */
.menu-main { max-width: 760px; margin: 0 auto; padding: 8px 16px 34px; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.menu-card {
  display: flex; flex-direction: column;
  overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(71, 43, 26, .07);
}
.menu-card-img { flex: 0 0 auto; display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f7e8d7; }
.menu-card-body { display: flex; flex-direction: column; flex: 1; padding: 11px 12px 13px; }
.menu-card-cat { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.menu-card-code { display: inline-block; margin-right: 7px; color: var(--brand); font-size: 12px; letter-spacing: .04em; }
.menu-card-name { display: block; margin: 3px 0 5px; font-size: 16px; line-height: 1.25; }
.menu-card-desc { min-height: 36px; margin-bottom: 10px; color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.menu-card-desc[lang="en"] { font-size: 11px; }
.menu-card-drink .menu-card-body { padding: 18px 14px; min-height: 176px; background: linear-gradient(145deg, #fff, #fff7ec); }
.menu-card-drink .menu-card-img { object-fit: contain; padding: 12px; background: #fff; }

/* Card prices: the paid pickup price first, with 已計優惠 beside the amount; platform price below, small and red */
.price-stack { margin-top: auto; padding-top: 9px; border-top: 1px solid var(--line); }
.pickup-label { display: block; color: var(--pickup); font-size: 12px; font-weight: 900; }
.pickup-label small { margin-left: 4px; font-size: 9px; font-weight: 400; }
.pickup-amount { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 3px; }
.pickup-amount strong { color: var(--pickup); font-size: 21px; line-height: 1.1; white-space: nowrap; }
.price-included { padding: 2px 6px; border-radius: 999px; background: var(--pickup); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.45; white-space: nowrap; }
.platform-price { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--platform-red); font-size: 11px; }
.platform-price > span { min-width: 0; }
.platform-price strong { flex-shrink: 0; color: var(--platform-red); font-size: 13px; font-weight: 700; text-decoration: line-through; text-decoration-thickness: 1px; }

/* WhatsApp contact */
.contact-card {
  max-width: 728px; margin: 4px auto 0; padding: 22px;
  border: 1px solid #dce8df; border-radius: var(--radius);
  background: linear-gradient(135deg, #f4fbf6, #fffdf8);
}
.contact-card h2 { margin-top: 2px; color: #194d35; font-size: 22px; line-height: 1.25; }
.contact-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 6px 0; }
.whatsapp-secondary { color: var(--green); font-size: 16px; font-weight: 700; }
.whatsapp-secondary a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.whatsapp-note { color: var(--muted); font-size: 14px; line-height: 1.7; }
.back-to-menu { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid #b9cfc0; border-radius: 999px; color: var(--green); background: #fff; font-size: 14px; font-weight: 700; }
.back-to-menu:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.contact-secondary { margin-top: 10px; color: var(--muted); font-size: 13px; }
.contact-secondary a { color: var(--brand); font-weight: 900; }

/* Bread wholesale (collapsed by default) */
.wholesale-card { max-width: 728px; margin: 20px auto; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.wholesale-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 16px 22px; cursor: pointer; list-style: none; color: var(--muted); font-weight: 700; }
.wholesale-card > summary::-webkit-details-marker { display: none; }
.wholesale-toggle { flex: 0 0 auto; font-size: 20px; line-height: 1; }
.wholesale-card[open] > summary { color: var(--brand); border-bottom: 1px solid var(--line); }
.wholesale-card[open] .wholesale-toggle { transform: rotate(45deg); }
.wholesale-content { padding: 14px 22px; }
.wholesale-details { margin-top: 7px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.wholesale-call { display: inline-flex; align-items: center; justify-content: center; margin-top: 18px; min-height: 50px; max-width: 100%; padding: 10px 20px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 17px; font-weight: 900; }
.wholesale-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.return-menu { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.wholesale-card > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; }
.wholesale-call:focus-visible, .return-menu:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
#wholesale, #menu, #whatsapp-inquiry { scroll-margin-top: 90px; }

/* Social links */
.social-card {
  max-width: 728px; margin: 24px auto 32px; padding: 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: 0 6px 20px rgba(71,43,26,.06);
}
.social-card h2 { color: var(--brand); font-size: 21px; line-height: 1.3; }
.social-note { margin-top: 5px; color: var(--muted); font-size: 13px; }
.social-links { margin-top: 15px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.social-link {
  min-width: 0; min-height: 76px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; border-radius: 13px;
  color: #fff; box-shadow: 0 4px 12px rgba(30,30,60,.15);
  transition: transform .15s ease, box-shadow .15s ease;
}
.social-facebook { background: #1456b8; }
.social-instagram { background: linear-gradient(120deg, #622f98, #9b285b 64%, #a83c27); }
.social-icon { flex: 0 0 28px; width: 28px; height: 28px; }
.social-label { min-width: 0; }
.social-label strong { display: block; font-size: 18px; font-weight: 900; line-height: 1.3; }
.social-label small { display: block; margin-top: 3px; font-size: 11px; }
.social-arrow { margin-left: auto; font-size: 24px; line-height: 1; }
.social-link:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(30,30,60,.23); }
.social-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

footer { padding: 20px; color: #8a766d; background: #f5eee7; text-align: center; font-size: 12px; }

/* Responsive: keep these in widest-to-narrowest order */
@media (min-width: 600px) {
  .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
  .header-inner { gap: 8px; padding-left: 16px; padding-right: 16px; }
  .brand-icon { display: none; }
  .header-links { gap: 6px; }
  .header-links > span { display: none; }
  .wholesale-top, .whatsapp-top { font-size: 11px; padding-left: 2px; padding-right: 2px; }
  .language-top { padding-left: 6px; padding-right: 6px; font-size: 11px; }
  .wholesale-card { margin: 20px 16px; }
  .wholesale-card > summary { padding: 16px 18px; }
  .wholesale-content { padding-left: 18px; padding-right: 18px; }
  .social-card { margin: 20px 16px 28px; padding: 18px; }
  .social-links { grid-template-columns: 1fr; gap: 10px; }
  .social-link { min-height: 68px; }
}
@media (max-width: 380px) {
  .header-inner { padding-left: 12px; padding-right: 12px; }
  .brand strong { font-size: 18px; }
  .menu-grid { gap: 9px; }
  .menu-card-body { padding: 9px; }
  .menu-card-name { font-size: 14px; }
  .pickup-amount strong { font-size: 19px; }
  .offer { gap: 10px; padding: 12px 14px; }
}
@media (max-width: 359px) {
  .brand small { font-size: 9px; letter-spacing: .03em; }
  .header-links { gap: 4px; }
  .language-flag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .social-link { transition: none; }
  .social-link:hover { transform: none; }
}
