/* ===== Healthy House — styles ===== */

:root {
  --green-900: #1f3d2b;
  --green-700: #2f6b45;
  --green-500: #4a9d6a;
  --green-100: #e8f3ec;
  --cream: #f7f4ec;
  --ink: #23291f;
  --muted: #6b7568;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(31, 61, 43, 0.12);
  --radius: 16px;
  --maxw: 1100px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* The [hidden] attribute must always win, even over class display rules
   (e.g. .sheet/.done use display:flex/grid). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  /* Shop photo behind everything, softened with a cream veil so text stays readable */
  background:
    linear-gradient(rgba(247, 244, 236, 0.86), rgba(247, 244, 236, 0.9)),
    url('img/shop-bg.webp') center / cover fixed no-repeat;
}

/* ===== Language toggle (all pages) ===== */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 700; font-size: 0.9rem;
  user-select: none;
}
.lang-toggle button {
  border: none; background: none; cursor: pointer;
  color: inherit; opacity: 0.55;
  padding: 4px 6px; border-radius: 6px; font-weight: 700; font-size: 0.9rem;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.lang-toggle button.active { opacity: 1; text-decoration: underline; }
.lang-toggle button:hover { opacity: 0.9; }
.lang-sep { opacity: 0.4; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

a { color: var(--green-700); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(247, 244, 236, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(31, 61, 43, 0.08);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--green-900); text-decoration: none; white-space: nowrap; }
.brand:hover { text-decoration: underline; }
.brand-mark { font-size: 1.5rem; }
.brand-name { font-size: 1.25rem; color: var(--green-900); letter-spacing: 0.3px; }

.nav { display: flex; gap: 22px; }
.nav a {
  text-decoration: none;
  color: var(--green-900);
  font-weight: 500;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--green-500);
  transition: width 0.25s ease;
}
.nav a:hover::after { width: 100%; }

/* ===== Hero ===== */
.hero {
  min-height: 82vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--white);
  /* Enhanced storefront photo (web-optimized), shown in full colour (no wash) */
  background: url('/img/shopweb.webp') center / cover no-repeat;
}
.hero-logo {
  width: min(560px, 88vw);
  max-width: 100%;
  /* Real sign photo — soft rounded corners + shadow until the background
     is cut out. */
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  animation: rise 0.8s ease both;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  margin: 0;
  letter-spacing: 1px;
  animation: rise 0.8s ease both;
}
.hero-phone {
  display: inline-block;
  margin-top: 18px;
  color: #fff;
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  animation: rise 0.8s ease 0.2s both;
}
.hero-phone:hover { text-decoration: underline; }
.tagline {
  font-size: clamp(1rem, 2.6vw, 1.4rem);
  opacity: 0.95;
  margin: 12px 0 28px;
  animation: rise 0.8s ease 0.15s both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background: var(--white);
  color: var(--green-900);
  box-shadow: var(--shadow);
  animation: rise 0.8s ease 0.3s both;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,0.25); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
  animation: rise 0.8s ease 0.4s both;
}
.btn-ghost:hover { transform: translateY(-3px); background: rgba(255,255,255,0.25); }

/* ===== Order options: 3 boxes side by side ===== */
.order-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 940px;
  margin: 0 auto;
  align-items: stretch;
}
.order-options-two { grid-template-columns: repeat(2, 1fr); max-width: 620px; }
.chat-line { display: block; width: fit-content; margin: 22px auto 0; padding: 12px 24px; border-radius: 999px; background: #06c755; color: #fff; font-weight: 700; text-decoration: none; }
.chat-line:hover { background: #05b34c; }
.order-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 32px 20px; border-radius: var(--radius);
  text-decoration: none; color: var(--green-900); background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.order-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(31,61,43,0.18); }
.order-card .oc-icon { font-size: 2.4rem; line-height: 1; }
.oc-svg { width: 2.9rem; height: 2.9rem; display: block; }

/* Shared admin nav (manage / staff / payments) */
.admin-nav { display: flex; gap: 6px; padding: 8px 14px; background: var(--green-900); position: sticky; top: 0; z-index: 15; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-nav .nav-link {
  color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 600; font-size: 0.92rem;
  padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,0.08); white-space: nowrap; flex-shrink: 0;
}
.admin-nav .nav-link.active { background: #fff; color: var(--green-900); font-weight: 800; cursor: default; }
.order-card .oc-title { font-weight: 700; font-size: 1.2rem; }
.order-card .oc-sub { color: var(--muted); font-size: 0.9rem; }

/* Pickup card highlighted */
.order-direct { background: var(--green-700); color: #fff; }
.order-direct .oc-sub { color: rgba(255,255,255,0.85); }

/* "Coming soon" (no link yet) */
.order-card.soon { opacity: 0.6; cursor: default; }
.order-card.soon:hover { transform: none; box-shadow: var(--shadow); }

@media (max-width: 680px) {
  .order-options { grid-template-columns: 1fr; }
}

/* ===== Sections ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 72px 24px; }
.section-alt {
  max-width: none;
  background: rgba(232, 243, 236, 0.72);
  backdrop-filter: blur(4px);
}
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--green-900);
  margin: 0 0 6px;
}
.section-sub { text-align: center; color: var(--muted); margin: 0 0 34px; }

/* ===== Carousel (crossfade) ===== */
.carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #d9e5dc;
}
.carousel-track { position: absolute; inset: 0; }
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-dots {
  position: absolute;
  bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
  z-index: 2;
}
.carousel-dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,0.55);
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dot.active { background: var(--white); transform: scale(1.25); }
.carousel-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center; padding: 20px;
  color: var(--muted); font-size: 0.95rem;
}
.carousel-empty code {
  background: rgba(31,61,43,0.08);
  padding: 2px 6px; border-radius: 6px;
}
.carousel.has-media .carousel-empty { display: none; }

/* ===== Postcard collage ===== */
.postcards { max-width: 1150px; }
.postcard-board {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 34px 30px;
  padding: 10px 0 20px;
}
.board-empty { color: var(--muted); text-align: center; width: 100%; padding: 40px; }

.postcard {
  --tilt: 0deg;
  width: 300px;
  margin: 0;
  background: #fff;
  padding: 12px 12px 8px;
  border-radius: 6px;
  box-shadow: 0 14px 30px rgba(31, 61, 43, 0.22);
  transform: rotate(var(--tilt));
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  position: relative;
}
.postcard::after {
  /* a little tape strip at the top */
  content: "";
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 84px; height: 22px;
  background: rgba(200, 224, 208, 0.65);
  box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}
.postcard:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.03);
  box-shadow: 0 22px 46px rgba(31, 61, 43, 0.3);
  z-index: 5;
}
.postcard.pc-wide { width: 640px; max-width: 100%; }
.postcard.pc-top { order: -1; }
.postcard.pc-bottom { order: 999; }

.pc-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
  background: #dfe9e1;
}
.pc-wide .pc-media { aspect-ratio: 16 / 9; }
.pc-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.pc-slide.active { opacity: 1; }
.pc-slide img, .pc-slide video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.pc-caption {
  text-align: center;
  padding: 12px 6px 6px;
  color: var(--green-900);
  font-size: 1.15rem;
  font-family: "Segoe Script", "Brush Script MT", cursive;
}

@media (max-width: 720px) {
  .postcard, .postcard.pc-wide { width: 88vw; transform: rotate(calc(var(--tilt) * 0.4)); }
}

/* ===== Videos ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.video-title { text-align: center; color: var(--green-900); margin: 0 0 14px; }
.video-player {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0c130e;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  text-align: center;
  padding: 16px;
}
.video-player video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== Visit / Contact ===== */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
  align-items: stretch;
}
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(31,61,43,0.08);
  font-size: 1.05rem;
}
.contact-list li:last-child { border-bottom: none; }
.contact-icon { font-size: 1.4rem; }
.line-qr {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(31,61,43,0.08);
  color: var(--muted); font-size: 0.95rem;
}
.line-qr img {
  width: 190px; height: 190px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(31,61,43,0.15);
}
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 320px;
  background: #d9e5dc;
}
.map-embed iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .admin-entry { color: var(--muted); opacity: 0.7; text-decoration: none; font-size: 0.82rem; }
.site-footer .admin-entry:hover { opacity: 1; text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .nav { display: none; }
  .visit-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Shared staff header — one consistent bar on every staff page:
     LEFT   the three staff links (current page = bold, not a link)
     CENTRE the Shop OPEN/CLOSED toggle
     RIGHT  language + page-specific bits (live status, sound)
   ============================================================ */
.staff-hdr { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  background: var(--green-900); color: #fff; padding: 8px 14px; position: sticky; top: 0; z-index: 20; }
.staff-hdr > .admin-nav { justify-self: start; }
.staff-hdr > .shop-toggle { justify-self: center; }
.staff-hdr > .hdr-right { justify-self: end; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

/* the nav is a plain row inside the header, not its own sticky bar */
.staff-hdr .admin-nav { background: none; padding: 0; position: static; overflow: visible; }
.staff-hdr .shop-toggle { white-space: nowrap; }

/* ---- Shop open/closed toggle -------------------------------------------
   A status control, not a button with a sentence crammed into it: live dot,
   the state in bold, the action as a quieter hint beneath. Soft rounded
   rectangle with a little depth so it sits well in the dark header.
   Lives here (not hub.css) because it is on every staff page. */
.shop-toggle {
  display: inline-flex; align-items: center; gap: 11px;
  margin: 0; border: 1px solid transparent; border-radius: 14px;
  padding: 8px 18px 8px 15px; cursor: pointer; font: inherit; text-align: left;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.shop-toggle .st-text { display: flex; flex-direction: column; line-height: 1.15; }
.shop-toggle .st-main { font-size: 1rem; font-weight: 800; letter-spacing: 0.2px; }
.shop-toggle .st-hint { font-size: 0.74rem; font-weight: 600; opacity: 0.62; letter-spacing: 0.2px; }
.shop-toggle .st-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

.shop-toggle.is-open {
  background: linear-gradient(180deg, #f2fdf6 0%, #dcf5e5 100%);
  border-color: #a7dfbc; color: #14532d;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.9);
}
.shop-toggle.is-open .st-dot { background: #22c55e; animation: st-pulse 2.4s ease-in-out infinite; }
.shop-toggle.is-closed {
  background: linear-gradient(180deg, #fff5f5 0%, #fadfdf 100%);
  border-color: #eab0b0; color: #7f1d1d;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.9);
}
.shop-toggle.is-closed .st-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }
/* save failed (e.g. auth) — flashes briefly, then re-syncs to real state */
.shop-toggle.st-err {
  background: linear-gradient(180deg, #fff5f5 0%, #ffd9d9 100%);
  border-color: #e08a8a; color: #7f1d1d;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.9);
}
.shop-toggle.st-err .st-dot { background: #dc2626; animation: st-pulse 0.6s ease-in-out infinite; }

.shop-toggle:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.9); }
.shop-toggle:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.shop-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@keyframes st-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.22); }
  50%      { box-shadow: 0 0 0 7px rgba(34,197,94,0.06); }
}
@media (prefers-reduced-motion: reduce) { .shop-toggle .st-dot { animation: none; } }
.staff-hdr .lang-toggle button { color: #cfe0c8; }
.staff-hdr .lang-toggle button.active { color: #fff; }

@media (max-width: 820px) {
  .staff-hdr { grid-template-columns: 1fr; justify-items: center; row-gap: 8px; }
  .staff-hdr > .admin-nav, .staff-hdr > .shop-toggle, .staff-hdr > .hdr-right { justify-self: center; }
  .staff-hdr .admin-nav { flex-wrap: wrap; justify-content: center; }
}

/* ---- Manager header: nav on the left, language on the right ---- */
.mgr-hdr { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--green-900); color: #fff; padding: 8px 14px; position: sticky; top: 0; z-index: 20; }
.mgr-hdr .admin-nav { background: none; padding: 0; position: static; overflow-x: auto; flex: 1; min-width: 0; }
.mgr-hdr .hdr-right { display: flex; align-items: center; gap: 12px; flex: none; }
.mgr-hdr .lang-toggle button { color: #cfe0c8; }
.mgr-hdr .lang-toggle button.active { color: #fff; }

/* Page actions (e.g. Save changes) now sit just under the header, not in it */
.mgr-actions { display: flex; justify-content: flex-end; gap: 10px;
  padding: 10px 16px 0; max-width: 1100px; margin: 0 auto; }

/* ---- Myanmar staff mode -------------------------------------------------
   Labels render as "Burmese (Thai)", ~2.4x longer than Thai alone. Keep the
   header from blowing out: drop the toggle's secondary hint line (the main
   line already says the state), let grid children shrink, and let the nav
   scroll rather than widening the page. */
/* Both lines stay bilingual; they're just set smaller so the header still fits. */
html[lang="my"] .staff-hdr .shop-toggle { white-space: normal; max-width: 42vw; }
html[lang="my"] .shop-toggle .st-main { font-size: 0.86rem; line-height: 1.2; }
html[lang="my"] .shop-toggle .st-hint { font-size: 0.68rem; line-height: 1.15; opacity: 0.72; }
.staff-hdr > *, .mgr-hdr > * { min-width: 0; }
.staff-hdr .admin-nav, .mgr-hdr .admin-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
