/* Colpesados — base del prototipo: reset, tipografía (Inter), íconos, header, botones, campos, sellos, tarjeta.
   v0.2 (13-oct-2026): logo horizontal, íconos Tabler + pictogramas propios, tarjeta con datos con ícono,
   amarillo solo en acción. Fuente: design.md v0.2, home-premium.md Parte A v2.0. */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--c-blanco); color: var(--c-texto); font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, video { max-width: 100%; display: block; }
a { color: var(--c-azul); }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: var(--tracking-tight); text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--c-amarillo); outline-offset: 2px; }

/* ---------- Íconos (sprite en línea: #ti-* Tabler, #pg-* pictogramas propios) ---------- */
.i { width: 20px; height: 20px; flex: 0 0 auto; }
.i--xs { width: 16px; height: 16px; }
.i--sm { width: 18px; height: 18px; }
.i--lg { width: 28px; height: 28px; }
.i--xl { width: 40px; height: 40px; }
.pg { width: 64px; height: 64px; flex: 0 0 auto; }

.wrap { max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--pt0 { padding-top: 0; }
.section--gris { background: var(--c-superficie); }
.section--azul { background: var(--c-azul-corp); color: #fff; }
.kicker { font-size: 13.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c-azul); margin: 0 0 14px; }
.lead { font-size: 19px; line-height: 1.5; color: var(--c-texto-2); max-width: 56ch; }

/* ---------- Header ---------- */
/* v0.3 (14-oct-2026, decisión de Freddy): arriba, header completo de 76 px en el flujo; al pasar el hero la barra
   se suelta y ENTRA DESDE ARRIBA en versión compacta de 60 px (deslizamiento de 360 ms), y queda visible mientras se
   baja. Al volver arriba sale deslizándose y el header completo queda en su sitio. `.hdr` conserva el alto: la página no
   salta. Estados (js/home.js): .is-suelto (fija, compacta, fuera de vista) → .is-visible (entra). En Bricks: header
   template + interacción de scroll bidireccional con umbral (o el JS del child theme) y transiciones en clases globales. */
.hdr { position: relative; z-index: 50; min-height: 77px; }
.hdr__bar { background: var(--c-blanco); border-bottom: 1px solid var(--c-linea); }
.hdr__in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.hdr__logo { flex: 0 0 auto; }
.hdr__logo img { height: 40px; width: auto; }
.hdr.is-suelto .hdr__bar { position: fixed; top: 0; left: 0; right: 0; transform: translateY(-100%); border-bottom-color: transparent; box-shadow: var(--shadow-card); background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
.hdr.is-suelto.is-visible .hdr__bar { transform: none; transition: transform 360ms var(--ease); }
.hdr.is-suelto.is-saliendo .hdr__bar { transform: translateY(-100%); transition: transform 240ms cubic-bezier(.4, 0, 1, 1); }
.hdr.is-suelto .hdr__in { min-height: 60px; }
.hdr.is-suelto .hdr__logo img { height: 32px; }
.hdr.is-suelto .hdr__pub { padding-top: 9px; padding-bottom: 9px; }
.hdr.is-suelto .hdr__ico { width: 38px; height: 38px; }
.nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--c-texto); font-size: 15px; font-weight: 600; white-space: nowrap; }
.nav a.act, .nav a:hover { color: var(--c-azul); }
.hdr__acc { display: flex; align-items: center; gap: 10px; }
.hdr__ico { width: 42px; height: 42px; border-radius: var(--r-btn); border: 1px solid var(--c-linea); display: grid; place-items: center; color: var(--c-azul); background: #fff; cursor: pointer; transition: border-color var(--t-hover), background var(--t-hover); }
.hdr__ico:hover { border-color: var(--c-azul); background: var(--c-azul-10); }
.hdr__burger { display: none; }
.hdr__pub { padding: 12px 18px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-btn); padding: 13px 20px; font-size: 16px; font-weight: 700; text-decoration: none; line-height: 1; border: 1.5px solid transparent; cursor: pointer; font-family: inherit; transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease), background var(--t-hover), border-color var(--t-hover); white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn--cta { background: var(--c-amarillo); color: var(--c-texto); }
.btn--cta:hover { background: #F5AE00; box-shadow: 0 6px 16px rgba(254, 183, 1, .28); }
.btn--p { background: var(--c-azul); color: #fff; }
.btn--p:hover { background: #0B3AA8; }
.btn--s { border-color: var(--c-azul); color: var(--c-azul); background: #fff; }
.btn--s:hover { background: var(--c-azul-10); }
.btn--inv { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.btn--inv:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn--wa { background: var(--c-whatsapp-oscuro); color: #fff; }
.btn--wa:hover { background: #095A51; }
.btn--lg { padding: 16px 24px; font-size: 17px; }
.btn--sm { padding: 10px 14px; font-size: 14.5px; }
.btn--block { width: 100%; }
.more { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--c-azul); text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.more .i { transition: transform var(--t-hover) var(--ease); }
.more:hover .i { transform: translateX(3px); }

/* ---------- Campos (buscador, simulador) ---------- */
.busca { background: #fff; border: 1px solid var(--c-linea); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 14px 16px 16px; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.tab { padding: 9px 18px; border-radius: var(--r-btn); font-size: 15px; font-weight: 700; color: var(--c-texto-2); background: var(--c-superficie); border: 0; font-family: inherit; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--c-azul); color: #fff; }
.campos { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 8px; }
.campo { display: flex; align-items: center; gap: 10px; border: 1px solid var(--c-linea); border-radius: var(--r-field); padding: 10px 12px; font-size: 15.5px; color: var(--c-texto-2); background: #fff; min-width: 0; cursor: pointer; transition: border-color var(--t-hover); }
.campo:hover { border-color: var(--c-azul); }
.campo > .i { color: var(--c-azul); }
.campo__tx { display: block; min-width: 0; flex: 1; }
.campo b { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-azul); margin-bottom: 2px; font-weight: 700; }
.campo__tx > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-texto); }
.campo .ch { color: var(--c-texto-2); }

/* ---------- Sellos, etiquetas y estados ---------- */
.sello { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: var(--r-tag); }
.sello--dest { background: var(--c-amarillo); color: var(--c-texto); }
.tag { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--c-ok); background: #E6F3EC; padding: 3px 8px; border-radius: var(--r-tag); white-space: nowrap; }
.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--c-texto-2); background: #fff; border: 1px solid var(--c-linea); padding: 5px 10px; border-radius: var(--r-chip); white-space: nowrap; }
.estado--ok { color: var(--c-ok); background: #E6F3EC; border-color: #CFE7DA; }
.estado--wa { color: #fff; background: var(--c-whatsapp-oscuro); border-color: var(--c-whatsapp-oscuro); }
.ok { color: var(--c-ok); }

/* ---------- Tarjeta de anuncio ---------- */
.card { border: 1px solid var(--c-linea); border-radius: var(--r-card); overflow: hidden; background: #fff; box-shadow: var(--shadow-card); transition: transform var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease); display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
/* Registro común: recortes de catálogo normalizados a 4:3 sobre la superficie gris (el blanco del JPG se funde con multiply) */
.card__ph { aspect-ratio: 4/3; background: var(--c-superficie); position: relative; overflow: hidden; }
.card__ph img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: transform 600ms var(--ease); }
.card:hover .card__ph img { transform: scale(1.04); }
.card__ph .sello { position: absolute; left: 12px; top: 12px; }
.card__fav { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--c-azul); border: 1px solid var(--c-linea); cursor: pointer; transition: color var(--t-hover), border-color var(--t-hover); }
.card__fav:hover { border-color: var(--c-azul); background: #EEF2FA; }
.card__cnt { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; background: var(--c-texto); color: #fff; font-size: 12.5px; font-weight: 600; padding: 4px 8px; border-radius: var(--r-tag); font-variant-numeric: tabular-nums; }
.card__b { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card__cat { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-azul); margin-bottom: 4px; }
.card__t { font-size: 18px; line-height: 1.25; margin: 0 0 10px; font-weight: 700; letter-spacing: -0.01em; min-height: 2.5em; }
.card__d { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 14px; color: var(--c-texto-2); margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.card__d li, .card__c, .card__q, .card__v { display: inline-flex; align-items: center; gap: 5px; }
.card__d .i, .card__c .i, .card__q .i { color: var(--c-azul); }
.card__c { font-size: 14px; color: var(--c-texto-2); margin: 0 0 12px; }
.card__pr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 30px; }
.card__p { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.card__p--conv { font-size: 19px; color: var(--c-azul); }
.card__q { font-size: 14px; color: var(--c-texto-2); margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.card__q b { color: var(--c-texto); }
.card__v { font-size: 13.5px; font-weight: 700; color: var(--c-ok); border-top: 1px solid var(--c-linea); padding-top: 12px; margin: auto 0 12px; }

/* ---------- Fotografía con tinte por construcción ---------- */
.foto { position: relative; overflow: hidden; background: var(--c-azul-corp); }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto::after { content: ""; position: absolute; inset: 0; background: var(--c-tinte-foto); mix-blend-mode: multiply; pointer-events: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1320px) { .hdr__logo img { height: 36px; } .nav { gap: 16px; } .hdr__in { gap: 20px; } }
@media (max-width: 1180px) { .nav a:nth-child(n+5) { display: none; } .hdr__burger { display: grid; } }
@media (max-width: 1080px) { .nav a:nth-child(n+4) { display: none; } }
@media (max-width: 900px) {
  .nav { display: none; }
  .campos { grid-template-columns: 1fr 1fr; }
  .campos .btn { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .hdr { min-height: 65px; }
  .hdr__in { min-height: 64px; gap: 12px; justify-content: space-between; }
  .hdr__logo img { height: 30px; }
  .hdr.is-suelto .hdr__in { min-height: 56px; }
  .hdr.is-suelto .hdr__logo img { height: 26px; }
  .hdr__pub { display: none; } /* en celular «Publicar» vive en la barra inferior */
  .campos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
