/* RDN360 — sistema de diseño compartido */
:root {
  /* Modo claro en capas: lienzo (--bg) más oscuro que las superficies blancas, para que barra, tarjetas, bandas y pie
     se distingan entre sí y no se fundan en un solo tono. */
  --bg: #ebe7dc;
  --surface: #ffffff;
  --surface-2: #f6f3ea;
  --ink: #14201c;
  --muted: #55645f;
  --line: #d3cdbb;
  --topbar-bg: #ffffff;
  --band-bg: #ffffff;
  --hero-wash: linear-gradient(180deg, #d4ebe4 0%, #e2eee6 45%, var(--bg) 100%);
  --footer-bg: #10231e;
  --footer-ink: #e4ede9;
  --footer-muted: #9bb1a9;
  --footer-link: #8fe0cb;
  --footer-line: rgba(255, 255, 255, 0.14);
  --brand: #0d6b5c;
  --brand-ink: #ffffff;
  --brand-soft: #dff1ec;
  --brand-deep: #08463c;
  --accent: #f0a22d;
  --accent-ink: #2b1c00;
  --accent-soft: #fdf0d8;
  --danger: #b8322a;
  --danger-soft: #fbe5e2;
  --ok: #14794a;
  --ok-soft: #dcf3e6;
  --info: #25609f;
  --info-soft: #e0ecf8;
  --gold: #8a5b00;
  --gold-soft: #fbeccb;
  /* Movimiento: las curvas por defecto del navegador son flojas; estas arrancan rápido y frenan suave. Las
     entradas y salidas usan ease-out; lo que se mueve estando ya en pantalla, ease-in-out. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius: 16px;
  --radius-s: 10px;
  --shadow-s: 0 1px 2px rgba(20, 32, 28, 0.08), 0 2px 8px -4px rgba(20, 32, 28, 0.1);
  --shadow: 0 1px 2px rgba(20, 32, 28, 0.07), 0 12px 30px -12px rgba(20, 32, 28, 0.26);
  --shadow-l: 0 24px 60px -20px rgba(20, 32, 28, 0.35);
  --font-d: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #0d1412;
  --surface: #152019;
  --surface-2: #1a2721;
  --ink: #e9efec;
  --muted: #9aaba4;
  --line: #28372f;
  --topbar-bg: color-mix(in srgb, var(--bg) 88%, transparent);
  --band-bg: #101a16;
  --hero-wash: none;
  --footer-bg: var(--surface-2);
  --footer-ink: var(--ink);
  --footer-muted: var(--muted);
  --footer-link: #7fd6c3;
  --footer-line: var(--line);
  --brand: #2fa58f;
  --brand-ink: #04211b;
  --brand-soft: #14352e;
  --brand-deep: #7fd6c3;
  --accent: #f3b04b;
  --accent-soft: #3a2c10;
  --danger: #ef7d74;
  --danger-soft: #3b1b18;
  --ok: #58d19a;
  --ok-soft: #123324;
  --info: #7db4ee;
  --info-soft: #14283d;
  --gold: #f2c262;
  --gold-soft: #3a2c10;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 400 16px/1.55 var(--font); color: var(--ink); background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
#app { flex: 1; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-d); line-height: 1.12; margin: 0; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.ic { flex: none; vertical-align: -0.2em; }
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.75rem; }
.center { text-align: center; }
.right { text-align: right; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap-s { gap: 6px; }
.gap-l { gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-l { display: flex; flex-direction: column; gap: 28px; }
.grow { flex: 1; min-width: 0; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section { padding-block: clamp(36px, 6vw, 72px); }
/* Banda: franja de otro tono para separar bloques de la página; las tarjetas de adentro toman el tono del lienzo. */
.section.band { background: var(--band-bg); border-block: 1px solid var(--line); padding-block: clamp(36px, 6vw, 64px) !important; }
.band .step-card, .band .card { background: var(--bg); }
[data-theme='dark'] .band .step-card, [data-theme='dark'] .band .card { background: var(--surface); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow { font: 700 0.78rem/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); }
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--topbar-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); box-shadow: 0 6px 18px -14px rgba(20, 32, 28, 0.35); }
.topbar-in { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 1.15rem var(--font-d); color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand small { font: 600 0.7rem var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: 3px 8px; border-radius: 99px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a, .nav button.nav-link { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: 0.94rem; background: none; border: 0; cursor: pointer; font-family: inherit; position: relative; }
.nav a:hover, .nav button.nav-link:hover { background: var(--brand-soft); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.count { background: var(--accent); color: var(--accent-ink); font: 700 0.7rem/1 var(--font); border-radius: 99px; padding: 3px 6px; min-width: 18px; text-align: center; }
.icon-btn.burger { display: none; margin-left: auto; }
@media (max-width: 1120px) {
  .icon-btn.burger { display: inline-grid; }
  .nav { position: fixed; inset: 66px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px var(--gutter) 16px; display: none; box-shadow: var(--shadow); margin: 0; }
  .nav.open { display: flex; }
}

/* Menú «Ingresar» de la barra (solo sin sesión) y modal «Suscribirme» */
.dd { position: relative; margin-left: 6px; }
.dd-btn .ic:last-child { transition: transform 0.15s; }
.dd.open .dd-btn { background: var(--brand-soft); }
.dd.open .dd-btn .ic:last-child { transform: rotate(180deg); }
.dd-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-l); display: grid; gap: 2px; z-index: 60; }
.dd-menu[hidden] { display: none; }
.dd-menu a { padding: 10px 12px; }
.nav > .btn { margin-left: 6px; }
@media (max-width: 1120px) {
  .dd { margin-left: 0; }
  .dd-btn { width: 100%; justify-content: flex-start; }
  .dd-btn .ic:last-child { margin-left: auto; }
  .dd-menu { position: static; margin-top: 4px; box-shadow: none; background: var(--surface-2); }
  .nav > .btn { margin: 8px 0 0; }
}
.choose { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 8px; }
@media (max-width: 460px) { .choose { grid-template-columns: 1fr; } }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.choice:hover, .choice:focus-visible { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.choice b { font-size: 1.05rem; }
.choice-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; margin-bottom: 4px; }
.choice-ic.prov { background: #1f2f5c; }

/* ---------- Botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 600 0.94rem var(--font); cursor: pointer; transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--brand); text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 16px -8px var(--brand); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.ghost.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-deep); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { padding: 7px 12px; font-size: 0.85rem; border-radius: 10px; }
.btn.lg { padding: 14px 26px; font-size: 1.02rem; border-radius: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand-deep); }
.icon-btn.on { color: #d6336c; }
.link-btn { background: none; border: 0; color: var(--brand); font: 600 0.9rem var(--font); cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: 0.88rem; }
.field .hint { font-size: 0.8rem; color: var(--muted); }
.field .err { font-size: 0.8rem; color: var(--danger); font-weight: 600; }
.req::after { content: ' *'; color: var(--danger); }
.input, .select, .textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 400 0.97rem var(--font); transition: border-color 0.15s, box-shadow 0.15s; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
/* Las listas desplegables nativas no heredan el fondo: sin esto, en modo oscuro quedan blanco sobre blanco */
select option, select optgroup { background-color: var(--surface); color: var(--ink); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.form-grid .span2 { grid-column: 1 / -1; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.input-group .input { border-radius: 0 12px 12px 0; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.93rem; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
input[type='range'] { accent-color: var(--brand); width: 100%; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 500 0.88rem var(--font); cursor: pointer; transition: all 0.14s; }
button.chip:hover, label.chip:hover { border-color: var(--brand); }
.chip.on, .chip.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip.tiny { padding: 2px 9px; font-size: 0.74rem; cursor: default; background: var(--surface-2); }
.chip.tiny.on, .chip.tiny.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip input { display: none; }
.chip .x { opacity: 0.7; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font: 700 0.72rem/1.4 var(--font); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warn { background: var(--accent-soft); color: var(--gold); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.mute { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-s); }
.card.flat { box-shadow: none; }
.card h3 { margin-bottom: 4px; }
.avatar { --s: 48px; width: var(--s); height: var(--s); border-radius: calc(var(--s) * 0.28); object-fit: cover; flex: none; display: inline-grid; place-items: center; font: 800 calc(var(--s) * 0.38) var(--font-d); color: #fff; background: linear-gradient(135deg, hsl(var(--h), 55%, 38%), hsl(calc(var(--h) + 35), 62%, 28%)); }

.stars { display: inline-flex; align-items: center; gap: 4px; font-size: 0.9rem; }
.stars .ic { color: var(--accent); }
.price { font: 700 1rem var(--font-d); color: var(--brand-deep); white-space: nowrap; }
.price small { font: 500 0.75rem var(--font); color: var(--muted); }
.price.quote { color: var(--muted); font-weight: 600; font-size: 0.92rem; }

/* ---------- Tarjeta de proveedor ---------- */
.pcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-s); transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s; }
.pcard:hover { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
@media (hover: hover) and (pointer: fine) { .pcard:hover { transform: translateY(-2px); } } /* en pantallas táctiles el «hover» queda pegado tras tocar */
.pcard.is-premium { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 40%); }
.spons { position: absolute; top: -9px; left: 16px; background: var(--accent); color: var(--accent-ink); font: 800 0.66rem var(--font); letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; }
.pcard-head { display: flex; gap: 12px; align-items: flex-start; }
.pcard-title { flex: 1; min-width: 0; }
.pcard-title h3 a { color: var(--ink); }
.pcard-title .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 3px; }
.pcard-tag { color: var(--muted); font-size: 0.93rem; }
.why { display: flex; gap: 8px; align-items: flex-start; background: var(--brand-soft); color: var(--brand-deep); padding: 8px 11px; border-radius: 10px; font-size: 0.82rem; }
.why .ic { margin-top: 2px; }
.spec { display: flex; flex-wrap: wrap; gap: 6px; }
.spec span { font-size: 0.8rem; padding: 3px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.facts-mini { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; color: var(--muted); }
.facts-mini li { display: inline-flex; gap: 6px; align-items: center; }
.svc-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px dashed var(--line); }
.svc-mini li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 0.9rem; align-items: baseline; }
.promo { font-size: 0.83rem; color: var(--gold); background: var(--gold-soft); padding: 6px 10px; border-radius: 8px; }
.pcard-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.pcard-foot .btn.primary { margin-left: auto; }

/* ---------- Varios ---------- */
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-ic { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: var(--brand-soft); color: var(--brand); }
.divider { height: 1px; background: var(--line); margin-block: 8px; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--info); font-size: 0.9rem; align-items: flex-start; }
.notice.warn { background: var(--accent-soft); color: var(--gold); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }
.notice .ic { margin-top: 2px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 99px; transition: width 0.4s; }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi b { font: 800 1.9rem var(--font-d); letter-spacing: -0.02em; }
.kpi span { color: var(--muted); font-size: 0.85rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 11px 16px; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font: 600 0.94rem var(--font); cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; gap: 7px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .active { color: var(--brand-deep); border-bottom-color: var(--brand); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.t th, .t td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.t th { font-weight: 700; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; background: var(--surface-2); white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t td.best { background: var(--ok-soft); font-weight: 700; }
.t .rowhead { font-weight: 700; background: var(--surface-2); white-space: nowrap; }

/* ---------- Modal / toasts ---------- */
.overlay, .overlay-out { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(10, 18, 15, 0.55); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.18s var(--ease-out); overflow-y: auto; }
.overlay.in { opacity: 1; }
.overlay-out { pointer-events: none; transition-duration: 0.15s; } /* sale más rápido de lo que entra */
.overlay-out .modal { transform: scale(0.97) translateY(4px); transition: transform 0.15s var(--ease-out); }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 620px; box-shadow: var(--shadow-l); transform: scale(0.97) translateY(10px); transition: transform 0.22s var(--ease-out); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.overlay.in .modal { transform: none; }
.modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; } /* en una ventana alta, el cuerpo del formulario se desplaza y el pie queda a la vista */
.modal.sm { max-width: 440px; } .modal.lg { max-width: 860px; }
.modal-head { padding: 20px 24px 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-body { padding: 12px 24px 8px; overflow-y: auto; }
.modal-foot { padding: 16px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-l); font-weight: 500; font-size: 0.93rem; max-width: 340px; opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out); }
.toast.in { opacity: 1; transform: none; }
.toast.ok { background: var(--ok); color: #fff; } .toast.error { background: var(--danger); color: #fff; }

/* ---------- Mapa ---------- */
.map { width: 100%; height: 360px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--surface-2); z-index: 1; }
.map-fallback { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 20px; }
.rdn-pin span { display: grid; place-items: center; background: var(--pin); border: 3px solid #fff; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); }
.rdn-pin b { transform: rotate(45deg); color: #fff; font: 800 12px var(--font); }
.leaflet-popup-content { font-family: var(--font); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding-block: 36px 28px; background: var(--footer-bg); color: var(--footer-ink); }
.footer a { color: var(--footer-link); }
.footer a:hover { text-decoration: underline; }
.footer .muted { color: var(--footer-muted); }
.footer-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 0.9rem; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr; gap: 28px 36px; font-size: 0.9rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h3 { font: 700 0.78rem var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--footer-muted); margin: 0 0 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col li { display: flex; gap: 9px; align-items: flex-start; }
.footer-col li .ic { color: var(--footer-link); margin-top: 3px; flex: none; }
.footer-col p { margin: 0 0 8px; }
.footer-social { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.footer-legal { display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--footer-line); font-size: 0.82rem; color: var(--footer-muted); }

/* ---------- Movimiento ---------- */
/* Pantalla nueva: sale rápido (110 ms) y entra con un fundido corto. Solo opacity y transform. */
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
.page-in { animation: pageIn 0.26s var(--ease-out); }
.page-out { opacity: 0.12; transform: translateY(-3px); transition: opacity 0.11s ease-out, transform 0.11s ease-out; pointer-events: none; }

/* Entrada al llegar a la vista (motion.js). Sin JS no hay `.rv`, así que nada queda oculto. */
.rv { opacity: 0; transform: translateY(12px); }
.rv.rv-in { opacity: 1; transform: none; transition: opacity 0.45s var(--ease-out) var(--rv-d, 0ms), transform 0.45s var(--ease-out) var(--rv-d, 0ms); }

/* Menú «Ingresar»: se abre desde su botón (esquina de arriba a la derecha), no desde el centro */
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }
.dd-menu:not([hidden]) { transform-origin: top right; animation: popIn 0.16s var(--ease-out); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 1120px) { .nav.open { animation: slideDown 0.2s var(--ease-out); } }

/* Respuesta al toque: lo que se presiona se hunde un poco */
.icon-btn:active, .chip:active, .choice:active, .cat-tile:active, .carousel-btn:active { transform: scale(0.95); }
.icon-btn, .carousel-btn { transition: transform 0.12s var(--ease-out), background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s; }

/* Favorito: late al marcarlo */
@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
.icon-btn.pop svg { animation: heartPop 0.38s var(--ease-out); }

/* Barra de selección: sube desde abajo cuando aparece (no en cada refresco) */
@keyframes barUp { from { opacity: 0; transform: translateY(16px); } }
.cmp-bar.enter { animation: barUp 0.28s var(--ease-out); }

/* Preguntas frecuentes: la respuesta baja suave al abrir */
@keyframes faqOpen { from { opacity: 0; transform: translateY(-4px); } }
details[open] > summary ~ * { animation: faqOpen 0.22s var(--ease-out); }

/* Carrusel */
.carousel { position: relative; min-width: 0; max-width: 100%; } /* sin esto la pista ensancha la columna de la grilla y la página se desplaza de costado */
.carousel-track { display: flex; gap: 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; scrollbar-width: none; padding: 6px 4px 16px; margin: -6px -4px -4px; cursor: grab; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 14px; }
.carousel-track.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.carousel-slide { flex: 0 0 calc((100% - 18px) / 2); scroll-snap-align: start; min-width: 0; display: flex; flex-direction: column; }
.carousel-slide > * { flex: 1 1 auto; }
.carousel[data-per='1'] .carousel-slide { flex-basis: 100%; }
.carousel[data-per='3'] .carousel-slide { flex-basis: calc((100% - 36px) / 3); }
@media (max-width: 900px) { .carousel[data-per='3'] .carousel-slide { flex-basis: calc((100% - 18px) / 2); } }
@media (max-width: 640px) { .carousel .carousel-slide, .carousel[data-per] .carousel-slide { flex-basis: 86%; } } /* la siguiente asoma: se nota que hay más */
.carousel-ui { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.carousel.is-static .carousel-ui { display: none; }
.carousel-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-s); }
@media (hover: hover) and (pointer: fine) { .carousel-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-deep); } }
.carousel-btn:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.carousel-dots { display: flex; align-items: center; gap: 8px; }
.carousel-dot { position: relative; width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: width 0.28s var(--ease-out), background 0.2s; }
.carousel-dot::after { content: ''; position: absolute; inset: -9px -4px; } /* zona de toque más grande que el punto */
.carousel-dot.on { width: 24px; background: var(--brand); }
.carousel .review { height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gal-img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); cursor: zoom-in; }

@media print {
  .rv { opacity: 1 !important; transform: none !important; }
  .no-print, .topbar, .footer, #toasts { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Selector de ubicación del cliente (ciudad + punto en el mapa) */
.locpick { display: flex; flex-direction: column; gap: 10px; }
.locpick .map { height: 320px; }
.locpick .lp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.locpick .lp-actions .btn { min-height: 44px; }
.locpick .lp-msg { min-height: 1.3em; margin: 0; }
.locpick .lp-msg.warn { color: var(--gold); font-weight: 600; }
.locpick .lp-msg.err { color: var(--danger); font-weight: 600; }

/* Pantallas de cuenta (crear, confirmar, ingresar, recuperar) */
.auth-card { max-width: 520px; margin-inline: auto; padding: 24px; }
.auth-title { font-size: clamp(1.5rem, 3.2vw, 2rem); margin: 0 0 6px; }

/* Documentos legales y casilleros de aceptación */
.legal-doc { max-width: 760px; margin-inline: auto; padding: 24px; }
.legal-doc h2 { font-size: 1.1rem; margin: 22px 0 6px; }
.legal-doc p { line-height: 1.6; margin: 0 0 10px; overflow-wrap: anywhere; }
.legal-doc .notice { margin: 12px 0 4px; }
.legal-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.legal-list a { display: grid; gap: 2px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); text-decoration: none; }
.legal-list a:hover { border-color: var(--brand); }
.consent-check { align-items: flex-start; }
.modal-body p.err, .consent .err { color: var(--danger); }
.consent-check input { flex: none; margin-top: 2px; }
.consent-text a { font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) { .legal-doc { padding: 18px; } }

/* «Mis datos»: descargar, retirar la empresa, eliminar la cuenta */
.my-data { padding: 20px; margin-top: 22px; }
.md-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); }
.md-row:first-of-type { margin-top: 8px; }
.md-row > div { flex: 1 1 260px; min-width: 0; }
.md-row p { margin: 2px 0 0; }
.md-row .btn { min-height: 44px; }
.del-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 0.92rem; line-height: 1.5; }
.pub-list { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 3px; font-size: 0.9rem; }

/* Franja del estado del sitio (aviso global y mantenimiento), debajo de la barra */
.site-notice { background: var(--info-soft); color: var(--info); border-bottom: 1px solid color-mix(in srgb, var(--info) 25%, transparent); font-size: 0.92rem; }
.site-notice.warn { background: var(--gold-soft); color: var(--gold); border-bottom-color: color-mix(in srgb, var(--gold) 30%, transparent); }
.site-notice .container { display: flex; align-items: center; gap: 10px; padding-block: 9px; }
.site-notice .container > .ic { flex: none; }
.site-notice span { flex: 1; min-width: 0; color: var(--ink); }
.site-notice-x { flex: none; margin-left: auto; }
