/* KTO Latin Auto — public site styles
   Palette: harbor blue, container yellow, steel, mist. Type: Archivo (variable width). */

:root {
  --harbor: #0F3550;
  --harbor-deep: #0A2638;
  --harbor-soft: #1C4A6B;
  --yellow: #F2B705;
  --yellow-soft: #FFE9A6;
  --steel: #5C6B77;
  --line: #D5DEE4;
  --mist: #EEF2F4;
  --paper: #FFFFFF;
  --ink: #15212B;
  --ok: #1F7A50;
  --warn: #A86A00;
  --muted: #8A97A1;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wide: "wdth" 118;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;
  --step-4: clamp(2.2rem, 5.4vw, 3.815rem);
  --radius: 4px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-variation-settings: "wdth" 100;
}
img { max-width: 100%; display: block; }
a { color: var(--harbor); text-underline-offset: 3px; }
a:hover { color: var(--harbor-soft); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-variation-settings: var(--wide); letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--ink); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: 0; }

/* language blocks: <div data-lang="es"> / <div data-lang="en"> */
html[lang="es"] [data-lang="en"], html[lang="en"] [data-lang="es"] { display: none !important; }

/* ---------------------------------------------------------- header */
.site-header { background: var(--harbor); color: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brand svg { width: 34px; height: 20px; flex: none; }
.brand-name { font-variation-settings: "wdth" 125; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand-name span { font-weight: 500; }
.nav { display: flex; gap: .25rem; }
.nav a { color: #DCE7EE; text-decoration: none; padding: .5rem .7rem; border-radius: var(--radius); font-weight: 550; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: var(--harbor-soft); }
.lang-switch { display: flex; border: 1px solid var(--harbor-soft); border-radius: var(--radius); overflow: hidden; }
.lang-switch button { background: none; border: 0; color: #DCE7EE; font: inherit; font-size: .85rem; font-weight: 600; padding: .35rem .6rem; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
.menu-btn { display: none; background: none; border: 1px solid var(--harbor-soft); color: #fff; border-radius: var(--radius); padding: .4rem .6rem; font: inherit; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--harbor); flex-direction: column; padding: .5rem 1.25rem 1rem; border-top: 1px solid var(--harbor-soft); }
  .nav.open { display: flex; }
  .nav a { padding: .75rem .5rem; }
}

/* ---------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; font: inherit; font-weight: 650; padding: .8rem 1.2rem; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.1; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: #FFC81F; color: var(--ink); }
.btn-wa { background: #1F7A50; color: #fff; }
.btn-wa:hover { background: #17633F; color: #fff; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.08); color: inherit; }
.btn-block { width: 100%; justify-content: center; }

/* ---------------------------------------------------------- hero with route line */
.hero { background: var(--harbor); color: #fff; padding: 3.5rem 0 0; overflow: hidden; }
.hero h1 { max-width: 15ch; color: #fff; }
.hero .lede { font-size: var(--step-1); color: #D2DFE8; max-width: 52ch; margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 3rem; }
.route { position: relative; border-top: 1px solid var(--harbor-soft); padding: 1.75rem 0 2.25rem; }
.route-title { font-size: var(--step--1); color: #A9BFCE; margin: 0 0 1.4rem; }
.route-line { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; list-style: none; margin: 0; padding: 0; }
.route-line::before { content: ""; position: absolute; left: 6px; right: 0; top: 6px; height: 2px; background: repeating-linear-gradient(90deg, var(--yellow) 0 14px, transparent 14px 22px); transform-origin: left; animation: draw 1.6s cubic-bezier(.6,.1,.2,1) .2s both; }
.route-line li { position: relative; padding-top: 1.4rem; }
.route-line li::before { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--harbor); border: 3px solid var(--yellow); }
.route-line li:first-child::before { background: var(--yellow); }
.route-line strong { display: block; font-variation-settings: "wdth" 112; font-size: 1.05rem; }
.route-line span { color: #A9BFCE; font-size: var(--step--1); }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 760px) {
  .route-line { grid-template-columns: 1fr 1fr; row-gap: 1.25rem; }
  .route-line::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .route-line::before { animation: none; } }

/* ---------------------------------------------------------- sections */
.section { padding: 4rem 0; }
.section-mist { background: var(--mist); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .35rem 0 0; color: var(--steel); }
.page-head { background: var(--harbor); color: #fff; padding: 2.75rem 0 2.25rem; }
.page-head h1 { color: #fff; font-size: var(--step-4); margin: 0; }
.page-head p { color: #D2DFE8; margin: .75rem 0 0; font-size: var(--step-1); }
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25rem; max-width: 68ch; }
.prose li { margin-bottom: .4rem; }

/* ---------------------------------------------------------- vehicle cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2rem 1.5rem; }
.car { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.car:hover { color: inherit; }
.car:hover .car-photo img { transform: scale(1.03); }
.car-photo { position: relative; aspect-ratio: 4 / 3; background: var(--mist); border-radius: var(--radius); overflow: hidden; }
.car-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.car-photo .no-photo { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: var(--step--1); }
.status { position: absolute; left: .6rem; top: .6rem; font-size: .8rem; font-weight: 650; padding: .2rem .55rem; border-radius: 3px; background: #fff; }
.status-reserved { background: var(--yellow); color: var(--ink); }
.status-sold { background: var(--ink); color: #fff; }
.car-body { padding: .85rem 0 0; border-bottom: 2px solid var(--line); flex: 1; display: flex; flex-direction: column; }
.car-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 .25rem; font-variation-settings: "wdth" 108; }
.car-title small { display: block; font-weight: 500; color: var(--steel); font-size: .9rem; font-variation-settings: "wdth" 100; }
.specs { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .3rem 0 .8rem; padding: 0; list-style: none; color: var(--steel); font-size: .9rem; }
.price { margin-top: auto; padding-bottom: .8rem; font-weight: 750; font-size: 1.2rem; font-variation-settings: "wdth" 110; }
.price small { font-weight: 550; font-size: .8rem; color: var(--steel); margin-left: .3rem; }
.price-ask { font-size: 1rem; color: var(--harbor); }
.empty { padding: 3rem 1.5rem; text-align: center; background: var(--mist); border-radius: var(--radius); color: var(--steel); }
.empty p { margin-inline: auto; }

/* ---------------------------------------------------------- inventory filters */
.inventory { display: grid; grid-template-columns: 260px 1fr; gap: 2.5rem; align-items: start; }
.filters { position: sticky; top: 84px; display: grid; gap: 1rem; }
.filters label, .field label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .3rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); padding: .65rem .75rem; border: 1px solid #B9C6CF; border-radius: var(--radius); background: #fff; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--harbor); outline: 2px solid var(--yellow-soft); }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.results-bar select { width: auto; }
.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pager button { min-width: 42px; padding: .5rem .7rem; font: inherit; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); cursor: pointer; }
.pager button[aria-current="page"] { background: var(--harbor); color: #fff; border-color: var(--harbor); }
.filter-toggle { display: none; }
@media (max-width: 900px) {
  .inventory { grid-template-columns: 1fr; }
  .filters { position: static; display: none; padding: 1rem; background: var(--mist); border-radius: var(--radius); }
  .filters.open { display: grid; }
  .filter-toggle { display: inline-flex; }
}

/* ---------------------------------------------------------- vehicle detail */
.detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 2.5rem; align-items: start; }
.gallery-main { position: relative; aspect-ratio: 4 / 3; background: var(--mist); border-radius: var(--radius); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #0c1a24; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(10,38,56,.75); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
.gallery-nav:hover { background: var(--harbor); }
.gallery-nav.prev { left: .6rem; } .gallery-nav.next { right: .6rem; }
.gallery-count { position: absolute; right: .6rem; bottom: .6rem; background: rgba(10,38,56,.8); color: #fff; font-size: .8rem; padding: .2rem .5rem; border-radius: 3px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; margin-top: .6rem; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 3px; overflow: hidden; cursor: pointer; aspect-ratio: 4/3; background: var(--mist); }
.thumbs button[aria-current="true"] { border-color: var(--yellow); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buy-box { position: sticky; top: 84px; border-top: 6px solid var(--yellow); background: var(--mist); padding: 1.5rem; border-radius: 0 0 var(--radius) var(--radius); }
.buy-box h1 { font-size: var(--step-3); margin-bottom: .25rem; }
.buy-box .sub { color: var(--steel); margin-bottom: 1rem; }
.buy-box .price { font-size: var(--step-3); padding: 0; margin: 0 0 1.25rem; }
.buy-box .btn { margin-bottom: .6rem; }
.note { font-size: var(--step--1); color: var(--steel); margin: .75rem 0 0; }
.spec-table { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.spec-table dt, .spec-table dd { padding: .6rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.spec-table dt { color: var(--steel); padding-right: 2rem; }
.spec-table dd { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.chips li { background: #fff; border: 1px solid var(--line); padding: .3rem .65rem; border-radius: 3px; font-size: .9rem; }
.back-link { display: inline-block; margin: 1.5rem 0 1rem; }
@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .buy-box { position: static; }
}

/* ---------------------------------------------------------- steps (real sequence) */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.75rem 1.5rem; }
.steps li { counter-increment: step; position: relative; padding-top: 3.1rem; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; background: var(--harbor); color: var(--yellow); font-weight: 800; border-radius: 50%; font-variation-settings: "wdth" 112; }
.steps h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.steps p { color: var(--steel); font-size: .95rem; margin: 0; }

/* ---------------------------------------------------------- two-col blocks, tables, faq */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 2rem; } }
.trust { border-left: 6px solid var(--yellow); padding: 1.25rem 1.5rem; background: #fff; }
.trust p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; }
table.compare { border-collapse: collapse; width: 100%; min-width: 520px; }
.compare th, .compare td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--harbor); color: #fff; font-weight: 650; }
.compare tbody th { font-weight: 600; color: var(--steel); width: 28%; }
details { border-bottom: 1px solid var(--line); padding: .25rem 0; }
summary { cursor: pointer; font-weight: 650; padding: .8rem 0; list-style-position: outside; }
details p { color: var(--steel); }

/* ---------------------------------------------------------- forms & contact */
.form { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -5000px; }
.form-msg { padding: .75rem 1rem; border-radius: var(--radius); font-weight: 600; }
.form-msg.ok { background: #E3F4EB; color: var(--ok); }
.form-msg.err { background: #FDECEA; color: #A22; }
.contact-card { background: var(--mist); padding: 1.5rem; border-radius: var(--radius); }
.contact-card dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0; }
.contact-card dt { color: var(--steel); }
.contact-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------------------------------------------------------- cta band */
.cta-band { background: var(--yellow); padding: 3rem 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { margin: 0; max-width: 22ch; }

/* ---------------------------------------------------------- footer */
.site-footer { background: var(--harbor-deep); color: #B8C9D5; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h3 { color: #fff; font-size: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.legal { border-top: 1px solid var(--harbor-soft); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; }
.legal p { max-width: none; margin-bottom: .3rem; }
.social { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--harbor-soft); color: #fff; }
.social a:hover { background: var(--yellow); color: var(--ink); }
.social svg { width: 20px; height: 20px; }

/* floating WhatsApp button */
.wa-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; width: 58px; height: 58px; border-radius: 50%; background: #1F7A50; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(10,38,56,.35); }
.wa-float:hover { background: #17633F; color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

.loading { color: var(--steel); padding: 2rem 0; }
