/* dogar.css — sistema de diseño Autos Dogar (Dirección A · Confianza limpia) */

:root {
  --red: #E0182D;
  --red-d: #B5121F;
  --red-soft: #fdecee;
  --ink: #17181a;
  --ink-2: #33363b;
  --mut: #6b6f76;
  --line: #e7e5e1;
  --soft: #f6f5f3;
  --paper: #ffffff;
  --font-display: 'Hanken Grotesk', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --maxw: 1120px;
  --radius: 16px;
  --shadow: 0 18px 44px -26px rgba(0,0,0,.34);
  --shadow-sm: 0 10px 26px -18px rgba(0,0,0,.3);
  --gridcols: repeat(3, 1fr);
}

/* Reset acotado al sitio público para no afectar al admin */
.dg * { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* overflow-x:hidden en html (no en body ni .dg) para no romper position:sticky */
html:has(body.dg-body) { overflow-x: hidden; }
body.dg-body { margin: 0; }
/* (no fijar height aquí: rompía la altura explícita del logo .dg-logo) */
/* evita que palabras/precios largos desborden en pantallas angostas */
.dg h1, .dg h2, .dg h3, .dg .ttl, .dg .price { overflow-wrap: anywhere; }

.dg {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.dg h1, .dg h2, .dg h3, .dg h4 { font-family: var(--font-display); margin: 0; line-height: 1.12; letter-spacing: -0.025em; font-weight: 800; }
.dg a { color: inherit; }
.dg p { margin: 0; }
.dg button { font-family: inherit; cursor: pointer; }
.dg img { max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* ---------- Buttons ----------
   NOTA: los colores se escriben con prefijo .dg para ganarle en especificidad
   a `.dg a { color: inherit }` (si no, los botones-enlace heredan el color del
   contenedor y el texto se vuelve invisible / sin contraste). */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 12px 20px; border-radius: 12px; border: 1px solid transparent; text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .12s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.dg .btn-primary, .btn-primary { background: var(--red); color: #fff; }
.dg .btn-primary:hover, .btn-primary:hover { background: var(--red-d); color: #fff; }
.dg .btn-dark, .btn-dark { background: var(--ink); color: #fff; }
.dg .btn-dark:hover, .btn-dark:hover { background: #000; color: #fff; }
.dg .btn-ghost, .btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.dg .btn-ghost:hover, .btn-ghost:hover { border-color: #cfccc6; color: var(--ink); }
.dg .btn-white, .btn-white { background: #fff; color: var(--red); }
.dg .btn-white:hover, .btn-white:hover { background: #fff; color: var(--red-d); }
.btn svg { flex-shrink: 0; }
.btn-lg { font-size: 16px; padding: 15px 26px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Pills / chips ---------- */
.pill { font: inherit; font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: all .14s; text-decoration:none; display:inline-block; }
.pill:hover { border-color: #cfccc6; }
.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--red); padding: 5px 10px; border-radius: 999px; }
.kicker { font-size: 13px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: .08em; }
.badge-soft { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--red); background: var(--red-soft); padding: 7px 13px; border-radius: 999px; white-space: nowrap; }

/* ---------- Nav ---------- */
.nav-util { background: var(--soft); border-bottom: 1px solid var(--line); }
.nav-util .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; padding-bottom: 9px; font-size: 13px; color: var(--mut); }
.nav-util .u-left { display: flex; gap: 22px; }
.nav-util .u-item { display: inline-flex; align-items: center; gap: 6px; }
.header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 15px; padding-bottom: 15px; }
.navlinks { display: flex; gap: 30px; align-items:center; }
.navlinks a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink); transition: color .14s; white-space: nowrap; }
.navlinks a:hover, .navlinks a.active { color: var(--red); }
.wordmark { display: flex; align-items: center; gap: 9px; text-decoration: none; cursor: pointer; }
.wordmark .mk { width: 34px; height: 34px; border-radius: 9px; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px; letter-spacing: -0.04em; font-family: var(--font-display); }
.wordmark .wt { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.02em; line-height: 1; }
.wordmark .wt .r { color: var(--red); }
/* width:auto + max-height de respaldo para que el logo nunca se sobreescale */
.dg .dg-logo { height: 44px; width: auto; max-height: 44px; display: block; }
.dg .dg-logo-sm { height: 38px; max-height: 38px; }
.dg .dg-logo-ftr { height: 46px; width: auto; max-height: 46px; display: block; }

/* ---------- Vehicle card ---------- */
.vcard { display: block; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .18s, transform .18s, border-color .18s; }
.vcard:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #d8d5d0; }
.vcard .media { position: relative; aspect-ratio: 4 / 3; background: #eceae6; overflow:hidden; }
.vcard .media img { width:100%; height:100%; object-fit:cover; display:block; }
.vcard .media .tag { position: absolute; top: 12px; left: 12px; }
.vcard .fav { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 999px; background: rgba(255,255,255,.92); border: none; display: grid; place-items: center; color: var(--ink); }
.vcard .fav:hover { color: var(--red); }
.vcard .fav.on { color: var(--red); }
.vcard .cmp { position: absolute; top: 50px; right: 10px; width: 34px; height: 34px; border-radius: 999px; background: rgba(255,255,255,.92); border: none; display: grid; place-items: center; color: var(--ink); }
.vcard .cmp:hover { color: var(--red); }
.vcard .cmp.on { color: #fff; background: var(--red); }

/* Barra flotante del comparador */
.cmp-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 41; background: var(--ink); color: #fff; border-radius: 999px; padding: 8px 8px 8px 20px; display: flex; align-items: center; gap: 14px; box-shadow: 0 14px 34px -12px rgba(0,0,0,.5); font-size: 14px; font-weight: 700; animation: pageIn .25s; }
.cmp-bar .btn { padding: 9px 18px; }
.cmp-bar button.x { background: transparent; border: none; color: rgba(255,255,255,.7); font-size: 16px; cursor: pointer; padding: 6px 10px; }
.cmp-bar button.x:hover { color: #fff; }
@media (max-width:560px){ .cmp-bar { left: 12px; right: 12px; transform: none; justify-content: space-between; bottom: 88px; } }
.vcard .body { padding: 16px 16px 18px; }
.vcard .cat { font-size: 12px; color: var(--mut); font-weight: 600; }
.vcard .ttl { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin-top: 3px; font-family: var(--font-display); line-height:1.3; }
.vcard .specs { display: flex; gap: 10px; margin-top: 10px; font-size: 12.5px; color: var(--mut); flex-wrap: wrap; }
.vcard .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.vcard .price { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; font-family: var(--font-display); }
.vcard .more { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--red); }

.vgrid { display: grid; grid-template-columns: var(--gridcols); gap: 22px; }

/* ---------- Sections / type ---------- */
.sec { padding-top: 64px; padding-bottom: 64px; }
.sec-tight { padding-top: 40px; padding-bottom: 40px; }
.h-xl { font-size: 52px; letter-spacing: -0.035em; line-height: 1.05; }
.h-lg { font-size: 36px; line-height: 1.12; }
.h-md { font-size: 28px; line-height: 1.15; }
.lead { font-size: 18px; color: var(--mut); line-height: 1.55; }
.muted { color: var(--mut); }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.input, .select, .textarea { font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); width: 100%; transition: border-color .14s, box-shadow .14s; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.input::placeholder, .textarea::placeholder { color: #a9adb3; }
.textarea { resize: vertical; min-height: 96px; }
.field.err .input, .field.err .select, .field.err .textarea { border-color: var(--red); }
.field .errmsg { font-size: 12.5px; color: var(--red); font-weight: 600; }

/* ---------- Misc ---------- */
.divider { border-top: 1px solid var(--line); }
.card-soft { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.whatsapp-float { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 58px; height: 58px; border-radius: 999px; background: #25D366; color: #fff; border: none; display: grid; place-items: center; box-shadow: 0 12px 30px -10px rgba(0,0,0,.4); transition: transform .15s; }
.whatsapp-float:hover { transform: scale(1.06); }

/* placeholder de foto (franjas) */
.photo-ph { position: relative; width: 100%; background: repeating-linear-gradient(135deg, #eceae6, #eceae6 14px, rgba(0,0,0,.045) 14px, rgba(0,0,0,.045) 28px); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.photo-ph span { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(40,38,35,.5); padding: 4px 10px; border: 1px solid rgba(40,38,35,.5); border-radius: 999px; background: #eceae6; text-align:center; }

/* fade/slide on route change */
.page-enter { animation: pageIn .4s cubic-bezier(.2,.7,.3,1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page-enter { animation: none; } }

/* footer */
.footer { background: var(--ink); color: rgba(255,255,255,.7); }
.footer a { color: rgba(255,255,255,.7); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer .ftop { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-top: 52px; padding-bottom: 28px; }
.footer h4 { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .06em; margin:0; }
.footer .col { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; font-size: 14px; }
.footer .fbot { border-top: 1px solid rgba(255,255,255,.12); }
.footer .fbot .wrap { display: flex; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; font-size: 13px; }

/* ---------- Grid helpers (reflowables) ---------- */
.g2 { display: grid; grid-template-columns: 1fr 1fr; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.g-split { display: grid; grid-template-columns: 1.1fr 1fr; }
.g-stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.g-detalle { display: grid; grid-template-columns: 1fr 380px; }
.g-cat { display: grid; grid-template-columns: 264px 1fr; }
.g-loc { display: grid; grid-template-columns: 1fr 1.3fr; }
.box-48 { padding: 48px; }

/* ---------- Mobile menu ---------- */
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #fff; place-items: center; color: var(--ink); }
.mobile-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 45; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.mobile-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 82%; max-width: 340px; background: #fff; z-index: 46; box-shadow: -20px 0 60px -20px rgba(0,0,0,.4); display: flex; flex-direction: column; padding: 20px; animation: slideIn .25s cubic-bezier(.2,.7,.3,1); }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: none; } }
.mobile-panel a { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 18px; padding: 14px 8px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.mobile-panel a.active { color: var(--red); }
.mobile-drawer[hidden] { display: none; }

/* ---------- Responsive breakpoints ---------- */
@media (max-width: 980px) {
  .g-detalle, .g-cat { grid-template-columns: 1fr !important; }
  .g-detalle aside, .g-cat aside { position: static !important; top: auto !important; }
}
@media (max-width: 860px) {
  .navlinks { display: none !important; }
  .nav-toggle { display: grid; }
  .header .btn-primary { display: none; }
  .nav-util .u-left { gap: 14px; }
  .nav-util .u-left .u-item:nth-child(2) { display: none; }
  .g2, .g-split, .g-loc { grid-template-columns: 1fr !important; }
  .g4 { grid-template-columns: 1fr 1fr !important; }
  .vgrid { grid-template-columns: 1fr 1fr !important; }
  .box-48 { padding: 30px !important; }
  .h-xl { font-size: 40px !important; }
  .h-lg { font-size: 30px !important; }
  .sec, .sec-tight { padding-top: 44px; padding-bottom: 44px; }
}
@media (max-width: 560px) {
  .wrap { padding-left: 18px !important; padding-right: 18px !important; }
  .g3, .g-stats, .g4 { grid-template-columns: 1fr 1fr !important; }
  .vgrid { grid-template-columns: 1fr !important; }
  .hero-search { flex-direction: column !important; }
  .hero-search .btn { width: 100%; justify-content: center; padding: 12px 22px !important; }
  .steps-row { flex-direction: column !important; }
  .box-48 { padding: 22px !important; }
  .h-xl { font-size: 32px !important; line-height: 1.08; }
  .h-lg { font-size: 25px !important; }
  .nav-util .wrap { font-size: 12px; }
  .nav-util .u-left .u-item:first-child { display: none; }
  .footer .ftop { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  .footer .fbot .wrap { flex-direction: column; gap: 4px; }
}
@media (max-width: 420px) {
  .wrap { padding-left: 14px !important; padding-right: 14px !important; }
  .dg .dg-logo { height: 36px; max-height: 36px; }
  .nav-util .u-left { display: none !important; }            /* solo queda el teléfono */
  .nav-util .wrap { justify-content: flex-end; }
  .h-xl { font-size: 27px !important; }
  .h-lg { font-size: 22px !important; }
  .h-md { font-size: 20px !important; }
  .lead { font-size: 16px !important; }
  .box-48 { padding: 18px !important; }
  .btn, .btn-lg { font-size: 14px; padding: 12px 16px; }
  .card-soft { border-radius: 14px; }
  .footer .ftop { grid-template-columns: 1fr !important; }
}
@media (max-width: 400px) {
  .g3, .g-stats { grid-template-columns: 1fr !important; }
  /* specs del detalle a una columna en teléfonos angostos */
  .dg-specs-2 { grid-template-columns: 1fr !important; }
}
@media (max-width: 340px) {
  .dg .dg-logo { height: 32px; max-height: 32px; }
  .h-xl { font-size: 24px !important; }
}

/* Crédito de desarrollo en el footer */
.footer .fbot .dev-credit a { color: #fff; font-weight: 700; text-decoration: none; }
.footer .fbot .dev-credit a:hover { color: var(--red); }
