.app-page { background: #f1efe9; }
.app-page .site-header { position: fixed; }
.app-page .desktop-nav a[aria-current="page"]::after { width: 100%; }
.configurator-page .site-header { color: var(--ink); background: rgba(244,242,237,.94); backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line); }
.configurator-page .site-header .logo-light { opacity: 0; }
.configurator-page .site-header .logo-dark { opacity: 1; }

/* Configurator */
.configurator { padding-top: 70px; }
.config-intro { padding: 90px 5vw 62px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 60px; background: #f1efe9; }
.config-intro h1 { margin: 0; font: 400 clamp(54px, 6vw, 88px)/.95 var(--serif); letter-spacing: -.05em; }
.config-intro > p { max-width: 500px; margin: 0 0 8px; color: #59656a; font-size: 16px; line-height: 1.7; }
.config-progress { padding: 0 5vw 28px; }
.config-progress > div { height: 2px; background: rgba(16,27,33,.13); }
.config-progress i { display: block; width: 20%; height: 2px; background: var(--accent); transition: width .35s; }
.config-progress ol { list-style: none; padding: 14px 0 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); color: #7b858a; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.config-progress li { transition: color .3s; }
.config-progress li.is-active { color: var(--ink); font-weight: 600; }
.config-workspace { min-height: 760px; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(460px, .88fr); background: #fff; border-top: 1px solid var(--line); }
.config-visual { position: sticky; top: 70px; height: calc(100vh - 70px); min-height: 680px; background: #172329; overflow: hidden; }
.config-stage { position: relative; height: calc(100% - 156px); overflow: hidden; color: #fff; }
.config-stage > img { height: 100%; object-fit: cover; transition: filter .5s, transform .6s; }
.config-stage.is-night > img { filter: brightness(.44) saturate(.72) contrast(1.08); }
.config-stage[data-facade="dark"] > img { filter: brightness(.62) saturate(.55); }
.config-stage[data-facade="modern"] > img { filter: saturate(.35) contrast(1.06); }
.config-stage[data-facade="scandi"] > img { filter: brightness(1.12) saturate(.55); }
.config-stage.is-night[data-facade] > img { filter: brightness(.42) saturate(.55) contrast(1.1); }
.visual-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,14,17,.65), transparent 40%); pointer-events: none; }
.visual-meta { position: absolute; left: 34px; right: 34px; bottom: 27px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.visual-meta a { border-bottom: 1px solid rgba(255,255,255,.55); padding-bottom: 6px; }
.visual-meta b { margin-left: 6px; }
.visual-actions { position: absolute; right: 24px; top: 24px; display: flex; padding: 4px; border-radius: 24px; background: rgba(14,23,27,.55); backdrop-filter: blur(10px); }
.visual-actions button { border: 0; border-radius: 20px; padding: 9px 14px; color: rgba(255,255,255,.65); background: none; font-size: 12px; cursor: pointer; }
.visual-actions button.is-active { color: var(--ink); background: #fff; }
.config-summary { height: 156px; padding: 28px 34px; display: grid; grid-template-columns: .8fr .7fr 1.5fr; gap: 28px; color: #fff; background: #172329; border-top: 1px solid rgba(255,255,255,.13); }
.config-summary > div { display: flex; flex-direction: column; gap: 9px; }
.config-summary > div + div { padding-left: 28px; border-left: 1px solid rgba(255,255,255,.14); }
.config-summary span { color: rgba(255,255,255,.58); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.config-summary strong { font: 400 21px var(--serif); }
.config-summary .summary-price strong { font-size: 27px; }
.config-summary small { color: rgba(255,255,255,.5); font-size: 10px; line-height: 1.4; }
.config-options { padding: 58px clamp(35px, 4vw, 74px) 34px; position: relative; }
.config-step { display: none; padding-bottom: 100px; }
.config-step.is-active { display: block; animation: configReveal .35s ease both; }
@keyframes configReveal { from { opacity: 0; transform: translateX(14px); } }
.step-count { margin: 0 0 14px; color: var(--accent); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .15em; }
.config-step h2 { margin: 0 0 12px; font-size: clamp(36px, 3.2vw, 49px); line-height: 1; letter-spacing: -.035em; }
.step-lead { margin: 0 0 31px; color: #59656a; font-size: 15px; line-height: 1.6; }
.choice-list, .package-choices, .addon-choices { display: grid; gap: 10px; }
.choice-list label, .tile-choices label, .package-choices label, .addon-choices label { display: block; cursor: pointer; }
.choice-list input, .tile-choices input, .package-choices input, .addon-choices input { position: absolute; opacity: 0; }
.house-choices label > span { min-height: 88px; display: grid; grid-template-columns: 104px 1fr auto; align-items: center; gap: 20px; padding: 8px 20px 8px 8px; border: 1px solid var(--line); border-radius: 6px; transition: .25s; }
.house-choices img { width: 104px; height: 70px; object-fit: cover; border-radius: 3px; }
.house-choices b, .package-choices b, .addon-choices b { display: grid; gap: 6px; font-size: 15px; }
.house-choices small, .package-choices small, .addon-choices small { color: #697378; font-size: 12px; font-weight: 400; }
.house-choices em, .package-choices em, .addon-choices em { font-style: normal; font-size: 13px; }
.choice-list input:checked + span, .tile-choices input:checked + span, .package-choices input:checked + span, .addon-choices input:checked + span { border-color: var(--ink); box-shadow: inset 3px 0 var(--accent); background: #faf9f6; }
.tile-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile-choices label > span { min-height: 138px; padding: 18px; display: flex; flex-direction: column; gap: 9px; border: 1px solid var(--line); border-radius: 6px; transition: .25s; }
.swatch { display: block; width: 100%; height: 58px; border-radius: 3px; background: #a97645; }
.swatch.natural { background: linear-gradient(115deg, #9f6d3d, #d0a77a); }
.swatch.dark { background: linear-gradient(115deg, #1d2528, #525a5d); }
.swatch.modern { background: linear-gradient(115deg, #c8c5bd, #555d60 52%, #9d744d 53%); }
.swatch.scandi { background: linear-gradient(115deg, #eee9de, #c8b69c); }
.tile-choices b { font-size: 14px; }
.tile-choices small { color: #697378; font-size: 12px; }
.package-choices label > span, .addon-choices label > span { min-height: 98px; padding: 20px; display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: center; border: 1px solid var(--line); border-radius: 6px; transition: .25s; }
.package-choices small, .addon-choices small { max-width: 360px; line-height: 1.5; }
.package-choices em, .addon-choices em { grid-column: 2; grid-row: 1 / 3; }
.addon-choices label > span { min-height: 78px; }
.final-card { margin-bottom: 20px; padding: 26px; color: #fff; background: #172329; border-radius: 7px; }
.final-card > span { font-size: 10px; text-transform: uppercase; letter-spacing: .15em; color: rgba(255,255,255,.55); }
.final-card h3 { margin: 8px 0 23px; font: 400 32px var(--serif); }
.final-card dl { margin: 0; }
.final-card dl div { display: flex; justify-content: space-between; gap: 25px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.13); font-size: 13px; }
.final-card dt { color: rgba(255,255,255,.57); }
.final-card dd { margin: 0; text-align: right; }
.final-card > p { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 0; font-size: 13px; }
.final-card > p strong { font: 400 27px var(--serif); }
.final-step .button { width: 100%; margin-top: 8px; }
.config-contact { background: #e9e7e1; }
.save-message { min-height: 20px; color: #3e7558; font-size: 13px; text-align: center; }
.config-nav { position: absolute; left: clamp(35px, 4vw, 74px); right: clamp(35px, 4vw, 74px); bottom: 34px; display: flex; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--line); }
.config-nav > button:first-child { border: 0; background: none; font-size: 14px; cursor: pointer; }
.config-nav > button:first-child:disabled { opacity: .3; }
.config-nav.is-final { display: none; }

/* 360 / 3D viewer */
.viewer-page { background: #101a1f; overflow: hidden; }
.viewer-header { color: #fff; background: linear-gradient(rgba(10,17,21,.6), transparent); }
.viewer-header.is-scrolled { color: #fff; height: 86px; background: linear-gradient(rgba(10,17,21,.6), transparent); box-shadow: none; backdrop-filter: none; }
.viewer-header.is-scrolled .brand .logo-light { opacity: 1; }
.viewer-header.is-scrolled .brand .logo-dark { opacity: 0; }
.viewer { height: 100svh; min-height: 680px; }
.viewer-canvas { position: relative; height: 100%; overflow: hidden; user-select: none; cursor: grab; touch-action: pan-y; }
.viewer-canvas.is-dragging { cursor: grabbing; }
.viewer-frame { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; }
.viewer-frame.is-active { opacity: 1; }
.viewer-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s, filter .5s; transform: scale(var(--viewer-zoom, 1)); }
.three-canvas { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .55s; outline: 0; }
.viewer-canvas.has-webgl .three-canvas { opacity: 1; }
.viewer-canvas.has-webgl .viewer-frame { opacity: 0 !important; }
.model-loading { position: absolute; z-index: 9; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 14px; padding: 19px 24px; border-radius: 8px; color: #fff; background: rgba(14,23,27,.72); backdrop-filter: blur(10px); transition: opacity .35s, visibility .35s; }
.model-loading i { width: 27px; height: 27px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: modelSpin .8s linear infinite; }
.model-loading span { font-size: 12px; }
.model-loading.is-hidden { opacity: 0; visibility: hidden; }
@keyframes modelSpin { to { transform: rotate(360deg); } }
.viewer-canvas.is-night .viewer-frame img { filter: brightness(.42) saturate(.7) contrast(1.1); }
.viewer-canvas[data-facade="dark"] .viewer-frame img { filter: brightness(.6) saturate(.5); }
.viewer-canvas[data-facade="modern"] .viewer-frame img { filter: saturate(.28) contrast(1.08); }
.viewer-canvas[data-facade="scandi"] .viewer-frame img { filter: brightness(1.1) saturate(.55); }
.viewer-canvas.is-night[data-facade] .viewer-frame img { filter: brightness(.4) saturate(.5) contrast(1.12); }
.viewer-vignette { position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(7,13,16,.58), transparent 38%, rgba(7,13,16,.18)), linear-gradient(0deg, rgba(7,13,16,.5), transparent 35%); }
.viewer-title { position: absolute; z-index: 2; left: 5vw; top: 18%; color: #fff; }
.viewer-title h1 { margin: 0 0 9px; font: 400 clamp(55px, 6vw, 88px)/.95 var(--serif); letter-spacing: -.045em; }
.viewer-title > span { color: rgba(255,255,255,.72); font-size: 14px; }
.viewer-panel { position: absolute; z-index: 5; top: 110px; right: 32px; bottom: 32px; width: 330px; display: flex; flex-direction: column; padding: 22px; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; color: #fff; background: rgba(17,28,33,.74); backdrop-filter: blur(16px); cursor: default; }
.viewer-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid rgba(255,255,255,.15); }
.viewer-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 0 4px 13px; color: rgba(255,255,255,.53); background: none; font-size: 11px; cursor: pointer; }
.viewer-tabs button.is-active { color: #fff; border-color: #fff; }
.viewer-tab-content { display: none; padding-top: 25px; }
.viewer-tab-content.is-active { display: grid; gap: 9px; animation: configReveal .3s ease both; }
.viewer-tab-content h2 { margin: 0 0 12px; font-size: 24px; }
.viewer-tab-content label { cursor: pointer; }
.viewer-tab-content input { position: absolute; opacity: 0; }
.viewer-tab-content label > span { min-height: 49px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 5px; font-size: 13px; }
.viewer-tab-content label input:checked + span { border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.1); }
.viewer-tab-content .swatch { width: 31px; height: 31px; border-radius: 50%; flex: 0 0 31px; }
.viewer-tab-content label b { display: grid; gap: 4px; font-size: 13px; }
.viewer-tab-content label small { color: rgba(255,255,255,.55); font-size: 10px; font-weight: 400; }
.viewer-configure { margin-top: auto; }
.room-list { margin: 0; }
.room-list div { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 12px; }
.room-list dd { margin: 0; }
.floor-plan-button { margin-top: 12px; padding: 12px; color: #fff; border: 1px solid rgba(255,255,255,.25); background: none; border-radius: 5px; cursor: pointer; }
.viewer-hotspot { position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; border: 0; color: #fff; background: none; cursor: pointer; transition: opacity .25s; }
.viewer-hotspot i { width: 10px; height: 10px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.2); animation: hotspotPulse 2.2s infinite; }
@keyframes hotspotPulse { 50% { box-shadow: 0 0 0 10px rgba(255,255,255,0); } }
.viewer-hotspot span { padding: 9px 12px; border-radius: 5px; font-size: 11px; line-height: 1.5; text-align: left; background: rgba(13,22,26,.72); backdrop-filter: blur(9px); }
.hotspot-living { left: 46%; top: 46%; }.hotspot-bedroom { left: 32%; top: 31%; }.hotspot-terrace { left: 57%; bottom: 20%; }
.viewer-canvas.hide-hotspots .viewer-hotspot { opacity: 0; pointer-events: none; }
.drag-hint { position: absolute; z-index: 3; left: 50%; bottom: 44px; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; transition: opacity .4s; }
.drag-hint span { font-size: 22px; font-weight: 400; }
.drag-hint.is-hidden { opacity: 0; }
.viewer-arrows { position: absolute; z-index: 4; left: 5vw; bottom: 38px; display: flex; align-items: center; gap: 14px; color: #fff; }
.viewer-arrows button, .viewer-tools button { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; color: #fff; background: rgba(13,22,26,.32); cursor: pointer; }
.viewer-arrows span { font-size: 10px; }
.viewer-tools { position: absolute; z-index: 4; left: 5vw; top: 42%; display: grid; gap: 8px; }
.viewer-tools button { width: 40px; height: 40px; font-size: 18px; }
.info-popover { position: absolute; z-index: 8; left: 50%; top: 50%; width: min(330px, calc(100% - 40px)); padding: 25px; border-radius: 8px; background: #fff; box-shadow: 0 25px 70px rgba(0,0,0,.28); opacity: 0; visibility: hidden; transform: translate(-50%, -45%); transition: .3s; cursor: default; }
.info-popover.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.info-popover button { position: absolute; right: 14px; top: 12px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.info-popover p { margin: 0 0 7px; color: var(--accent); font-size: 10px; text-transform: uppercase; letter-spacing: .14em; }
.info-popover h3 { margin: 0 0 6px; font: 400 28px var(--serif); }
.info-popover strong { display: block; margin-bottom: 14px; }
.info-popover > span { color: #59656a; font-size: 13px; line-height: 1.6; }
.viewer-mobile-bar { display: none; }

@media (max-width: 1000px) {
    .config-workspace { grid-template-columns: 1fr; }
    .config-visual { position: relative; top: auto; height: 680px; }
    .config-options { min-height: 760px; }
    .viewer-panel { width: 290px; }
    .viewer-title { top: 15%; }
}

@media (max-width: 720px) {
    .app-page .site-header { color: var(--ink); }
    .app-page .site-header .logo-light { opacity: 0; }
    .app-page .site-header .logo-dark { opacity: 1; }
    .viewer-page { padding-bottom: 0; }
    .viewer-page .site-header { color: #fff; }
    .viewer-page .site-header .logo-light { opacity: 1; }
    .viewer-page .site-header .logo-dark { opacity: 0; }
    .config-intro { padding: 68px 20px 42px; display: block; }
    .config-intro h1 { font-size: 55px; }
    .config-intro > p { margin-top: 27px; font-size: 15px; }
    .config-progress { padding: 0 20px 20px; }
    .config-progress ol { grid-template-columns: repeat(5, 1fr); }
    .config-progress li { font-size: 9px; letter-spacing: .03em; }
    .config-workspace { display: flex; flex-direction: column; }
    .config-visual { height: auto; min-height: 0; position: relative; }
    .config-stage { height: 47svh; min-height: 340px; }
    .visual-meta { left: 18px; right: 18px; bottom: 18px; font-size: 11px; }
    .visual-meta a { display: none; }
    .visual-actions { right: 12px; top: 12px; }
    .config-summary { height: auto; padding: 20px; grid-template-columns: 1fr 1fr; gap: 17px; }
    .config-summary > div + div { padding-left: 17px; }
    .config-summary .summary-price { grid-column: 1 / -1; padding: 17px 0 0; border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
    .config-summary .summary-price strong { font-size: 25px; }
    .config-options { min-height: 690px; padding: 45px 20px 110px; }
    .config-step { padding-bottom: 0; }
    .house-choices label > span { grid-template-columns: 78px 1fr; gap: 14px; padding-right: 13px; }
    .house-choices img { width: 78px; height: 62px; }
    .house-choices em { display: none; }
    .tile-choices { gap: 8px; }
    .tile-choices label > span { min-height: 126px; padding: 12px; }
    .package-choices label > span, .addon-choices label > span { padding: 16px; grid-template-columns: 1fr; }
    .package-choices em, .addon-choices em { grid-column: 1; grid-row: auto; }
    .config-nav { left: 20px; right: 20px; bottom: 28px; }
    .viewer { min-height: 620px; }
    .viewer-header .header-actions .button { display: none; }
    .viewer-title { left: 20px; top: 13%; }
    .viewer-title h1 { font-size: 56px; }
    .viewer-title > span { font-size: 12px; }
    .viewer-panel { left: 12px; right: 12px; top: auto; bottom: 70px; width: auto; height: 235px; padding: 15px; border-radius: 9px; }
    .viewer-tabs button { padding-bottom: 9px; }
    .viewer-tab-content { padding-top: 12px; grid-template-columns: 1fr 1fr; gap: 6px; overflow-y: auto; }
    .viewer-tab-content h2 { display: none; }
    .viewer-tab-content label > span { min-height: 42px; padding: 6px 9px; font-size: 11px; }
    .viewer-tab-content .swatch { width: 25px; height: 25px; flex-basis: 25px; }
    .viewer-tab-content label b { font-size: 11px; }
    .viewer-configure { display: none; }
    .room-list { grid-column: 1 / -1; }
    .room-list div { padding: 5px 0; }
    .floor-plan-button { display: none; }
    .viewer-tools { left: 16px; top: 35%; }
    .viewer-tools button { width: 37px; height: 37px; }
    .viewer-arrows { left: auto; right: 17px; top: 34%; bottom: auto; }
    .viewer-arrows span { display: none; }
    .drag-hint { display: none; }
    .viewer-hotspot span { display: none; }
    .hotspot-bedroom { left: 30%; top: 31%; }.hotspot-living { left: 56%; top: 42%; }.hotspot-terrace { left: 49%; bottom: 43%; }
    .viewer-mobile-bar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; color: #fff; background: #111d22; font-size: 12px; }
    .viewer-mobile-bar a { color: #fff; font-weight: 600; }
}
