:root {
  color-scheme: light;

  /* Superficies */
  --fondo: #FFFFFF;
  --superficie: #FFFFFF;
  --fondo-suave: #F9FAFB;

  /* Lineas y bordes */
  --linea: #E5E7EB;
  --linea-suave: #F3F4F6;
  --linea-fuerte: #D1D5DB;

  /* Texto */
  --texto: #1F2937;
  --texto-2: #4B5563;
  --texto-3: #5B6472;
  --texto-4: #6B7280;

  /* Marca: tinta para texto, fuerte para superficies pintadas */
  --azul: #1E3A5F;
  --azul-fuerte: #1E3A5F;
  --azul-fuerte-hover: #162D4A;
  --ambar: #D97706;
  --ambar-accion: #B45309;
  --ambar-accion-hover: #92400E;

  /* Aviso */
  --aviso-fondo: #FEF3C7;
  --aviso-texto: #92400E;

  --radio: 10px;
  --fuente: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Tema oscuro: solo en pantalla, la impresion usa siempre los tokens claros. */
@media screen and (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --fondo: #121212;
    --superficie: #1A1A1A;
    --fondo-suave: #1F1F1F;

    --linea: #2E2E2E;
    --linea-suave: #262626;
    --linea-fuerte: #3A3A3A;

    --texto: #EDEDED;
    --texto-2: #B8B8B8;
    --texto-3: #949494;
    --texto-4: #8A8A8A;

    --azul: #9CC2EA;
    --azul-fuerte: #3A6FA5;
    --azul-fuerte-hover: #4279AD;

    --ambar: #D97706;
    --ambar-accion: #B45309;
    --ambar-accion-hover: #92400E;

    --aviso-fondo: #2A2114;
    --aviso-texto: #F5C97A;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.45;
  color: var(--texto);
  background: var(--fondo);
}

img { max-width: 100%; height: auto; }

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 14px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--azul-fuerte);
  color: #fff;
  padding: 10px 14px;
  z-index: 100;
}
.skip:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* cabecera */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--superficie);
  border-bottom: 1px solid var(--linea);
}
.top-inner {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.logo {
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -.02em;
  color: var(--azul);
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--ambar); }
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .75rem;
}
.nav a {
  color: var(--texto-2);
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--azul); }
.nav-cta {
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--azul) !important;
  font-weight: 600;
}

/* portada */
.intro { padding: 7px 0 4px; }
.intro h1 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--texto);
}
.intro p {
  margin: 2px 0 0;
  font-size: .75rem;
  color: var(--texto-3);
}

.chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 0;
  margin: 0;
  position: sticky;
  top: 46px;
  z-index: 15;
  background: var(--superficie);
  border-bottom: 1px solid var(--linea-suave);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--superficie);
  color: var(--texto);
  font-size: .78125rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.chip.is-active {
  background: var(--azul-fuerte);
  border-color: var(--azul-fuerte);
  color: #fff;
}
.chips-inline { position: static; border: 0; padding: 0; }

/* listado */
.list { border-top: 1px solid var(--linea-suave); }

.row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 80px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--linea-suave);
  color: inherit;
  text-decoration: none;
}
.row:hover, .row:focus-visible { background: var(--fondo-suave); }
.row-top, .row-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.row-top { margin-bottom: 2px; }
.price {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--azul);
  white-space: nowrap;
}
.specs {
  font-size: .75rem;
  color: var(--texto-2);
  white-space: nowrap;
}
.addr {
  font-size: .875rem;
  color: var(--texto);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agency {
  font-size: .6875rem;
  color: var(--texto-4);
  white-space: nowrap;
}

.more {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  margin: 14px 0 6px;
  border-radius: var(--radio);
  background: var(--azul-fuerte);
  color: #fff;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
}
.more:hover { background: var(--azul-fuerte-hover); }

/* bloque comercial */
.b2b {
  margin: 18px 0 8px;
  padding: 14px;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: var(--fondo-suave);
}
.b2b h2 {
  margin: 0 0 4px;
  font-size: .9375rem;
  line-height: 1.3;
}
.b2b p {
  margin: 0 0 8px;
  font-size: .8125rem;
  color: var(--texto-2);
}
.b2b a {
  font-size: .875rem;
  font-weight: 600;
  color: var(--azul);
}

/* vacío */
.empty {
  padding: 26px 6px 20px;
  text-align: center;
}
.empty h2 { margin: 0 0 6px; font-size: 1rem; }
.empty p { margin: 0 0 8px; font-size: .875rem; color: var(--texto-2); }
.empty a { color: var(--azul); font-weight: 600; }
.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--azul);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* herramientas del listado */
.toolbar { padding: 6px 0 8px; }
.toolbar input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 16px;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  background: var(--superficie);
  color: var(--texto);
}
.toolbar input[type="search"]::placeholder { color: var(--texto-3); }
.selects {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.selects label {
  flex: 1 1 0;
  font-size: .6875rem;
  color: var(--texto-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.selects select {
  height: 34px;
  padding: 0 6px;
  font-size: .75rem;
  border: 1px solid var(--linea);
  border-radius: 8px;
  background: var(--superficie);
  color: var(--texto);
}

.note { font-size: .75rem; color: var(--texto-3); }

/* ficha */
.crumb {
  padding: 8px 0;
  font-size: .75rem;
  color: var(--texto-3);
}
.crumb a { color: var(--texto-2); text-decoration: none; }
.ficha h1 {
  margin: 4px 0 8px;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.price-big {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--azul);
}
.price-big small { font-size: .875rem; font-weight: 500; color: var(--texto-2); }
.price-big span {
  margin-left: 8px;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--texto-2);
}
.compare {
  margin: 4px 0 14px;
  font-size: .8125rem;
  color: var(--texto-2);
}
.aviso {
  margin: 6px 0 10px;
  padding: 10px 12px;
  border-radius: var(--radio);
  background: var(--aviso-fondo);
  color: var(--aviso-texto);
  font-size: .8125rem;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
}
.spec {
  padding: 9px 11px;
  border-radius: var(--radio);
  background: var(--fondo-suave);
}
.spec dt {
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--texto-3);
}
.spec dd {
  margin: 2px 0 0;
  font-size: .9375rem;
  font-weight: 600;
}
.source {
  padding: 14px;
  border: 1px solid var(--linea);
  border-radius: 12px;
  margin: 12px 0;
}
.agency-name { margin: 0 0 2px; font-weight: 700; }
.source-name { margin: 0 0 10px; font-size: .8125rem; color: var(--texto-3); }
.btn-source {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border-radius: var(--radio);
  background: var(--ambar-accion);
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: none;
}
.btn-source:hover { background: var(--ambar-accion-hover); }
.disclaimer {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: var(--radio);
  background: var(--fondo-suave);
  font-size: .75rem;
  color: var(--texto-3);
}
.similar h2 {
  margin: 20px 0 6px;
  font-size: 1rem;
}
.back { margin: 18px 0 6px; font-size: .875rem; }
.back a { color: var(--azul); text-decoration: none; }

/* comerciales */
.comercial { padding: 16px 0 8px; }
.comercial h1 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.comercial p { font-size: .9375rem; color: var(--texto-2); }
.comercial form {
  display: grid;
  gap: 10px;
  margin: 18px 0 10px;
}
.comercial label { font-size: .8125rem; font-weight: 600; }
.comercial input,
.comercial textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--linea-fuerte);
  border-radius: var(--radio);
  background: var(--superficie);
  color: var(--texto);
}
.comercial input::placeholder,
.comercial textarea::placeholder { color: var(--texto-3); }
.comercial button {
  height: 46px;
  border: 0;
  border-radius: var(--radio);
  background: var(--ambar-accion);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.comercial button:hover { background: var(--ambar-accion-hover); }

/* pie */
footer {
  margin-top: 18px;
  padding: 16px 0 28px;
  border-top: 1px solid var(--linea);
  font-size: .75rem;
  color: var(--texto-3);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.footer-links a { color: var(--texto-2); text-decoration: none; }

@media (min-width: 768px) {
  .intro { padding: 14px 0 8px; }
  .intro h1 { font-size: 1.5rem; }
  .list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
  }
  .ficha .list { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(4, 1fr); }
  .comercial { max-width: 620px; }
  .nav { font-size: .8125rem; gap: 14px; }
}
