:root {
  --cream: #f8f1e7;
  --paper: #fffaf3;
  --cocoa: #3a2417;
  --ink: #2b1d14;
  --muted: #86705f;
  --caramel: #a8612f;
  --caramel-dark: #8b4d22;
  --butter: #f3e3c3;
  --line: #06c755;
  --kraft: #c9a77c;
  --kraft-light: #e8d5b7;
  --twine: #c0392b;
  --hand: "Caveat", "Segoe Print", cursive;
  --border: #ecdcc8;
  --shadow: 0 1px 2px rgba(58, 36, 23, .06), 0 10px 28px rgba(58, 36, 23, .08);
  --radius: 20px;
  --serif: "Fraunces", Georgia, "Noto Serif Thai", serif;
  --sans: "Sarabun", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--caramel); }
img { max-width: 100%; display: block; }
button { font: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 36px; padding-bottom: 140px; min-height: 50vh; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: rgba(248, 241, 231, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-head.over { position: absolute; left: 0; right: 0; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-head .brand { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--cocoa); text-decoration: none; letter-spacing: -.01em; }
.site-head nav { display: flex; gap: 18px; font-size: .95rem; }
.site-head nav a { color: var(--cocoa); text-decoration: none; }
.site-head nav a.on { text-decoration: underline; text-underline-offset: 5px; }
.site-head.on-image .brand, .site-head.on-image nav a { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
.site-head.over .brand { visibility: hidden; }

/* Cover */
.hero { position: relative; display: flex; align-items: flex-end; padding: 76px 0 28px; overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, #f4d3b8 0, transparent 42%),
    radial-gradient(circle at 88% 8%, #efdcc0 0, transparent 38%),
    radial-gradient(circle at 70% 95%, #f1d9cd 0, transparent 40%),
    radial-gradient(circle, rgba(201, 167, 124, .22) 2px, transparent 2.5px) 0 0 / 22px 22px,
    linear-gradient(180deg, #f3e3c3 0%, var(--cream) 100%); }
.hero.has-image { min-height: 0; color: #fff;
  background: linear-gradient(180deg, rgba(30, 18, 10, .35) 0%, rgba(30, 18, 10, .5) 45%, rgba(30, 18, 10, .8) 100%), var(--hero) center / cover no-repeat; }
.hero-inner { max-width: 1080px; margin: 0 auto; padding: 0 20px; width: 100%; }
.eyebrow { display: inline-block; margin: 0 0 12px; padding: 2px 14px 4px; background: #2f3431; color: #fdfbf6; font-family: var(--hand); font-size: 1.25rem; font-weight: 700; line-height: 1.2; border: 4px solid #b98a5a; border-radius: 6px; transform: rotate(-2deg); box-shadow: 0 6px 16px rgba(30, 18, 10, .25); text-shadow: 0 0 1px rgba(255, 255, 255, .4); }

.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 8px; max-width: 14ch; color: var(--cocoa); }
.hero.has-image h1 { color: #fff; text-shadow: 0 2px 20px rgba(0, 0, 0, .2); }
.lede { font-size: 1.05rem; max-width: 46ch; margin: 0 0 6px; }
.hero-note { font-size: .95rem; margin: 0; opacity: .9; }

/* How to order */
.how { list-style: none; counter-reset: how; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how li { counter-increment: how; position: relative; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px 14px 56px; font-size: .95rem; line-height: 1.45; color: var(--muted); }
.how li::before { content: counter(how); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--caramel); color: #fff; font-weight: 600; display: grid; place-items: center; }
.how strong { display: block; color: var(--cocoa); font-size: 1rem; }
@media (max-width: 720px) { .how { grid-template-columns: 1fr; gap: 8px; margin-bottom: 26px; } .how li { padding: 10px 14px 10px 52px; font-size: .9rem; } .how li::before { top: 12px; width: 28px; height: 28px; } }

/* Day picker */
.days { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 26px; padding: 2px 2px 8px; scrollbar-width: thin; }
.days a { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 9px 14px; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); color: var(--cocoa); text-decoration: none; font-weight: 600; font-size: .95rem; line-height: 1.25; }
.days a small { font-size: .72rem; font-weight: 600; color: var(--caramel); }
.days a.on { background: var(--cocoa); color: #fff; }
.days a.on small { color: var(--butter); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 99px; padding: 14px 26px; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; background: var(--caramel); color: #fff; white-space: nowrap; transition: background .15s, transform .15s, opacity .15s; }
.btn:hover { background: var(--caramel-dark); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn-light { background: #fff; color: var(--cocoa); }
.btn-light:hover { background: var(--butter); }
.btn-line { background: var(--line); }
.btn-line:hover { background: #05b04b; }

/* Menu */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 16px; margin: 0 0 22px; }
.section-head h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -.01em; margin: 0; color: var(--cocoa); }
.section-head p { margin: 0; color: var(--muted); font-family: var(--hand); font-size: 1.4rem; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }

.item { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.item:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(58, 36, 23, .06), 0 16px 36px rgba(58, 36, 23, .12); }
.item-media { position: relative; aspect-ratio: 1 / 1; background: var(--butter); overflow: hidden; }
.item-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.item:hover .item-media img { transform: scale(1.04); }
.item-placeholder { width: 100%; height: 100%; display: grid; place-items: center; }
.item-placeholder span { font-family: var(--hand); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.1; color: var(--cocoa); text-align: center; padding: 10px 18px; background: var(--kraft-light); border-radius: 6px; transform: rotate(-4deg); box-shadow: 0 2px 8px rgba(58, 36, 23, .12); max-width: 80%; }
.tone-0, .tone-1, .tone-2, .tone-3 { background-color: #f6efe4; background-image: radial-gradient(circle, rgba(201, 167, 124, .28) 2px, transparent 2.5px); background-size: 18px 18px; }
.tone-1 { background-color: #f4e8e2; }
.tone-2 { background-color: #eef0e4; }
.tone-3 { background-color: #f3ebe0; }
.tag { position: absolute; top: 12px; left: 12px; background: rgba(255, 250, 243, .95); color: var(--cocoa); font-size: .8rem; font-weight: 600; padding: 5px 12px; border-radius: 99px; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.item-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.item h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; line-height: 1.2; margin: 0 0 6px; color: var(--cocoa); }
.item-desc { margin: 0 0 14px; color: var(--muted); font-size: .95rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.item-feet { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.variant { display: inline-flex; align-items: center; gap: 8px; }
.variant-name { font-size: .9rem; font-weight: 600; color: var(--cocoa); }
.item-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.price-tag { position: relative; align-self: center; display: inline-block; font-family: var(--hand); font-weight: 700; font-size: 1.55rem; line-height: 1.2; color: var(--cocoa); background: var(--kraft-light); padding: 1px 14px 1px 24px; transform: rotate(-3deg); clip-path: polygon(13px 0, 100% 0, 100% 100%, 13px 100%, 0 50%); }
.price-tag::before { content: ""; position: absolute; left: 10px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--kraft); }
.twine { height: 6px; background: repeating-linear-gradient(135deg, var(--twine) 0 7px, #fff 7px 14px); }

.stepper { display: inline-flex; align-items: center; background: var(--cream); border-radius: 99px; padding: 4px; transition: background .15s; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--cocoa); font-size: 1.25rem; line-height: 1; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper input { width: 2.4rem; margin: 0; padding: 0; border: 0; background: transparent; text-align: center; font: 600 1.05rem var(--sans); color: var(--cocoa); -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.has-qty { background: var(--caramel); }
.stepper.has-qty input { color: #fff; }

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .item-body { padding: 12px 12px 14px; }
  .item h3 { font-size: 1.05rem; }
  .item-desc { font-size: .85rem; -webkit-line-clamp: 2; margin-bottom: 10px; }
  .item-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .stepper { justify-content: space-between; }
  .price-tag { font-size: 1.35rem; align-self: flex-start; }
  .tag { top: 8px; left: 8px; font-size: .72rem; padding: 4px 9px; }
}

/* Order bar */
.order-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; width: min(640px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 22px; background: var(--cocoa); color: #fff; border-radius: 99px; box-shadow: 0 12px 32px rgba(43, 29, 20, .32); }
.order-sum { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.order-sum strong { font-size: 1.05rem; }
.order-sum span { font-size: .85rem; opacity: .75; }
.order-bar .btn { padding: 12px 22px; }
.order-bar .btn:not(.btn-line) { background: var(--butter); color: var(--cocoa); }
.order-bar .btn:not(.btn-line):hover { background: #fff; }

/* Forms, messages and simple pages */
.note-box { margin: 32px 0 0; max-width: 640px; }
label { display: block; font-weight: 500; margin: 0 0 16px; color: var(--cocoa); }
input, textarea { display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); color: var(--ink); }
input:focus, textarea:focus { outline: 2px solid var(--caramel); outline-offset: 1px; border-color: transparent; }
.stepper input:focus { outline: none; }
.notice { background: var(--paper); border-left: 4px solid var(--caramel); border-radius: 14px; padding: 14px 18px; margin: 0 0 24px; box-shadow: var(--shadow); }
.flash { border-radius: 14px; padding: 14px 18px; margin: 0 0 24px; background: #e6f2e2; color: #24461d; font-weight: 500; }
.flash-error { background: #f8e1dc; color: #6b2316; }
.empty { text-align: center; padding: 56px 24px; color: var(--muted); background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty h3 { font-family: var(--serif); font-weight: 600; color: var(--cocoa); font-size: 1.5rem; margin: 0 0 8px; }
.empty p { margin: 0; }
main h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 5vw, 2.4rem); letter-spacing: -.01em; color: var(--cocoa); margin: 0 0 8px; }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: 0 0 18px; max-width: 640px; }
.card .btn { margin-top: 4px; }
.list-head { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--cocoa); margin: 26px 0 10px; }
.price { font-weight: 600; color: var(--cocoa); }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--butter); color: var(--cocoa); vertical-align: middle; margin-left: 6px; }
.badge.paid { background: #e6f2e2; color: #24461d; }
.badge.unpaid { background: #f8e1dc; color: #6b2316; }

/* Footer */
.site-foot { background: var(--cocoa); color: var(--butter); padding: 40px 0 120px; }
.twine + .site-foot { margin-top: 0; }
.site-foot strong { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: #fff; }
.site-foot p { margin: 8px 0 0; opacity: .85; }

/* Payment page */
.pay-qr { text-align: center; margin: 16px 0; }
.pay-qr img { display: block; margin: 0 auto 12px; width: 100%; max-width: 320px; background: #fff; padding: 12px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.pay-note { text-align: center; }

/* Day picker under the products: radio buttons styled as day chips */
.pick-head { margin-top: 40px; scroll-margin-top: 16px; }
.day-pick label { flex: 0 0 auto; position: relative; display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 9px 14px; border-radius: 14px; background: var(--paper); box-shadow: var(--shadow); color: var(--cocoa); font-weight: 600; font-size: .95rem; line-height: 1.25; cursor: pointer; }
.day-pick input { position: absolute; opacity: 0; pointer-events: none; }
.day-pick label:has(input:checked) { background: var(--cocoa); color: #fff; }
.day-pick label:has(input:focus-visible) { outline: 2px solid var(--caramel); outline-offset: 2px; }
.day-pick label small { font-size: .72rem; font-weight: 600; color: var(--caramel); }
.day-pick label.is-full { opacity: .5; cursor: default; }

/* Upcoming orders list */
.my-list { list-style: none; margin: 8px 0 0; padding: 0; }
.my-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-top: 1px solid rgba(0, 0, 0, .06); }
.btn-small { padding: 7px 16px; font-size: .9rem; }

.login-note { margin: 16px 0 0; color: var(--muted); }
.note-box label + label { margin-top: 14px; }
.received p { margin: 0 0 10px; }
.received p:last-child { margin-bottom: 0; }

/* Promises in the header */
.promise { list-style: none; margin: 10px 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.promise li { background: rgba(255, 255, 255, .85); color: var(--cocoa); border-radius: 99px; padding: 5px 12px 5px 30px; font-weight: 600; font-size: .9rem; position: relative; }
.promise li::before { content: "✓"; position: absolute; left: 11px; color: var(--caramel); font-weight: 700; }

/* Good to know, below the bakes */
.good-to-know { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 48px 0 110px; }
.good-to-know > div { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 20px; }
.good-to-know h2 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--cocoa); margin: 0 0 8px; }
.good-to-know p { margin: 0; color: var(--muted); line-height: 1.5; }
@media (max-width: 720px) { .good-to-know { grid-template-columns: 1fr; } }

/* Delivery: one place for now, shown as a chosen chip. */
.delivery-pick label { flex: 1 1 100%; }


/* Day picker: a week of weekdays as small cards, all in view (no sideways scrolling). */
.days.day-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); overflow: visible; }
.day-pick label { min-width: 0; padding: 10px 8px; text-align: center; }
.day-pick label span { font-size: .82rem; font-weight: 500; }
.day-pick label b { font-size: 1.05rem; font-weight: 600; }
.days.delivery-pick { display: flex; }
.day-pick .day-short { display: none; }

/* How will you pay: QR now or cash on delivery. Text for the other choice is hidden. */
.pay-head { margin: 26px 0 12px; }
.pay-head h2 { font-size: 1.3rem; }
#order-form.paying-cash .qr-only, #order-form:not(.paying-cash) .cash-only { display: none; }

/* Logo in the header and footer */
.site-head .brand { display: inline-flex; align-items: center; gap: 10px; }
.site-head .brand-logo { width: 44px; height: 44px; }
.foot-logo { display: block; width: 96px; height: 96px; margin: 0 0 10px; }

/* Privacy policy and terms */
.legal { max-width: 720px; }
.legal h2 { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--cocoa); margin: 28px 0 8px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 0 0 8px; }
.foot-links a { color: inherit; }
.day-pick label b .mo { font: inherit; color: inherit; text-transform: none; }

/* Order steps appear one at a time. */
.step-block[hidden] { display: none; }

/* Delivery: a selectable option (radio dot, place, time), ready for more options such as Grab. */
.delivery-options { display: grid; gap: 10px; margin: 0 0 26px; }
.delivery-option { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--paper); border: 2px solid transparent; box-shadow: var(--shadow); cursor: pointer; }
.delivery-option:has(input:checked) { border-color: var(--caramel); }
.delivery-option input { accent-color: var(--caramel); width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; }
.delivery-text { display: flex; flex-direction: column; gap: 2px; color: var(--cocoa); }
.delivery-text strong { font-size: 1rem; }
.delivery-text span { font-size: .9rem; opacity: .8; }

/* Good to know, read before ordering. */
.good-to-know { margin-top: 0; margin-bottom: 34px; }

/* Last order step (log in, or pay) sits in the form; the bottom bar only shows the running total. */
.final-step { margin: 26px 0 0; padding: 20px 22px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.final-step h2 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: var(--cocoa); margin: 0 0 6px; }
.final-step p { margin: 0 0 14px; color: var(--muted); }
.final-step .btn { width: 100%; max-width: 360px; }
.order-bar { justify-content: center; padding: 10px 22px; width: auto; min-width: 240px; }
.order-sum { align-items: center; text-align: center; }

/* Room under the form so the running-total bar never covers the last step's button. */
#order-form { padding-bottom: 110px; }


.just-in { padding: 10px 14px; border-radius: 10px; background: #e3f4e6; color: #1f5f2c !important; }


/* While the order is placed straight after login, hide the page so the products don't flash up again. */
html.placing body > * { visibility: hidden; }


/* Pay page: the exact amount, a Thai QR made with that amount, and "I've paid". */
.pay-amount { display: flex; flex-direction: column; align-items: center; margin: 18px 0 8px; padding: 14px; border-radius: 16px; background: var(--cocoa); color: #fff; }
.pay-amount span { font-size: .9rem; opacity: .8; }
.pay-amount strong { font-size: 2.2rem; line-height: 1.1; letter-spacing: .5px; }
.pay-explain { text-align: center; color: var(--muted); margin: 0 auto 16px; max-width: 480px; }
.pay-qr canvas { display: block; margin: 0 auto; width: 260px; height: 260px; }
.thai-qr-head { width: 260px; margin: 0 auto; padding: 8px; background: #113566; color: #fff; font-weight: 600; font-size: .9rem; text-align: center; border-radius: 10px 10px 0 0; }
.thai-qr-amount { width: 260px; margin: 0 auto 12px; padding: 8px; background: #fff; border-top: 1px solid #eee; font-weight: 600; text-align: center; border-radius: 0 0 10px 10px; color: #113566; }
.paid-form { text-align: center; margin: 18px 0; }
.paid-form .btn { width: 100%; max-width: 360px; }
.paid-form details { margin-top: 8px; }

/* Header bar lines up with the page container on wide screens. */
.site-head { padding-left: max(20px, calc((100% - 1040px) / 2)); padding-right: max(20px, calc((100% - 1040px) / 2)); }
