/* Nakhon Thai Shop – site styles
   Palette and motifs follow the shop's flyers: Thai-flag red, navy and white,
   temple gold, cream paper and plumeria flowers. Mobile first. */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: 'Kanit'; font-weight: 500; font-display: swap; src: url('../fonts/kanit-thai-500-normal.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-weight: 500; font-display: swap; src: url('../fonts/kanit-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-weight: 600; font-display: swap; src: url('../fonts/kanit-thai-600-normal.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-weight: 600; font-display: swap; src: url('../fonts/kanit-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Kanit'; font-weight: 700; font-display: swap; src: url('../fonts/kanit-thai-700-normal.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Kanit'; font-weight: 700; font-display: swap; src: url('../fonts/kanit-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sarabun'; font-weight: 400; font-display: swap; src: url('../fonts/sarabun-thai-400-normal.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Sarabun'; font-weight: 400; font-display: swap; src: url('../fonts/sarabun-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sarabun'; font-weight: 600; font-display: swap; src: url('../fonts/sarabun-thai-600-normal.woff2') format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'Sarabun'; font-weight: 600; font-display: swap; src: url('../fonts/sarabun-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --red: #c8102e;
  --red-600: #b00d24;
  --red-800: #7f0a19;
  --navy: #1d2b78;
  --navy-800: #141e57;
  --gold: #e3a81d;
  --gold-300: #f8d877;
  --gold-100: #fdeebd;
  --gold-700: #a8750b;
  --cream: #fff8e6;
  --cream-200: #fdf0cf;
  --ink: #2b1a10;
  --muted: #72604f;
  --line: #efdfb6;
  --card: #ffffff;
  --green: #128c4b;
  --green-600: #0d7a40;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(88, 45, 10, .08), 0 3px 10px rgba(88, 45, 10, .07);
  --shadow: 0 2px 6px rgba(88, 45, 10, .08), 0 12px 28px rgba(88, 45, 10, .12);
  --font-display: 'Kanit', 'Sarabun', 'Leelawadee UI', 'Thonburi', 'Noto Sans Thai', system-ui, sans-serif;
  --font-body: 'Sarabun', 'Kanit', 'Leelawadee UI', 'Thonburi', 'Noto Sans Thai', system-ui, sans-serif;
  --page: 1180px;
  --gutter: 14px;
  --header-h: 64px;
  --tabbar-h: 62px;
  --flag: linear-gradient(to bottom, var(--red) 0 16.667%, #fff 16.667% 33.333%, var(--navy) 33.333% 66.667%, #fff 66.667% 83.333%, var(--red) 83.333%);
  /* faint gold lattice, echoing the Thai pattern border on the flyers */
  --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%23e3a81d' stroke-opacity='.2' stroke-width='1'%3E%3Cpath d='M22 2 42 22 22 42 2 22Z'/%3E%3Cpath d='M22 12 32 22 22 32 12 22Z'/%3E%3C/g%3E%3Cg fill='%23e3a81d' fill-opacity='.22'%3E%3Ccircle cx='22' cy='22' r='2'/%3E%3Ccircle cx='0' cy='0' r='2'/%3E%3Ccircle cx='44' cy='0' r='2'/%3E%3Ccircle cx='0' cy='44' r='2'/%3E%3Ccircle cx='44' cy='44' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream) var(--lattice);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 6px; }
.sprite { position: absolute; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
.noscript { margin: 16px; padding: 14px; background: #fff; border-radius: 12px; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.2;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn-primary { color: #fff; background: linear-gradient(180deg, #dd2238, var(--red-600)); box-shadow: inset 0 0 0 2px rgba(248, 216, 119, .85), 0 4px 12px rgba(176, 13, 36, .3); }
.btn-primary:hover { background: linear-gradient(180deg, #e52b41, #bd0f28); }
.btn-whatsapp { color: #fff; background: linear-gradient(180deg, #17a257, var(--green-600)); box-shadow: 0 4px 12px rgba(13, 122, 64, .28); }
.btn-whatsapp:hover { background: linear-gradient(180deg, #19ad5d, #0e8546); }
.btn-outline { color: var(--navy); background: #fff; box-shadow: inset 0 0 0 2px var(--navy); }
.btn-outline:hover { background: #f1f3ff; }

/* ---------- Header ---------- */
.flag-stripe { height: 10px; background: var(--flag); }
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 252, 243, .96);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--gold-300);
  box-shadow: 0 2px 10px rgba(88, 45, 10, .08);
}
.header-inner {
  max-width: var(--page); margin: 0 auto; height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 10px;
}
.brand { display: flex; align-items: center; gap: 8px; flex: none; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; }
.brand-text { display: none; line-height: 1.1; }
.brand-text strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--red-600); }
.brand-text small { display: block; font-family: var(--font-display); font-weight: 500; font-size: .78rem; letter-spacing: .04em; color: var(--gold-700); }

.search { position: relative; flex: 1; min-width: 0; }
.search input {
  width: 100%; height: 44px; padding: 0 40px 0 42px;
  border: 2px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 1rem; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: #9a8a79; }
.search input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(227, 168, 29, .22); }
.search input::-webkit-search-cancel-button { display: none; }
.search-icon { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--red-600); pointer-events: none; }
.search-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--cream-200); color: var(--muted); cursor: pointer; }
.search-clear svg { width: 16px; height: 16px; }
.header-actions { display: none; align-items: center; gap: 10px; flex: none; }

.open-pill, .open-now {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 500; font-size: .9rem; white-space: nowrap;
  padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line);
}
.open-pill::before, .open-now::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #9a8a79; flex: none; }
.is-open.open-pill, .is-open.open-now { color: var(--green-600); box-shadow: inset 0 0 0 1.5px #bfe5cf; background: #f1fbf5; }
.is-open.open-pill::before, .is-open.open-now::before { background: #19ad5d; box-shadow: 0 0 0 4px rgba(25, 173, 93, .2); }
.is-closed.open-pill, .is-closed.open-now { color: var(--red-600); box-shadow: inset 0 0 0 1.5px #f3c7cd; background: #fff5f6; }
.is-closed.open-pill::before, .is-closed.open-now::before { background: var(--red); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #bfe3fb 0%, #e6f4fd 38%, #fff6dc 78%, var(--cream) 100%);
  border-bottom: 3px solid var(--gold-300);
}
.hero::after { /* gold pattern band along the bottom edge */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; z-index: -1;
  background: var(--gold-100) var(--lattice); background-size: auto, 20px 20px; opacity: .9;
}
.hero-inner {
  position: relative; max-width: var(--page); margin: 0 auto;
  padding: 18px var(--gutter) 24px;
  display: grid; grid-template-columns: 124px 1fr; align-items: center; gap: 4px 12px;
}
.hero-logo { width: 124px; height: 124px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(88, 45, 10, .22)); }
.hero-text { min-width: 0; }
.hero-gable { width: 96px; height: 26px; margin: 0 0 -2px 6px; }
.hero-name {
  display: block; font-family: var(--font-display); font-weight: 700; line-height: 1.15;
  font-size: clamp(1.9rem, 9vw, 3.6rem);
  color: var(--red-600);
  text-shadow: 0 2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 -2px 0 #fff, 0 5px 10px rgba(127, 10, 25, .25);
}
.hero-name-en { display: block; font-family: var(--font-display); font-weight: 600; font-size: clamp(.82rem, 3.4vw, 1.25rem); letter-spacing: .06em; color: var(--gold-700); margin-top: 2px; }
.hero-tagline {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin-top: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 5vw, 1.7rem); line-height: 1.3; color: var(--navy);
}
.hero-place {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 14px 2px 8px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe89a, #f6c94a); color: var(--navy-800);
  box-shadow: 0 2px 6px rgba(168, 117, 11, .25);
}
.hero-place svg { width: 20px; height: 20px; color: var(--red); }
.hero-points { display: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero-actions .btn { flex: 1 1 150px; }
.hero-browse { display: none; }
.hero-inner > .hero-text { display: contents; }
.hero-inner > .hero-text > h1 { align-self: center; }
.hero-inner > .hero-text > .hero-gable { display: none; }
.hero-inner > .hero-text > .hero-actions { grid-column: 1 / -1; }

.hero-flag { position: absolute; z-index: -1; width: 250px; height: 92px; filter: drop-shadow(0 4px 6px rgba(20, 30, 87, .22)); }
.hero-flag-left { left: -84px; top: -26px; transform: rotate(-24deg); }
.hero-flag-right { right: -92px; top: -30px; transform: rotate(24deg) scaleX(-1); }
.hero-flower { position: absolute; z-index: -1; filter: drop-shadow(0 3px 4px rgba(88, 45, 10, .25)); }
.hero-flower-1 { width: 58px; height: 58px; right: -14px; bottom: 56px; transform: rotate(18deg); }
.hero-flower-2 { width: 40px; height: 40px; left: -10px; bottom: 8px; transform: rotate(-20deg); }
.hero-flower-3 { display: none; }

/* ---------- Highlights (delivery / hours / contact) ---------- */
.highlights {
  max-width: var(--page); margin: 0 auto; padding: 14px var(--gutter) 4px;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(236px, 1fr); gap: 10px;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
}
.highlights::-webkit-scrollbar { display: none; }
.highlight {
  scroll-snap-align: start;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px; border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--line);
}
.highlight-icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: #fff; }
.highlight-icon svg { width: 26px; height: 26px; }
.highlight-delivery .highlight-icon { background: linear-gradient(160deg, #e3263c, var(--red-800)); }
.highlight-hours .highlight-icon { background: linear-gradient(160deg, #3246a8, var(--navy-800)); }
.highlight-contact .highlight-icon { background: linear-gradient(160deg, #19ad5d, var(--green-600)); }
.highlight-text { min-width: 0; line-height: 1.25; }
.highlight-text strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.highlight-text small { display: block; font-size: .86rem; color: var(--muted); }
.highlight-delivery strong { color: var(--red-600); }
.highlight-hours.is-open strong { color: var(--green-600); }
.highlight-hours.is-closed strong { color: var(--red-600); }

/* ---------- Category chips ---------- */
.chips-bar {
  position: sticky; top: var(--header-h); z-index: 30;
  margin-top: 10px;
  background: rgba(255, 248, 230, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.chips-title { display: none; }
.chips {
  max-width: var(--page); margin: 0 auto; padding: 10px var(--gutter);
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 42px; padding: 0 14px 0 6px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: #fff; box-shadow: inset 0 0 0 1.5px var(--line);
  font-family: var(--font-display); font-weight: 500; font-size: .95rem; color: var(--ink); white-space: nowrap;
  transition: background-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.chip-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--cream-200); font-size: 1.05rem; line-height: 1; }
.chip-count { font-family: var(--font-body); font-size: .78rem; color: var(--muted); }
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--gold); }
.chip[aria-pressed='true'] { color: #fff; background: linear-gradient(180deg, #dd2238, var(--red-600)); box-shadow: inset 0 0 0 2px var(--gold-300), 0 3px 8px rgba(176, 13, 36, .28); }
.chip[aria-pressed='true'] .chip-icon { background: #fff; }
.chip[aria-pressed='true'] .chip-count { color: rgba(255, 255, 255, .85); }

/* ---------- Catalog ---------- */
.catalog { max-width: var(--page); margin: 0 auto; padding: 6px var(--gutter) 8px; min-height: 50vh; }
.section { padding-top: 16px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-title {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 4px 18px 4px 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.2; color: #fff;
  background: linear-gradient(180deg, #d81f35, var(--red-800));
  border-radius: 999px 14px 14px 999px;
  box-shadow: inset 0 0 0 2px var(--gold-300), 0 3px 8px rgba(127, 10, 25, .22);
}
.section-title .emoji { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: 1.05rem; line-height: 1; flex: none; }
.section-featured .section-title { color: var(--navy-800); background: linear-gradient(180deg, #ffe89a, #f1bd35); box-shadow: inset 0 0 0 2px #fff3c4, 0 3px 8px rgba(168, 117, 11, .28); }
.section-count { display: none; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.see-all {
  display: inline-flex; align-items: center; gap: 2px; border: 0; cursor: pointer; white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; color: var(--navy);
  transition: background-color .12s ease, box-shadow .12s ease;
}
.see-all svg { width: 16px; height: 16px; flex: none; }
.see-all-head { flex: none; min-height: 36px; padding: 0 8px 0 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font-size: .88rem; }
.see-all-head:hover { box-shadow: inset 0 0 0 1.5px var(--gold); }
.see-all-foot { display: flex; justify-content: center; width: 100%; min-height: 46px; margin-top: 10px; padding: 0 14px; border-radius: 14px; background: var(--gold-100); box-shadow: inset 0 0 0 1.5px var(--gold-300); font-size: .98rem; white-space: normal; text-align: center; line-height: 1.25; }
.see-all-foot:hover { background: #fbe39a; }
.grid-preview > :nth-child(n+7) { display: none; }
.section-rule { flex: 1; min-width: 8px; height: 2px; background: linear-gradient(90deg, var(--gold-300), rgba(248, 216, 119, 0)); border-radius: 2px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  transition: transform .14s ease, box-shadow .14s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--gold); }
.card-media { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(180deg, #fff, #fffaf0); display: grid; place-items: center; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: clamp(2.6rem, 14vw, 4rem); line-height: 1; background: radial-gradient(circle at 50% 45%, #fff 0 34%, var(--tint, #fdefc9) 35% 100%); }
.card-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; flex: 1; border-top: 1px solid #f6ecd0; }
.card-name { font-family: var(--font-body); font-weight: 600; font-size: .95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card-unit { font-size: .82rem; color: var(--muted); }
.card-price { margin-top: auto; padding-top: 4px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.1; color: var(--red-600); white-space: nowrap; }
.price .cur { font-family: system-ui, sans-serif; font-size: .78em; font-weight: 700; margin-right: 1px; }
.price-old { font-size: .86rem; color: #9a8a79; text-decoration: line-through; white-space: nowrap; }
.deal-line { flex: 1 1 100%; }
.deal { display: inline-block; padding: 1px 9px; border-radius: 999px; background: #fff0c9; box-shadow: inset 0 0 0 1.5px var(--gold); font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--red-800); white-space: nowrap; }
.deal .cur { font-family: system-ui, sans-serif; font-size: .85em; }
.dialog-meta .deal { font-size: 1.1rem; padding: 3px 14px; }
.price-ask { font-family: var(--font-display); font-weight: 500; font-size: .92rem; color: var(--navy); }
.badge { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 2px 9px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: .74rem; line-height: 1.5; }
.badge-featured { color: var(--navy-800); background: linear-gradient(180deg, #ffe89a, #f1bd35); box-shadow: 0 1px 3px rgba(168, 117, 11, .35); }
.badge-sale { color: #fff; background: var(--red); box-shadow: 0 1px 3px rgba(127, 10, 25, .35); }
.badge + .badge { top: 34px; }
.card.is-out .card-media img, .card.is-out .card-placeholder { opacity: .4; filter: grayscale(.8); }
.card.is-out .price { color: #8a7a6a; }
.badge-out { top: auto; bottom: 8px; left: 50%; transform: translateX(-50%); color: #fff; background: rgba(43, 26, 16, .82); white-space: nowrap; }

.skeleton { aspect-ratio: 3 / 4.3; background: linear-gradient(100deg, #fff 30%, #fdf3d8 50%, #fff 70%) 0 0 / 300% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -300% 0; } }

.empty { margin: 34px auto; max-width: 420px; padding: 26px 20px; text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--line); }
.empty-icon { font-size: 2.6rem; line-height: 1; margin-bottom: 8px; }
.empty h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--navy); }
.empty p { margin: 6px 0 16px; color: var(--muted); }
.catalog-note { max-width: var(--page); margin: 12px auto 0; padding: 0 var(--gutter); font-size: .84rem; color: var(--muted); text-align: center; }

/* ---------- Shop info ---------- */
.shop { position: relative; overflow: hidden; margin-top: 28px; padding: 30px var(--gutter) 34px; background: linear-gradient(180deg, #fdeebd, #fff4d2); border-top: 3px solid var(--gold-300); border-bottom: 3px solid var(--gold-300); }
.shop-grid { position: relative; max-width: var(--page); margin: 0 auto; display: grid; gap: 16px; }
.panel { background: #fffdf6; border-radius: 22px; box-shadow: var(--shadow), inset 0 0 0 2px var(--gold-300); overflow: hidden; }
.panel-title {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 16px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.2; color: #fff;
  background: linear-gradient(180deg, #d81f35, var(--red-800)); border-bottom: 3px solid var(--gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.panel-title svg { width: 28px; height: 28px; flex: none; }
.panel-body { padding: 16px; text-align: center; }
.open-now { margin-bottom: 12px; }
.hours { display: grid; gap: 12px; }
.hours div + div { padding-top: 12px; border-top: 1.5px solid #f3c7cd; }
.hours dt { display: inline-block; padding: 3px 18px; border-radius: 999px; background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; }
.hours dd { margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; line-height: 1.2; color: var(--red-600); letter-spacing: .01em; }
.hours dd small { font-size: .55em; font-weight: 600; }
.panel-lead { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--navy); }
.panel-lead em { font-style: normal; color: var(--red); font-size: 1.25em; }
.place-pill { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0; padding: 6px 16px 6px 10px; border-radius: 999px; background: linear-gradient(180deg, #ffe89a, #f6c94a); color: var(--navy-800); font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; text-align: left; }
.place-pill svg { width: 22px; height: 22px; color: var(--red); flex: none; }
.panel-small { font-size: .92rem; color: var(--muted); }
.contact-number { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1.25; color: var(--navy); }
.contact-number a { color: var(--red-600); white-space: nowrap; }
.contact-actions { display: flex; gap: 10px; margin: 12px 0 14px; }
.contact-actions .btn { flex: 1; }
.address { display: flex; gap: 6px; justify-content: center; text-align: left; font-size: .98rem; }
.address svg { width: 20px; height: 20px; color: var(--red); flex: none; margin-top: 2px; }
.btn-map { margin-top: 12px; }
.shop-map { position: relative; max-width: var(--page); height: 240px; margin: 18px auto 0; border-radius: 22px; overflow: hidden; background: #f3ead2; box-shadow: var(--shadow), 0 0 0 2px var(--gold-300); }
.shop-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.invite { position: relative; max-width: 720px; margin: 22px auto 0; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.5; color: var(--red-800); }
.shop-flower { position: absolute; filter: drop-shadow(0 3px 4px rgba(88, 45, 10, .22)); }
.shop-flower-1 { width: 64px; height: 64px; left: -14px; top: -10px; transform: rotate(-18deg); }
.shop-flower-2 { width: 76px; height: 76px; right: -18px; bottom: -14px; transform: rotate(24deg); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-800); color: #e8ebff; }
.site-footer::before { content: ''; display: block; height: 8px; background: var(--flag); }
.footer-inner { max-width: var(--page); margin: 0 auto; padding: 20px var(--gutter) 24px; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: .95rem; }
.footer-inner img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 50%; padding: 4px; }
.footer-inner strong { font-family: var(--font-display); font-weight: 600; color: var(--gold-300); font-size: 1.1rem; }
.footer-small { font-size: .8rem; opacity: .75; }

/* ---------- Bottom tab bar (phones) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 253, 246, .97); backdrop-filter: blur(8px);
  border-top: 2px solid var(--gold-300); box-shadow: 0 -4px 16px rgba(88, 45, 10, .1);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-family: var(--font-display); font-weight: 500; font-size: .76rem; color: var(--muted); }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a.is-active { color: var(--red-600); }
.tabbar .tab-order { color: var(--green-600); }
.tabbar .tab-order svg { width: 34px; height: 34px; padding: 6px; margin-top: -2px; border-radius: 50%; color: #fff; background: linear-gradient(180deg, #19ad5d, var(--green-600)); box-shadow: 0 3px 8px rgba(13, 122, 64, .35); }

/* ---------- Product dialog ---------- */
.product-dialog {
  width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; padding: 0;
  border: 0; border-radius: 24px 24px 0 0; background: #fffdf6; color: var(--ink);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .3);
  overflow: auto;
}
.product-dialog::backdrop { background: rgba(30, 16, 8, .55); backdrop-filter: blur(2px); }
.product-dialog[open] { animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.dialog-close { position: sticky; top: 10px; z-index: 2; width: 40px; height: 40px; margin: 10px 10px -50px auto; display: grid; place-items: center; border: 0; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--line); cursor: pointer; }
.dialog-close svg { width: 20px; height: 20px; }
.dialog-media { background: #fff; border-bottom: 3px solid var(--gold-300); display: grid; place-items: center; aspect-ratio: 4 / 3; }
.dialog-media img { width: 100%; height: 100%; object-fit: contain; padding: 18px; }
.dialog-media .card-placeholder { font-size: 6rem; }
.dialog-body { padding: 16px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }
.dialog-category { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); }
.dialog-name { margin-top: 2px; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; line-height: 1.3; }
.dialog-name-en { color: var(--muted); font-size: .95rem; }
.dialog-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; }
.dialog-meta .price { font-size: 2rem; }
.dialog-meta .price-ask { font-size: 1.15rem; }
.dialog-unit { color: var(--muted); }
.dialog-description { margin-top: 10px; }
.dialog-out { margin-top: 10px; display: inline-block; padding: 3px 12px; border-radius: 999px; background: #efe6d6; color: #6b5a49; font-family: var(--font-display); font-weight: 500; font-size: .9rem; }
.dialog-actions { margin-top: 16px; display: grid; gap: 8px; }
.dialog-hint { font-size: .84rem; color: var(--muted); text-align: center; }

/* ---------- Search mode ---------- */
body.is-searching #intro { display: none; }
body.is-searching .chips-bar { margin-top: 0; }

/* ---------- Wider screens ---------- */
@media (min-width: 520px) {
  :root { --gutter: 20px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .brand-text { display: block; }
}

@media (min-width: 760px) {
  :root { --header-h: 72px; }
  body { padding-bottom: 0; font-size: 17px; }
  .tabbar { display: none; }
  .header-actions { display: flex; }
  .header-inner { gap: 18px; }
  .search { max-width: 460px; margin: 0 auto; }
  .brand-logo { width: 54px; height: 54px; }

  .hero-inner { grid-template-columns: 300px 1fr; gap: 12px 36px; padding: 34px var(--gutter) 44px; }
  .hero-logo { width: 300px; height: 300px; }
  .hero-inner > .hero-text { display: block; }
  .hero-inner > .hero-text > .hero-gable { display: block; width: 150px; height: 40px; }
  .hero-tagline { margin-top: 10px; }
  .hero-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
  .hero-points li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; font-size: .98rem; color: var(--navy-800); }
  .hero-points li::before { content: '✓'; color: var(--red); font-weight: 700; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .btn { flex: 0 0 auto; min-height: 52px; padding: 0 28px; font-size: 1.08rem; }
  .hero-browse { display: inline-flex; }
  .hero-flag { width: 420px; height: 150px; }
  .hero-flag-left { left: -150px; top: -50px; }
  .hero-flag-right { right: -150px; top: -50px; }
  .hero-flower-1 { width: 96px; height: 96px; right: 3%; bottom: 26px; }
  .hero-flower-2 { width: 64px; height: 64px; left: 1.5%; bottom: 20px; }
  .hero-flower-3 { display: block; width: 46px; height: 46px; right: 13%; bottom: 96px; transform: rotate(-30deg); }

  .highlights { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; padding-top: 20px; gap: 16px; }
  .highlight { padding: 14px 18px 14px 14px; gap: 14px; }
  .highlight-icon { width: 54px; height: 54px; }
  .highlight-text strong { font-size: 1.15rem; }
  .highlight-text small { font-size: .95rem; }

  .chips { padding: 12px var(--gutter); }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .grid-preview > :nth-child(n+7) { display: flex; }
  .see-all-small-screens { display: none; }
  .section-count { display: inline; }
  .see-all-foot { width: auto; margin: 14px auto 0; padding: 0 26px; }
  .card-body { padding: 10px 14px 14px; }
  .card-name { font-size: 1rem; }
  .price { font-size: 1.45rem; }
  .section { padding-top: 26px; }
  .section-title { font-size: 1.3rem; min-height: 46px; padding-right: 24px; }

  .shop { padding: 44px var(--gutter) 48px; margin-top: 44px; }
  .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
  .invite { font-size: 1.4rem; margin-top: 30px; }
  .shop-map { height: 320px; margin-top: 24px; }
  .shop-flower-1 { width: 96px; height: 96px; }
  .shop-flower-2 { width: 120px; height: 120px; }

  .product-dialog { width: min(860px, calc(100% - 48px)); margin: auto; border-radius: 24px; max-height: 88dvh; }
  .product-dialog[open] { animation: dialog-in .18s ease-out; }
  @keyframes dialog-in { from { transform: scale(.96); opacity: 0; } }
  .dialog-content { display: grid; grid-template-columns: 1fr 1fr; min-height: 380px; }
  .dialog-media { aspect-ratio: auto; border-bottom: 0; border-right: 3px solid var(--gold-300); }
  .dialog-body { padding: 56px 28px 28px; align-self: center; }
  .dialog-close { position: absolute; top: 12px; right: 12px; margin: 0; }
  .dialog-name { font-size: 1.7rem; }
}

@media (min-width: 1040px) {
  .hero-inner { grid-template-columns: 340px 1fr; }
  .hero-logo { width: 340px; height: 340px; }

  /* categories become a side menu next to the products */
  .store { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 28px; align-items: start; }
  .chips-bar {
    top: calc(var(--header-h) + 16px); margin-top: 26px;
    max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; scrollbar-width: thin;
    background: #fffdf6; backdrop-filter: none; border: 0; border-radius: 20px;
    box-shadow: var(--shadow-sm), inset 0 0 0 2px var(--gold-300);
  }
  .chips-title {
    position: sticky; top: 0; z-index: 1;
    display: flex; align-items: center; gap: 8px; padding: 11px 16px;
    font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: #fff;
    background: linear-gradient(180deg, #d81f35, var(--red-800)); border-bottom: 3px solid var(--gold);
  }
  .chips-title svg { width: 20px; height: 20px; }
  .chips { flex-direction: column; gap: 2px; padding: 8px; overflow: visible; }
  .chip { width: 100%; height: auto; min-height: 42px; padding: 4px 10px 4px 6px; border-radius: 12px; background: transparent; box-shadow: none; white-space: normal; text-align: left; line-height: 1.25; }
  .chip:hover { background: var(--cream-200); box-shadow: none; }
  .chip-icon { flex: none; }
  .chip-count { margin-left: auto; padding-left: 6px; }
  .catalog { max-width: none; margin: 0; padding: 0 0 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
