/* House configurator layout, copied from ../modular/styles.css. Colors, type and buttons come from ../styles.css. */
.cfg { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
/* 87px = header 55 + demo bar 32, so the room buttons are on screen when the page opens */
.viewer { position: sticky; top: 55px; height: calc(100vh - 87px); min-height: 420px; background: #dfe7ea; overflow: hidden; }
.viewer canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.viewer canvas:active { cursor: grabbing; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); background: #dfe7ea; }
.view-top { position: absolute; top: 14px; right: 14px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
/* the Estate view: a tag over each plot, a card for the plot tapped, no room buttons */
.viewer.estate-on .rooms { display: none; }
.viewer:not(.estate-on) .tags, .viewer:not(.estate-on) .vcard { display: none; }
.tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tag { position: absolute; left: 0; top: 0; pointer-events: auto; display: inline-flex; align-items: center; gap: 5px;
  border: 0; border-radius: 999px; padding: 4px 9px 4px 7px; background: rgba(255, 253, 249, .92); color: var(--ink);
  font: 600 .78rem var(--sans); cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); font-variant-numeric: tabular-nums; }
.tag .dot { margin: 0; width: 9px; height: 9px; }
.tag.on { background: var(--ink); color: #fff; }
.tag.focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.vcard { position: absolute; left: 14px; bottom: 14px; width: min(360px, calc(100% - 28px)); background: var(--card);
  border-radius: 12px; padding: 12px 14px; box-shadow: 0 4px 18px rgba(0, 0, 0, .18); }
.vcard p { margin: 0; }
.vc-lead { font-size: .9rem; }
.vc-head { display: flex; align-items: center; gap: 10px; }
.vc-head b { font-size: 1.05rem; }
.vc-facts { color: var(--muted); font-size: .85rem; margin-top: 4px !important; font-variant-numeric: tabular-nums; }
.vc-msg { font-size: .88rem; margin-top: 6px !important; }
.vcard .btn { margin-top: 10px; }
.vcard [hidden] { display: none !important; }
.see3d { margin-top: 12px; }
.hint { position: absolute; top: 14px; left: 14px; margin: 0; font-size: .82rem; color: #fff; background: rgba(29, 35, 32, .62);
  padding: 6px 12px; border-radius: 999px; pointer-events: none; transition: opacity .4s; }
.hint.off { opacity: 0; }
.rooms { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.rooms button { border: 1px solid rgba(255, 255, 255, .6); background: rgba(255, 253, 249, .9); color: var(--ink);
  font: 600 .88rem var(--sans); padding: 9px 15px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); }
.rooms button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rooms .lbl { align-self: center; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55); margin: 0 2px 0 6px; }

.options { background: var(--card); border-left: 1px solid var(--line); padding: 28px 26px 30px; min-height: calc(100vh - 87px); }
.options h1 { font-size: 2rem; }
.options .lead { margin: 10px 0 6px; }
.group { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.group h2 { font: 600 .76rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choices.two, .choices.swatches { grid-template-columns: repeat(2, 1fr); }
.choices button { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 11px;
  cursor: pointer; font: inherit; color: var(--ink); display: grid; gap: 1px; align-content: start; transition: border-color .12s; }
.choices button:hover { border-color: #a9b3ad; }
.choices button.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #f1f6f3; }
.choices b { font-size: .93rem; line-height: 1.25; }
.choices span { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.swatches button { grid-template-columns: 30px 1fr; column-gap: 10px; align-items: center; }
.swatches em { font-style: normal; }
.choices.opts { grid-template-columns: 1fr; gap: 6px; }
.opts button { grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; padding: 9px 12px; }
.opts span { text-align: right; white-space: nowrap; }
.plot-now { margin: 0; font-size: .92rem; }
.plot-now a { color: var(--accent); }
.swatches i { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }

.total { position: sticky; bottom: 0; margin: 20px -26px -30px; padding: 16px 26px 20px; background: var(--card);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: end; }
.total-price { margin: 0; font: 600 1.9rem var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.total-price:empty, .total-note:empty { display: none; }
.total-note { grid-column: 1 / -1; margin: 0 0 6px; font-size: .8rem; color: var(--muted); }
.total-label { margin: 0; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.total-sum { margin: 0; font-size: .9rem; line-height: 1.4; }
.total .btn, .total .link { grid-column: 1 / -1; }
.total .btn { text-align: center; }
.link { border: 0; background: none; color: var(--accent); font: inherit; font-size: .88rem;
  cursor: pointer; text-decoration: underline; padding: 2px 0 0; }

/* plans: rooms are buttons, walls are drawn from model/plan.json */
.group h2 .sub { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.plan-tabs { margin-bottom: 10px; }
.plan-tabs button { padding: 6px 14px; font-size: .85rem; }
.mini-plan svg, .sheet svg { display: block; width: 100%; height: auto; }
.mini-plan { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
svg .room { fill: #f7f3ec; stroke: none; cursor: pointer; transition: fill .12s; outline: none; }
svg .room.wet { fill: #edf1f2; }
svg .room:hover, svg .room:focus-visible { fill: #dcebe3; }
svg .room.on { fill: #c4dfd1; }
svg .wall { fill: #2c322e; }
svg .part { fill: #4d5550; }
svg .gap { fill: #fff; }
svg .thin { fill: none; stroke: #2c322e; stroke-width: .025; }
svg .swing { fill: none; stroke: #8b938e; stroke-width: .02; }
svg .tread { fill: none; stroke: #8b938e; stroke-width: .02; }
svg .glass-l { stroke: #6f9fb0; stroke-width: .04; }
svg .dim { fill: none; stroke: #7d8681; stroke-width: .02; }
svg .outline { fill: none; stroke: #9aa29d; stroke-width: .025; stroke-dasharray: .12 .08; }
svg text { font-family: var(--sans); fill: #343b37; text-anchor: middle; pointer-events: none; }
svg text.name { font-size: .30px; font-weight: 600; }
svg text.area { font-size: .24px; fill: #6b736e; }
svg text.dimt { font-size: .28px; fill: #5d6661; }
svg text.tag { font-size: .22px; fill: #7d8681; letter-spacing: .02px; }
/* elevations */
svg .e-wall { fill: #f4f0e8; stroke: #2c322e; stroke-width: .03; }
svg .e-plinth { fill: #8d8a85; stroke: #2c322e; stroke-width: .03; }
svg .e-roof { fill: #a5482f; stroke: #2c322e; stroke-width: .03; }
svg .e-tiles { fill: none; stroke: rgba(0, 0, 0, .25); stroke-width: .02; }
svg .e-win { fill: #c7dbe2; stroke: #2c322e; stroke-width: .05; }
svg .e-door { fill: #6a4630; stroke: #2c322e; stroke-width: .05; }
svg .e-timber { fill: #b98a57; stroke: #2c322e; stroke-width: .03; }
svg .e-line { fill: none; stroke: #2c322e; stroke-width: .03; }
svg .e-fascia { fill: #33383a; stroke: #2c322e; stroke-width: .03; }
svg .e-ground { stroke: #2c322e; stroke-width: .06; }

/* the estate: site plan (SVG, metres, north up) and the plot card */
section.estate { padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 48px) 0; max-width: 1500px; margin: 0 auto; }
.estate .legend { margin-top: 0; }
.estate .legend span { display: inline-flex; align-items: center; }
.estate-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.site { background: #fff; border: 1px solid var(--line); padding: 8px; overflow-x: auto; }
.site svg { display: block; width: 100%; height: auto; }
svg .s-land { fill: #e4ead9; }
svg .s-street { fill: #d6d1c7; }
svg .s-lane { stroke: #fff; stroke-width: .25; stroke-dasharray: 2 1.6; }
svg .s-name { font-size: 1.9px; fill: #6b736e; letter-spacing: .1px; }
svg .s-north { font-size: 2.2px; font-weight: 700; fill: #5d6661; }
svg .s-arrow { fill: #5d6661; }
svg .plot { cursor: pointer; outline: none; }
svg .s-plot { stroke: #fff; stroke-width: .5; transition: fill .12s; }
svg .plot.available .s-plot { fill: #cfe6d7; }
svg .plot.reserved .s-plot { fill: #f3e2b8; }
svg .plot.sold .s-plot { fill: #ecc9c4; }
svg .plot.available:hover .s-plot, svg .plot.available:focus-visible .s-plot { fill: #a9d6b9; }
svg .plot.reserved:hover .s-plot, svg .plot.sold:hover .s-plot, svg .plot:focus-visible .s-plot { stroke: #8b938e; }
svg .plot.focus .s-plot { stroke: var(--ink); stroke-width: .6; }
svg .plot.on .s-plot { fill: var(--available); stroke: var(--ink); stroke-width: .6; }
svg .s-house { fill: #fff; stroke: #4d5550; stroke-width: .3; }
svg .plot.sold .s-house { fill: #f6ece9; }
svg .s-num { font-size: 3.8px; font-weight: 700; fill: #2c322e; }
svg .s-area { font-size: 2px; fill: #5d6661; }
svg .plot.on .s-num, svg .plot.on .s-area { fill: #fff; }
.plot-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 20px; }
.estate-count { margin: 0; color: var(--muted); font-size: .95rem; }
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-head h3 { font-size: 1.5rem; }
.plot-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0; font-size: .92rem; }
.plot-card dt { color: var(--muted); }
.plot-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.pc-msg { margin: 0 0 12px; font-size: .9rem; }
.plot-card [hidden] { display: none; }
.plot-card .btn { width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 600; }

section.drawings { padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 48px) 0; max-width: 1500px; margin: 0 auto; }
.sheets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.sheet { background: #fff; border: 1px solid var(--line); padding: 14px 14px 0; }
.sheet figcaption { padding: 10px 0 12px; }

.contact textarea { font: inherit; font-size: .92rem; padding: 12px 14px; border-radius: 10px; border: 1px dashed #47504b;
  background: transparent; color: #c9d0cb; resize: none; }
section.gallery { padding-bottom: 0; }
[hidden] { display: none !important; }
/* five facts in one strip; the house type sets them */
.facts { grid-template-columns: repeat(5, 1fr); }
.facts b { font-size: clamp(1.1rem, 1.75vw, 1.5rem); white-space: nowrap; }
.choices.types span { font-size: .76rem; }

/* the hint drops under the House/Estate and Day/Evening switches when they would meet */
@media (max-width: 1240px) { .hint { top: 58px; } }
@media (max-width: 980px) {
  .cfg { grid-template-columns: minmax(0, 1fr); }
  .viewer { height: 62vh; height: 62svh; min-height: 320px; z-index: 5; }
  .options { border-left: 0; min-height: 0; padding: 22px 16px 24px; }
  .total { margin: 18px -16px -24px; padding: 14px 16px 18px; }
  .hint { font-size: .75rem; }
  .rooms button { padding: 7px 12px; font-size: .82rem; }
  /* one swipeable row of rooms, so the chips do not cover the house */
  .rooms { left: 0; right: 0; padding: 0 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rooms::-webkit-scrollbar { display: none; }
  .rooms > * { flex: none; white-space: nowrap; }
  /* one-row sticky total on phones (price left, button right) so the 3D view keeps the screen */
  .total { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 0 12px; padding: 8px 16px 10px; align-items: center; }
  .total > div { grid-column: 1; grid-row: 1; }
  .total-label { white-space: nowrap; letter-spacing: .04em; font-size: .7rem; }
  .total-label::after { content: " · incl. VAT"; }
  :lang(ro) .total-label::after { content: " · cu TVA"; }
  .total-price { grid-column: 1; grid-row: 2; font-size: 1.35rem; line-height: 1.15; }
  .total-sum, .total-note, .total .link { display: none; }
  .total .btn { grid-column: 2; grid-row: 1 / 3; padding: 10px 16px; font-size: .9rem; white-space: nowrap; }
  .estate-wrap { grid-template-columns: 1fr; }
  .sheets { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div { border-top: 1px solid var(--line); }
  .facts div:nth-child(-n+2) { border-top: 0; }
  .facts div:nth-child(even) { border-right: 0; }
  .facts div:nth-child(5) { grid-column: 1 / -1; border-right: 0; }
}
@media (max-width: 420px) {
  .choices { grid-template-columns: 1fr 1fr; }
  .choices[data-key="f"] button:first-child { grid-column: 1 / -1; }
  .choices.types { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .choices.types button { padding: 9px 8px; }
  .choices.two[data-key="f"] button:first-child { grid-column: auto; }
  .view-top .seg button { padding: 6px 11px; font-size: .82rem; }
  .vcard { left: 10px; bottom: 10px; width: calc(100% - 20px); padding: 10px 12px; }
  .tag { padding: 3px 7px 3px 6px; font-size: .72rem; }
  .hint:not(.in) { display: none; }
  .hint { right: 14px; text-align: center; }
  .sheet { padding: 8px 8px 0; }
}
@media (max-width: 350px) {
  .total { gap: 0 8px; padding-left: 12px; padding-right: 12px; }
  .total .btn { padding: 10px 11px; font-size: .84rem; }
}
