:root {
  --paper: #f4f0e4;
  --paper-2: #ebe5d3;
  --card: #fbf9f2;
  --ink: #1d231c;
  --muted: #5d6556;
  --line: #d8d1bd;
  --forest: #1f3d2b;
  --culm: #6f9a3e;
  --culm-soft: #dfe9cf;
  --node: #b98b4e;
  --warn: #8f3416;
  --max: 1180px;
  --sans: "Outfit", "Avenir Next", system-ui, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
}

body.th {
  --sans: "Noto Sans Thai", "Outfit", system-ui, sans-serif;
  --serif: "Noto Serif Thai", "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.04rem/1.6 var(--sans);
}

a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--culm); outline-offset: 3px; }

.wrap { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--forest); color: var(--paper); padding: .5rem .8rem; z-index: 10; }
.skip:focus { top: 1rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -.02em; line-height: 1.08; }
body.th h1, body.th h2, body.th h3 { letter-spacing: 0; line-height: 1.3; }

/* header */
.top {
  position: sticky; top: 0; z-index: 5;
  background: var(--forest); color: #eef2e4;
  border-bottom: 4px solid var(--node);
}
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 560 1.05rem var(--serif); letter-spacing: .06em; text-transform: uppercase; }
.brand svg { width: 16px; height: 28px; fill: var(--culm); }
.brand svg .leaf { fill: #d9c27a; }
.tools { display: flex; gap: 1.1rem; align-items: center; font-size: .95rem; }
.tools a { text-decoration: none; }
.cart-link { background: var(--culm); color: #10200f; padding: .35rem .8rem; border-radius: 999px; font-weight: 500; }
.cart-link span { display: inline-block; min-width: 1.4em; text-align: center; background: #10200f; color: #eef2e4; border-radius: 999px; font-size: .82rem; margin-left: .2rem; }
.cats { display: flex; gap: 1.3rem; overflow-x: auto; padding: 0 0 .6rem; font-size: .9rem; scrollbar-width: none; }
.cats a { text-decoration: none; white-space: nowrap; opacity: .82; }
.cats a:hover { opacity: 1; text-decoration: underline; text-underline-offset: .3em; }

/* hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--paper-2), var(--paper)); border-bottom: 1px solid var(--line); }
.stalks { position: absolute; bottom: 0; height: 100%; width: 190px; fill: var(--culm); opacity: .15; pointer-events: none; }
.stalks .node { fill: var(--forest); }
.stalks .leaf { fill: var(--forest); opacity: .6; }
.stalks-l { left: -30px; }
.hero-grid { position: relative; display: grid; gap: 2rem; padding: 3rem 0 2.6rem; align-items: center; }
.eyebrow { margin: 0 0 .7rem; color: var(--node); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; }
h1 { margin: 0; font-size: clamp(3.2rem, 8vw, 6.2rem); letter-spacing: -.035em; color: var(--forest); }
.dek { max-width: 34rem; font-size: 1.18rem; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem 1.3rem; align-items: center; margin-top: 1.4rem; }
.range { font: 1.3rem var(--serif); font-variant-numeric: tabular-nums; }
.hero-shots { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: .7rem; }
.hero-shots img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.hero-shots img:first-child { grid-row: span 2; }

.btn, button {
  font: inherit; cursor: pointer;
  display: inline-block; text-decoration: none;
  background: var(--forest); color: #f2f4ea;
  border: 1px solid var(--forest); border-radius: 4px;
  padding: .7rem 1.1rem;
}
.btn:hover, button:hover { background: #2b5139; }
button:disabled { opacity: .55; cursor: wait; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; border-bottom: 1px solid var(--line); }
.facts div { padding: 1rem 1rem 1rem 0; }
.facts dt { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: .15rem 0 0; }

/* categories */
.cat { padding: 3.2rem 0 1rem; scroll-margin-top: 6.5rem; }
.cat + .cat { border-top: 1px solid var(--line); }
.cat-head { display: grid; gap: .3rem; margin-bottom: 1.6rem; }
.cat-head h2 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.7rem); color: var(--forest); position: relative; padding-left: 1.1rem; }
.cat-head h2::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 6px; border-radius: 3px; background: linear-gradient(var(--culm) 0 30%, var(--node) 30% 36%, var(--culm) 36% 66%, var(--node) 66% 72%, var(--culm) 72%); }
.cat-head p { margin: 0; color: var(--muted); max-width: 44rem; }
.count { color: var(--node); font-size: .9rem; margin-left: .3rem; white-space: nowrap; }

.grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 7rem; }
.shot { background: #efe9da; aspect-ratio: 1; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.item-body { padding: 1rem 1.05rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.item h3 { margin: 0; font-size: 1.35rem; }
.meta { margin: 0; color: var(--node); font-size: .86rem; }
.text { margin: 0; color: var(--muted); font-size: .95rem; }
.buy { margin-top: auto; padding-top: .7rem; display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.price { margin: 0; font: 560 1.45rem var(--serif); font-variant-numeric: tabular-nums; }
.buy button { padding: .55rem .85rem; font-size: .92rem; }
.buy button.is-added { background: var(--culm); border-color: var(--culm); color: #10200f; }

/* info */
.info { padding: 3.4rem 0; border-top: 1px solid var(--line); background: var(--paper-2); }
.info-grid { display: grid; gap: 2rem; }
.prose h2, .info h2 { margin: 0 0 .7rem; font-size: 1.8rem; color: var(--forest); }
.prose p { margin: 0 0 .8rem; max-width: 36rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; max-width: 44rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .7rem .8rem .7rem 0; border-bottom: 1px solid var(--line); }
thead th { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* footer */
.foot { background: var(--forest); color: #d9e0cc; font-size: .9rem; border-top: 4px solid var(--node); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1.6rem; padding: 1.4rem 0 2rem; }
.foot p { margin: 0; }

/* checkout */
.checkout { padding: 2.4rem 0 4rem; }
.checkout h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.test-banner { background: #fbe3d6; color: var(--warn); border: 2px dashed var(--warn); padding: .7rem 1rem; font-weight: 500; border-radius: 4px; }
.co-grid { display: grid; gap: 2rem; margin-top: 1.4rem; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: grid; grid-template-columns: 72px 1fr auto; gap: .9rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.lines img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; }
.lines .qty { display: flex; gap: .3rem; align-items: center; margin-top: .3rem; }
.lines .qty button { padding: .1rem .55rem; font-size: .9rem; background: var(--card); color: var(--ink); border-color: var(--line); }
.lines .qty .rm { margin-left: .6rem; color: var(--warn); }
.lines b { font: 560 1.15rem var(--serif); }
.totals { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; margin: 1rem 0 0; font-variant-numeric: tabular-nums; }
.totals dd { margin: 0; text-align: right; }
.totals .grand { font: 560 1.3rem var(--serif); padding-top: .4rem; border-top: 1px solid var(--line); }
.co-form { display: grid; gap: .85rem; align-content: start; background: var(--card); border: 1px solid var(--line); padding: 1.2rem; border-radius: 6px; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 1.2rem; flex-wrap: wrap; }
legend { font-size: .9rem; margin-bottom: .3rem; padding: 0; }
label { display: grid; gap: .3rem; font-size: .93rem; }
label.radio { display: flex; gap: .4rem; align-items: center; }
input, textarea { font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: .6rem .7rem; }
.form-msg { margin: 0; min-height: 1.4em; color: var(--warn); font-size: .92rem; }
.pay { margin-top: 2rem; background: var(--card); border: 2px solid var(--forest); border-radius: 6px; padding: 1.4rem; max-width: 44rem; }
.pay h2 { margin: 0 0 .5rem; font-size: 1.6rem; }
.pay .amount { font: 560 2rem var(--serif); margin: .2rem 0 .8rem; font-variant-numeric: tabular-nums; word-break: break-all; }
.pay code { display: block; background: #fff; border: 1px solid var(--line); padding: .7rem; border-radius: 4px; font-size: .95rem; word-break: break-all; text-decoration: line-through; text-decoration-color: rgba(143, 52, 22, .55); }
.pay .row { display: flex; gap: .7rem; flex-wrap: wrap; margin: .8rem 0; }
.pay .small { color: var(--muted); font-size: .9rem; margin: .3rem 0; }

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1fr 1fr; padding: 4rem 0 3.4rem; }
  .stalks { width: 240px; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .info-grid { grid-template-columns: repeat(3, 1fr); }
  .co-grid { grid-template-columns: 1.2fr 1fr; }
}

@media (max-width: 859px) {
  .hero-copy { position: relative; }
  .stalks { opacity: .12; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
