/* SOFIONA DIAMOND — styles (home page + the six category pages)
   Phone first; tablet from 600px; desktop from 900px. Built from the approved mobile draft (Oct 2026).
   Brand: Azureish #a2d0ef · white · jet black (+ slate #364955) · Libre Baskerville (+ Jost for UI). */

/* --- Tokens ------------------------------------------------------------ */
:root {
  --black: #0b0b0c; --white: #fff; --ink: #0b0b0c; --ink-2: #26343d; --slate: #364955; --muted: #56707f;
  --azure: #a2d0ef; --azure-50: #f2f8fc; --azure-100: #e6f2fb; --line: #dbe7f0;
  --line-green: #06c755; --wa-green: #1fa855; --error: #b3261e;
  --serif: "Libre Baskerville", "Noto Serif Thai", Georgia, serif;
  --sans: "Jost", "Noto Sans Thai", "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px; --section: 56px; --header-h: 60px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --z-header: 20; --z-float: 30;
}

/* --- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 16px/1.6 var(--sans); overflow-x: clip; }
body.has-dialog { overflow: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
svg.i { width: 22px; height: 22px; flex: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--slate); outline-offset: 3px; }
::selection { background: var(--azure); color: var(--black); }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--black); color: var(--white); transition: top .2s; }
.skip-link:focus { top: 12px; }

/* --- Type -------------------------------------------------------------- */
.eyebrow { font-size: 13px; letter-spacing: .02em; color: var(--muted); }
.h2 { font: 400 26px/1.3 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.body { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.stack > * + * { margin-top: 14px; }
html[lang="th"] .h2 { line-height: 1.45; letter-spacing: 0; }
html[lang="th"] .body { line-height: 1.8; }

/* --- Buttons (thin outline, sentence case) ----------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px; border: 1px solid currentColor; font: 400 15px/1 var(--sans); letter-spacing: .01em; transition: background-color .2s var(--ease), color .2s var(--ease); touch-action: manipulation; }
.btn:active { background: var(--black); color: var(--white); border-color: var(--black); }
.btn--light { color: var(--white); }
.btn--light:active { background: var(--white); color: var(--black); }
.btn--solid { background: var(--black); color: var(--white); border-color: var(--black); }
.btn--block { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 15px; }
.link svg { width: 16px; height: 16px; transform: rotate(-90deg); }
@media (hover: hover) {
  .btn:hover { background: var(--black); color: var(--white); border-color: var(--black); }
  .btn--light:hover { background: var(--white); color: var(--black); border-color: var(--white); }
  .btn--solid:hover { background: var(--slate); border-color: var(--slate); }
}

/* --- Header ------------------------------------------------------------ */
.header { position: sticky; top: 0; z-index: var(--z-header); height: var(--header-h); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 2px; padding: 0 6px 0 4px; background: rgba(255,255,255,.97); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.is-scrolled { border-bottom-color: var(--line); }
.header__side { display: flex; align-items: center; }
.header__side--right { justify-content: flex-end; }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; }
.lang-toggle { min-width: 40px; height: 44px; display: grid; place-items: center; }
.lang-toggle span { padding: 2px 7px; border: 1px solid var(--line); border-radius: 11px; font-size: 11px; letter-spacing: .1em; }
.logo img { width: 108px; }
.header__side--right .icon-btn { width: 36px; }
.wish-count { position: absolute; top: 5px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--azure); color: var(--black); font-size: 10px; line-height: 16px; text-align: center; }
.book-btn { position: relative; display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 17px; background: var(--black); color: var(--white); font-size: 11px; letter-spacing: .01em; white-space: nowrap; }
.book-btn::after { content: ""; position: absolute; inset: -5px -2px; } /* 44px tap area */
html[lang="th"] .book-btn { font-size: 12px; }

/* --- Hero: full screen, text bottom-left over the film ----------------- */
.hero { position: relative; height: calc(100svh - var(--header-h)); min-height: 520px; max-height: 760px; overflow: hidden; color: var(--white); background: var(--azure-100); }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,20,28,0) 38%, rgba(11,20,28,.62) 100%); pointer-events: none; }
.hero__text { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 36px; z-index: 1; }
.hero h1 { font: 400 36px/1.15 var(--serif); letter-spacing: -.015em; }
.hero h1 em { font-style: italic; color: var(--azure); }
.hero p { margin-top: 12px; font-size: 15px; line-height: 1.6; max-width: 32ch; opacity: .92; }
.hero .btn { margin-top: 22px; }
.hero__pause { position: absolute; right: 12px; top: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.75); color: var(--black); }
.hero__pause svg { width: 16px; height: 16px; }
html[lang="th"] .hero h1 { line-height: 1.35; letter-spacing: 0; }

/* --- Section scaffolding ---------------------------------------------- */
.sec { padding: var(--section) 0; }
.sec--tint { background: var(--azure-50); }
.pad { padding-inline: var(--gutter); }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gutter); }

/* --- Swipe rows -------------------------------------------------------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 62%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 0 var(--gutter); margin-top: 22px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail--wide { grid-auto-columns: 84%; }
.rail--auto { scroll-snap-type: none; } /* the gliding rows move smoothly without snapping */
.rail--mini { grid-auto-columns: 44%; gap: 10px; margin-top: 14px; }
.rail-pause { width: 40px; height: 44px; display: grid; place-items: center; color: var(--muted); }
.rail-pause svg { width: 16px; height: 16px; }

/* --- Product card ------------------------------------------------------ */
.card { position: relative; }
.card__open { display: block; width: 100%; text-align: left; -webkit-tap-highlight-color: transparent; }
.card__img { aspect-ratio: 1; background: #f4f4f4; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__fav { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; display: grid; place-items: center; }
.card__fav::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: rgba(255,255,255,.9); }
.card__fav svg { position: relative; width: 17px; height: 17px; }
.card__fav[aria-pressed="true"] { --heart-fill: var(--black); }
.card__fav.pop-heart svg { animation: heartPop .42s var(--ease); }
@keyframes heartPop { 40% { transform: scale(1.3); } }
.card__cat { margin-top: 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
html[lang="th"] .card__cat { letter-spacing: .02em; font-size: 12px; }
.card__name { margin-top: 12px; font: 400 15px/1.35 var(--serif); }
.card__cat + .card__name { margin-top: 4px; }
.card__style { margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.card__price { margin-top: 6px; font-size: 14px; letter-spacing: .01em; }
.card__karat { color: var(--muted); font-size: 12px; }
.card__tag { display: inline-block; margin-left: 4px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; letter-spacing: .06em; color: var(--muted); vertical-align: 1px; }
.rail--mini .card__name { font-size: 14px; }
.rail--mini .card__style { font-size: 12px; }
.rail--mini .card__price { font-size: 13px; }

/* --- Signature Edit ---------------------------------------------------- */
.edit { padding-bottom: var(--section); }
.edit__img { aspect-ratio: 4 / 5; overflow: hidden; }
.edit__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.edit__text { margin-top: 32px; }
.edit__cta { margin-top: 24px; }

/* --- Shop by category (on black) --------------------------------------- */
.cats { background: var(--black); color: var(--white); padding: 48px 0 0; }
.cats .eyebrow { color: var(--azure); }
.cats .body { color: rgba(255,255,255,.82); }
.cats .rail { margin-top: 28px; padding-bottom: 0; gap: 2px; grid-auto-columns: 78%; scroll-padding-inline: 0; padding-inline: 0; }
.cats__wrap { position: relative; }
.cats__arrow { position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--black); box-shadow: 0 6px 18px -8px rgba(0,0,0,.45); transition: opacity .25s var(--ease), transform .2s var(--ease); }
.cats__arrow:active { transform: scale(.94); }
.cats__arrow svg { width: 20px; height: 20px; }
.cats__arrow--prev { left: 10px; }
.cats__arrow--prev svg { transform: rotate(90deg); }
.cats__arrow--next { right: 10px; }
.cats__arrow--next svg { transform: rotate(-90deg); }
.cats__arrow:disabled { opacity: 0; pointer-events: none; }
.tile { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; color: var(--white); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.55)); }
.tile__text { position: absolute; left: 0; right: 0; bottom: 26px; z-index: 1; text-align: center; }
.tile__name { font: 400 24px/1.2 var(--serif); }
.tile__cta { display: inline-block; margin-top: 8px; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }

/* gentle pop when the mouse points at a tile or a piece (mouse devices only) */
@media (hover: hover) {
  .cats .rail { padding-block: 14px; margin-top: 14px; }
  .tile { transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
  .tile img { transition: transform .9s var(--ease); }
  .tile__text { transition: transform .45s var(--ease); }
  .tile:hover, .tile:focus-visible { z-index: 1; transform: translateY(-6px) scale(1.025); box-shadow: 0 20px 40px -18px rgba(0,0,0,.65); }
  .tile:hover img, .tile:focus-visible img { transform: scale(1.06); }
  .tile:hover .tile__text, .tile:focus-visible .tile__text { transform: translateY(-4px); }

  .rail:not(.cats .rail) { padding-block: 10px; margin-bottom: -10px; }
  .card { transition: transform .45s var(--ease); }
  .card__img { transition: box-shadow .45s var(--ease); }
  .card__img img { transition: transform .9s var(--ease); }
  .card:hover, .card:focus-within { transform: translateY(-5px); }
  .card:hover .card__img, .card:focus-within .card__img { box-shadow: 0 16px 30px -18px rgba(0,0,0,.45); }
  .card:hover .card__img img, .card:focus-within .card__img img { transform: scale(1.05); }
}
/* phones & tablets: the same pop while a finger is on a piece or a category (class set in app.js) */
@media (hover: none) {
  .rail:not(.cats .rail) { padding-block: 8px; margin-bottom: -8px; }
  .cats .rail { padding-block: 10px; margin-top: 18px; }
  .card, .tile { transition: transform .25s var(--ease), box-shadow .25s var(--ease); -webkit-tap-highlight-color: transparent; }
  .card__img { transition: box-shadow .25s var(--ease); }
  .card__img img, .tile img { transition: transform .5s var(--ease); }
  .card.is-pressed { transform: translateY(-4px); }
  .card.is-pressed .card__img { box-shadow: 0 14px 26px -16px rgba(0,0,0,.45); }
  .card.is-pressed .card__img img { transform: scale(1.04); }
  .tile.is-pressed { z-index: 1; transform: translateY(-4px) scale(1.02); box-shadow: 0 18px 34px -18px rgba(0,0,0,.6); }
  .tile.is-pressed img { transform: scale(1.05); }
}

/* --- The atelier: rolling row of pieces + the brand quote --------------- */
.atelier { padding-block: 44px var(--section); }
.atelier .row-head .eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); }
html[lang="th"] .atelier .row-head .eyebrow { letter-spacing: .02em; font-size: 13px; }
.atelier__text { margin-top: 56px; text-align: center; }
.atelier__text .eyebrow { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
html[lang="th"] .atelier__text .eyebrow { letter-spacing: .04em; font-size: 13px; }
.atelier__quote { max-width: 30em; margin: 18px auto 0; font: italic 400 18px/1.75 var(--serif); color: var(--ink-2); }
html[lang="th"] .atelier__quote { font-style: normal; line-height: 1.9; }

/* --- Promises (front page strip + product pop-up list) ----------------- */
.promise { display: grid; grid-template-columns: 1fr 1fr; margin: 44px var(--gutter) 0; padding: 0; border-top: 1px solid var(--line); }
.promise li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 8px; font-size: 13px; letter-spacing: .02em; color: var(--ink); text-align: center; border-bottom: 1px solid var(--line); }
.promise li:nth-child(odd) { border-right: 1px solid var(--line); }
.promise li:nth-child(5) { grid-column: 1 / -1; border-right: 0; } /* shipping spans the full width on phones */
.promise svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--slate); stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; }
.promises { padding-top: 48px; }
.promises .promise { margin-top: 0; }

/* --- Visit ------------------------------------------------------------- */
.visit__img { margin: 0 var(--gutter); aspect-ratio: 3 / 2; overflow: hidden; }
.visit__img img { width: 100%; height: 100%; object-fit: cover; }
.visit .stack { margin-top: 26px; }
.visit__addr { font-size: 14px; line-height: 1.6; color: var(--muted); }
.visit__btns { display: grid; gap: 10px; margin-top: 22px; }
.visit__btns .btn { width: 100%; }

/* --- Accordions (FAQ + footer) ----------------------------------------- */
.acc { border-top: 1px solid var(--line); margin-top: 22px; }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 8px 0; font-size: 15px; line-height: 1.45; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary svg { width: 18px; height: 18px; flex: none; transition: transform .25s var(--ease); }
.acc details[open] summary svg { transform: rotate(180deg); }
.acc__body { padding: 0 0 18px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.acc__body a, .acc__body button { display: block; padding: 8px 0; text-align: left; }

/* --- Footer ------------------------------------------------------------ */
.footer { background: var(--black); color: var(--white); padding: 48px var(--gutter) calc(96px + env(safe-area-inset-bottom)); }
.footer .acc { border-color: rgba(255,255,255,.18); margin-top: 28px; }
.footer .acc details { border-color: rgba(255,255,255,.18); }
.footer .acc__body { color: rgba(255,255,255,.75); }
.footer__logo { width: 150px; }
.footer__tag { margin-top: 14px; font-size: 14px; color: rgba(255,255,255,.7); }
.social { display: flex; gap: 6px; margin-top: 26px; }
.social a { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; }
.social svg { width: 20px; height: 20px; }
.footer__base { margin-top: 30px; font-size: 12px; color: rgba(255,255,255,.55); }

/* --- Floating chat pill ------------------------------------------------ */
.chat { position: fixed; z-index: var(--z-float); right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.chat.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
.chat__label { padding: 8px 14px; border-radius: 18px; background: var(--white); color: var(--ink); font-size: 14px; box-shadow: 0 6px 20px -8px rgba(0,0,0,.35); }
.chat__btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--black); color: var(--line-green); --line-ink: var(--black); box-shadow: 0 10px 26px -10px rgba(0,0,0,.5); }
.chat__btn svg { width: 26px; height: 26px; }

/* --- Dialogs (shared) -------------------------------------------------- */
dialog { padding: 0; border: 0; color: var(--ink); background: var(--white); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(11,20,28,.45); backdrop-filter: blur(2px); }
.dlg-close { position: absolute; right: 10px; top: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); box-shadow: 0 4px 14px -6px rgba(0,0,0,.3); }
.dlg-close svg { width: 18px; height: 18px; }
.grab { position: absolute; left: 50%; top: 8px; z-index: 3; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(0,0,0,.18); }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(100%); } }
@keyframes winIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes winOut { to { opacity: 0; transform: translateY(10px) scale(.98); } }

/* bottom sheet on phones (product, booking, saved pieces); a centred window on desktop */
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; border-radius: 18px 18px 0 0; overflow: hidden; display: none; flex-direction: column; }
.sheet[open] { display: flex; animation: sheetUp .38s var(--ease); }
.sheet.is-closing { animation: sheetDown .22s ease-in forwards; }
.sheet__scroll { overflow-y: auto; overscroll-behavior: contain; }
.sheet__head { padding: 26px 64px 14px var(--gutter); border-bottom: 1px solid var(--line); }
.sheet__head .h2 { font-size: 22px; }
.sheet__body { padding: 20px var(--gutter) calc(24px + env(safe-area-inset-bottom)); }

/* --- Product pop-up ----------------------------------------------------- */
.pop.sheet { max-width: 440px; }
.pop__gallery { position: relative; background: #f4f4f4; }
.pop__slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pop__slides::-webkit-scrollbar { display: none; }
.pop__slide { position: relative; flex: 0 0 100%; margin: 0; aspect-ratio: 5 / 4; scroll-snap-align: start; cursor: zoom-in; }
.pop__slide img { width: 100%; height: 100%; object-fit: cover; }
/* draft: a photo that hasn't been shot yet (see tools/photo-manifest.mjs) */
.ph-missing { display: grid; place-items: center; width: 100%; height: 100%; aspect-ratio: 1; background: #f1f1ee; color: #9a9a94;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; text-align: center; padding: 8px; box-sizing: border-box; }
.pop__slide .ph-missing { aspect-ratio: auto; cursor: default; }
.wish-item .ph-missing { width: 64px; height: 64px; }
.pop__shown { position: absolute; left: 12px; top: 12px; padding: 3px 10px; border-radius: 12px; background: rgba(255,255,255,.88); font-size: 11px; color: var(--muted); }
.pop__views { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 2px; padding: 3px; border-radius: 20px; background: rgba(255,255,255,.9); box-shadow: 0 4px 14px -8px rgba(0,0,0,.35); }
.pop__view { position: relative; min-width: 58px; min-height: 30px; padding: 0 12px; border-radius: 16px; font-size: 12px; letter-spacing: .02em; color: var(--muted); transition: background-color .2s var(--ease), color .2s var(--ease); }
.pop__view[aria-pressed="true"] { background: var(--black); color: var(--white); }
.pop__view::after { content: ""; position: absolute; inset: -7px 0; } /* 44px tap height */
.pop__info { padding: 20px var(--gutter) calc(28px + env(safe-area-inset-bottom)); }
.pop__name { margin-top: 6px; font: 400 26px/1.25 var(--serif); }
.pop__style { margin-top: 2px; font-size: 14px; color: var(--muted); }
.pop__buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pop__price { min-width: 0; font-size: 22px; line-height: 1.2; letter-spacing: .01em; }
.pop__price small { display: block; margin-top: 2px; font-size: 12px; letter-spacing: .02em; color: var(--muted); }
.pop__karats { display: flex; gap: 6px; flex: none; }
.pop__karat { min-width: 52px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; font-size: 13px; }
.pop__karat[aria-pressed="true"] { border-color: var(--black); background: var(--azure-50); }
.pop__tones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pop__tone { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 8px; border: 1px solid var(--line); border-radius: 18px; font-size: 13px; }
.pop__tone[aria-pressed="true"] { border-color: var(--black); }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); flex: none; }
.dot--white { background: linear-gradient(135deg, #fbfbfa, #cfd1d4); }
.dot--yellow { background: #d4c282; }
.dot--rose { background: linear-gradient(135deg, #f6d5c6, #d29a86); }
.pop__desc { margin-top: 14px; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.pop__size { margin-top: 16px; }
.pop__size label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.pop__help { margin-top: 6px; font-size: 12px; color: var(--muted); }
.pop__specs { margin-top: 18px; border-top: 1px solid var(--line); }
.pop__specs div { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pop__specs dt { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
html[lang="th"] .pop__specs dt { letter-spacing: 0; text-transform: none; font-size: 13px; padding-top: 1px; }
.pop__specs dd { font-size: 14px; line-height: 1.55; }
.pop__ask { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.pop__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid var(--line); border-radius: 23px; font-size: 14px; letter-spacing: .02em; color: var(--ink); transition: background-color .2s var(--ease); }
.pop__btn svg { width: 20px; height: 20px; color: var(--wa-green); }
.pop__btn--line { background: var(--black); border-color: var(--black); color: var(--white); --line-ink: var(--black); }
.pop__btn--line svg { color: var(--line-green); }
.pop__btn:active { background: var(--azure-50); }
.pop__btn--line:active { background: var(--slate); }
.pop__book { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 44px; margin-top: 6px; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.pop__promise { grid-template-columns: 1fr; margin: 18px 0 0; }
.pop__promise li { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 14px 4px; font-size: 13px; text-align: left; }
.pop__promise li:nth-child(odd) { border-right: 0; }
.pop__promise li:nth-child(5) { grid-column: auto; }
.pop__promise svg { width: 18px; height: 18px; }
.pop__promise.is-ready li { opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.pop__promise.is-in li { opacity: 1; transform: none; }
.pop__promise.is-in li:nth-child(2) { transition-delay: .1s; }
.pop__promise.is-in li:nth-child(3) { transition-delay: .2s; }
.pop__promise.is-in li:nth-child(4) { transition-delay: .3s; }
.pop__promise.is-in li:nth-child(5) { transition-delay: .4s; }

/* --- Form fields (booking) --------------------------------------------- */
.field { display: grid; gap: 6px; margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { padding: 0; font-size: 13px; color: var(--muted); }
.field input, .field textarea, .select select { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 2px; background: var(--white); font-size: 16px; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus, .select select:focus { border-color: var(--ink); outline: none; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__err { font-size: 13px; color: var(--error); }
.field__opt { color: var(--muted); }
.field-row { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
.select { position: relative; display: block; }
.select select { appearance: none; padding-right: 40px; cursor: pointer; }
.select svg { position: absolute; right: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; pointer-events: none; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { position: relative; display: inline-flex; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 19px; font-size: 14px; cursor: pointer; }
.check input:checked + span { border-color: var(--black); background: var(--azure-50); }
.check input:focus-visible + span { outline: 2px solid var(--slate); outline-offset: 2px; }
.book__send { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.book__note { margin-top: 12px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.book__lead { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* --- Saved pieces ------------------------------------------------------- */
.wish-item { display: grid; grid-template-columns: 64px 1fr 44px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wish-item img { width: 64px; height: 64px; object-fit: cover; background: #f4f4f4; }
.wish-item h3 { font: 400 16px/1.3 var(--serif); }
.wish-item p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.wish-empty { padding: 32px 0; text-align: center; color: var(--muted); }
.wish-empty svg { width: 28px; height: 28px; margin: 0 auto 10px; }
.wish-send { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }

/* --- Photo zoom --------------------------------------------------------- */
.lightbox { width: 100vw; height: 100dvh; margin: 0; background: rgba(11,11,12,.94); display: none; place-items: center; }
.lightbox[open] { display: grid; animation: winIn .25s var(--ease); }
.lightbox.is-closing { animation: winOut .18s ease-in forwards; }
.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.lightbox .dlg-close { top: max(14px, env(safe-area-inset-top)); }

/* --- Toast -------------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 22px; background: var(--black); color: var(--white); font-size: 14px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast svg { width: 14px; height: 14px; color: var(--azure); }

/* --- Menu (☰) ------------------------------------------------------------ */
.menu { width: min(86vw, 360px); height: 100dvh; margin: 0 auto 0 0; display: none; flex-direction: column; overflow-y: auto; }
.menu[open] { display: flex; animation: menuIn .32s var(--ease); }
.menu.is-closing { animation: menuOut .2s ease-in forwards; }
@keyframes menuIn { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes menuOut { to { transform: translateX(-100%); } }
.menu__head { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding: 0 8px 0 var(--gutter); border-bottom: 1px solid var(--line); }
.menu__head img { width: 120px; }
.menu__nav { display: flex; flex-direction: column; padding: 12px var(--gutter) 24px; }
.menu__nav a, .menu__nav button { display: flex; align-items: center; width: 100%; min-height: 48px; font: 400 19px/1.3 var(--serif); color: var(--ink); text-align: left; border-bottom: 1px solid var(--line); }
.menu__nav a[aria-current="page"] { color: var(--slate); text-decoration: underline; text-underline-offset: 5px; }
.menu__nav .menu__home { font-size: 22px; }
.menu__label { margin: 24px 0 4px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
html[lang="th"] .menu__label { letter-spacing: .04em; font-size: 13px; }
.menu__contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding: 16px var(--gutter) calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

/* --- Category page ------------------------------------------------------- */
.catview { padding-bottom: 56px; }
.cat-hero { background: var(--azure-50); }
.cat-hero__img { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; }
.cat-hero__img img { width: 100%; height: 100%; object-fit: cover; }
.cat-hero__text { padding-block: 20px 28px; }
.crumbs { display: flex; gap: 8px; font-size: 12px; letter-spacing: .04em; color: var(--muted); }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.cat-hero__line { margin-top: 12px; font: italic 400 17px/1.5 var(--serif); color: var(--slate); text-wrap: balance; }
html[lang="th"] .cat-hero__line { font-style: normal; line-height: 1.75; }
/* sticky line under the header: category name left, gold dots right */
.cat-head { position: sticky; top: var(--header-h); z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 0 var(--gutter); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.cat-title { flex: 1; min-width: 0; padding-block: 12px; font: 400 21px/1.25 var(--serif); }
.cat-gold { flex: none; display: flex; align-items: center; }
.cat-gold__btn { position: relative; width: 30px; height: 36px; display: grid; place-items: center; }
.cat-gold__btn .dot { transition: box-shadow .2s var(--ease); }
.cat-gold__btn[aria-pressed="true"] .dot { box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 2px var(--white), 0 0 0 3px var(--ink); }
.cat-gold__btn::after { content: ""; position: absolute; inset: -4px 0; }
.cat-gold__name { display: none; margin-left: 4px; min-width: 42px; font-size: 12px; }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; padding: 16px var(--gutter) 0; transition: opacity .22s ease-in; }
.cat-grid.is-fading { opacity: 0; }
.cat-grid .card.is-entering { animation: cardIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cat-grid .card__name { font-size: 15px; }
.cat-grid .card__style { font-size: 12px; }
.cat-grid .card__price { font-size: 13px; }
.cat-empty { padding: 48px var(--gutter); text-align: center; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 44px; padding: 0 var(--gutter); }
.pager__btn { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; color: var(--muted); transition: background-color .2s var(--ease), color .2s var(--ease); }
.pager__btn[aria-current="page"] { background: var(--black); color: var(--white); }
.pager__btn:disabled { opacity: .3; cursor: default; }
.pager__arrow svg { width: 18px; height: 18px; }
.pager__arrow--prev svg { transform: rotate(90deg); }
.pager__arrow--next svg { transform: rotate(-90deg); }
.pager__note { flex-basis: 100%; margin-top: 6px; text-align: center; font-size: 12px; color: var(--muted); }

/* ================= Tablet (600–899px): the phone layout, a little roomier ================= */
@media (min-width: 600px) and (max-width: 899px) {
  :root { --gutter: 32px; --section: 72px; }
  .rail { grid-auto-columns: 38%; gap: 16px; }
  .rail--mini { grid-auto-columns: 28%; }
  .cats .rail { grid-auto-columns: 46%; gap: 4px; }
  .hero h1 { font-size: 46px; }
  .edit__img { aspect-ratio: 16 / 11; }
  .visit__img { aspect-ratio: 16 / 9; }
  /* front-page promise strip only (the pop-up keeps its one-per-row list) */
  .promises .promise { grid-template-columns: repeat(3, 1fr); }
  .promises .promise li:nth-child(odd) { border-right: 0; }
  .promises .promise li:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
  .promises .promise li:nth-child(5) { grid-column: auto; }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 16px; }
  .cat-hero__img { aspect-ratio: 21 / 9; }
  .pop.sheet { max-width: 560px; }
}

/* ================= Desktop (900px and wider): same sections, laid out wide ================= */
@media (min-width: 900px) {
  :root { --gutter: max(40px, calc((100vw - 1240px) / 2)); --section: 96px; --header-h: 76px; }
  .h2 { font-size: 36px; }
  .body { font-size: 16px; max-width: 52ch; }

  .header { padding: 0 calc(var(--gutter) - 12px); }
  .logo img { width: 160px; }
  .header__side--right .icon-btn { width: 44px; }
  .book-btn { min-height: 40px; padding: 0 18px; border-radius: 20px; font-size: 13px; letter-spacing: .03em; }
  .lang-toggle span { font-size: 12px; padding: 3px 9px; }

  .hero { min-height: 620px; max-height: 880px; }
  .hero video { object-position: 60% 35%; }
  .hero::after { background: linear-gradient(90deg, rgba(11,20,28,.55) 0%, rgba(11,20,28,.15) 45%, rgba(11,20,28,0) 70%); }
  .hero__text { left: var(--gutter); right: auto; bottom: 96px; max-width: 560px; }
  .hero h1 { font-size: 60px; }
  .hero p { font-size: 17px; }
  .hero__pause { right: var(--gutter); top: auto; bottom: 32px; }

  .row-head { padding-inline: var(--gutter); }
  .rail { grid-auto-columns: calc((100% - 3 * 24px) / 4); gap: 24px; margin-top: 32px; }
  .rail--mini { grid-auto-columns: calc((100% - 5 * 16px) / 6); gap: 16px; }
  .card__name { font-size: 17px; }

  .edit { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto auto 1fr; padding-bottom: 0; }
  .edit__img { grid-row: 1 / 5; aspect-ratio: auto; height: 100%; min-height: 640px; }
  .edit__text { grid-row: 2; margin-top: 0; padding: 0 var(--gutter) 0 72px; }
  .edit__btn { grid-row: 3; padding: 0 var(--gutter) 0 72px; }

  .cats { padding: 88px 0 96px; }
  .cats .stack { display: grid; grid-template-columns: 1fr 1fr; column-gap: 72px; align-items: end; }
  .cats .stack .eyebrow { grid-column: 1; }
  .cats .stack .h2 { grid-column: 1; margin-top: 10px; }
  .cats .stack .body { grid-column: 2; grid-row: 1 / 3; margin-top: 0; }
  .cats .rail { padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); gap: 16px; grid-auto-columns: calc((100% - 2 * 16px) / 3); margin-top: 26px; padding-block: 14px; }
  .cats__arrow { width: 52px; height: 52px; margin-top: -26px; }
  .cats__arrow--prev { left: calc(var(--gutter) - 26px); }
  .cats__arrow--next { right: calc(var(--gutter) - 26px); }

  .atelier { padding-block: 88px var(--section); }
  .atelier__text { margin-top: 96px; }
  .atelier__quote { max-width: 34em; font-size: 22px; line-height: 1.7; }

  .promises { padding-top: 80px; }
  /* front-page promise strip on one line — scoped so it can't widen the product pop-up (that hid its photos) */
  .promises .promise { grid-template-columns: repeat(5, auto); justify-content: center; margin: 0 auto; border-top: 0; }
  .promises .promise li { flex-direction: row; justify-content: center; gap: 12px; padding: 6px 22px; font-size: 14px; white-space: nowrap; border-bottom: 0; }
  .promises .promise li:nth-child(odd) { border-right: 0; }
  .promises .promise li:nth-child(5) { grid-column: auto; }
  .promises .promise li + li { border-left: 1px solid var(--line); }

  .visit { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; padding-inline: var(--gutter); }
  .visit__img { margin: 0; aspect-ratio: 4 / 3; }
  .visit .stack { margin-top: 0; padding: 0 0 0 72px; }
  .visit__btns { grid-auto-flow: column; justify-content: start; }
  .visit__btns .btn { width: auto; padding: 0 28px; }

  .faq-sec { display: grid; grid-template-columns: 1fr 1.7fr; column-gap: 72px; align-items: start; }
  .faq-sec .acc { margin-top: 0; }

  .footer { display: grid; grid-template-columns: 1.2fr 3fr; grid-template-areas: "logo acc" "tag acc" "social acc" "base base"; column-gap: 72px; padding: 72px var(--gutter) 40px; }
  .footer__logo { grid-area: logo; }
  .footer__tag { grid-area: tag; max-width: 32ch; }
  .footer .social { grid-area: social; align-self: start; }
  .footer .acc { grid-area: acc; margin-top: 0; border: 0; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
  .footer .acc details { border: 0; }
  .footer .acc summary { min-height: 0; padding: 0 0 14px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6); pointer-events: none; }
  .footer .acc summary svg { display: none; }
  .footer .acc__body a, .footer .acc__body button { padding: 6px 0; }
  .footer__base { grid-area: base; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.18); }

  .chat { right: 24px; bottom: 24px; }

  /* dialogs: centred windows */
  .sheet { width: min(560px, 92vw); max-height: 86vh; margin: auto; border-radius: 4px; }
  .sheet[open] { animation: winIn .3s var(--ease); }
  .sheet.is-closing { animation: winOut .2s ease-in forwards; }
  .grab { display: none; }
  .pop.sheet { width: min(980px, 92vw); max-width: none; }
  .pop__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } /* photo and details always split 50/50 */
  .pop__gallery { position: sticky; top: 0; align-self: start; }
  .pop__slide { aspect-ratio: 1; }
  .pop__info { padding: 36px 40px 28px; }
  .dlg-close { top: 12px; right: 12px; }

  /* category page */
  .cat-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .cat-hero__img { order: 2; aspect-ratio: auto; height: 100%; max-height: 480px; }
  .cat-hero__text { order: 1; padding: 56px 64px 56px var(--gutter); }
  .cat-hero__line { font-size: 20px; }
  .cat-head { min-height: 72px; }
  .cat-title { font-size: 30px; white-space: nowrap; }
  .cat-gold__name { display: inline; }
  .cat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 56px 20px; padding-top: 24px; }
  .cat-grid .card__name { font-size: 16px; }
  .catview { padding-bottom: 88px; }
  .pager { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
