/* Copied verbatim from design-ref/page-kit/shared/rx.css — the page kit's shared tokens, header,
   footer and common parts. The kit's `scripts/rx-sync-data.mjs` (extended by the lead) refreshes
   this copy from that source path; until then, keep the two in step by hand.
   It is served from /kit/rx.css and loaded as a <link> only when the layout's chrome mode is
   "kit" (components/kit/routes.ts), so it never reaches an old-chrome page. */
/* Rx Route page kit: shared tokens, header, footer and common parts (from the approved mockups' shared/rx.css).
   White ground, hairline ink, tracked caps, ONE accent (MEAMED blue), Archivo + IBM Plex Sans Thai. Colour is the only theme. */
:root {
  --paper: #ffffff; --ink: #121214; --ink-soft: #5f5f66; --hair: #d9d9dd; --hair-lo: #ececef; --mute: #9a9aa2;
  --accent: #3a6be0; --accent-fill: #4274e8; --accent-ink: #ffffff; --tint: #eef3fd;
  --pk-r: #ffffff; --pk-l: #e6ecf5; --pk-t: #f6f8fc; --pk-edge: #3d4250; --pk-tone: #121214;
  --font: "Archivo", "IBM Plex Sans Thai", system-ui, sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --g: clamp(16px, 4vw, 48px);
  --max: 1320px;
}
.t-blue { --pk-tone: #4274e8; }
.t-coral { --pk-tone: #e8604c; }

* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; font-synthesis: none; overflow-x: hidden; }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, figure, table { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.num, td, .money { font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-weight: 700; font-stretch: 82%; letter-spacing: -.01em; line-height: 1.14; text-wrap: balance; }
/* the negative tracking is for the Latin faces: Thai is never letter-spaced (see the .kick comment) */
:root[lang="th"] h1, :root[lang="th"] h2, :root[lang="th"] h3 { letter-spacing: normal; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.2vw, 3.1rem); }
h2 { font-size: clamp(1.35rem, 1rem + 1.1vw, 2rem); }
h3 { font-size: 1.05rem; }
/* tracking only on Latin: Thai is never letter-spaced. Wrap the English half in <i>. */
.kick { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.kick i, i.t { font-style: normal; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }
.en { font-size: 13px; color: var(--ink-soft); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--g); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { flex: none; }

/* header */
.head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 32px; height: 72px; padding: 0 var(--g); background: color-mix(in srgb, var(--paper) 94%, transparent); border-bottom: 1px solid var(--hair-lo); backdrop-filter: blur(6px); }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.logo svg { width: 40px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 3.5; }
.logo rect { fill: var(--accent); stroke: none; }
.nav { display: flex; gap: 26px; font-size: 14px; color: var(--ink-soft); }
.nav a { padding: 6px 0; border-bottom: 1.5px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); border-color: var(--ink); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.ico { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; height: 36px; border: 0; background: none; font-size: 20px; cursor: pointer; padding: 0; }
.cartlink b { font-size: 12px; font-weight: 700; min-width: 18px; height: 18px; display: inline-grid; place-items: center; background: var(--accent); color: var(--accent-ink); padding: 0 4px; }

/* split-bracket button (homepage direction F) */
.brk { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 38px; padding: 0 26px; font: 600 13px var(--font); white-space: nowrap; border: 0; background: none; cursor: pointer; --t: 1.5px; transition: background-color 160ms var(--ease), transform 120ms var(--ease); }
.brk::before, .brk::after { content: ""; position: absolute; left: 0; right: 0; height: 60%; border: 0 solid var(--accent); pointer-events: none; }
.brk::before { top: 0; border-top-width: var(--t); border-right-width: var(--t); }
.brk::after { bottom: 0; border-bottom-width: var(--t); border-left-width: var(--t); }
.brk.bold { --t: 3px; height: 50px; padding: 0 34px; font-size: 15px; font-weight: 700; }
.brk.fill { background: var(--accent); color: var(--accent-ink); }
.brk.fill::before, .brk.fill::after { border-color: var(--accent); }
/* white on #4274e8 is 4.29:1: only the 15px bold buttons take the lighter fill, small ones keep --accent (4.82:1) */
.brk.bold.fill { background: var(--accent-fill); }
.brk.bold.fill::before, .brk.bold.fill::after { border-color: var(--accent-fill); }
.brk:active { transform: translateY(1px); }
.brk svg { font-size: 18px; }
@media (hover: hover) and (pointer: fine) {
  .brk:not(.fill):hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
  .brk.fill:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
}
.txtlink { font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* quantity stepper: square, hairline */
.qty { justify-self: start; display: inline-flex; align-items: stretch; height: 44px; border: 1px solid var(--ink); }
.qty button { width: 44px; border: 0; background: none; font-size: 18px; display: grid; place-items: center; cursor: pointer; }
.qty button:hover { background: var(--tint); }
.qty input { width: 64px; border: 0; border-inline: 1px solid var(--hair); text-align: center; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.sm { height: 34px; } .qty.sm button { width: 34px; font-size: 15px; } .qty.sm input { width: 46px; font-size: 15px; }

/* square tag, never a pill */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border: 1px solid var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.tag.acc { border-color: var(--accent); color: var(--accent); }
.tag.solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* a Thai tag (class="tag th") carries Thai copy: no tracking, no caps, so the glyphs stay readable.
   The Latin "Bundle Sale" tag keeps its tracked caps even on a Thai page. */
:root[lang="th"] .tag.th { letter-spacing: 0; text-transform: none; font-size: 12px; font-weight: 600; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-soft); padding: 22px 0 0; }
.crumbs svg { font-size: 12px; }

/* source list, shared by the product page and the article page */
.refs { list-style: none; padding: 0; font-size: 14px; }
.refs li { padding: 10px 0; border-bottom: 1px solid var(--hair); }
.refs a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.refs span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-soft); }

/* unknown / missing ?p= or ?a= page, shared by product, article and brand */
.missing { padding: 40px 0 0; max-width: 640px; }
.missing .en { display: block; margin-top: 10px; }
.missing .acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* pack line art */
.pack { display: block; width: 100%; height: auto; overflow: visible; }
.pack path, .pack rect { vector-effect: non-scaling-stroke; }
.pk-r { fill: var(--pk-r); stroke: var(--pk-edge); stroke-width: 1; stroke-linejoin: round; }
.pk-l { fill: var(--pk-l); stroke: var(--pk-edge); stroke-width: 1; stroke-linejoin: round; }
.pk-t { fill: var(--pk-t); stroke: var(--pk-edge); stroke-width: 1; stroke-linejoin: round; }
.pk-brand { fill: var(--ink); font-family: "Archivo", sans-serif; font-weight: 800; letter-spacing: .02em; }
.pk-sub { fill: var(--ink-soft); font-family: "Archivo", sans-serif; font-weight: 600; letter-spacing: .14em; }
.pk-stripe { fill: var(--pk-tone); stroke: none; }
.pk-mark { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.pk-line { stroke: var(--hair); stroke-width: 1; }
.pk-floor { stroke: var(--hair); stroke-width: 1; fill: none; }

/* drawing-sheet frame for art */
.sheet { position: relative; border: 1px solid var(--hair); }

/* footer */
.foot { margin-top: 96px; border-top: 1px solid var(--ink); padding: 36px var(--g) 28px; }
.ft-in { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.ft-in p { flex: 1 1 320px; color: var(--ink-soft); font-size: 14px; }
.ft-in p .en { display: block; }
.foot .colophon { max-width: var(--max); margin: 22px auto 0; font-size: 11px; letter-spacing: .08em; color: var(--ink-soft); }

#toast { position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper); padding: 12px 20px; font-size: 14px; transition: opacity 200ms var(--ease), transform 200ms var(--ease); max-width: calc(100vw - 32px); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* language link and phone menu (native <details>) */
.lang { font: 600 11px var(--font); color: var(--ink-soft); padding: 6px 0; }
.lang:hover { color: var(--ink); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: 46px; display: grid; min-width: 220px; background: var(--paper); border: 1px solid var(--ink); }
.menu nav a { padding: 14px 18px; border-bottom: 1px solid var(--hair-lo); font-size: 15px; }
.menu nav a:last-child { border-bottom: 0; }
.ft-links { max-width: var(--max); margin: 28px auto 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 13px; color: var(--ink-soft); }
.ft-links a:hover { color: var(--ink); }
/* the footer row the language switch lives in; a currency selector sits beside it later (ticket 11) */
.ft-row { max-width: var(--max); margin: 22px auto 0; display: flex; align-items: center; gap: 18px; }

/* the footer dropdown (KitSelect): language now, currency beside it. A <details>; its list is a form of submit buttons */
.ft-sel { position: relative; }
.ft-sel summary, .ft-sel-list button { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; font: 600 12px var(--font); letter-spacing: .04em; color: var(--ink-soft); cursor: pointer; }
.ft-sel summary { list-style: none; border: 1px solid var(--ink-soft); }
.ft-sel summary::-webkit-details-marker { display: none; }
.ft-sel summary:hover, .ft-sel[open] summary, .ft-sel-list button:hover { color: var(--ink); }
.ft-sel[open] summary { border-color: var(--ink); }
.ft-sel summary:focus-visible, .ft-sel-list button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ft-sel-ic { display: inline-flex; margin-left: auto; transition: transform 160ms var(--ease); }
.ft-sel[open] .ft-sel-ic { transform: rotate(180deg); }
.ft-sel-list { position: absolute; z-index: 20; left: 0; bottom: calc(100% + 4px); min-width: 100%; display: grid; background: var(--paper); border: 1px solid var(--ink); }
.ft-sel[data-drop="down"] .ft-sel-list { bottom: auto; top: calc(100% + 4px); left: auto; right: 0; }
.ft-sel-list button { justify-content: space-between; width: 100%; border: 0; border-bottom: 1px solid var(--hair-lo); background: none; text-align: left; white-space: nowrap; }
.ft-sel-list button:last-child { border-bottom: 0; }
.ft-sel-list button[aria-current="true"] { color: var(--ink); }

@media (max-width: 900px) { .nav { display: none; } .menu { display: block; } }
@media (max-width: 560px) {
  .ft-sel summary, .ft-sel-list button { min-height: 44px; font-size: 14px; }
  .head { height: 60px; gap: 10px; }
  .logo span { display: none; }
  .tools { gap: 6px; }
  .head .brk { padding: 0 12px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
