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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
html.has-sheet { overflow: hidden; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 85% -10%, var(--body-glow-1), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, var(--body-glow-2), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: calc(var(--bottombar-h) + var(--safe-b));
}
body.has-minicart { padding-bottom: calc(var(--bottombar-h) + 64px + var(--safe-b)); }
body[data-area="admin"] { padding-bottom: calc(24px + var(--safe-b)); }
@media (min-width: 1024px) {
  body, body.has-minicart { padding-bottom: 0; }
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
[hidden] { display: none !important; }
.is-hidden { display: none !important; }

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

.muted { color: var(--muted); }
.center { text-align: center; }

.view { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Announcement strip ─────────────────────────────────── */
.announce { background: var(--grad-brand); color: #E6F1FA; font-size: 12.5px; }
.announce__inner { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 var(--side); }
.announce__status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; white-space: nowrap; color: #fff; }
.announce__msg {
  flex: 1; min-width: 0; overflow: hidden; font-weight: 500;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee__track span { padding: 0 40px; white-space: nowrap; }
.announce__tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.announce__link { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: #fff; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.status-dot.is-open { background: #4ADE80; animation: ping 2s infinite; }
.status-dot.is-closed { background: #FB7185; }

.role-switch {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  padding: 2px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.role-switch a { position: relative; z-index: 1; padding: 3px 11px; font-size: 11.5px; font-weight: 700; text-align: center; color: rgba(255, 255, 255, 0.8); border-radius: var(--r-pill); transition: color 0.25s; white-space: nowrap; }
.role-switch a.is-active { color: #0B3A5B; }
.role-switch__thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: var(--r-pill); background: #fff; transform: translateX(calc(var(--x) * 100%)); transition: transform 0.35s var(--ease); }
.theme-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #FFE08A; transition: transform 0.3s var(--ease); }
.theme-btn:active { transform: rotate(30deg) scale(0.92); }
.theme-btn svg { width: 14px; height: 14px; }
@media (max-width: 640px) {
  .announce__status { font-size: 0; gap: 0; }
  .announce__inner { gap: 8px; }
}

/* ── Header ─────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: var(--chrome-bg);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: var(--shadow-sm);
}
.hdr__main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand loc icons" "search search search";
  align-items: center;
  gap: 10px 12px;
  padding: 10px var(--side);
}
.brand { grid-area: brand; display: flex; align-items: center; gap: 10px; min-width: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.logo-mark { width: 40px; height: 40px; }
.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand__text strong { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: 0.005em; line-height: 1.05; white-space: nowrap; color: var(--text); }
.brand__accent { color: var(--head-accent); }
.brand__text small { font-family: var(--font-body); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.3; color: var(--aqua); white-space: nowrap; }

.hsearch {
  grid-area: search;
  position: relative;
  display: flex; align-items: center; gap: 10px;
  height: 46px;
  padding: 0 6px 0 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  color: var(--muted);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.hsearch:focus-within { background: var(--surface); border-color: var(--aqua); box-shadow: 0 0 0 4px var(--aqua-soft); }
.hsearch > svg { width: 18px; height: 18px; }
.hsearch input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); font-size: 15px; }
.hsearch input::placeholder { color: var(--muted-2); }
.hsearch input::-webkit-search-cancel-button { display: none; }
.hsearch__go { display: none; place-items: center; height: 36px; padding: 0 16px; border-radius: 9px; background: var(--aqua); color: var(--on-accent); }
.hsearch__go svg { width: 18px; height: 18px; }

.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 50;
  max-height: min(70vh, 460px); overflow-y: auto;
  padding: 10px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
.suggest__label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 6px 8px; }
.suggest__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 4px 4px; }
.suggest__chips button { padding: 7px 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 13px; font-weight: 500; }
.suggest__chips button:hover { background: var(--aqua-soft); color: var(--aqua); }
.suggest__item { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.suggest__item:hover, .suggest__item:focus-visible { background: var(--surface-2); }
.suggest__item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.suggest__item span { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; min-width: 0; }
.suggest__item small { font-size: 12px; color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest__item b { font-family: var(--font-head); }
.suggest__all { display: block; padding: 10px 8px 4px; color: var(--aqua); font-weight: 600; font-size: 14px; }
.suggest__empty { padding: 10px 8px; color: var(--muted); font-size: 14px; }

.hdr__loc {
  grid-area: loc; justify-self: end;
  display: none; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  text-align: left;
  color: var(--text);
}
.hdr__loc:hover { background: var(--surface-2); }
.hdr__loc svg { width: 20px; height: 20px; color: var(--aqua); }
.hdr__loc span { display: flex; flex-direction: column; line-height: 1.2; }
.hdr__loc small { font-size: 11px; color: var(--muted); }
.hdr__loc strong { font-size: 13px; font-weight: 700; white-space: nowrap; }

.hdr__icons { grid-area: icons; display: flex; align-items: center; gap: 4px; }
.hicon { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; border-radius: 10px; color: var(--text); font-size: 11px; font-weight: 600; }
.hicon:hover { background: var(--surface-2); }
.hicon svg { width: 23px; height: 23px; }
.hicon > span:last-child { display: none; }
.hicon__cart { position: relative; display: inline-grid; }
.hicon__cart.bump { animation: bump 0.45s var(--ease); }
.badge-count {
  position: absolute; top: -7px; right: -11px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px;
  background: var(--cta); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 14px; text-align: center;
  border: 2px solid var(--surface);
  box-sizing: border-box;
  pointer-events: none;
}
.hicon > .badge-count { top: 0; right: 4px; }
.hdr__back { grid-area: icons; }
.hdr[data-area="admin"] .hdr__main { grid-template-areas: "brand icons"; grid-template-columns: 1fr auto; }

.hdr__nav {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding: 0 var(--side) 10px;
}
.hdr__nav::-webkit-scrollbar { display: none; }
.hdr__nav a {
  position: relative; flex-shrink: 0;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  white-space: nowrap;
}
.hdr__nav a.is-active { background: var(--aqua); color: var(--on-accent); }
.hdr__nav a.is-hot { color: var(--cta); }
.hdr__nav a.is-hot.is-active { color: #fff; background: var(--cta); }

@media (min-width: 768px) {
  .hdr__main { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "brand search loc icons"; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
  .hdr__loc { display: flex; }
  .hicon > span:last-child { display: block; }
}
@media (min-width: 1024px) {
  .hsearch { height: 48px; max-width: 760px; }
  .hsearch__go { display: inline-grid; }
  .hdr__nav { gap: 2px; padding-bottom: 0; border-top: 1px solid var(--line-soft); }
  .hdr__nav a { background: none; border-radius: 0; padding: 12px 14px; font-size: 14px; }
  .hdr__nav a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--aqua); transform: scaleX(0); transition: transform 0.25s var(--ease); }
  .hdr__nav a:hover::after, .hdr__nav a.is-active::after { transform: none; }
  .hdr__nav a.is-active { background: none; color: var(--aqua); }
  .hdr__nav a.is-hot.is-active { background: none; color: var(--cta); }
  .hdr__nav a.is-hot::after { background: var(--cta); }
}

/* ── Bottom nav (mobile) ────────────────────────────────── */
.bnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottombar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--bar-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-soft);
  box-shadow: 0 -6px 20px -12px rgba(15, 23, 42, 0.2);
}
.bnav > * { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.bnav svg { width: 22px; height: 22px; }
.bnav i { position: relative; display: inline-grid; font-style: normal; }
.bnav .is-active { color: var(--aqua); }
.bnav__wa { color: var(--wa) !important; }
@media (min-width: 1024px) { .bnav { display: none; } }

.minicart-wrap {
  position: fixed; left: 10px; right: 10px; z-index: 44;
  bottom: calc(var(--bottombar-h) + var(--safe-b) + 8px);
  animation: fade-up 0.35s var(--ease);
}
.minicart {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  background: var(--aqua);
  color: var(--on-accent);
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.minicart__thumbs { display: flex; }
.minicart__thumbs img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; border: 2px solid var(--aqua); margin-left: -10px; background: #fff; }
.minicart__thumbs img:first-child { margin-left: 0; }
.minicart__text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.minicart__text strong { font-size: 14px; }
.minicart__text small { font-size: 12.5px; opacity: 0.9; }
.minicart__go { font-weight: 700; font-size: 14px; }
@media (min-width: 1024px) { .minicart-wrap { display: none !important; } }

.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 45;
  display: none; place-items: center;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff;
  box-shadow: var(--glow-wa);
  transition: transform 0.2s var(--ease);
}
.fab:hover { transform: scale(1.08); }
.fab svg { width: 30px; height: 30px; }
@media (min-width: 1024px) { .fab:not([hidden]) { display: grid; } }

/* ── Footer ─────────────────────────────────────────────── */
.foot { margin-top: 48px; background: var(--grad-brand); color: #CFE0EE; font-size: 14px; }
.foot__grid { display: grid; gap: 28px; padding: 36px var(--side) 24px; }
.foot__grid h3 { font-size: 15px; color: #fff; margin-bottom: 4px; }
.foot__grid > div { display: flex; flex-direction: column; gap: 8px; }
.foot__grid a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot__brand p { max-width: 320px; }
.foot__brand .brand__text strong { color: #fff; }
.foot__brand .brand__text small { color: #7DD3FC; }
.foot__brand .brand__accent { color: #7DD3FC; }
.foot__brand .btn { align-self: flex-start; margin-top: 4px; }
.foot__brand .btn:hover { text-decoration: none; }
.foot__pay { margin-top: 6px; color: #fff; font-weight: 600; }
.foot__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px var(--side); border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 12.5px; }
.foot__bottom .link { color: #7DD3FC; font-size: 12.5px; }
@media (min-width: 768px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

/* Smooth cross-fade only while switching theme */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .marquee__track { animation: none; }
}

/* Owner-only link in the top strip */
.announce__pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: var(--r-pill); background: #FDE047; color: #422006; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.foot__links { display: inline-flex; gap: 16px; }
.foot__links .link { color: #7DD3FC; font-size: 12.5px; }
.hicon--dash { color: var(--aqua); }
