/* ============================================================
   JCREATORSINMOBIL — Sistema de diseño
   Paleta 60-30-10 vibrante: base fría / índigo eléctrico /
   coral CTA · turquesa piscina · ámbar
   ============================================================ */

:root {
  --base:        #F7F8FD;
  --base-soft:   #EBEDF8;
  --line:        #DFE2F0;
  --ink:         #14162A;
  --ink-soft:    #4A4E6B;
  --midnight:    #2A1E8F;
  --midnight-2:  #1E1568;
  --midnight-3:  #140E49;
  --champagne:   #FFB020;
  --terracotta:  #FF4D2E;
  --terracotta-d:#E23A1C;
  --sage:        #00C2A8;
  --amber:       #F59E0B;
  --danger:      #E5484D;
  --gray-unit:   #55606E;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -18px rgba(26, 18, 95, .32);
  --shadow-sm: 0 6px 24px -10px rgba(26, 18, 95, .24);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--base);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand, .sr-cuota, .up-price, .hp-value {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--champagne);
}
.eyebrow-light { color: var(--champagne); }

.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; padding: 0 24px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 48px); margin: 10px 0 12px; color: var(--midnight); }
.section-head .section-sub { color: var(--ink-soft); font-size: 16px; }
.section-head.on-dark h2 { color: var(--base); }
.section-head.on-dark .section-sub { color: rgba(250, 249, 246, .68); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--terracotta); color: #fff;
  box-shadow: 0 10px 26px -10px rgba(255, 77, 46, .55);
}
.btn-primary:hover { background: var(--terracotta-d); transform: translateY(-1px); }

.btn-ghost { border-color: var(--midnight); color: var(--midnight); background: transparent; }
.btn-ghost:hover { background: var(--midnight); color: var(--base); }

.btn-ghost-light { border-color: rgba(250, 249, 246, .4); color: var(--base); background: transparent; }
.btn-ghost-light:hover { border-color: var(--base); background: rgba(250, 249, 246, .08); }

.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Nav ---------- */
.nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 64px);
}
.brand {
  color: var(--base); text-decoration: none; font-size: 22px; letter-spacing: .04em;
  display: inline-flex; align-items: baseline; gap: 7px;
}
.brand-dot { color: var(--champagne); }
.brand-sub { font-family: var(--font-sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(250,249,246,.6); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: rgba(250,249,246,.85); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--base); }

/* ---------- Barra sticky de conversión ---------- */
.sticky-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(20px, 5vw, 64px);
  background: rgba(250, 249, 246, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-110%);
  transition: transform .45s var(--ease);
}
.sticky-bar.visible { transform: translateY(0); }
.sb-info { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.sb-name { font-family: var(--font-display); font-size: 19px; color: var(--midnight); white-space: nowrap; }
.sb-price { font-size: 14px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.sb-actions { display: flex; gap: 10px; }

/* ---------- Hero parallax ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, #120C45 0%, var(--midnight) 55%, #5B34D6 100%);
  display: flex; align-items: center; justify-content: center;
}
.hero-layer { position: absolute; inset: 0; will-change: transform; pointer-events: none; }
.hero-glow {
  background:
    radial-gradient(520px 520px at 72% 24%, rgba(255, 176, 32, .38), transparent 65%),
    radial-gradient(900px 500px at 18% 78%, rgba(255, 77, 46, .26), transparent 70%);
}
.skyline { top: auto; bottom: -2px; height: 46vh; width: 100%; }
.skyline-far { opacity: .5; }
.skyline-near { opacity: .9; }

.hero-content {
  position: relative; z-index: 5;
  text-align: center; color: var(--base);
  padding: 120px 24px 140px;
  max-width: 780px;
  will-change: transform;
}
.hero h1 { font-size: clamp(44px, 8vw, 92px); margin: 18px 0 20px; }
.hero-sub { font-size: clamp(15px, 1.6vw, 18px); color: rgba(250,249,246,.78); max-width: 520px; margin: 0 auto 28px; }
.hero-price { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-bottom: 30px; }
.hp-label { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: rgba(250,249,246,.6); }
.hp-value { font-size: clamp(30px, 4vw, 44px); color: var(--champagne); }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: 12.5px; color: rgba(250,249,246,.55); }

.badge {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px;
}
.float-badge {
  position: absolute; z-index: 6;
  background: rgba(250, 249, 246, .1);
  border: 1px solid rgba(250, 249, 246, .22);
  color: var(--base);
  backdrop-filter: blur(6px);
  will-change: transform;
}
.fb-1 { top: 30%; left: 9%; }
.fb-2 { top: 56%; right: 8%; }
.fb-3 { top: 22%; right: 16%; }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 6;
  width: 26px; height: 42px; border: 1.5px solid rgba(250,249,246,.4); border-radius: 14px;
}
.scroll-hint span {
  position: absolute; top: 7px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  background: var(--champagne); border-radius: 2px;
  animation: scrollHint 1.8s var(--ease) infinite;
}
@keyframes scrollHint { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Franja de confianza ---------- */
.trust {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  max-width: 1080px; margin: 0 auto; padding: 72px 32px;
}
.trust-item { display: flex; gap: 16px; align-items: flex-start; }
.trust-item svg { width: 30px; height: 30px; flex: none; color: var(--champagne); margin-top: 3px; }
.trust-item h3 { font-size: 19px; color: var(--midnight); margin-bottom: 4px; }
.trust-item p { font-size: 14px; color: var(--ink-soft); }

/* ---------- Visor 3D ---------- */
.section-3d {
  background: linear-gradient(180deg, #1B2FA8 0%, #2E6FDE 42%, #9BD7F8 100%);
  padding: 88px 0 96px;
}
.viewer-wrap { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
#canvas3d {
  height: min(62vh, 560px);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: grab;
  background: radial-gradient(720px 420px at 50% 26%, rgba(255,255,255,.16), transparent 70%);
  border: 1px solid rgba(255,255,255,.3);
}
#canvas3d:active { cursor: grabbing; }
#canvas3d canvas { display: block; }
.canvas-fallback {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.92); font-size: 15px; text-align: center; padding: 24px;
}

.legend { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  background: rgba(255,255,255,.85); border: 1px solid rgba(20,22,42,.08);
  padding: 7px 14px; border-radius: 999px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-sage { background: var(--sage); }
.dot-champagne { background: var(--champagne); }
.dot-gray { background: var(--gray-unit); }
.dot-terracotta { background: var(--terracotta); }

.drag-hint { text-align: center; margin-top: 12px; font-size: 12.5px; color: rgba(20,22,42,.55); }

.unit-panel {
  position: absolute; top: 24px; right: 44px; z-index: 10;
  width: 300px; max-width: calc(100% - 48px);
  background: rgba(18, 12, 70, .9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 176, 32, .4);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--base);
  box-shadow: var(--shadow);
  animation: panelIn .4s var(--ease);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.unit-panel h3 { font-size: 26px; margin: 6px 0 4px; }
.up-meta { font-size: 13.5px; color: rgba(250,249,246,.65); margin-bottom: 10px; }
.up-price { font-size: 30px; color: var(--champagne); margin-bottom: 16px; }
.up-actions { display: grid; gap: 10px; }
.up-note { margin-top: 12px; font-size: 12px; color: rgba(250,249,246,.5); }

.panel-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; color: inherit;
  font-size: 22px; cursor: pointer; opacity: .6; line-height: 1;
}
.panel-close:hover { opacity: 1; }

/* ---------- Simulador ---------- */
.section-sim { padding: 96px 24px 80px; max-width: 1180px; margin: 0 auto; }
.sim-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: start; }

.sim-inputs {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-sm);
  display: grid; gap: 26px;
}
.control-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.control label { font-size: 14px; font-weight: 600; color: var(--midnight); }
.control label small { font-weight: 400; color: var(--ink-soft); }
.control output { font-size: 14px; font-weight: 700; color: var(--terracotta-d); font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px;
  background: linear-gradient(to right, var(--terracotta) 50%, var(--base-soft) 50%);
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--terracotta);
  box-shadow: 0 2px 10px rgba(224,113,61,.4);
  transition: transform .2s var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 3px solid var(--terracotta);
}

.segment { display: inline-flex; background: var(--base-soft); border-radius: 999px; padding: 4px; }
.seg-btn {
  border: none; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); padding: 8px 18px; border-radius: 999px;
  transition: background .25s, color .25s;
}
.seg-btn.active { background: var(--midnight); color: var(--base); }

.control-row { display: grid; gap: 10px; }
select, .input-euro input {
  font-family: var(--font-sans); font-size: 15px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  width: 100%; outline: none;
}
select:focus, .input-euro input:focus { border-color: var(--champagne); }
.input-euro { position: relative; }
.input-euro span {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--ink-soft);
}

/* Resultados (tarjeta oscura) */
.sim-results {
  background: linear-gradient(165deg, var(--midnight) 0%, var(--midnight-3) 100%);
  color: var(--base);
  border-radius: var(--radius);
  padding: 34px 32px;
  box-shadow: var(--shadow);
  position: sticky; top: 84px;
}
.sr-label { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: rgba(250,249,246,.55); }
.sr-cuota { font-size: clamp(44px, 5vw, 58px); color: #fff; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.sr-unit { font-family: var(--font-sans); font-size: 16px; color: rgba(250,249,246,.55); margin-left: 8px; }

.ratio { margin: 14px 0 6px; }
.ratio-track { height: 6px; border-radius: 999px; background: rgba(250,249,246,.12); overflow: hidden; }
.ratio-fill { height: 100%; width: 0; border-radius: 999px; background: var(--sage); transition: width .4s var(--ease), background .4s; }
.ratio-text { font-size: 12.5px; margin-top: 7px; color: rgba(250,249,246,.7); }

.donut-row { display: flex; align-items: center; gap: 20px; margin: 22px 0; }
.donut { width: 132px; height: 132px; flex: none; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 14; }
.donut-bg  { stroke: rgba(250,249,246,.1); }
.donut-cap { stroke: var(--champagne); stroke-linecap: butt; transition: stroke-dasharray .5s var(--ease); }
.donut-int { stroke: var(--terracotta); stroke-linecap: butt; transition: stroke-dasharray .5s var(--ease), stroke-dashoffset .5s var(--ease); }
.donut text { transform: rotate(90deg); transform-origin: 70px 70px; fill: var(--base); }
.donut-t1 { font-size: 9.5px; text-anchor: middle; fill: rgba(250,249,246,.55); letter-spacing: .08em; text-transform: uppercase; }
.donut-t2 { font-size: 15px; text-anchor: middle; font-weight: 700; font-family: var(--font-sans); }
.donut-legend { list-style: none; display: grid; gap: 10px; font-size: 13.5px; color: rgba(250,249,246,.75); }
.donut-legend li { display: flex; align-items: center; gap: 9px; }
.donut-legend b { color: #fff; margin-left: 4px; font-variant-numeric: tabular-nums; }

.stress {
  background: rgba(224, 113, 61, .12);
  border: 1px solid rgba(224, 113, 61, .3);
  border-radius: var(--radius-sm);
  padding: 12px 16px; margin-bottom: 18px;
  font-size: 13.5px;
}
.stress-title { font-weight: 700; color: var(--terracotta); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; }
.stress b { font-variant-numeric: tabular-nums; }

.breakdown { display: grid; gap: 0; border-top: 1px solid rgba(250,249,246,.12); }
.breakdown > div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(250,249,246,.08);
  font-size: 14px;
}
.breakdown dt { color: rgba(250,249,246,.65); }
.breakdown dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.bd-total dt, .bd-total dd { color: var(--champagne) !important; font-weight: 700; font-size: 15px; }

.sr-ctas { display: grid; gap: 10px; margin-top: 22px; }

/* Tabla de amortización */
.amort { margin-top: 34px; }
.amort summary {
  cursor: pointer; font-weight: 600; color: var(--midnight);
  padding: 16px 20px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); list-style: none;
}
.amort summary::-webkit-details-marker { display: none; }
.amort summary::after { content: " ↓"; color: var(--champagne); }
.amort[open] summary::after { content: " ↑"; }
.amort-scroll { max-height: 380px; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.amort table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.amort th, .amort td { text-align: right; padding: 10px 18px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.amort th:first-child, .amort td:first-child { text-align: left; }
.amort thead th { position: sticky; top: 0; background: var(--base-soft); color: var(--midnight); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Footer ---------- */
.footer {
  background: var(--midnight-3); color: rgba(250,249,246,.55);
  text-align: center; padding: 56px 24px;
  font-size: 13px;
}
.footer .brand { margin-bottom: 14px; display: inline-flex; }
.footer p { max-width: 560px; margin: 0 auto; }

/* ---------- Carrito ---------- */
.cart-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--midnight); color: var(--base);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease), background .25s;
}
.cart-fab:hover { transform: translateY(-3px); background: var(--midnight-2); }
.cart-fab svg { width: 24px; height: 24px; }
.cart-count[hidden] { display: none; }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--terracotta); color: #fff;
  font-size: 12px; font-weight: 700;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
}

.cart-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(8, 26, 38, .5); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .35s;
}
.cart-overlay.open { opacity: 1; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80;
  width: 420px; max-width: 100vw;
  background: var(--base);
  box-shadow: -20px 0 60px rgba(8, 26, 38, .3);
  transform: translateX(105%);
  transition: transform .45s var(--ease);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cd-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px; border-bottom: 1px solid var(--line);
}
.cd-head h3 { font-size: 24px; color: var(--midnight); }
.cd-head .panel-close { position: static; color: var(--ink); font-size: 26px; }

.cd-items { flex: 1; overflow-y: auto; padding: 20px 26px; display: grid; gap: 14px; align-content: start; }
.cd-empty { text-align: center; color: var(--ink-soft); font-size: 14px; padding: 40px 10px; }

.cart-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px; position: relative;
  display: grid; gap: 6px;
}
.ci-type {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  padding: 4px 10px; border-radius: 999px;
}
.ci-type.visita  { background: rgba(0,194,168,.12);  color: #0B8A78; }
.ci-type.reserva { background: rgba(255,77,46,.12);  color: var(--terracotta-d); }
.ci-type.fianza  { background: rgba(255,176,32,.16); color: #B45309; }
.ci-name { font-weight: 600; font-size: 14.5px; color: var(--ink); padding-right: 24px; }
.ci-amount { font-family: var(--font-display); font-size: 20px; color: var(--midnight); }
.ci-hold { font-size: 12.5px; color: var(--terracotta-d); font-weight: 600; font-variant-numeric: tabular-nums; }
.ci-remove {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-soft); font-size: 18px; line-height: 1; opacity: .6;
}
.ci-remove:hover { opacity: 1; color: var(--danger); }

.cd-pay { padding: 6px 26px 14px; border-top: 1px solid var(--line); }
.cd-pay-title { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin: 14px 0 10px; }
.pay-options { display: grid; gap: 8px; max-height: 218px; overflow-y: auto; }
.pay-opt {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 10px; align-items: center;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.pay-opt:has(input:checked) { border-color: var(--terracotta); background: rgba(224,113,61,.05); }
.pay-opt input { grid-row: span 2; accent-color: var(--terracotta); }
.po-name { font-size: 13.5px; font-weight: 600; }
.po-sub { font-size: 11.5px; color: var(--ink-soft); grid-column: 2; }
.pay-opt.disabled { opacity: .4; pointer-events: none; }
.pay-warn { font-size: 12px; color: var(--amber); margin-top: 10px; font-weight: 500; }

.cd-foot { padding: 16px 26px 24px; border-top: 1px solid var(--line); background: #fff; }
.cd-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.cd-total span { font-size: 14px; color: var(--ink-soft); }
.cd-total b { font-family: var(--font-display); font-size: 28px; color: var(--midnight); font-variant-numeric: tabular-nums; }
.cd-note { text-align: center; font-size: 11.5px; color: var(--ink-soft); margin-top: 10px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: grid; gap: 8px; justify-items: center;
  pointer-events: none;
}
.toast {
  background: var(--midnight); color: var(--base);
  font-size: 13.5px; font-weight: 500;
  padding: 12px 22px; border-radius: 999px;
  box-shadow: var(--shadow);
  animation: toastIn .35s var(--ease);
  max-width: min(90vw, 480px); text-align: center;
}
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ============================================================
   INTERIORES — comparador, hotspots, luz ambiente y galería
   ============================================================ */
.int-section { max-width: 1080px; margin: 0 auto; padding: 96px 24px 0; }

/* Huecos de imagen con arrastrar-y-soltar */
.img-slot {
  position: relative; overflow: hidden;
  background: var(--base-soft);
  width: 100%; height: 100%;
}
.img-slot .slot-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-slot .drop-note {
  position: absolute; inset: 0; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 22px; cursor: pointer;
  color: var(--ink-soft); font-size: 14px; line-height: 1.5;
  border: 2px dashed var(--line); border-radius: inherit;
  background: repeating-linear-gradient(45deg, #F2F3FB 0 14px, #ECEEF8 14px 28px);
}
.img-slot .drop-note b { color: var(--midnight); font-size: 15px; }
.img-slot .drop-note .dn-icon { font-size: 30px; }
.img-slot.empty .drop-note { display: flex; }
.img-slot.empty .slot-img { visibility: hidden; }
.img-slot.dragover .drop-note {
  border-color: var(--terracotta); color: var(--terracotta-d);
  background: rgba(255,77,46,.06);
}
.img-slot input[type="file"] { display: none; }

/* Comparador deslizante */
.compare {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 10; box-shadow: var(--shadow);
  touch-action: pan-y; cursor: ew-resize; user-select: none;
}
.compare .cmp-base, .compare .cmp-top { position: absolute; inset: 0; }
.compare .cmp-top { clip-path: inset(0 50% 0 0); }
.cmp-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px;
  background: #fff; z-index: 5; transform: translateX(-50%);
  box-shadow: 0 0 18px rgba(0,0,0,.35); pointer-events: none;
}
.cmp-handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--midnight);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; letter-spacing: 1px;
  box-shadow: var(--shadow-sm);
}
.cmp-label {
  position: absolute; top: 16px; z-index: 6; pointer-events: none;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(18,12,70,.75); color: #fff; backdrop-filter: blur(6px);
}
.cmp-label.left  { left: 16px; }
.cmp-label.right { right: 16px; }

/* Hotspots sobre la foto */
.spot-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 10; box-shadow: var(--shadow);
}
.spot-media { position: absolute; inset: 0; }
.spot-tint-warm, .spot-tint-cool {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 2;
  transition: opacity .25s;
}
.spot-tint-warm { background: linear-gradient(200deg, rgba(255,140,40,.55), rgba(120,40,90,.35)); mix-blend-mode: multiply; }
.spot-tint-cool { background: linear-gradient(200deg, rgba(90,140,255,.35), rgba(40,60,120,.25)); mix-blend-mode: multiply; }
.spot {
  position: absolute; z-index: 4; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--terracotta-d);
  font-weight: 800; font-size: 16px; line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transition: transform .25s var(--ease), background .25s;
}
.spot::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.65);
  animation: spotPulse 2.2s ease-out infinite;
}
@keyframes spotPulse {
  0% { transform: scale(.6); opacity: 1; }
  75%, 100% { transform: scale(1.25); opacity: 0; }
}
.spot:hover, .spot.active { transform: scale(1.18); background: var(--terracotta); color: #fff; }
.spot-card {
  position: absolute; z-index: 8; width: 250px; max-width: 70vw;
  background: rgba(18,12,70,.92); color: var(--base);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,176,32,.4);
  border-radius: var(--radius-sm); padding: 16px 18px;
  box-shadow: var(--shadow); pointer-events: none;
}
.spot-card h4 { font-family: var(--font-display); font-size: 19px; margin-bottom: 5px; color: var(--champagne); }
.spot-card p { font-size: 13px; line-height: 1.55; color: rgba(247,248,253,.85); }
.spot-card[hidden] { display: none; }

/* Deslizador de luz ambiente */
.luz-box {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 22px; padding: 18px 22px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.luz-box label { font-size: 14px; font-weight: 600; color: var(--midnight); white-space: nowrap; }
.luz-box input[type="range"] { flex: 1; min-width: 160px; }
.luz-tag {
  font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  background: rgba(255,176,32,.15); color: #B45309; white-space: nowrap;
  min-width: 110px; text-align: center;
}

/* Galería + lightbox */
.gal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.gal-card {
  border-radius: var(--radius); overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  cursor: zoom-in; transition: transform .3s var(--ease), box-shadow .3s;
  margin: 0;
}
.gal-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.gal-card .img-slot { aspect-ratio: 16 / 10; }
.gal-card figcaption { padding: 16px 20px; }
.gal-card h3 { font-size: 20px; color: var(--midnight); margin-bottom: 3px; }
.gal-card p { font-size: 13.5px; color: var(--ink-soft); }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 6, 40, .92); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 4vmin;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 100%; border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
.lightbox .panel-close {
  position: fixed; top: 18px; right: 26px; color: #fff; font-size: 34px; opacity: .8;
}

/* CTA de cierre */
.int-cta {
  margin-top: 96px; padding: 64px 24px; text-align: center;
  background: linear-gradient(165deg, var(--midnight) 0%, var(--midnight-3) 100%);
  color: var(--base);
}
.int-cta h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 12px; }
.int-cta p { color: rgba(247,248,253,.7); margin-bottom: 26px; }
.int-cta .row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .sim-grid { grid-template-columns: 1fr; }
  .sim-results { position: static; }
  .trust { grid-template-columns: 1fr; gap: 26px; padding: 56px 28px; }
  .fb-1 { left: 5%; top: 24%; }
  .fb-3 { display: none; }
}
@media (max-width: 720px) {
  .gal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links a { display: none; }
  .sb-price { display: none; }
  .sb-actions .btn-ghost { display: none; }
  .unit-panel { top: auto; bottom: 16px; right: 50%; transform: translateX(50%); }
  .hero-ctas .btn { width: 100%; }
  .float-badge { display: none; }
  .cart-drawer { width: 100vw; }
  #canvas3d { height: 52vh; }
}

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