/* Somrak Home — Caramel Hour (light). One theme only. */
:root {
  --cream: #FBF5EA;
  --cream-raised: #FFFDF8;
  --cream-deep: #F3E6D0;
  --shell: #F4B9AE;
  --shell-soft: #FCE6E0;
  --line: #E6D5BC;
  --ink: #4A3426;
  --ink-muted: #7A5E4A;
  --caramel: #C2622A;
  --caramel-text: #9A4718;
  --on-caramel: #FFFAF2;
  --moss: #55613A;
  --butter: #E9B44C;
  --steel: #8F8A82;

  --font-display: "Young Serif", Georgia, serif;
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-khmer: "Kantumruy Pro", "Noto Sans Khmer", sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-cushion: 18px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--caramel-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
[lang="km"] { font-family: var(--font-khmer); line-height: 1.6; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.section { padding-block: clamp(40px, 7vw, 72px); }

/* Type */
.display { font-family: var(--font-display); font-weight: 400; margin: 0; line-height: 1.02; text-wrap: balance; }
.display-xl { font-size: clamp(42px, 6.4vw, 80px); }
.display-m { font-size: clamp(32px, 4vw, 44px); }
.title { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 28px; margin: 0; }
.eyebrow { font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--caramel-text); }
.lead { font-size: 18px; line-height: 1.6; max-width: 34em; margin: 0; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; line-height: 1.5; }
.km-line { font-size: 22px; font-weight: 500; color: var(--ink-muted); margin: 0; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 0.33em; font-size: 28px; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo__en { font-family: var(--font-display); line-height: 1; white-space: nowrap; }
.logo__rule { width: max(1.5px, 0.05em); height: 0.9em; background: var(--steel); border-radius: 1px; }
.logo__km { font-family: var(--font-khmer); font-size: 0.54em; line-height: 1; color: var(--caramel); padding-top: 0.18em; }

/* Header */
.header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--cream); border-bottom: 1px solid transparent; }
.header.is-scrolled { background: var(--cream-raised); border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--caramel-text); }
@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
  .logo { font-size: 22px; }
  .header .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
  .hide-sm { display: none; }
  .btn--block { font-size: 17px; padding: 0 18px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0; font-size: 19px; font-weight: 700; line-height: 1.15; text-decoration: none; text-align: center; }
.btn--primary { background: var(--caramel); color: var(--on-caramel); }
.btn--primary:hover { background: #A9531F; color: var(--on-caramel); }
.btn--soft { background: var(--shell); color: var(--ink); font-size: 16px; min-height: 46px; padding: 0 20px; }
.btn--soft:hover { background: #EFA698; color: var(--ink); }
.btn--block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Price */
.price { display: inline-flex; align-items: baseline; gap: 8px; background: var(--butter); color: var(--ink); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 700; font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.price--big { font-size: 34px; padding: 10px 18px; }
.price small { font-size: 0.5em; font-weight: 600; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 56px); align-items: center; padding-block: clamp(24px, 5vw, 56px) clamp(40px, 6vw, 64px); }
.hero__copy { display: flex; flex-direction: column; gap: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 6px; }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__media { order: -1; }
}

/* Photo slot + illustrated sofa (until real photos exist) */
.photo { position: relative; overflow: hidden; border-radius: var(--radius-md); background: var(--shell-soft); display: flex; align-items: flex-end; justify-content: center; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo__note { position: absolute; left: 14px; top: 12px; right: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.photo--hero { aspect-ratio: 5 / 3; width: 100%; }
.photo--product { aspect-ratio: 5 / 3; width: 100%; }
.photo img.is-portrait { object-fit: contain; }
.photo--card { aspect-ratio: 5 / 3; width: 100%; }
.photo--tall { aspect-ratio: 3 / 4; width: 100%; }

.sofa { position: relative; width: 78%; aspect-ratio: 300 / 140; margin-bottom: 9%; --fab: #B8662F; --tex: repeating-linear-gradient(90deg, rgba(0,0,0,0.08) 0 2px, transparent 2px 7px); }
.sofa.is-chenille { --tex: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1.5px) 0 0 / 5px 5px; }
.sofa span { position: absolute; display: block; background: var(--tex), var(--fab); transition: background-color .2s; }
.sofa .back { top: 8%; height: 44%; border-radius: 18px; filter: brightness(1.06); }
.sofa .back-l { left: 17%; width: 31%; }
.sofa .back-r { left: 52%; width: 31%; }
.sofa .back-one { left: 20%; width: 60%; display: none; }
.sofa.is-single .back-l, .sofa.is-single .back-r { display: none; }
.sofa.is-single .back-one { display: block; }
.sofa .arm { top: 26%; width: 20%; height: 42%; border-radius: 20px; }
.sofa .arm-l { left: 0; } .sofa .arm-r { right: 0; }
.sofa .seat { left: 0; right: 0; top: 58%; height: 21%; border-radius: 12px; }
.sofa .base { left: 0; right: 0; top: 79%; height: 21%; border-radius: 12px; filter: brightness(0.86); }
.sofa .frame { left: 4%; top: 40%; width: 11%; height: 60%; background: none; border: 3px solid var(--steel); border-bottom: 0; border-radius: 14px 14px 0 0; }

/* Benefits */
.benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; border-top: 2px solid var(--steel); padding-top: 28px; }
.benefits > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@media (max-width: 900px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .benefits { grid-template-columns: minmax(0, 1fr); } }

/* Product card */
.card { background: var(--cream-raised); border-radius: var(--radius-md); padding: 16px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: center; text-decoration: none; color: var(--ink); }
.card:hover { color: var(--ink); }
.card__body { display: flex; flex-direction: column; gap: 14px; padding: 8px; }
.dots { display: flex; flex-wrap: wrap; gap: 8px; }
.dots i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(74,52,38,0.2); }
@media (max-width: 760px) { .card { grid-template-columns: minmax(0, 1fr); } }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--shell-soft); border-radius: var(--radius-cushion); }
.steps li::before { content: counter(step); font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--caramel); }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 24px; line-height: 1; color: var(--caramel); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; max-width: 46em; color: var(--ink-muted); }

/* Footer */
.footer { background: var(--shell); color: var(--ink); margin-top: clamp(40px, 7vw, 72px); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; padding-block: 36px max(36px, env(safe-area-inset-bottom, 0px)); }
.footer .logo__km { color: var(--caramel-text); }
.footer a { color: var(--ink); }

/* Product page */
.crumbs { font-size: 14px; color: var(--ink-muted); padding-top: 8px; }
.crumbs a { color: var(--ink-muted); }
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: start; padding-block: 20px 40px; }
.product__media { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; }
.thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.thumb { position: relative; padding: 0; border: 2px solid transparent; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 1 / 1; background: var(--shell-soft); min-height: 44px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-pressed="true"] { border-color: var(--ink); }
.product__info { display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 900px) {
  .product { grid-template-columns: minmax(0, 1fr); }
  .product__media { position: static; }
}

.opt { display: flex; flex-direction: column; gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.opt legend { font-size: 15px; font-weight: 600; padding: 0; margin-bottom: 10px; }
.opt legend span { font-weight: 400; }
.opt .hint { font-size: 14px; color: var(--ink-muted); margin: -4px 0 4px; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; min-height: 48px; border-radius: 12px; text-align: left; background: transparent; border: 1.5px solid var(--line); }
.choice b { font-size: 16px; }
.choice span { font-size: 13px; color: var(--ink-muted); }
.choice .p { font-size: 14px; font-weight: 600; color: var(--ink); }
.choice[aria-pressed="true"] { background: var(--cream-raised); border: 2px solid var(--ink); padding: 11.5px 13.5px; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; padding: 0; border: 2px solid rgba(74,52,38,0.22); }
.swatch[aria-pressed="true"] { border-color: var(--cream); box-shadow: 0 0 0 2px var(--ink); }

.specs { border-top: 2px solid var(--steel); }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.specs dt { font-weight: 600; margin: 0; }
.specs dd { margin: 0; text-align: right; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); font-weight: 600; padding: 10px 12px; }
.table td { padding: 12px; border-top: 1px solid var(--line); }
.table tr.is-current td { background: var(--shell-soft); }

/* Sticky reserve bar on phones */
.buybar { display: none; }
@media (max-width: 900px) {
  .buybar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--cream-raised); border-top: 1px solid var(--line); }
  .buybar .btn { min-height: 48px; font-size: 17px; padding: 0 18px; }
  .has-buybar { padding-bottom: 84px; }
}

/* ---- v2 additions ---- */
.btn svg { width: 20px; height: 20px; flex: none; }
.show-sm { display: none; }
@media (max-width: 760px) { .show-sm { display: inline; } .hide-sm { display: none; } }
.lang { background: none; border: 1.5px solid var(--line); border-radius: 999px; min-height: 40px; padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--ink); }
.lang[lang="km"] { font-family: var(--font-khmer); }
.lang:hover { border-color: var(--ink); }
.nav a[aria-current="page"] { color: var(--caramel-text); }
@media (max-width: 1020px) and (min-width: 761px) { .nav { gap: 18px; } }

.m0 { margin: 0; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.strong { font-weight: 600; }
.note { margin: 0; }
.section__h { margin-bottom: 24px; }
.section--tight { padding-top: 0; }
.title--l { font-size: 26px; line-height: 1.2; }
.card__link { font-weight: 600; color: var(--caramel-text); }
.footer__links { display: flex; flex-direction: column; gap: 4px; }
.intro { margin: 8px 0 18px; }
.product__h1 { font-size: clamp(32px, 4.2vw, 46px); }
.opt legend .n { font-weight: 400; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 28px; }
.order { display: flex; flex-direction: column; gap: 8px; }
.order__call { margin: 0; text-align: center; }
.order__call a, .cta-row a[data-phone], .footer a[data-phone] { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.order__call svg, .cta-row a[data-phone] svg { width: 16px; height: 16px; }
.choice-copy { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--shell-soft); border-radius: 12px; }
.choice-copy__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.choice-copy code { font-family: var(--font-sans); font-size: 15px; font-weight: 600; }
.copy { border: 1.5px solid var(--ink); background: var(--cream-raised); border-radius: 999px; min-height: 36px; padding: 0 14px; font-size: 14px; font-weight: 600; flex: none; }
.card .photo img { object-position: center; }

.page { padding-block: clamp(24px, 5vw, 48px) 0; }
.page__head { display: flex; flex-direction: column; gap: 16px; max-width: 46em; margin-bottom: clamp(28px, 5vw, 48px); }
.page__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.page__text { display: flex; flex-direction: column; gap: 32px; }
.info { display: flex; flex-direction: column; gap: 8px; padding-top: 22px; border-top: 2px solid var(--steel); }
.info p { margin: 0; max-width: 40em; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tiles li { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--shell-soft); border-radius: var(--radius-cushion); }
.tiles p { margin: 0; }
.promises { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.checks li { display: flex; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.checks li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--caramel); transform: translateY(-1px); }
@media (max-width: 900px) { .page__grid, .promises { grid-template-columns: minmax(0, 1fr); } .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .photo--tall { aspect-ratio: 4 / 3; } }
@media (max-width: 480px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* Khmer mode */
html[lang="km"] body { font-family: var(--font-khmer); line-height: 1.75; }
html[lang="km"] .display, html[lang="km"] .title { font-family: var(--font-khmer); font-weight: 600; line-height: 1.35; letter-spacing: 0; }
html[lang="km"] .display-xl { font-size: clamp(34px, 5vw, 60px); }
html[lang="km"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 14px; }
html[lang="km"] .km-line { display: none; }
html[lang="km"] .btn { font-family: var(--font-khmer); }
html[lang="km"] .faq summary { font-family: var(--font-khmer); }
.specs dd { min-width: 0; overflow-wrap: anywhere; }
.specs dt { flex: none; }
html[lang="km"] body { overflow-wrap: anywhere; }
