/**
 * HuahinFood partner shell — shared by every shop on huahinfood.online.
 * Platform tokens only; never use shop accent (gold/wine) in this file.
 */
:root {
  --hf-ink: #1c1814;
  --hf-sand: #f5efe6;
  --hf-teal: #0d5c63;
  --hf-teal-light: #14808a;
  --hf-coral: #e85d4c;
  --hf-muted: #5e564e;
  /* Height of the shop-zone bar. The shop identity bar and the sticky menu row
     position themselves below it, so this must match the rendered bar. */
  --shopnav-h: 44px;

  /* Layering scale for shop pages. Anything a shop skin sticks must sit below the platform
     chrome, or it paints over shared navigation (that is what happened: the storefront identity
     bar at z-index 29 covered the category panel, whose own 30 is trapped inside its parent).
     New shop pages use these three values and do not invent their own. */
  --z-shop-skin: 20;
  --z-shopnav: 40;
  --z-platform: 50;
  /* Height of the rendered platform header. The shop's own sticky identity bar and the
     cart offset are positioned from this, so it must match the real header or they slide
     underneath it. Measured on the staged build: 63px wide, 109px when the phone layout
     puts the nav on its own row (see the @media rule at the end of this file). */
  --platform-main-h: 63px;
}

.platform-chrome,
.platform-chrome-bottom {
  display: none;
}

body.huahinfood-shop .platform-chrome {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  position: sticky;
  top: 0;
  z-index: var(--z-platform, 50);
  padding: 0;
  padding-top: max(0px, env(safe-area-inset-top));
  /* Same family as the homepage header (.top uses 0.92). The shop page body is very dark,
     so a more transparent header would visibly darken as the menu scrolls beneath it. */
  background: rgba(245, 239, 230, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(13, 92, 99, 0.1);
}

body.huahinfood-shop .platform-chrome__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  width: 100%;
}

body.huahinfood-shop .platform-chrome__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--hf-ink);
  min-width: 0;
  flex: 1;
}

body.huahinfood-shop .platform-chrome__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

body.huahinfood-shop .platform-chrome__type {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

body.huahinfood-shop .platform-chrome .logo-word {
  display: block;
  font-family: "Sarabun", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  white-space: nowrap;
}

body.huahinfood-shop .platform-chrome .logo-word__huahin {
  color: var(--hf-ink);
}

body.huahinfood-shop .platform-chrome .logo-word__food {
  color: var(--hf-coral);
}

body.huahinfood-shop .platform-chrome .logo-word__tld {
  font-size: 0.78em;
  font-weight: 700;
  color: var(--hf-teal);
}

body.huahinfood-shop .platform-chrome__slogan {
  font-family: "Sarabun", system-ui, sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--hf-muted);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

@media (max-width: 480px) {
  body.huahinfood-shop .platform-chrome__slogan {
    display: none;
  }
}

body.huahinfood-shop .platform-chrome__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

body.huahinfood-shop .platform-chrome__nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
}

body.huahinfood-shop .platform-chrome .lang-switch {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  padding: 3px;
  border: 2px solid var(--hf-teal);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(13, 92, 99, 0.18);
}

body.huahinfood-shop .platform-chrome .lang-switch::before {
  content: "\1F310";
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 4px 0 8px;
  pointer-events: none;
}

body.huahinfood-shop .platform-chrome .lang-switch button {
  border: 0;
  background: transparent;
  font-family: "Sarabun", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  min-width: 74px;
  padding: 8px 16px;
  min-height: 40px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--hf-teal);
}

body.huahinfood-shop .platform-chrome .lang-switch button:hover {
  background: rgba(13, 92, 99, 0.08);
}

body.huahinfood-shop .platform-chrome .lang-switch button.active {
  background: var(--hf-teal);
  color: #fff;
  box-shadow: 0 1px 3px rgba(13, 92, 99, 0.35);
}

@media (max-width: 480px) {
  body.huahinfood-shop .platform-chrome__main { flex-wrap: wrap; row-gap: 8px; }
  body.huahinfood-shop .platform-chrome__brand { flex: 1 1 0; min-width: 0; }
  body.huahinfood-shop .platform-chrome .lang-switch { margin-left: auto; }
  body.huahinfood-shop .platform-chrome .lang-switch { gap: 2px; padding: 2px; border-width: 2px; }
  body.huahinfood-shop .platform-chrome .lang-switch::before { font-size: 0.8rem; padding: 0 2px 0 6px; }
  body.huahinfood-shop .platform-chrome .lang-switch button { min-width: 0; padding: 6px 9px; min-height: 36px; font-size: 0.82rem; }
}

body.huahinfood-shop .platform-chrome__nav a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: "Sarabun", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--hf-teal);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(13, 92, 99, 0.12);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.12s ease, color 0.12s ease;
}

body.huahinfood-shop .platform-chrome__nav .contact-nav__toggle {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  background: var(--hf-teal);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.huahinfood-shop .platform-chrome__nav .contact-nav.is-open .contact-nav__toggle,
body.huahinfood-shop .platform-chrome__nav .contact-nav__toggle:hover {
  background: var(--hf-teal-light);
}

body.huahinfood-shop .platform-chrome__nav a:hover {
  border-color: rgba(232, 93, 76, 0.45);
  color: var(--hf-coral);
}

@media (max-width: 720px) {
  :root {
    --platform-main-h: 109px;
  }
  body.huahinfood-shop .platform-chrome__main {
    flex-wrap: wrap;
    padding: 8px 14px;
  }
  body.huahinfood-shop .platform-chrome__brand {
    flex: 1 1 auto;
  }
  body.huahinfood-shop .platform-chrome__tools {
    width: 100%;
    flex-shrink: 1;
  }
  body.huahinfood-shop .platform-chrome__nav {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body.huahinfood-shop .platform-chrome__nav a {
    padding: 5px 9px;
    font-size: 0.72rem;
  }
  body.huahinfood-shop .platform-chrome__nav::-webkit-scrollbar {
    display: none;
  }

  /* Real stores: category switching is shopnav — drop the duplicate nav row. */
  body.huahinfood-shop:has([data-shopnav]) {
    --platform-main-h: 56px;
  }
  body.huahinfood-shop:has([data-shopnav]) .platform-chrome__main {
    flex-wrap: nowrap;
    padding: 8px 12px;
  }
  body.huahinfood-shop:has([data-shopnav]) .platform-chrome__mark {
    width: 32px;
    height: 32px;
  }
  body.huahinfood-shop:has([data-shopnav]) .platform-chrome .logo-word {
    font-size: 0.88rem;
  }
  body.huahinfood-shop:has([data-shopnav]) .platform-chrome__tools {
    width: auto;
    margin-left: auto;
  }
  body.huahinfood-shop:has([data-shopnav]) .platform-chrome__nav {
    display: none;
  }
}

/* below 375px the four links cannot fit, so fade the edge: a soft cut reads as
   "swipe for more" instead of a box that was chopped off */
@media (max-width: 374px) {
  body.huahinfood-shop:not(:has([data-shopnav])) .platform-chrome__nav {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 16px), rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 16px), rgba(0, 0, 0, 0) 100%);
  }
}

body.huahinfood-shop .platform-chrome-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: center;
  padding: 14px 16px;
  margin: 0 auto;
  max-width: 920px;
  background: var(--hf-sand);
  border-top: 1px solid rgba(13, 92, 99, 0.12);
}

body.huahinfood-shop .platform-chrome-bottom a {
  font-family: "Sarabun", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--hf-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.huahinfood-shop .platform-chrome-bottom a:hover {
  color: var(--hf-coral);
}

html[lang="en"] .th-only {
  display: none !important;
}

html[lang="th"] .en-only {
  display: none !important;
}

/* The shell must not assume the host page ships a global reset: on the demo shops
   `width: 100%` plus padding under content-box sizing pushed the header 36px past the
   viewport, which read as a horizontal scroll on every /shops/* page. */
body.huahinfood-shop .platform-chrome__main,
body.huahinfood-shop .platform-chrome__brand,
body.huahinfood-shop .platform-chrome__tools,
body.huahinfood-shop .platform-chrome__nav,
body.huahinfood-shop .lang-switch {
  box-sizing: border-box;
}
