/* Vittorio 2A listing — presentation only */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --line: #e4e6e9;
  --ink: #1f2328;
  --ink-2: #4b5259;
  --muted: #6b737b;
  --accent: #0e6470;        /* teal: links, plan highlight */
  --accent-soft: rgba(14, 100, 112, .14);
  --wa: #1f8f4e;
  --dark: #1f2328;
  --radius: 8px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif;
  --font-th: "Noto Sans Thai", "Inter", system-ui, sans-serif;
  --wrap: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h2 { font-size: 19px; font-weight: 600; margin-bottom: 14px; }
h3 { font-size: 15px; font-weight: 600; }
table { border-collapse: collapse; width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.th { font-family: var(--font-th); font-weight: 400; color: var(--muted); font-size: .82em; margin-left: .35em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.link { font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; }
.skip { position: absolute; left: -999px; top: 8px; background: #000; color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: 6px;
  border: 1px solid transparent; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; background: none; }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn--block { display: flex; width: 100%; margin-top: 8px; }
.btn--dark { background: var(--dark); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #18753f; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: #c5cad0; background: var(--bg-soft); }
.btn .th { color: inherit; opacity: .8; }
.iconbtn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; line-height: 1; display: inline-grid; place-items: center; }
.iconbtn:hover { background: var(--bg-soft); }
.iconbtn--dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.iconbtn--dark:hover { background: rgba(255,255,255,.18); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 24px; height: 56px; }
.brand { font-weight: 700; letter-spacing: .02em; color: var(--ink); text-decoration: none; }
.topbar__nav { display: flex; gap: 18px; flex: 1; }
.topbar__nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.topbar__nav a:hover { color: var(--ink); }
.topbar__cta { display: flex; gap: 8px; }

/* Title */
.titlebar { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-top: 20px; padding-bottom: 16px; }
.eyebrow { margin: 0 0 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: var(--bg-soft); border: 1px solid var(--line); }
.tag .th { font-size: 11px; }
.tag--ok { color: #176b3a; background: #ecf7f0; border-color: #cfe9d9; }
h1 { font-size: 26px; font-weight: 700; }
h1 .unit { font-weight: 500; color: var(--ink-2); }
.loc { margin: 4px 0 10px; color: var(--ink-2); }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 14px; }
.facts b { color: var(--ink); font-weight: 600; }
.price { font-size: 26px; font-weight: 700; white-space: nowrap; }
.price .per { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.titlebar__price { text-align: right; }

/* Hero grid */
.hero { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; height: min(480px, 46vw); border-radius: var(--radius); overflow: hidden; }
.hero__tile { position: relative; padding: 0; border: 0; cursor: pointer; overflow: hidden; background: var(--bg-soft); }
.hero__tile:first-child { grid-row: span 2; }
.hero__tile img { width: 100%; height: 100%; object-fit: cover; transition: filter .15s; }
.hero__tile:hover img { filter: brightness(.92); }
.hero__lbl { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.94); color: var(--ink); font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 4px; }
.hero__lbl small { font-weight: 500; color: var(--muted); }
.hero__lbl--key { background: var(--ink); color: #fff; }
.hero__lbl--key small { color: #cfd3d7; }
.hero__btns { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.hero__btns .btn { box-shadow: 0 1px 3px rgba(0,0,0,.18); }

/* Room strip */
.roomstrip { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: thin; }
.roomchip { flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; }
.roomchip:hover { border-color: #c5cad0; background: var(--bg-soft); }
.roomchip img { width: 40px; height: 30px; object-fit: cover; border-radius: 3px; }
.roomchip span { color: var(--muted); font-weight: 400; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding-top: 12px; padding-bottom: 48px; }
.block { padding: 26px 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; }
.side { position: sticky; top: 76px; padding-top: 26px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.card .kv { margin: 12px 0 8px; }

/* Key/value tables */
.kv th, .kv td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.kv th { font-weight: 500; color: var(--ink-2); width: 42%; padding-right: 12px; }
.kv td { font-weight: 500; }
.kv th .th { display: block; margin: 1px 0 0; font-size: 12px; }
.kv--compact th, .kv--compact td { padding: 7px 0; font-size: 13px; }
.kv--compact th { width: 48%; }
.specs2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }

/* Highlights */
.highlights { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.hl { text-align: left; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fff; cursor: pointer; }
.hl:hover { border-color: #c5cad0; }
.hl h3 { margin-bottom: 3px; }
.hl p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.hl--primary { grid-column: 1 / -1; background: var(--bg-soft); border-color: #d5dadf; display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 10px; }
.hl--primary img { width: 120px; height: 90px; object-fit: cover; border-radius: 5px; }
.hl--primary h3 { font-size: 16px; }
.hl .go { font-size: 12.5px; color: var(--accent); font-weight: 500; margin-top: 4px; display: inline-block; }

.prose p { margin: 0 0 12px; color: var(--ink-2); max-width: 68ch; }

/* Rooms */
.rooms { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 32px; }
.room { padding: 10px 0; border-bottom: 1px solid var(--line); }
.room h3 { display: flex; justify-content: space-between; gap: 8px; }
.room h3 button { border: 0; background: none; color: var(--accent); font-size: 12.5px; font-weight: 500; cursor: pointer; padding: 0; }
.room ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }

/* Floor plan (shared SVG styles) */
.plan { margin: 0; }
.plan__frame { border: 1px solid var(--line); border-radius: var(--radius); background: #e4e4e4; overflow: hidden; }
.plan figcaption { margin-top: 8px; }
.plan__actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.plansvg { display: block; width: 100%; height: auto; }
.plansvg .z { fill: transparent; stroke: transparent; stroke-width: 6; transition: fill .12s; }
.plansvg.is-click .z { cursor: pointer; }
.plansvg.is-click .z:hover, .plansvg.is-click .z:focus { fill: var(--accent-soft); stroke: var(--accent); outline: none; }
.plansvg .z.on { fill: rgba(14,100,112,.30); stroke: var(--accent); stroke-width: 10; }
.plansvg .dim { fill: rgba(18,19,20,.42); pointer-events: none; }
.plansvg.is-spot .z.on { fill: rgba(14,100,112,.22); stroke: #0aa5b5; stroke-width: 16; }
.plansvg .z.room { fill: rgba(14,100,112,.12); stroke: rgba(14,100,112,.5); stroke-width: 5; }
.plansvg .ztip { font: 600 34px var(--font); fill: #fff; paint-order: stroke; stroke: var(--accent); stroke-width: 10px; pointer-events: none; }
.planlegend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.planlegend button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; }
.planlegend button:hover { border-color: var(--accent); color: var(--accent); }

/* Amenities */
.amen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 32px; }
.amen li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.amen li .th { display: block; margin: 0; font-size: 12px; }
.amen button { border: 0; background: none; color: var(--accent); font-size: 12.5px; cursor: pointer; padding: 0; white-space: nowrap; }

/* Map */
.map { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); display: grid; place-items: center; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Contact */
.contact__num { font-size: 22px; font-weight: 700; margin: 0 0 10px; }
.contact__btns { display: flex; gap: 8px; flex-wrap: wrap; }

.foot { border-top: 1px solid var(--line); padding: 18px 0 90px; }
.mbar { display: none; }

/* ============ PHOTO TOUR ============ */
.tour, .planbox { position: fixed; inset: 0; z-index: 50; background: #fff; display: flex; flex-direction: column; }
.tour__bar { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.tour__title { flex: 1; font-weight: 600; }
.tour__scroll { flex: 1; overflow-y: auto; }
.tour__inner { max-width: 1120px; margin: 0 auto; padding: 20px 16px 80px; }
.tour__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.tcard { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.tcard img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.tcard:hover img { filter: brightness(.92); }
.tcard b { display: block; font-size: 13.5px; font-weight: 600; }
.tcard span { font-size: 12.5px; color: var(--muted); }
.troom { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 0; }
.troom__head { position: sticky; top: 16px; align-self: start; }
.troom__head h2 { font-size: 22px; margin-bottom: 2px; }
.troom__head .th { margin: 0; font-size: 14px; display: block; }
.troom__head .cnt { font-size: 13px; color: var(--muted); margin: 6px 0 12px; }
.troom__subs { list-style: none; margin: 0 0 14px; padding: 0; font-size: 13.5px; }
.troom__subs li { padding: 4px 0 4px 10px; border-left: 2px solid var(--line); color: var(--ink-2); }
.troom__subs li.on { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.troom__plan { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #e4e4e4; }
.troom__out { font-size: 13px; color: var(--ink-2); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.tsub + .tsub { margin-top: 26px; }
.tsub h3 { font-size: 14px; margin-bottom: 10px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.tsub h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.tgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tph { position: relative; padding: 0; border: 0; cursor: zoom-in; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.tph img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.tph.wide { grid-column: 1 / -1; }
.tph:hover img { filter: brightness(.93); }
.tph .no { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11.5px; padding: 2px 7px; border-radius: 3px; }

/* ============ VIEWER ============ */
.viewer { position: fixed; inset: 0; z-index: 60; background: #121314; color: #f2f3f4; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto; }
.viewer__bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; min-height: 60px; }
.viewer__where { flex: 1; min-width: 0; text-align: center; }
.viewer__room { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer__room .sep { color: #7d858c; margin: 0 8px; font-weight: 400; }
#vSub { color: #9fd7de; }
.viewer__th { margin: 0; color: #9aa1a8; font-size: 12.5px; }
.viewer__count { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #c7ccd1; font-variant-numeric: tabular-nums; }
.viewer__body { display: grid; grid-template-columns: minmax(0,1fr) 300px; min-height: 0; }
.viewer__stage { position: relative; min-height: 0; overflow: hidden; touch-action: pan-y pinch-zoom; user-select: none; }
.viewer__stage img { position: absolute; inset: 12px 72px; margin: auto; max-width: calc(100% - 144px); max-height: calc(100% - 24px); width: auto; height: auto; object-fit: contain; border-radius: 2px; }
.vnav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 3px; }
.vnav:hover { background: rgba(255,255,255,.2); }
.vnav:disabled { opacity: .25; cursor: default; }
.vnav--prev { left: 12px; } .vnav--next { right: 12px; }
.viewer__side { border-left: 1px solid #26292c; padding: 4px 16px 16px; overflow-y: auto; }
.locator__label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8d959c; margin: 6px 0 8px; }
.locator__plan { background: #e9e9e9; border-radius: 6px; overflow: hidden; }
.locator__plan.is-out { opacity: .35; }
.locator__note { font-size: 12.5px; color: #c7ccd1; margin-top: 8px; min-height: 18px; }
.vrooms { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: r; }
.vrooms button { width: 100%; display: flex; justify-content: space-between; gap: 8px; background: none; border: 0; color: #c7ccd1; padding: 7px 8px; border-radius: 5px; cursor: pointer; font-size: 13.5px; text-align: left; }
.vrooms button:hover { background: rgba(255,255,255,.06); color: #fff; }
.vrooms button.on { background: rgba(14,100,112,.35); color: #fff; font-weight: 600; }
.vrooms span { color: #8d959c; font-variant-numeric: tabular-nums; }
.viewer__foot { min-width: 0; padding: 8px 16px 12px; border-top: 1px solid #26292c; }
.vchips { display: none; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.vchips button { flex: none; border: 1px solid #3a3f44; background: none; color: #c7ccd1; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; }
.vchips button.on { background: #f2f3f4; color: #121314; border-color: #f2f3f4; font-weight: 600; }
.vthumbs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #3a3f44 transparent; }
.vthumbs .sec { flex: none; align-self: center; font-size: 11px; color: #8d959c; padding: 0 4px 0 8px; writing-mode: horizontal-tb; white-space: nowrap; }
.vthumbs button { flex: none; padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; opacity: .55; }
.vthumbs button img { width: 76px; height: 57px; object-fit: cover; border-radius: 2px; }
.vthumbs button:hover { opacity: .9; }
.vthumbs button.on { opacity: 1; border-color: #f2f3f4; }
.vthumbs button.insec { opacity: .85; }

/* Floor plan lightbox */
.planbox__scroll { flex: 1; overflow: auto; background: #e4e4e4; display: grid; place-items: center; }
.planbox__frame { width: min(100%, calc((100vh - 80px) * 1.333)); }
.planbox.is-actual .planbox__scroll { place-items: start; }
.planbox.is-actual .planbox__frame { width: 2034px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .topbar__nav { display: none; }
  .viewer__body { grid-template-columns: minmax(0,1fr) 240px; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .side { display: none; }
  .titlebar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .titlebar__price { text-align: left; }
  .hero { grid-template-columns: 1fr; grid-template-rows: 1fr; height: auto; aspect-ratio: 4 / 3; margin: 0 -16px; border-radius: 0; }
  .hero__tile:not(:first-child) { display: none; }
  .hero__tile:first-child { grid-row: auto; }
  .hero__btns { right: 10px; bottom: 10px; }
  .topbar__cta { display: none; }
  .topbar__in { height: 50px; }
  .mbar { display: flex; align-items: center; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); }
  .mbar__price { flex: 1; font-weight: 700; font-size: 16px; }
  .mbar__price .per { font-weight: 500; color: var(--muted); font-size: 13px; }
  .troom { grid-template-columns: 1fr; gap: 14px; padding: 24px 0; }
  .troom__head { position: static; display: grid; grid-template-columns: 1fr 150px; gap: 0 14px; align-items: start; }
  .troom__head > :not(.troom__plan):not(.troom__out) { grid-column: 1; }
  .troom__plan, .troom__out { grid-column: 2; grid-row: 1 / span 4; }
  .viewer__body { grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) auto; }
  .viewer__stage img { inset: 0; max-width: 100%; max-height: 100%; border-radius: 0; }
  .vnav { display: none; }
  .viewer__side { border: 0; padding: 8px 16px 0; display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; overflow: visible; }
  .locator { display: contents; }
  .locator__label, .vrooms { display: none; }
  .locator__plan { grid-column: 1; }
  .locator__note { grid-column: 2; margin: 0; }
  .vchips { display: flex; }
  .viewer__room { font-size: 15px; }
  .vthumbs button img { width: 60px; height: 45px; }
}
@media (max-width: 600px) {
  h1 { font-size: 22px; }
  .price { font-size: 22px; }
  .highlights, .rooms, .amen { grid-template-columns: 1fr; }
  .specs2 { grid-template-columns: 1fr; }
  .hl--primary { grid-template-columns: 96px 1fr; }
  .hl--primary img { width: 96px; height: 72px; }
  .tgrid { grid-template-columns: 1fr; }
  .tour__cards { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .tour__bar #tourSlideshow { display: none; }
  .viewer__bar { padding: 8px 10px; gap: 8px; }
  .viewer__count { font-size: 12.5px; gap: 6px; }
  .viewer__count .iconbtn { display: none; }
  .troom__head { grid-template-columns: 1fr 120px; }
}
@media (prefers-reduced-motion: reduce) { html, .tour__scroll { scroll-behavior: auto; } * { transition: none !important; } }
