/*
 * MiAuto.ec — the one stylesheet of the public site.
 *
 * Every public page links this file and nothing else: the pages car-publisher generates (home,
 * cars, facets) and the static pages website-build/build.mjs generates (Nosotros, Precios, Contacto,
 * legal). The header and footer markup is @ism-cars/shared/siteChrome.mjs. A page that looks
 * different is a page that broke one of those two rules — e2e WEB-09 checks both.
 *
 * One dark theme, taken from the AutoDeal template the site started from: charcoal ground, white
 * Outfit headings, the brand orange for prices, badges and the active tab.
 */

/* Self-hosted (SIL OFL, licences beside the files): no third-party request blocks the first paint. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin.woff2') format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/outfit-latin.woff2') format('woff2'); }

:root {
	--brand: #FF7101;
	--brand-hover: #FF8A2E;
	--brand-soft: rgba(255, 113, 1, .14);
	--bg: #171A21;
	--surface: #1E222A;
	--surface-2: #262B35;
	--heading: #FFFFFF;
	--text: #E4E2DF;
	--muted: #A3A09B;
	--line: rgba(255, 255, 255, .1);
	--line-strong: rgba(255, 255, 255, .22);
	--ok: #5BCB86;
	--light: #FFFFFF;
	--on-light: #24272C;

	--font-display: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--radius: 14px;
	--gutter: 16px;
	--max: 1240px;
	--header-h: 76px;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font: 400 16px/1.6 var(--font-text);
	color: var(--text);
	background: var(--bg);
	overflow-x: hidden;
}
/* height:auto lets each image keep its own proportions (or a rule's aspect-ratio) while the
   width/height attributes still reserve its space before it loads. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; color: var(--heading); }
h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 600; }
h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 600; }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0; }
svg { flex: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

/* ── Buttons ─────────────────────────────────────────────────────────────────────────── */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 12px 22px; border-radius: var(--radius);
	font: 500 16px/1 var(--font-display); text-decoration: none; cursor: pointer;
	border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-hover); }
.btn-light { background: var(--light); color: var(--on-light); }
.btn-light:hover { background: #F1EFEC; }
.btn-ghost { border-color: var(--line-strong); color: var(--heading); background: transparent; }
.btn-ghost:hover { border-color: var(--heading); }
.btn-wa { background: #0E7A3C; color: #fff; }
.btn-wa:hover { background: #11904A; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

/* ── Header ──────────────────────────────────────────────────────────────────────────── */
.site-header {
	position: sticky; top: 0; z-index: 20;
	background: rgba(23, 26, 33, .94); backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
	transition: background .2s, border-color .2s;
}
/* Over the homepage carousel the header floats on the photo until the page scrolls. */
body:has(.hero-slider) .site-header { position: fixed; left: 0; right: 0; background: linear-gradient(180deg, rgba(10, 12, 16, .7), rgba(10, 12, 16, 0)); border-color: transparent; backdrop-filter: none; }
html.scrolled body:has(.hero-slider) .site-header { background: rgba(23, 26, 33, .96); border-color: var(--line); backdrop-filter: saturate(1.4) blur(10px); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.site-header .logo { flex: none; }
.site-header .logo img { height: 36px; width: auto; }
.site-nav { display: flex; gap: 30px; margin-inline: auto; }
.site-nav a, .site-actions .signin {
	font: 500 16px/1 var(--font-display); text-decoration: none; color: var(--heading); padding: 8px 0;
}
.site-nav a:hover, .site-actions .signin:hover { color: var(--brand); }
.site-nav a[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
/* The catalogue menu: opens on hover and on keyboard focus; its columns come from catalogo.json. */
.nav-catalog { position: relative; }
.nav-catalog > a { display: inline-flex; align-items: center; gap: 4px; }
.nav-catalog .chev { width: 16px; height: 16px; transition: transform .15s; }
.nav-catalog:hover .chev, .nav-catalog:focus-within .chev { transform: rotate(180deg); }
.mega {
	position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 14px; z-index: 30;
	width: min(720px, calc(100vw - 32px)); padding: 22px 24px 18px; border-radius: 16px;
	background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 50px rgba(0, 0, 0, .45);
	display: grid; gap: 14px; visibility: hidden; opacity: 0; transition: opacity .15s, visibility .15s;
}
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-catalog:hover .mega, .nav-catalog:focus-within .mega { visibility: visible; opacity: 1; }
.mega-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mega-group h3, .panel-catalog h3 { font: 600 12px/1 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.mega-group ul, .panel-catalog ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-group a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; margin-inline: -10px; border-radius: 8px; text-decoration: none; color: var(--heading); font: 500 15px/1.2 var(--font-display); box-shadow: none; }
.mega-group a:hover { background: var(--surface-2); color: var(--brand); }
.mega .n, .panel-catalog .n { color: var(--muted); font: 400 13px/1.2 var(--font-text); font-variant-numeric: tabular-nums; }
.mega > .text-link { display: inline-flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.mega > .text-link svg { width: 16px; height: 16px; }
.site-actions { display: flex; align-items: center; gap: 20px; flex: none; }
.site-actions .btn { min-height: 44px; padding: 10px 20px; }

.site-menu { display: none; margin-left: auto; }
.site-menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--heading); }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary svg { width: 26px; height: 26px; }
.site-menu[open] summary { background: var(--surface-2); }
.site-menu .panel {
	position: absolute; left: 0; right: 0; top: var(--header-h);
	background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(0, 0, 0, .35);
	padding: 8px var(--gutter) 20px; display: grid; gap: 4px;
}
.site-menu .panel a:not(.btn) { font: 500 18px/1 var(--font-display); text-decoration: none; color: var(--heading); padding: 14px 0; border-bottom: 1px solid var(--line); }
.site-menu .panel .btn { margin-top: 12px; }
.site-menu .panel { max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.panel-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 32px; padding: 14px 4px 16px 14px; border-bottom: 1px solid var(--line); }
.panel-catalog:empty { display: none; }
.site-menu .panel .panel-catalog a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; margin: 0; border-radius: 0; border-bottom: 0; text-decoration: none; color: var(--text); font: 400 16px/1.2 var(--font-text); }

@media (max-width: 900px) {
	.site-nav, .site-actions { display: none; }
	.site-menu { display: block; }
	.site-header .logo img { height: 32px; }
	:root { --header-h: 68px; }
}

/* ── Footer ──────────────────────────────────────────────────────────────────────────── */
.site-footer { background: #24272C; color: var(--text); margin-top: 80px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-block: 40px; }
.site-footer img { height: 30px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer nav a { color: var(--text); text-decoration: none; font: 500 15px/1.4 var(--font-display); }
.site-footer nav a:hover { color: var(--brand); }
.site-footer .legal { width: 100%; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; }

/* ── Page openers ────────────────────────────────────────────────────────────────────── */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 56px; }
.hero p { color: var(--text); font-size: 18px; margin-top: 12px; max-width: 62ch; }
.hero .actions { margin-top: 24px; }
.hero-photo { position: relative; background: var(--bg) center / cover no-repeat; border-bottom: 0; }
.hero-photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 16, 20, .88) 0%, rgba(14, 16, 20, .5) 60%, rgba(14, 16, 20, .2) 100%); }
.hero-photo .wrap { position: relative; padding-block: clamp(72px, 12vw, 140px); }

.page-title { border-bottom: 1px solid var(--line); padding-block: 32px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.car-crumbs { padding-top: 28px; margin-bottom: 0; }
.crumbs a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; color: var(--text); }
.crumbs a:hover { color: var(--brand); }

/* ── Sections and text ───────────────────────────────────────────────────────────────── */
.section { padding-block: 56px 8px; }
.section.facet { padding-top: 32px; }
.section > .wrap > h2 + *, .section > h2 + * { margin-top: 20px; }
.lede { font-size: 18px; color: var(--muted); max-width: 64ch; }
.note { font-size: 14px; color: var(--muted); margin-top: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.text-link { color: var(--brand); font: 600 15px/1.4 var(--font-display); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Information cards: a responsive row that never leaves one card alone on a line. */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 22px; }
.info-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--surface); display: grid; gap: 10px; align-content: start; min-width: 0; }
.info-card p { color: var(--muted); font-size: 15px; }
.icon-chip { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.icon-chip svg { width: 24px; height: 24px; }

.steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; border-left: 3px solid var(--brand); padding: 2px 0 2px 16px; display: grid; gap: 6px; align-content: start; }
.steps li::before { content: "Paso " counter(step); font: 700 12px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.steps p { color: var(--muted); font-size: 15px; }

.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23FF7101' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }

.faq { display: grid; gap: 10px; margin-top: 22px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 20px; font: 500 17px/1.35 var(--font-display); color: var(--heading); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font: 400 24px/1 var(--font-display); color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 18px; color: var(--muted); }

/* ── Badges and tags ─────────────────────────────────────────────────────────────────── */
.badge { align-self: flex-start; display: inline-flex; align-items: center; background: var(--brand); color: #fff; font: 600 12px/1 var(--font-text); padding: 7px 12px; border-radius: 99px; }
.tag { display: inline-flex; align-items: center; gap: 5px; background: rgba(23, 26, 33, .72); color: #fff; font: 600 12px/1 var(--font-text); padding: 6px 10px; border-radius: 99px; backdrop-filter: blur(4px); }
.tag svg { width: 14px; height: 14px; }
.verified { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font: 500 13px/1.3 var(--font-text); }
.verified svg { width: 16px; height: 16px; }

/* ── Prices ──────────────────────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 22px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.plan.is-featured { border: 1px solid var(--brand); box-shadow: 0 18px 40px rgba(255, 113, 1, .16); }
.plan .price { font: 600 46px/1 var(--font-display); color: var(--heading); margin-top: 6px; font-variant-numeric: tabular-nums; }
.plan .price small { font: 400 14px/1 var(--font-text); color: var(--muted); margin-left: 6px; }
.plan .days { color: var(--muted); font-size: 15px; flex: 1; }

/* ── Stores (Descarga la app) ────────────────────────────────────────────────────────── */
.store { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: #fff; opacity: .9; }
.store svg { width: 24px; height: 24px; fill: #fff; }
.store small { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }
.store strong { font: 600 17px/1.2 var(--font-display); }

/* ── Legal texts ─────────────────────────────────────────────────────────────────────── */
.prose { max-width: 76ch; }
.prose h2 { font-size: 22px; margin-top: 34px; }
.prose h3 { font-size: 17px; margin-top: 20px; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--brand); }
.draft { display: inline-block; background: rgba(240, 196, 64, .12); color: #F2CE63; border: 1px solid rgba(240, 196, 64, .4); border-radius: 8px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.updated { color: var(--muted); font-size: 14px; margin-top: 10px; }

/* ── The homepage carousel ───────────────────────────────────────────────────────────── */
.hero-slider { position: relative; background: #0E1014; }
.hero-slider .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero-slider .slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; min-height: clamp(560px, 82vh, 780px); display: flex; align-items: flex-end; overflow: hidden; }
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::before { content: ""; position: absolute; inset: 0; z-index: 1; background:
	linear-gradient(90deg, rgba(10, 12, 16, .82) 0%, rgba(10, 12, 16, .45) 45%, rgba(10, 12, 16, 0) 75%),
	linear-gradient(0deg, rgba(23, 26, 33, 1) 0%, rgba(23, 26, 33, 0) 38%); }
.slide-body { position: relative; z-index: 2; width: 100%; padding-bottom: 170px; display: grid; gap: 16px; justify-items: start; }
.slide-title { font-size: clamp(36px, 6vw, 70px); font-weight: 600; line-height: 1.05; max-width: 14ch; }
.hero-slider .facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: #fff; font: 400 16px/1.2 var(--font-display); }
.hero-slider .facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-slider .facts svg { width: 22px; height: 22px; color: var(--brand); }
.slide-price { font: 600 clamp(28px, 3.4vw, 40px)/1 var(--font-display); color: var(--brand); font-variant-numeric: tabular-nums; }
.slide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 6px; }
.slide-actions .verified { color: #fff; }
.slide-actions .verified svg { color: var(--ok); }
.slider-nav { position: absolute; left: 0; right: 0; bottom: 118px; z-index: 3; display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.nav-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(23, 26, 33, .5); color: #fff; display: grid; place-items: center; cursor: pointer; }
.nav-btn:hover { background: var(--brand); border-color: var(--brand); }
.nav-btn svg { width: 20px; height: 20px; }
/* The dot is 10 px; its padding makes each one a 24 px target. */
.dots { display: flex; gap: 0; }
.dots button { width: 10px; height: 10px; padding: 7px; box-sizing: content-box; background-clip: content-box; border-radius: 99px; border: 0; background-color: rgba(255, 255, 255, .35); cursor: pointer; transition: width .2s, background .2s; }
.dots button[aria-current="true"] { width: 28px; background-color: var(--brand); }

/* ── The search box, over the bottom of the carousel ─────────────────────────────────── */
.finder { position: relative; z-index: 4; margin-top: -96px; }
.finder.no-hero { margin-top: 0; padding-top: 40px; }
.finder-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; box-shadow: 0 24px 50px rgba(0, 0, 0, .35); display: grid; gap: 20px; }
.finder-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; }
.finder-head h1 { font-size: clamp(24px, 3vw, 32px); }
.finder-head p { color: var(--muted); font-size: 15px; }
.finder-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: end; }
.finder-form label { display: grid; gap: 6px; min-width: 0; }
.finder-form label span { font: 500 13px/1 var(--font-display); color: var(--muted); letter-spacing: .02em; }
.finder-form select {
	appearance: none; width: 100%; min-height: 50px; padding: 12px 40px 12px 14px; border-radius: 12px;
	border: 1px solid var(--line); background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23A3A09B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
	color: var(--heading); font: 400 16px/1.2 var(--font-text);
}
.finder-form select:disabled { opacity: .5; }
.finder-form .btn { min-height: 50px; padding-inline: 28px; }
@media (max-width: 860px) {
	.finder-form { grid-template-columns: 1fr 1fr; }
	.finder-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.finder-form { grid-template-columns: 1fr; }
}

/* ── Listings (home, facets) ─────────────────────────────────────────────────────────── */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { border: 1px solid var(--line); background: transparent; color: var(--text); font: 500 15px/1 var(--font-display); padding: 10px 16px; border-radius: 99px; cursor: pointer; }
.tabs button:hover { border-color: var(--line-strong); color: var(--heading); }
.tabs button[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.facets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.facets a { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 8px 16px; text-decoration: none; font-size: 14px; }
.facets a:hover { border-color: var(--brand); color: var(--heading); }

/* Brand marks: a car brand's logo (or its monogram) beside its written name, in the text's colour.
   Only where a buyer picks a brand: the Explora tiles, a brand's page, the catalogue menu, Créditos. */
.brand-mark { width: 28px; height: 28px; flex: none; display: inline-block; fill: currentColor; color: inherit; vertical-align: middle; }
.brand-mark.wide { width: 44px; }
.brand-mark.xwide { width: 64px; }
.brand-mark.sm { width: 20px; height: 20px; }
.brand-mark.sm.wide { width: 32px; }
.brand-mark.sm.xwide { width: 44px; }
.brand-mark.xl { width: 64px; height: 64px; }
.brand-mark.xl.wide { width: 104px; }
.brand-mark.xl.xwide { width: 150px; height: 56px; }
.brand-mark.raster { background-color: currentColor; -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat; }
.brand-mark.mono { display: inline-grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; font: 700 10px/1 var(--font-display); letter-spacing: .02em; }
.brand-mark.sm.mono { font-size: 7.5px; border-width: 1.25px; }
.brand-mark.xl.mono { font-size: 22px; border-width: 3px; }
.brand-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; margin-top: 20px; }
.brand-tiles a { display: grid; grid-template-rows: 36px auto auto; align-items: center; justify-items: center; gap: 8px; padding: 18px 8px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--heading); text-decoration: none; transition: border-color .15s, transform .15s; }
.brand-tiles a:hover, .brand-tiles a:focus-visible { border-color: var(--brand); transform: translateY(-1px); }
.brand-tiles .brand-mark { width: 36px; height: 36px; }
.brand-tiles .brand-mark.wide { width: 58px; height: 30px; }
.brand-tiles .brand-mark.xwide { width: 84px; height: 30px; }
.brand-tiles .brand-mark.mono { font-size: 12px; }
.brand-tiles .name { font: 600 15px/1.15 var(--font-display); text-align: center; }
.brand-tiles .n { font: 400 12px/1 var(--font-text); color: var(--muted); font-variant-numeric: tabular-nums; }
.brand-tiles + .facets { margin-top: 14px; }
@media (max-width: 480px) { .brand-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .brand-tiles a { padding: 14px 4px 12px; } }
.hero.brand-hero .wrap { display: flex; align-items: center; gap: 22px; }
.hero.brand-hero .brand-mark { color: var(--heading); }
.hero.brand-hero p { margin-top: 8px; }
@media (max-width: 560px) { .hero.brand-hero .wrap { gap: 16px; } .hero.brand-hero .brand-mark.xl { width: 48px; height: 48px; } }
.mega-group a.has-mark, .panel-catalog a.has-mark { justify-content: flex-start; align-items: center; }
.mega-group a.has-mark .n, .panel-catalog a.has-mark .n { margin-left: auto; }
.mega-group a.has-mark .brand-mark, .panel-catalog a.has-mark .brand-mark { color: var(--text); }
.mega-group a.has-mark .mark-box, .panel-catalog a.has-mark .mark-box { width: 44px; display: inline-flex; justify-content: center; margin-right: 10px; }
.mega-group a.has-mark:hover .brand-mark { color: var(--brand); }
.credits { list-style: none; padding: 0; display: grid; gap: 0; }
.credits .credit-row { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.credits .brand-mark { width: 32px; height: 32px; color: var(--heading); justify-self: center; }
.credits .brand-mark.wide { width: 56px; }
.credits .brand-mark.xwide { width: 72px; }
@media (prefers-reduced-motion: reduce) { .brand-tiles a { transition: none; } }

.listings { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: border-color .15s, transform .15s; min-width: 0; }
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card[hidden] { display: none; }
.card > a { text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card .media { position: relative; overflow: hidden; }
.card .thumb { aspect-ratio: 4 / 3; background: var(--surface-2); object-fit: cover; width: 100%; transition: transform .4s; }
.card:hover .thumb { transform: scale(1.03); }
.card .tags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.card .year { position: absolute; bottom: 12px; right: 12px; background: rgba(23, 26, 33, .72); color: #fff; font: 600 12px/1 var(--font-text); padding: 7px 12px; border-radius: 99px; backdrop-filter: blur(4px); }
.card .body { padding: 18px 16px 16px; display: grid; gap: 8px; flex: 1; align-content: start; }
.card .kind { color: var(--brand); font: 500 14px/1 var(--font-display); }
.card .t { font: 500 19px/1.25 var(--font-display); color: var(--heading); }
.card .facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.card .facts li { display: inline-flex; align-items: center; gap: 5px; }
.card .facts svg { width: 15px; height: 15px; }
.card .p { color: var(--brand); font: 500 22px/1.2 var(--font-display); font-variant-numeric: tabular-nums; margin-top: 2px; }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.card .photos-ok { position: absolute; bottom: 12px; left: 12px; }
.card .photos-ok svg { color: var(--ok); }
.card .more { margin-left: auto; font: 500 14px/1 var(--font-display); color: var(--heading); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 14px; white-space: nowrap; }
.card:hover .more { border-color: var(--brand); color: var(--brand); }
.card.featured { border-color: rgba(255, 113, 1, .55); }
.empty { color: var(--muted); margin-top: 18px; }
.more-link { margin-top: 28px; display: flex; justify-content: center; }
.more-link svg { width: 18px; height: 18px; }

/* ── A car ───────────────────────────────────────────────────────────────────────────── */
.car { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 36px; padding-block: 24px 8px; }
.car h1 { font-size: clamp(32px, 5vw, 52px); }

/* ── Favorites: a heart on every card and car page; the footer script keeps them ─────────── */
.fav, .car-fav { display: inline-grid; place-items: center; border: 0; cursor: pointer; color: #fff; --heart-fill: none; }
.fav[aria-pressed="true"], .car-fav[aria-pressed="true"] { color: var(--brand); --heart-fill: var(--brand); }
.fav { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 99px; background: rgba(23, 26, 33, .72); backdrop-filter: blur(4px); }
.fav svg { width: 22px; height: 22px; }
.car-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.car-fav { flex: none; width: 52px; height: 52px; margin-top: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); }
.car-fav svg { width: 26px; height: 26px; }
.site-actions .favs { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; color: var(--text); --heart-fill: none; }
.site-actions .favs svg { width: 24px; height: 24px; }
.site-actions .favs .n { position: absolute; top: 2px; right: 0; min-width: 18px; padding: 2px 5px; border-radius: 99px; background: var(--brand); color: #fff; font: 700 11px/14px var(--font-text); text-align: center; }
.fav-empty { color: var(--muted); }
.car .price { color: var(--brand); font: 600 34px/1.1 var(--font-display); margin: 10px 0 20px; font-variant-numeric: tabular-nums; }
/* Trust badges under the price: each a button that opens what it means (docs/mobile/trust-badges.md). */
.badges { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 20px; }
.badge-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 14px; border-radius: 99px; border: 1px solid rgba(91, 203, 134, .35); background: rgba(91, 203, 134, .12); color: var(--ok); font: 600 14px/1.2 var(--font-text); cursor: pointer; }
.badge-btn svg { width: 17px; height: 17px; flex: none; }
.badge-btn:hover, .badge-btn[aria-expanded="true"] { background: rgba(91, 203, 134, .2); border-color: var(--ok); }
.badge-btn:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }
.badge-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 6; width: min(400px, 100%); padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font-size: 14px; line-height: 1.5; color: var(--text); }
.badge-pop[hidden] { display: none; }
.badge-pop p { margin: 0 0 8px; }
.badge-pop-title { display: flex; align-items: center; gap: 8px; font: 600 16px/1.3 var(--font-display); color: var(--heading); }
.badge-pop-title svg { width: 20px; height: 20px; color: var(--ok); }
.badge-pop .badge-pop-foot { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.gallery { display: grid; gap: 10px; }
.gallery img { width: 100%; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.stage { position: relative; display: block; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.stage img { aspect-ratio: 16 / 10; border-radius: 0; }
.stage .zoom, .stage .count { position: absolute; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; background: rgba(14, 16, 20, .72); color: #fff; font: 600 13px/1 var(--font-text); padding: 8px 12px; border-radius: 99px; backdrop-filter: blur(4px); }
.stage .zoom { right: 12px; }
.stage .zoom svg { width: 16px; height: 16px; }
.stage .count { left: 12px; font-variant-numeric: tabular-nums; }
.stage:hover .zoom { background: var(--brand); }
/* All the photos, the cover included: one row of five that scrolls sideways. */
.thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 5); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
.thumbs a { display: block; border-radius: 12px; border: 2px solid transparent; scroll-snap-align: start; opacity: .7; transition: opacity .15s, border-color .15s; }
.thumbs a:hover { opacity: 1; }
.thumbs a[aria-current="true"] { border-color: var(--brand); opacity: 1; }
.thumbs img { aspect-ratio: 4 / 3; border-radius: 10px; }

/* The viewer: the photo as large as the screen allows. */
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 9, 12, .96); color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(8, 9, 12, .96); }
.lb-img { max-width: calc(100vw - 140px); max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lb-caption { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font: 500 15px/1.3 var(--font-display); color: var(--text); }
.lb-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(23, 26, 33, .6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: var(--brand); border-color: var(--brand); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
@media (max-width: 800px) {
	.lb-img { max-width: 100vw; max-height: calc(100vh - 140px); border-radius: 0; }
	.lb-prev, .lb-next { top: auto; bottom: 64px; transform: none; }
}
.specs { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; margin: 24px 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; color: var(--heading); font-variant-numeric: tabular-nums; }
.description { white-space: pre-line; }
.contact { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; align-self: start; position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); }
.contact .seller-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.contact .seller { font: 600 17px/1.3 var(--font-display); color: var(--heading); }
/* Reportar este anuncio: a quiet link under the car, and its form in a dialog. */
.report-row { margin: 28px 0 0; }
.report-open { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; border: 0; background: none; color: var(--muted); font: 500 14px/1.3 var(--font-text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.report-open:hover { color: var(--heading); }
.report-open:disabled { cursor: default; text-decoration: none; }
.report-open svg { width: 16px; height: 16px; }
.report { width: min(460px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.report::backdrop { background: rgba(8, 9, 12, .7); }
.report h2 { margin: 0 0 6px; font: 700 22px/1.25 var(--font-display); color: var(--heading); }
.report-ask { margin: 0 0 12px; color: var(--muted); }
.report-reasons { display: grid; gap: 4px; margin: 0 0 16px; padding: 0; border: 0; }
.report-reasons label { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-radius: 8px; cursor: pointer; }
.report-reasons label:hover { background: var(--surface-2); }
.report-reasons input { width: 18px; height: 18px; accent-color: var(--brand); }
.report-note-label { display: block; margin: 0 0 6px; font-weight: 600; color: var(--heading); }
.report-note-label span { font-weight: 400; color: var(--muted); }
.report textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: 15px/1.4 var(--font-text); resize: vertical; }
.report-error { margin: 10px 0 0; color: #FF8A80; }
.report-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.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; }
.trust { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ok); font-weight: 600; }
.trust svg { width: 16px; height: 16px; }

@media (max-width: 800px) {
	.car { grid-template-columns: 1fr; }
	/* On a phone the contact stays at hand: pinned to the bottom of the screen while the car is read. */
	.contact { position: sticky; top: auto; bottom: 0; z-index: 5; margin-inline: calc(-1 * var(--gutter)); border-radius: 16px 16px 0 0; border-bottom: 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .45); padding: 14px var(--gutter); flex-direction: row; flex-wrap: wrap; align-items: center; }
	.contact .seller-row { width: 100%; }
	.contact .btn { flex: 1 1 0; white-space: nowrap; }
	.contact .wide { display: none; }
	.thumbs { grid-auto-columns: calc((100% - 20px) / 3); }
	.slide-body { padding-bottom: 150px; }
	.slider-nav { bottom: 112px; justify-content: center; }
	.slider-nav .nav-btn { display: none; }
	.finder { margin-top: -80px; }
	.finder-card { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
	.card:hover, .card:hover .thumb { transform: none; }
}
