@font-face { font-family: "Ardela"; src: url("../assets/fonts/ArdelaEdge-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ardela"; src: url("../assets/fonts/ArdelaEdge-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Ardela"; src: url("../assets/fonts/ArdelaEdge-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --sb: env(safe-area-inset-bottom, 0px); --st: env(safe-area-inset-top, 0px); /* márgenes del notch y de la barra del teléfono */
  --lime: #d5f430;
  --lime-dim: rgba(213, 244, 48, .18);
  --ink: #0b0b0b;
  --glass: rgba(14, 14, 14, .58);
  --glass-strong: rgba(10, 10, 10, .82);
  --line: rgba(255, 255, 255, .12);
  --txt: #f4f2ee;
  --txt-dim: rgba(244, 242, 238, .62);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --display: "Ardela", "Manrope", sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #0b0b0b; color: var(--txt); font-family: var(--body); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, a, .swatch { -webkit-tap-highlight-color: transparent; } /* sin el destello gris al tocar en celular */
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: grab; }
#scene:active { cursor: grabbing; }

/* ---------- UI reveal ---------- */
.ui { opacity: 0; transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
body.ready .ui { opacity: 1; }

/* ---------- LOADER ---------- */
#loader { position: fixed; inset: 0; z-index: 50; background: #0b0b0b; display: grid; place-items: center; transition: opacity 1.4s var(--ease), visibility 1.4s; }
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { width: min(420px, 78vw); position: relative; z-index: 2; }
.loader-logo { width: 100%; display: block; margin-bottom: 36px; }
.loader-bar { height: 1px; background: var(--line); position: relative; overflow: hidden; }
.loader-bar span { position: absolute; inset: 0; width: 0%; background: var(--lime); box-shadow: 0 0 14px var(--lime); transition: width .4s var(--ease); }
.loader-meta { display: flex; justify-content: space-between; margin-top: 14px; color: var(--txt-dim); }
#loaderPct { color: var(--lime); }
.loader-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 64px 64px; opacity: .25; mask-image: radial-gradient(circle at center, #000 0%, transparent 65%); }

/* ---------- TOPBAR ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 22px 36px; gap: 24px; background: linear-gradient(180deg, rgba(10,10,10,.55), transparent); }
.brand img { height: 16px; display: block; }
.nav { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); }
.nav a { font-size: 13px; padding: 8px 16px; border-radius: 999px; color: var(--txt-dim); transition: color .3s, background .3s; }
.nav a:hover { color: var(--txt); }
.nav a.active { color: var(--ink); background: var(--txt); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); transition: border-color .3s; }
.icon-btn:hover { border-color: var(--lime); }
.icon-btn.on #soundWaves { opacity: 1; stroke: var(--lime); }
/* ---------- SELECTOR DE IDIOMA ---------- */
.lang { position: relative; }
.lang-btn { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--txt-dim); }
.lang-btn:hover, .lang.open .lang-btn { color: var(--lime); border-color: var(--lime); }
.lang-pop { display: none; position: absolute; z-index: 40; top: calc(100% + 10px); right: 0; min-width: 164px; list-style: none; padding: 7px; border-radius: 16px; background: rgba(14,14,14,.96); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 24px 50px -22px #000; }
.lang.open .lang-pop { display: block; }
.lang-pop li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--txt); cursor: pointer; white-space: nowrap; }
.lang-pop li:hover { background: var(--lime-dim); }
.lang-pop li.on { color: var(--lime); }
.lang-pop li b { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; color: var(--txt-dim); }
.lang-pop li.on b { color: var(--lime); }

.btn-lime { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 600; font-size: 13px; transition: transform .3s var(--ease), box-shadow .3s; }
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px var(--lime); }
.btn-lime.wide { width: 100%; padding: 16px; margin-top: 8px; }

/* ---------- STATEMENT ---------- */
.statement { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 15; text-align: center; pointer-events: none; opacity: 0; transition: opacity 1.4s var(--ease), transform 1.6s var(--ease), filter 1.4s; }
.statement.show { opacity: 1; }
.statement.gone { opacity: 0; transform: translate(-50%, -62%); filter: blur(8px); }
.statement .kicker { color: var(--ink); opacity: .6; margin-bottom: 18px; }
.statement h1 { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 6vw, 88px); line-height: 1; color: #151515; letter-spacing: -.01em; }
.statement h1 em { font-style: italic; color: #151515; background: linear-gradient(transparent 62%, var(--lime) 62%, var(--lime) 88%, transparent 88%); padding: 0 .08em; }

/* ---------- INFO ---------- */
.info { position: fixed; left: 36px; bottom: 110px; z-index: 12; width: min(340px, 30vw); padding: 22px 24px 24px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); }
.info-index { display: flex; align-items: center; gap: 10px; color: var(--txt-dim); }
.info-index span:first-child { color: var(--lime); }
.info-index i { width: 28px; height: 1px; background: var(--line); }
.info-cat { margin-top: 20px; color: var(--txt-dim); }
.info-name { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.02; margin-top: 8px; }
.info-tag { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--txt-dim); font-weight: 300; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 22px; }
.chips li { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--txt); }
.chips li::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--lime); margin-right: 7px; vertical-align: 1px; }
.btn-ghost { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 500; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--lime-dim); color: var(--lime); transition: background .3s, color .3s; }
.btn-ghost:hover { background: var(--lime); color: var(--ink); }
.btn-ghost span { transition: transform .3s var(--ease); }
.btn-ghost:hover span { transform: translateX(4px); }

/* text swap animation */
.swap-out { animation: swapOut .45s var(--ease) forwards; }
.swap-in { animation: swapIn .8s var(--ease) both; }
@keyframes swapOut { to { opacity: 0; transform: translateY(-10px); filter: blur(4px); } }
@keyframes swapIn { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- CONFIG ---------- */
.config { position: fixed; right: 36px; top: 50%; translate: 0 -50%; z-index: 12; width: 220px; padding: 20px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.config-head { display: flex; align-items: center; gap: 8px; color: var(--txt-dim); }
.config-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.config-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.config-label { font-size: 13px; color: var(--txt); margin-bottom: 12px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; position: relative; border: 1px solid rgba(255,255,255,.25); transition: transform .3s var(--ease); overflow: hidden; }
.swatch::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid transparent; transition: border-color .3s, inset .3s var(--ease); }
.swatch:hover { transform: scale(1.08); }
.swatch.active { outline: 1.5px solid var(--lime); outline-offset: 3px; }
.swatch .half { position: absolute; inset: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.config-value { margin-top: 12px; color: var(--lime); min-height: 14px; }
.action-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line); font-size: 13px; text-align: left; transition: border-color .3s, background .3s; }
.action-btn + .action-btn { margin-top: 8px; }
.action-btn:hover { border-color: var(--lime); }
.action-btn.on { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.ab-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); font-size: 11px; }
.action-btn.on .ab-icon { background: rgba(0,0,0,.12); }
.config-hint { margin-top: 18px; color: var(--txt-dim); font-size: 9.5px; line-height: 1.6; }

/* ---------- RAIL ---------- */
.rail { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 12; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.rail-arrow { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: var(--txt-dim); transition: color .3s, background .3s; }
.rail-arrow:hover { color: var(--ink); background: var(--lime); }
.rail-items { display: flex; gap: 4px; }
.rail-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 18px 12px; border-radius: 999px; font-size: 13px; color: var(--txt-dim); transition: color .3s, background .3s; white-space: nowrap; }
.rail-item b { font-family: var(--mono); font-weight: 400; font-size: 10px; color: rgba(244,242,238,.4); }
.rail-item:hover { color: var(--txt); }
.rail-item.active { color: var(--txt); background: rgba(255,255,255,.08); }
.rail-item.active b { color: var(--lime); }
.rail-item .prog { position: absolute; left: 18px; right: 18px; bottom: 5px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; opacity: 0; }
.rail-item.active .prog { opacity: 1; }
.rail-item .prog i { position: absolute; inset: 0; width: 0; background: var(--lime); }
.rail.locked { pointer-events: none; }
.rail.locked .rail-items { opacity: .5; }

/* ---------- HUD ---------- */
.hud { position: fixed; right: 36px; bottom: 44px; z-index: 11; display: flex; gap: 18px; color: rgba(20,20,20,.55); font-size: 10px; }
.hud .live { display: flex; align-items: center; gap: 7px; color: #1a1a1a; }
.hud .live i { width: 6px; height: 6px; border-radius: 50%; background: #e2402f; animation: pulse 1.4s infinite; }

/* ---------- LIFT TAG ---------- */
.lift-tag { position: fixed; left: 50%; top: 108px; transform: translate(-50%, -10px); z-index: 13; display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-radius: 999px; background: var(--glass-strong); color: var(--lime); opacity: 0; transition: opacity .5s, transform .5s var(--ease); pointer-events: none; }
.lift-tag.show { opacity: 1; transform: translate(-50%, 0); }
.lt-bar { width: 44px; height: 2px; background: rgba(213,244,48,.2); position: relative; overflow: hidden; }
.lt-bar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--lime); animation: scan 1s linear infinite; }
@keyframes scan { from { left: -40%; } to { left: 100%; } }

/* ---------- PANELS ---------- */
.panel-scrim { position: fixed; inset: 0; z-index: 30; background: rgba(8,8,8,.35); opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.panel-scrim.show { opacity: 1; visibility: visible; }
.panel { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 31; width: min(560px, calc(100vw - 24px)); padding: 64px 48px 40px; border-radius: 26px; background: rgba(12,12,12,.9); border: 1px solid var(--line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); overflow-y: auto; transform: translateX(calc(100% + 24px)); transition: transform .8s var(--ease); }
.panel.show { transform: none; }
.panel-close { position: absolute; top: 18px; right: 22px; width: 40px; height: 40px; font-size: 26px; color: var(--txt-dim); }
.panel-close:hover { color: var(--lime); }
.panel .kicker { color: var(--lime); }
.panel h3 { font-family: var(--display); font-weight: 400; font-size: clamp(28px, 3vw, 40px); line-height: 1.08; margin: 14px 0 32px; }
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.svc-grid article { padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.03); transition: border-color .3s; }
.svc-grid article:hover { border-color: var(--lime-dim); }
.svc-grid span { color: var(--lime); }
.svc-grid h4 { font-size: 16px; font-weight: 600; margin: 14px 0 8px; }
.svc-grid p, .steps p { font-size: 13.5px; line-height: 1.55; color: var(--txt-dim); font-weight: 300; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.stats b { display: block; font-family: var(--display); font-weight: 600; font-size: 40px; color: var(--lime); }
.stats span { font-size: 12px; color: var(--txt-dim); }
.steps { list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 26px 56px; border-left: 1px solid var(--line); margin-left: 14px; }
.steps li:last-child { border-color: transparent; }
.steps li::before { content: "0" counter(s); position: absolute; left: -15px; top: -4px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); border: 1px solid var(--lime); color: var(--lime); font-family: var(--mono); font-size: 10px; }
.steps b { font-size: 16px; font-weight: 600; display: block; margin-bottom: 6px; }
/* ---------- CUESTIONARIO DE CONTACTO ---------- */
.quiz { display: grid; gap: 30px; }
.quiz-progress { display: flex; align-items: center; gap: 14px; color: var(--txt-dim); }
#qStepLabel { color: var(--lime); min-width: 54px; }
.qbar { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.qbar i { display: block; height: 100%; width: 33.3%; background: var(--lime); box-shadow: 0 0 10px var(--lime); transition: width .6s var(--ease); }
.quiz-stage { display: grid; }
.qstep { grid-area: 1 / 1; display: grid; align-content: start; gap: 24px; opacity: 0; visibility: hidden; transform: translateX(28px); transition: opacity .35s var(--ease), transform .6s var(--ease), visibility 0s .35s; }
.qstep.past { transform: translateX(-28px); }
.qstep.show { opacity: 1; visibility: visible; transform: none; transition: opacity .5s var(--ease) .15s, transform .6s var(--ease) .15s, visibility 0s; }
.qstep h4 { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; }
.q-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.q-big { min-height: 96px; border-radius: 20px; font-family: var(--display); font-weight: 600; font-size: 30px; background: var(--lime); color: var(--ink); border: 1px solid var(--lime); transition: transform .3s var(--ease), box-shadow .3s, background .3s, color .3s; }
.q-big:hover { transform: translateY(-3px); box-shadow: 0 14px 34px -12px var(--lime); }
.q-big.alt { background: transparent; color: var(--txt); border-color: var(--line); }
.q-big.alt:hover { border-color: var(--lime); color: var(--lime); box-shadow: none; }
.q-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.q-actions .btn-lime { margin-left: auto; }
.q-back { padding: 13px 20px; border-radius: 999px; border: 1px solid var(--line); color: var(--txt-dim); font-size: 13px; transition: border-color .3s, color .3s; }
.q-back:hover { border-color: var(--lime); color: var(--lime); }
.quiz .btn-lime { padding: 15px 24px; font-size: 14px; }
.quiz .btn-lime[disabled] { opacity: .3; pointer-events: none; }
.quiz input[type="text"], .quiz input[type="email"] { width: 100%; font: inherit; font-size: 16px; color: var(--txt); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; outline: none; transition: border-color .3s; }
.quiz input:focus { border-color: var(--lime); }
.quiz input[aria-invalid="true"] { border-color: #ff6b5e; }
.q-error { min-height: 20px; margin: 10px 0 18px; font-size: 13px; color: #ff8a7f; }
.q-other { margin-top: -6px; }

/* desplegable con buscador */
.combo { position: relative; }
.combo-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; font-size: 16px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--txt-dim); transition: border-color .3s; }
.combo-btn.chosen { color: var(--txt); }
.combo-btn i { font-style: normal; color: var(--lime); transition: transform .3s var(--ease); }
.combo.open .combo-btn, .combo-btn:hover { border-color: var(--lime); }
.combo.open .combo-btn i { transform: rotate(180deg); }
.combo-pop { display: none; position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 8px); padding: 10px; border-radius: 16px; background: rgba(18,18,18,.98); border: 1px solid var(--line); box-shadow: 0 24px 50px -20px #000; }
.combo.open .combo-pop { display: block; }
.combo-pop input { margin-bottom: 8px; padding: 12px 14px; font-size: 16px; } /* 16px: menos y el iPhone hace zoom al escribir */
.combo-pop ul { list-style: none; max-height: 232px; overflow-y: auto; overscroll-behavior: contain; }
.combo-pop li { padding: 11px 14px; border-radius: 10px; font-size: 15px; color: var(--txt); cursor: pointer; }
.combo-pop li:hover, .combo-pop li.active { background: var(--lime-dim); }
.combo-pop li.sel { color: var(--lime); }
.combo-pop li.empty { color: var(--txt-dim); cursor: default; }
.combo-pop li.empty:hover { background: none; }

/* Solo celular: el nombre del producto y las pestañas de la tarjeta de personalización (en escritorio no existen) */
.cfg-title, .sw-tabs { display: none; }

/* Recomendación de girar el teléfono: solo se ve en celular vertical (se activa más abajo) */
/* Solo el icono (SVG blanco), centrado sobre la escena: sin texto, sin fondo, sin cuadro. Una sombra suave lo despega del 3D. */
.rotate-hint { display: none; position: fixed; left: 50%; top: 50%; z-index: 13; width: min(42vw, 170px); aspect-ratio: 1; margin: calc(min(42vw, 170px) / -2) 0 0 calc(min(42vw, 170px) / -2); opacity: 0; pointer-events: none; filter: drop-shadow(0 3px 14px rgba(0, 0, 0, .55)); transition: opacity .6s var(--ease); }
.rotate-hint.show { opacity: 1; }
.rotate-hint svg { display: block; width: 100%; height: 100%; }
/* Solo el giro: el icono completo (teléfono y flechas) gira 90° y regresa. Ciclo de 3.6 s. */
.rh-giro { transform-origin: 100px 100px; animation: rhGira 3.6s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes rhGira { 0%, 15% { transform: rotate(0); } 45%, 60% { transform: rotate(90deg); } 90%, 100% { transform: rotate(0); } }
/* (sin regla de "reducir movimiento": este giro ES el aviso, y sale solo 9 segundos. Si se apagara, el icono quedaría quieto y no diría nada.) */

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .info { width: 320px; }
  .hud { display: none; }
}

/* ============ CELULAR VERTICAL ============
   Pantalla angosta y alta: diseño propio (tarjeta de personalización abajo, paneles a pantalla completa).
   El teléfono ACOSTADO no entra aquí: ve la página ancha normal (más abajo). */
@media (max-width: 760px) and (min-height: 561px), (max-width: 760px) and (orientation: portrait) {
  .hide-m { display: none; }

  /* --- barra de arriba, compacta y por debajo del notch --- */
  .topbar { padding: calc(10px + var(--st)) 14px 12px; gap: 10px; }
  .nav { display: none; }
  .brand img { height: 12px; }
  .top-actions { gap: 8px; }
  .icon-btn { width: 38px; height: 38px; }
  .btn-lime { padding: 10px 14px; font-size: 12px; }
  .lang-pop { min-width: 150px; }
  .lang-pop li { padding: 12px; }

  /* --- frase de entrada: nunca se sale de la pantalla --- */
  .statement { width: calc(100% - 32px); top: 40%; }
  .statement h1 { font-size: clamp(28px, 9.5vw, 46px); }
  .statement .kicker { margin-bottom: 12px; font-size: 10px; }
  .rotate-hint { display: flex; } /* recomendación de girar el teléfono, sobre la escena */

  /* --- en celular NO hay tarjeta informativa: ese lugar es la personalización --- */
  .info { display: none; }
  .rail { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } /* desenfoque suave: cada panel borroso cuesta cuadros por segundo */

  /* Una sola tarjeta abajo: nombre del producto, pestañas por grupo, fila de colores y botones de acción
     (el detalle de esa tarjeta está en el bloque "TARJETA DE PERSONALIZACIÓN COMPACTA", más abajo). */
  .config { top: auto; left: 12px; right: 12px; bottom: calc(76px + var(--sb)); translate: none; width: auto; padding: 12px 14px 14px; border-radius: 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .cfg-title { display: block; font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.1; margin-bottom: 10px; text-transform: uppercase; }

  /* --- barra de productos: toques grandes y por encima del borde del teléfono --- */
  .rail { bottom: calc(12px + var(--sb)); max-width: calc(100vw - 20px); overflow-x: auto; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail-arrow { width: 44px; height: 44px; flex: none; }
  .rail-item { padding: 13px 15px; }
  .rail-item span { display: none; }
  .rail-item .prog { left: 12px; right: 12px; bottom: 4px; }

  .lift-tag { top: calc(66px + var(--st)); padding: 8px 14px; }
  .part-tip { padding: 9px 14px; }

  /* --- paneles a pantalla completa --- */
  .panel { top: 0; right: 0; bottom: 0; left: 0; width: auto; border-radius: 0; padding: 60px 18px calc(32px + var(--sb)); overscroll-behavior: contain; }
  .panel-close { top: calc(10px + var(--st)); right: 10px; width: 44px; height: 44px; }
  .panel h3 { margin: 12px 0 26px; }
  .svc-grid { grid-template-columns: 1fr; }
  .stats b { font-size: 32px; }
  .q-choices { grid-template-columns: 1fr; }
  .q-big { min-height: 72px; font-size: 26px; }
  .q-actions .btn-lime { flex: 1; margin-left: 0; }
  .combo-pop ul { max-height: 46vh; }
}

/* ============ TARJETA DE PERSONALIZACIÓN COMPACTA ============
   La usan el celular vertical (abajo) y el celular acostado (a la derecha): pestañas por grupo
   (Pintura / Vidrios / Cojinería), una fila de colores con el nombre del elegido y botones CON texto. */
@media (max-width: 760px) and (min-height: 561px), (max-width: 760px) and (orientation: portrait), (orientation: landscape) and (max-height: 560px) {
  .config-head, .config-hint { display: none; }

  .sw-tabs { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
  .sw-tabs::-webkit-scrollbar { display: none; }
  .sw-tab { flex: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--txt-dim); white-space: nowrap; }
  .sw-tab.on { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 600; }

  #swGroups .config-block { display: none; margin: 0; padding: 0; border: 0; }
  #swGroups .config-block.is-active { display: block; }
  #swGroups .config-label { display: none; }
  #swGroups:not(.has-tabs) .config-label { display: block; font-size: 12px; color: var(--txt-dim); margin-bottom: 8px; } /* con un solo grupo no hay pestañas: se rotula igual */
  #swGroups .swatches { flex-wrap: nowrap; gap: 10px; overflow-x: auto; padding: 4px 3px; scrollbar-width: none; }
  #swGroups .swatches::-webkit-scrollbar { display: none; }
  #swGroups .swatch { flex: none; width: 32px; height: 32px; }
  #swGroups .config-value { margin-top: 8px; font-size: 10px; min-height: 0; }

  .config > .config-block { margin: 12px 0 0; padding: 12px 0 0; display: flex; gap: 8px; }
  .action-btn { flex: 1; width: auto; min-width: 0; height: 38px; padding: 0 10px; justify-content: center; gap: 6px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
  .action-btn + .action-btn { margin-top: 0; }
  .action-btn > span:not(.ab-icon) { overflow: hidden; text-overflow: ellipsis; }
  .ab-icon { width: 18px; height: 18px; flex: none; font-size: 10px; }
}

/* ============ CELULAR ACOSTADO ============
   La misma página ancha de escritorio, compactada para tan poca altura (el teléfono mide ~390 px de alto). */
@media (orientation: landscape) and (max-height: 560px) {
  :root { --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px); }
  .hud { display: none; }

  .topbar { padding: calc(8px + var(--st)) calc(18px + var(--sr)) 8px calc(18px + var(--sl)); gap: 14px; }
  .brand img { height: 13px; }
  .nav a { padding: 6px 12px; font-size: 12px; }
  .top-actions { gap: 8px; }
  .icon-btn { width: 36px; height: 36px; }
  .btn-lime { padding: 9px 16px; font-size: 12px; }
  .lift-tag { top: calc(54px + var(--st)); padding: 7px 14px; }

  .statement { top: 44%; }
  .statement h1 { font-size: clamp(26px, 6.2vw, 52px); }
  .statement .kicker { margin-bottom: 10px; }

  /* tarjeta del producto: angosta, abajo a la izquierda (deja libre el centro, donde está el producto) */
  .info { left: calc(18px + var(--sl)); bottom: calc(68px + var(--sb)); width: min(206px, 26vw); padding: 10px 12px 12px; border-radius: 14px; }
  .info-tag, .chips { display: none; }
  .info-index { font-size: 10px; }
  .info-cat { margin-top: 8px; font-size: 10px; }
  .info-name { font-size: 19px; margin-top: 4px; }
  .btn-ghost { padding: 9px 11px; margin-top: 10px; font-size: 11.5px; border-radius: 11px; }

  /* personalización: angosta, abajo a la derecha (con las pestañas de arriba) */
  .config { top: auto; translate: none; right: calc(18px + var(--sr)); bottom: calc(68px + var(--sb)); width: min(222px, 28vw); padding: 10px 12px 12px; border-radius: 14px; }
  .sw-tabs { gap: 4px; margin-bottom: 8px; }
  .sw-tab { padding: 5px 8px; font-size: 10.5px; }
  #swGroups .swatch { width: 24px; height: 24px; }
  #swGroups .swatches { gap: 6px; padding: 3px 2px; }
  #swGroups .config-value { margin-top: 6px; }
  .config > .config-block { margin-top: 8px; padding-top: 8px; gap: 6px; }
  .action-btn { height: 30px; font-size: 10.5px; padding: 0 7px; gap: 5px; }
  .ab-icon { width: 15px; height: 15px; font-size: 8px; }

  .rail { bottom: calc(12px + var(--sb)); padding: 5px; }
  .rail-arrow { width: 36px; height: 36px; }
  .rail-item { padding: 8px 14px 10px; font-size: 12px; }
  .rail-item .prog { left: 14px; right: 14px; bottom: 3px; }

  .panel { padding: 52px 30px 26px; }
}
/* teléfonos acostados angostos: sin los 4 enlaces del menú (el botón "demo" sigue arriba) */
@media (orientation: landscape) and (max-height: 560px) and (max-width: 820px) {
  .nav { display: none; }
  .rail-item span { display: none; }
  .info { width: min(190px, 28vw); }
  .config { width: min(210px, 31vw); }
}

/* Pantalla de escritorio baja (no teléfono) */
@media (min-width: 761px) and (min-height: 561px) and (max-height: 760px) {
  .config-hint { display: none; }
  .config-block { margin-top: 14px; padding-top: 12px; }
  .info-tag { display: none; }
}

/* ---------- PANTALLAS TÁCTILES ----------
   Sin ratón no existe el "pasar por encima": se quitan esos efectos (si no, el botón
   se queda resaltado después de tocarlo) y se usa un rebote corto al presionar. */
@media (hover: none) {
  .btn-lime:hover { transform: none; box-shadow: none; }
  .swatch:hover { transform: none; }
  .q-big:hover, .q-big.alt:hover { transform: none; box-shadow: none; border-color: var(--lime); }
  .q-big.alt:hover { border-color: var(--line); color: var(--txt); }
  .btn-ghost:hover { background: none; color: var(--lime); }
  .btn-ghost:hover span { transform: none; }
  .rail-arrow:hover { color: var(--txt-dim); background: none; }
  .rail-item:hover { color: var(--txt-dim); }
  .rail-item.active { color: var(--txt); }
  .nav a:hover { color: var(--txt-dim); }
  .icon-btn:hover, .action-btn:hover, .combo-btn:hover, .q-back:hover { border-color: var(--line); }
  .lang-btn:hover { color: var(--txt-dim); border-color: var(--line); }
  .lang.open .lang-btn { color: var(--lime); border-color: var(--lime); }
  .combo.open .combo-btn { border-color: var(--lime); }
  .panel-close:hover { color: var(--txt-dim); }
  .svc-grid article:hover { border-color: var(--line); }
  .combo-pop li:hover, .lang-pop li:hover { background: none; }
  .combo-pop li.active { background: var(--lime-dim); }
  .action-btn.on { background: var(--lime); color: var(--ink); border-color: var(--lime); }

  .swatch:active { transform: scale(.9); }
  .action-btn:active, .btn-lime:active, .q-big:active, .q-back:active, .rail-item:active, .rail-arrow:active,
  .btn-ghost:active, .icon-btn:active, .combo-btn:active, .combo-pop li:active, .lang-pop li:active { opacity: .65; }
}

/* ---------- TOOLTIP DE INTERACCIÓN ---------- */
.part-tip { position: fixed; left: 0; top: 0; z-index: 14; pointer-events: none; padding: 8px 12px; border-radius: 999px; background: var(--glass-strong); color: var(--lime); border: 1px solid var(--lime-dim); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.part-tip.show { opacity: 1; }

/* ---------- AUTORIZACIÓN DE DATOS Y ENLACES LEGALES ---------- */
.q-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--txt-dim); cursor: pointer; text-align: left; }
.q-consent input { flex: none; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--lime); cursor: pointer; }
.q-consent a { color: var(--lime); }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 10px; }
.legal-links a { color: var(--txt-dim); text-decoration: none; }
.legal-links a:hover { color: var(--lime); }

/* ---------- RESPALDO SIN 3D ---------- */
#no3d { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: #0b0b0b; }
#no3d[hidden] { display: none; }
.no3d-box { max-width: 520px; text-align: center; }
.no3d-box img { height: 18px; margin-bottom: 28px; }
.no3d-box h1 { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 5vw, 36px); line-height: 1.1; margin-bottom: 14px; }
.no3d-box p { color: var(--txt-dim); font-size: 15px; line-height: 1.6; }
.no3d-box p.en { font-size: 13px; margin-top: 8px; }
.no3d-btn { display: inline-block; margin: 22px 0; padding: 14px 22px; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 600; text-decoration: none; }
.no3d-box nav { font-size: 12px; color: var(--txt-dim); }
.no3d-box nav a { color: var(--txt-dim); }

/* ---------- PANTALLA COMPLETA ---------- */
#fsBtn .fs-out { display: none; }
#fsBtn.on .fs-in { display: none; }
#fsBtn.on .fs-out { display: inline; }
#fsBtn.on { border-color: var(--lime); color: var(--lime); }
