/* ==========================================================================
   RH Automotores — sistema de diseño compartido por todas las páginas públicas
   ========================================================================== */

@font-face { font-family:"Barlow"; font-style:normal; font-weight:400; font-display:swap; src:url(/assets/fonts/barlow-400.woff2) format("woff2"); }
@font-face { font-family:"Barlow"; font-style:normal; font-weight:500; font-display:swap; src:url(/assets/fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family:"Barlow"; font-style:normal; font-weight:600; font-display:swap; src:url(/assets/fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family:"Barlow"; font-style:normal; font-weight:700; font-display:swap; src:url(/assets/fonts/barlow-700.woff2) format("woff2"); }
@font-face { font-family:"Barlow Condensed"; font-style:normal; font-weight:600; font-display:swap; src:url(/assets/fonts/barlow-condensed-600.woff2) format("woff2"); }
@font-face { font-family:"Barlow Condensed"; font-style:normal; font-weight:700; font-display:swap; src:url(/assets/fonts/barlow-condensed-700.woff2) format("woff2"); }

:root {
  --navy:     #083150;   /* color de marca */
  --navy-900: #051f33;
  --navy-800: #06263f;
  --navy-100: #e6edf3;
  --red:      #c9102e;   /* acento de marca: acciones principales */
  --red-700:  #a50d26;
  --wa:       #0e7a3e;   /* verde WhatsApp con contraste AA para texto blanco */
  --wa-700:   #0b6533;
  --ink:      #0d1620;
  --text:     #1f2933;
  --muted:    #5b6470;
  --line:     #e2e6eb;
  --bg:       #f3f5f7;
  --surface:  #ffffff;
  --ok:       #0e7a3e;
  --ok-bg:    #e5f4ea;
  --warn-bg:  #fff4d6;
  --warn:     #7a5200;

  /* alias de nombres anteriores (los usan historia y 0km) */
  --primary: var(--navy); --accent: var(--red); --accent-light: #e5304a; --text-light: var(--muted);
  --card-bg: #fff; --border: var(--line); --radius: var(--r-sm);

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(13,22,32,.06), 0 1px 1px rgba(13,22,32,.04);
  --shadow-2: 0 2px 4px rgba(13,22,32,.06), 0 12px 28px rgba(13,22,32,.10);
  --wrap: 1240px;
  --gutter: 20px;
  --header-h: 68px;
}

*,*::before,*::after { box-sizing:border-box; }
* { margin:0; padding:0; }
html { -webkit-text-size-adjust:100%; scroll-padding-top:calc(var(--header-h) + 12px); }
body { font-family:var(--font); font-size:16px; line-height:1.5; color:var(--text); background:var(--bg); -webkit-font-smoothing:antialiased; }
img, svg { display:block; max-width:100%; }
a { color:inherit; }
button, input, select, textarea { font:inherit; color:inherit; }
button { cursor:pointer; }
[hidden] { display:none !important; }
fieldset { border:0; min-width:0; }
legend { padding:0; }
:focus-visible { outline:3px solid #3b82f6; outline-offset:2px; }

.wrap { max-width:var(--wrap); margin:0 auto; padding:0 var(--gutter); }
.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; }
.skip-link { position:absolute; left:12px; top:-60px; z-index:1000; background:#fff; color:var(--ink); padding:10px 16px; border-radius:var(--r-sm); font-weight:700; text-decoration:none; }
.skip-link:focus { top:12px; }

.icon { width:1.15em; height:1.15em; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.icon-fill { width:1.15em; height:1.15em; flex-shrink:0; fill:currentColor; }

/* ── Tipografía ─────────────────────────────────────────────────────────── */
.eyebrow { font-size:.75rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--red); }
.h-display { font-family:var(--font-display); font-weight:700; line-height:1.02; letter-spacing:-.005em; color:var(--ink); }
.h2 { font-family:var(--font-display); font-weight:700; font-size:clamp(1.75rem, 3.4vw, 2.4rem); line-height:1.05; color:var(--ink); }
.lead { font-size:1.05rem; color:var(--muted); max-width:60ch; }

/* ── Botones ────────────────────────────────────────────────────────────── */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; padding:0 20px; border-radius:var(--r-sm); border:1.5px solid transparent; font-weight:700; font-size:.95rem; line-height:1.1; text-decoration:none; white-space:nowrap; transition:background-color .15s, border-color .15s, color .15s; }
.btn-lg { min-height:52px; padding:0 26px; font-size:1rem; }
.btn-sm { min-height:38px; padding:0 14px; font-size:.86rem; }
.btn-block { width:100%; }
.btn-primary { background:var(--red); color:#fff; }
.btn-primary:hover { background:var(--red-700); }
.btn-wa { background:var(--wa); color:#fff; }
.btn-wa:hover { background:var(--wa-700); }
.btn-navy { background:var(--navy); color:#fff; }
.btn-navy:hover { background:var(--navy-900); }
.btn-outline { background:#fff; color:var(--ink); border-color:#cdd3da; }
.btn-outline:hover { border-color:var(--ink); }
.btn-light { background:rgba(255,255,255,.1); color:#fff; border-color:rgba(255,255,255,.35); }
.btn-light:hover { background:rgba(255,255,255,.18); }
.btn[disabled] { opacity:.6; cursor:default; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header { position:sticky; top:0; z-index:200; background:var(--navy); color:#fff; box-shadow:0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.18); }
.site-header .wrap { display:flex; align-items:center; gap:24px; height:var(--header-h); }
.brand { display:flex; align-items:center; text-decoration:none; flex-shrink:0; }
.brand img { height:40px; width:auto; }
.main-nav { display:flex; gap:4px; margin-left:auto; }
.main-nav a { color:rgba(255,255,255,.82); text-decoration:none; font-weight:600; font-size:.92rem; padding:8px 12px; border-radius:var(--r-sm); }
.main-nav a:hover, .main-nav a[aria-current="page"] { color:#fff; background:rgba(255,255,255,.08); }
.header-actions { display:flex; align-items:center; gap:10px; }
.header-phone { display:inline-flex; align-items:center; gap:6px; color:#fff; text-decoration:none; font-weight:600; font-size:.92rem; }
.menu-btn { display:none; background:none; border:0; color:#fff; width:44px; height:44px; align-items:center; justify-content:center; border-radius:var(--r-sm); }
.menu-btn .icon { width:26px; height:26px; }

/* Menú móvil (panel lateral) */
.drawer { position:fixed; inset:0; z-index:400; visibility:hidden; }
.drawer.open { visibility:visible; }
.drawer-backdrop { position:absolute; inset:0; background:rgba(5,15,25,.55); opacity:0; transition:opacity .2s; }
.drawer.open .drawer-backdrop { opacity:1; }
.drawer-panel { position:absolute; top:0; right:0; bottom:0; width:min(86vw, 360px); background:#fff; display:flex; flex-direction:column; transform:translateX(100%); transition:transform .22s ease; overflow-y:auto; }
.drawer.open .drawer-panel { transform:none; }
.drawer-head { display:flex; align-items:center; justify-content:space-between; padding:14px 16px 14px 20px; background:var(--navy); }
.drawer-head img { height:34px; width:auto; }
.drawer-close { background:none; border:0; color:#fff; width:44px; height:44px; display:flex; align-items:center; justify-content:center; }
.drawer-nav { display:flex; flex-direction:column; padding:8px 0; }
.drawer-nav a { display:flex; align-items:center; justify-content:space-between; padding:15px 22px; text-decoration:none; font-weight:600; font-size:1.05rem; color:var(--ink); border-bottom:1px solid var(--line); }
.drawer-nav a::after { content:"›"; color:var(--muted); font-size:1.3rem; line-height:1; }
.drawer-contact { padding:20px 22px 28px; display:flex; flex-direction:column; gap:10px; margin-top:auto; background:var(--bg); }
.drawer-contact p { font-size:.88rem; color:var(--muted); }

/* ── Secciones ──────────────────────────────────────────────────────────── */
.section { padding:64px 0; }
.section-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:28px; flex-wrap:wrap; }
.section-head .eyebrow { margin-bottom:6px; }
.link-arrow { display:inline-flex; align-items:center; gap:6px; font-weight:700; color:var(--navy); text-decoration:none; }
.link-arrow:hover { text-decoration:underline; }

/* ── Badges y precios ───────────────────────────────────────────────────── */
.badge { display:inline-flex; align-items:center; gap:5px; padding:4px 9px; border-radius:4px; font-size:.72rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; line-height:1.2; }
.badge-ok { background:var(--ok-bg); color:var(--ok); }
.badge-sold { background:var(--ink); color:#fff; }
.badge-new { background:var(--red); color:#fff; }
.badge-dark { background:rgba(10,18,26,.78); color:#fff; }
.badge-now { background:var(--warn-bg); color:var(--warn); }
.price { font-family:var(--font-display); font-weight:700; color:var(--ink); line-height:1; letter-spacing:-.01em; }
.price small { font-family:var(--font); font-size:.5em; font-weight:700; color:var(--muted); letter-spacing:.04em; margin-right:3px; }
.price-ask { font-family:var(--font); font-weight:700; color:var(--navy); }

/* ── Tarjeta de vehículo ────────────────────────────────────────────────── */
.vgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:22px; }
.vcard { position:relative; display:flex; flex-direction:column; background:var(--surface); border-radius:var(--r); overflow:hidden; box-shadow:var(--shadow-1); border:1px solid var(--line); transition:box-shadow .2s, transform .2s; }
@media (hover:hover) { .vcard:hover { box-shadow:var(--shadow-2); transform:translateY(-2px); } .vcard:hover .vcard-img img { transform:scale(calc(var(--zoom,1) * 1.03)); } }
.vcard-img { position:relative; aspect-ratio:3/2; background:#dfe3e8; overflow:hidden; }
.vcard-img img { width:100%; height:100%; object-fit:cover; transform:scale(var(--zoom,1)); transform-origin:var(--ox,50%) 50%; transition:transform .35s ease; }
.vcard-ph { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#9aa5b1; }
.vcard-ph .icon { width:56px; height:56px; stroke-width:1.4; }
.vcard-tags { position:absolute; top:10px; left:10px; display:flex; flex-wrap:wrap; gap:6px; }
.vcard-count { position:absolute; right:10px; bottom:10px; display:inline-flex; align-items:center; gap:5px; }
.vcard.is-sold .vcard-img img { filter:grayscale(.85) brightness(.8); }
.vcard-body { display:flex; flex-direction:column; flex:1; padding:16px 18px 18px; }
.vcard-brand { font-size:.75rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.vcard-title { font-family:var(--font-display); font-weight:700; font-size:1.45rem; line-height:1.1; color:var(--ink); margin-top:2px; }
.vcard-title a { text-decoration:none; }
.vcard-title a::after { content:""; position:absolute; inset:0; z-index:1; } /* toda la tarjeta es clickeable */
.vcard-version { font-size:.82rem; color:var(--muted); margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vcard-specs { display:flex; flex-wrap:wrap; gap:4px 14px; margin:14px 0 16px; font-size:.88rem; font-weight:600; color:var(--text); }
.vcard-specs span { display:inline-flex; align-items:center; gap:5px; }
.vcard-specs .icon { color:var(--muted); width:1em; height:1em; }
.vcard-foot { margin-top:auto; display:flex; align-items:flex-end; justify-content:space-between; gap:12px; padding-top:14px; border-top:1px solid var(--line); }
.vcard-foot .price { font-size:1.7rem; }
.vcard-foot .price-ask { font-size:1rem; }
.vcard-wa { position:relative; z-index:2; }
.vcard-cmp { position:absolute; top:8px; right:8px; z-index:3; display:inline-flex; align-items:center; gap:6px; background:rgba(255,255,255,.94); border:0; border-radius:20px; padding:6px 10px; font-size:.76rem; font-weight:700; color:var(--ink); box-shadow:0 1px 3px rgba(0,0,0,.2); }
.vcard-cmp input { width:15px; height:15px; accent-color:var(--navy); }

/* Esqueleto de carga */
.skel { background:linear-gradient(90deg,#e4e8ec 25%,#eef1f4 50%,#e4e8ec 75%); background-size:200% 100%; animation:skel 1.3s ease-in-out infinite; border-radius:4px; }
@keyframes skel { from { background-position:200% 0; } to { background-position:-200% 0; } }

/* ── Formularios ────────────────────────────────────────────────────────── */
.field { display:flex; flex-direction:column; gap:6px; min-width:0; }
.field > span, .field > label { font-size:.78rem; font-weight:700; color:var(--text); }
.input, .select, .textarea { width:100%; min-height:48px; border:1.5px solid #cdd3da; border-radius:var(--r-sm); background:#fff; padding:10px 12px; font-size:1rem; color:var(--ink); transition:border-color .15s, box-shadow .15s; }
.textarea { min-height:96px; resize:vertical; }
.select { appearance:none; padding-right:36px; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6470' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; background-size:18px; }
.input:focus, .select:focus, .textarea:focus { outline:none; border-color:var(--navy); box-shadow:0 0 0 3px rgba(8,49,80,.15); }
.input[aria-invalid="true"] { border-color:var(--red); }
.field-error { font-size:.8rem; color:var(--red); font-weight:600; }
.form-note { font-size:.82rem; color:var(--muted); }

/* ── Bloque de ubicación / contacto ─────────────────────────────────────── */
.contact-list { list-style:none; display:flex; flex-direction:column; gap:18px; }
.contact-list li { display:flex; gap:14px; align-items:flex-start; }
.contact-list .ci { width:40px; height:40px; border-radius:50%; background:var(--navy-100); color:var(--navy); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.contact-list strong { display:block; font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.contact-list a { text-decoration:none; font-weight:600; }
.contact-list a:hover { text-decoration:underline; }
.open-now { display:inline-flex; align-items:center; gap:6px; font-size:.82rem; font-weight:700; margin-top:4px; }
.open-now::before { content:""; width:8px; height:8px; border-radius:50%; background:currentColor; }
.open-now.is-open { color:var(--ok); }
.open-now.is-closed { color:var(--muted); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { background:var(--navy-900); color:rgba(255,255,255,.72); padding:56px 0 28px; font-size:.92rem; }
.footer-grid { display:grid; grid-template-columns:1.3fr 1fr 1fr 1fr; gap:32px; }
.site-footer h2 { font-size:.78rem; text-transform:uppercase; letter-spacing:.12em; color:#fff; margin-bottom:14px; }
.site-footer ul { list-style:none; display:flex; flex-direction:column; gap:9px; }
.site-footer a { color:rgba(255,255,255,.82); text-decoration:none; }
.site-footer a:hover { color:#fff; text-decoration:underline; }
.footer-brand img { height:38px; width:auto; margin-bottom:14px; }
.footer-social { display:flex; gap:10px; margin-top:16px; }
.footer-social a { width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,.08); display:flex; align-items:center; justify-content:center; }
.footer-social a:hover { background:rgba(255,255,255,.16); }
.footer-bottom { border-top:1px solid rgba(255,255,255,.1); margin-top:40px; padding-top:20px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:.82rem; color:rgba(255,255,255,.5); }
.footer-bottom a { color:rgba(255,255,255,.5); }

/* ── WhatsApp flotante (escritorio) y barra de acciones (celular) ───────── */
.wa-float { position:fixed; right:22px; bottom:22px; z-index:300; display:inline-flex; align-items:center; gap:10px; height:56px; padding:0 20px 0 16px; border-radius:28px; background:var(--wa); color:#fff; text-decoration:none; font-weight:700; box-shadow:0 8px 24px rgba(0,0,0,.25); }
.wa-float:hover { background:var(--wa-700); }
.wa-float .icon-fill { width:26px; height:26px; }
.mobile-bar { display:none; }

/* ── Comparador ─────────────────────────────────────────────────────────── */
.cmp-bar { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); z-index:310; display:flex; align-items:center; gap:14px; background:var(--ink); color:#fff; padding:10px 10px 10px 18px; border-radius:40px; box-shadow:0 10px 30px rgba(0,0,0,.3); font-weight:600; font-size:.92rem; }
.cmp-bar button.link { background:none; border:0; color:rgba(255,255,255,.7); font-weight:600; text-decoration:underline; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width:1024px) {
  .main-nav, .header-phone { display:none; }
  .menu-btn { display:inline-flex; }
  .header-actions { margin-left:auto; }
  .footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:720px) {
  :root { --gutter:16px; --header-h:60px; }
  .brand img { height:34px; }
  .header-actions .btn-wa span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
  .header-actions .btn-wa { min-height:42px; padding:0 12px; }
  .section { padding:48px 0; }
  .vgrid { grid-template-columns:1fr; gap:16px; }
  .footer-grid { grid-template-columns:1fr; gap:28px; }
  .wa-float { display:none; }
  .mobile-bar { position:fixed; left:0; right:0; bottom:0; z-index:300; display:flex; gap:8px; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); background:rgba(255,255,255,.97); border-top:1px solid var(--line); box-shadow:0 -6px 18px rgba(0,0,0,.08); }
  .mobile-bar .btn { flex:1; min-height:50px; }
  .mobile-bar .btn-call { flex:0 0 56px; padding:0; }
  body.has-mobile-bar { padding-bottom:76px; }
  .cmp-bar { bottom:84px; width:calc(100% - 24px); justify-content:space-between; }
}

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