/*
 * Energía Hoy: carburantes. Se carga solo en sus páginas, después de eh.css (usa sus tokens y componentes).
 * Tinta sobre blanco; verde, ámbar y rojo solo en marcas con su forma y su etiqueta.
 */

.eh-gas-page .entry-header,
.eh-gas {
	--eh-ink: #1b2638;
	--eh-ink-2: #4e5b70;
	--eh-canvas: #f4f6f8;
	--eh-line: rgba(27, 38, 56, 0.1);
	--eh-line-strong: rgba(27, 38, 56, 0.18);
}

/* ---------- Migas ---------- */

.eh-gas-crumbs { margin: 0 0 12px; font-size: 0.875rem; line-height: 1.5; color: var(--eh-ink-2); }
.eh-gas-crumbs ol { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; padding: 0; list-style: none; }
.eh-gas-crumbs li { display: inline-flex; align-items: baseline; margin: 0; }
.eh-gas-crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--eh-ink-2); }
.eh-gas-crumbs a { color: var(--eh-ink-2); text-decoration: underline; text-underline-offset: 2px; }
.eh-gas-crumbs a:hover { color: var(--eh-ink); }
.eh-gas-crumbs [aria-current] { color: var(--eh-ink); }

/* ---------- Textos de apoyo ---------- */

.eh-gas .eh-gas-sub { display: block; font-size: 0.875rem; line-height: 1.45; font-weight: 400; color: var(--eh-ink-2); }
.eh-gas .eh-gas-addr { margin: 0 0 16px !important; font-size: 1rem; line-height: 1.5; }
.eh-gas .eh-gas-meta { margin: 8px 0 24px !important; font-size: 0.875rem; line-height: 1.5; color: var(--eh-ink-2); }
.eh-gas .eh-gas-empty { margin: 8px 0 16px !important; padding: 16px; background: var(--eh-canvas); border-radius: 8px; line-height: 1.55; }
.eh-gas .eh-gas-warn {
	margin: 0 0 20px !important;
	padding: 12px 16px;
	background: var(--eh-canvas);
	border-left: 3px solid var(--eh-ink);
	border-radius: 4px;
	line-height: 1.55;
}
.eh-gas-preview {
	margin: 0 0 20px !important;
	padding: 12px 16px;
	background: #fff;
	border: 1px dashed var(--eh-ink, #1b2638);
	border-radius: 8px;
	line-height: 1.55;
}
.eh-gas .eh-gas-h3 { margin: 24px 0 8px !important; font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.eh-gas p + p { margin-top: 12px; }

/* ---------- Casillas de precio ---------- */

.eh-gas .eh-gas-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) {
	.eh-gas .eh-gas-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.eh-gas .eh-gas-tile .eh-tile-sub { display: grid; gap: 2px; }
.eh-gas .eh-gas-var { display: flex; align-items: baseline; font-size: 0.875rem; line-height: 1.4; color: var(--eh-ink-2); }
.eh-gas .eh-gas-var .eh-glyph { width: 0.62em; height: 0.62em; }
.eh-gas .eh-gas-tile-minor .eh-tile-value { font-size: 1.2rem; }

/* ---------- Gráfica de líneas ---------- */

.eh-gas .eh-gas-chart { margin-bottom: 16px; }
.eh-gas .eh-line.eh-gas-l1 { stroke: var(--eh-ink); stroke-width: 2; }
.eh-gas .eh-line.eh-gas-l2 { stroke: var(--eh-ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.eh-gas .eh-gas-key { display: inline-block; width: 18px; height: 0; margin-right: 6px; border-top: 2px solid var(--eh-ink); vertical-align: middle; transform: translateY(-2px); }
.eh-gas .eh-gas-key.eh-gas-l2 { border-top: 2px dashed var(--eh-ink-2); }
.eh-gas .eh-chart-head { flex-wrap: wrap; row-gap: 4px; }
.eh-gas .eh-legend { flex-wrap: wrap; font-size: 0.875rem; color: var(--eh-ink-2); }

/* ---------- Tablas ---------- */

/* El nombre y su dirección hacen salto de línea: la tabla cabe en el móvil sin desplazarse de lado. */
.eh-gas .eh-gas-table th[scope="row"] { font-weight: 500; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.eh-gas .eh-gas-table { width: 100%; }
.eh-gas .eh-gas-table th[scope="row"] a { font-weight: 500; }
.eh-gas .eh-gas-pos { width: 2.5em; color: var(--eh-ink-2); }
.eh-gas .eh-gas-table td.eh-num { white-space: nowrap; }
.eh-gas .eh-gas-table td .eh-glyph { width: 0.62em; height: 0.62em; }
.eh-gas .eh-gas-diff { color: var(--eh-ink-2); }
.eh-gas .eh-gas-legend-row { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px !important; font-size: 0.875rem; color: var(--eh-ink-2); }
.eh-gas .eh-gas-legend-row .eh-glyph { width: 0.62em; height: 0.62em; }
@media (max-width: 767.98px) {
	.eh-gas .eh-gas-table th,
	.eh-gas .eh-gas-table td { padding-left: 8px; padding-right: 8px; }
	.eh-gas .eh-gas-pos { width: 2em; }
	.eh-gas .eh-gas-table th[scope="row"] { min-width: 9em; }
}

.eh-gas details.eh-gas-more { margin: 12px 0; border: 1px solid var(--eh-line); border-radius: 8px; background: #fff; }
.eh-gas details.eh-gas-more > summary {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 16px;
	font-weight: 500;
	cursor: pointer;
	list-style-position: inside;
}
.eh-gas details.eh-gas-more[open] > summary { border-bottom: 1px solid var(--eh-line); }
.eh-gas details.eh-gas-more .eh-table-wrap { margin: 0; border: 0; border-radius: 0 0 8px 8px; }
.eh-gas .eh-gas-small { margin: 0; padding: 12px 16px 12px 32px; line-height: 1.6; }
.eh-gas .eh-gas-small li { margin: 0 0 6px; }
.eh-gas .eh-gas-mun { font-weight: 500; }

/* En el móvil, el ahorro y el desvío pasan debajo del nombre y el neto queda siempre a la vista. */
.eh-gas .eh-narrow-cell { display: none; }
@media (max-width: 767.98px) {
	.eh-gas .eh-wide-cell { display: none; }
	.eh-gas .eh-narrow-cell { display: block; }
}

/* ---------- Semáforo ---------- */

.eh-gas .eh-gas-sem { display: grid; gap: 12px; margin: 0 0 8px; }
@media (min-width: 768px) {
	.eh-gas .eh-gas-sem { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
.eh-gas .eh-gas-sem-row { padding: 16px 20px; background: #fff; border: 1px solid var(--eh-line); border-radius: 12px; }
.eh-gas .eh-gas-sem-prod { margin: 0 0 4px !important; font-size: 0.875rem; color: var(--eh-ink-2); }
.eh-gas .eh-gas-sem-price { font-weight: 600; color: var(--eh-ink); }
.eh-gas .eh-gas-sem-lines { margin: 4px 0 0; padding: 0 0 0 18px; line-height: 1.55; }
.eh-gas .eh-gas-sem-lines li { margin: 0 0 2px; }

/* ---------- Frases del histórico y enlaces ---------- */

.eh-gas .eh-gas-insights,
.eh-gas .eh-gas-links { margin: 0 0 16px; padding: 0 0 0 20px; line-height: 1.6; }
.eh-gas .eh-gas-insights li,
.eh-gas .eh-gas-links li { margin: 0 0 8px; }

/* ---------- Datos prácticos ---------- */

.eh-gas .eh-gas-dl { display: grid; gap: 0; margin: 0 0 16px; border: 1px solid var(--eh-line); border-radius: 12px; background: #fff; }
.eh-gas .eh-gas-dl > div { display: grid; gap: 2px; padding: 12px 16px; border-top: 1px solid var(--eh-line); }
.eh-gas .eh-gas-dl > div:first-child { border-top: 0; }
@media (min-width: 768px) {
	.eh-gas .eh-gas-dl > div { grid-template-columns: 180px 1fr; gap: 16px; }
}
.eh-gas .eh-gas-dl dt { font-size: 0.875rem; font-weight: 500; color: var(--eh-ink-2); }
.eh-gas .eh-gas-dl dd { margin: 0; line-height: 1.5; }

/* ---------- Formularios y botones ---------- */

.eh-gas label { display: grid; gap: 4px; font-size: 0.875rem; font-weight: 500; color: var(--eh-ink); }
.eh-gas input[type="number"],
.eh-gas input[type="search"],
.eh-gas select {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	font: inherit;
	font-size: 1rem;
	font-weight: 400;
	color: var(--eh-ink);
	background: #fff;
	border: 1px solid var(--eh-line-strong);
	border-radius: 8px;
	font-variant-numeric: tabular-nums;
}
.eh-gas input:focus-visible,
.eh-gas select:focus-visible,
.eh-gas button:focus-visible,
.eh-gas summary:focus-visible,
.eh-gas a:focus-visible,
.eh-gas-crumbs a:focus-visible {
	outline: 2px solid var(--eh-ink);
	outline-offset: 2px;
}

.eh-gas .eh-gas-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 8px 18px;
	font: inherit;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	color: #fff;
	background: var(--eh-ink);
	border: 1px solid var(--eh-ink);
	border-radius: 8px;
	cursor: pointer;
	transition: box-shadow 150ms cubic-bezier(0.16, 1, 0.3, 1), transform 150ms cubic-bezier(0.16, 1, 0.3, 1);
}
.eh-gas .eh-gas-btn:hover { box-shadow: 0 4px 12px rgba(27, 38, 56, 0.12); transform: translateY(-1px); }
.eh-gas .eh-gas-btn:active { transform: translateY(0); box-shadow: none; }
.eh-gas .eh-gas-btn-2 { color: var(--eh-ink); background: #fff; border-color: var(--eh-line-strong); }
.eh-gas .eh-gas-btn[disabled] { opacity: 0.6; cursor: progress; }
.eh-gas [hidden] { display: none !important; }

.eh-gas .eh-gas-search { margin: 0 0 24px; padding: 16px; background: #fff; border: 1px solid var(--eh-line); border-radius: 12px; }
.eh-gas .eh-gas-search-row { display: grid; gap: 12px; }
@media (min-width: 768px) {
	.eh-gas .eh-gas-search { padding: 20px 24px; }
	.eh-gas .eh-gas-search-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; }
}
.eh-gas .eh-gas-geo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0 !important; }
.eh-gas .eh-gas-geo-row:empty { display: none; }
.eh-gas .eh-gas-geo-note { font-size: 0.875rem; color: var(--eh-ink-2); }

.eh-gas .eh-gas-calc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 12px; }
@media (min-width: 768px) {
	.eh-gas .eh-gas-calc-fields { grid-template-columns: repeat(auto-fit, minmax(170px, 220px)); }
}
.eh-gas .eh-gas-calc-fields label:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
@media (min-width: 768px) {
	.eh-gas .eh-gas-calc-fields label:first-child:nth-last-child(odd) { grid-column: auto; }
}

/* ---------- Mapa (solo al pulsar «Ver mapa») ---------- */

.eh-gas .eh-gas-map-wrap { margin: 12px 0 !important; }
.eh-gas .eh-gas-map { height: 380px; margin: 0 0 16px; border: 1px solid var(--eh-line); border-radius: 12px; overflow: hidden; background: var(--eh-canvas); }
@media (max-width: 767.98px) {
	.eh-gas .eh-gas-map { height: 320px; }
}
.eh-gas .eh-gas-map .leaflet-popup-content { font: 0.875rem/1.45 inherit; color: var(--eh-ink); }

/* ---------- Mapa: etiquetas con logo y precio, al estilo de las webs de reservas ---------- */

.eh-gas .eh-gas-map { position: relative; height: min(72vh, 600px); min-height: 380px; font-family: inherit; }
.eh-gas-map .eh-mk-tiles { filter: none; } /* Mapa en su color normal (desde la 0.9.6; antes iba en gris). */
.eh-gas-map .leaflet-control-zoom a { width: 40px; height: 40px; line-height: 38px; color: #1b2638; }
.eh-gas-map .leaflet-control-attribution { font-size: 11px; }
.eh-mk-w { background: none; border: 0; }
.eh-mk-w:focus-visible { outline: none; }
.eh-mk-w:focus-visible .eh-mk-pill { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #1b2638; }
.eh-mk { position: relative; width: 0; height: 0; --lv: #fab219; }
.eh-mk-barata { --lv: #0ca30c; }
.eh-mk-cara { --lv: #d03b3b; }
/* Punto (cuando no cabe la etiqueta): el color de su nivel. */
.eh-mk-dot {
	position: absolute;
	left: -7px;
	top: -7px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--lv);
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(27, 38, 56, 0.4);
	cursor: pointer;
}
/* Etiqueta: logo y precio, con su puntita sobre el sitio exacto. */
.eh-mk-pill {
	position: absolute;
	left: 0;
	bottom: 9px;
	display: none;
	align-items: center;
	gap: 6px;
	height: 34px;
	padding: 0 11px 0 4px;
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 2px 10px rgba(27, 38, 56, 0.22), 0 0 0 1px rgba(27, 38, 56, 0.08);
	color: #1b2638;
	white-space: nowrap;
	cursor: pointer;
	transform: translateX(-50%);
	transform-origin: 50% 100%;
	transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1), background-color 200ms, color 200ms;
}
.eh-mk-pill::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -5px;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	background: inherit;
	border-radius: 0 0 3px 0;
	transform: rotate(45deg);
	box-shadow: 2px 2px 3px rgba(27, 38, 56, 0.10);
}
.eh-mk-pill b { display: inline-flex; align-items: center; gap: 4px; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.eh-mk-pill .eh-gas-logo { width: 34px; height: 26px; padding: 2px 3px; border-radius: 999px; border-color: rgba(27, 38, 56, 0.08); }
.eh-mk-pill .eh-gas-logo-b { font-size: 0.75rem; }
.eh-mk-pill .eh-gas-logo-g svg { width: 15px; height: 15px; }
/* La marca del nivel junto al precio (▼ barata, ● media, ▲ cara). */
.eh-mk-g { display: inline-block; width: 0.6em; height: 0.6em; background: var(--lv); }
.eh-mk-barata .eh-mk-g { clip-path: polygon(0 12%, 100% 12%, 50% 100%); }
.eh-mk-media .eh-mk-g { border-radius: 50%; transform: scale(0.86); }
.eh-mk-cara .eh-mk-g { clip-path: polygon(50% 0, 100% 88%, 0 88%); }
.is-pill .eh-mk-pill { display: inline-flex; animation: eh-mk-in 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.is-pill .eh-mk-dot { display: none; }
.eh-mk-pill:hover { transform: translateX(-50%) scale(1.06); box-shadow: 0 6px 16px rgba(27, 38, 56, 0.28), 0 0 0 1px rgba(27, 38, 56, 0.1); }
/* La elegida: en tinta y un poco más grande. */
.is-sel .eh-mk-pill { background: #1b2638; color: #fff; transform: translateX(-50%) scale(1.1); box-shadow: 0 8px 20px rgba(27, 38, 56, 0.35); }
.is-sel .eh-mk-pill .eh-gas-logo { background: #fff; }
@keyframes eh-mk-in { from { opacity: 0; transform: translateX(-50%) translateY(4px) scale(0.92); } to { opacity: 1; transform: translateX(-50%); } }
/* Tu ubicación: punto de tinta con halo que late. */
.eh-mk-yo span {
	position: absolute;
	left: -10px;
	top: -10px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #1b2638;
	border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.eh-mk-yo span::before {
	content: "";
	position: absolute;
	inset: -12px;
	border-radius: 50%;
	background: rgba(27, 38, 56, 0.18);
	animation: eh-mk-halo 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
.eh-mk-yo.is-zona span { width: 14px; height: 14px; left: -7px; top: -7px; background: #4e5b70; }
.eh-mk-yo.is-zona span::before { display: none; }
@keyframes eh-mk-halo { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }

/* Tarjeta de la gasolinera elegida, abajo del mapa. */
.eh-mk-card {
	position: absolute;
	z-index: 1000;
	left: 12px;
	right: 12px;
	bottom: 12px;
	max-width: 440px;
	margin: 0 auto;
	padding: 16px 16px 14px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 14px 36px rgba(27, 38, 56, 0.28);
	color: #1b2638;
	font-size: 0.9375rem;
	line-height: 1.45;
	cursor: auto;
}
.eh-mk-card[hidden] { display: none; }
.eh-mk-card.is-in { animation: eh-mk-card-in 320ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes eh-mk-card-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.eh-mk-x {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #4e5b70;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}
.eh-mk-x:hover { background: #f4f6f8; color: #1b2638; }
.eh-mk-x:focus-visible { outline: 2px solid #1b2638; outline-offset: -2px; }
.eh-mk-c-top { display: flex; align-items: center; gap: 12px; padding-right: 40px; }
.eh-mk-c-top .eh-gas-logo { width: 52px; height: 36px; }
.eh-mk-c-t { min-width: 0; }
.eh-mk-c-n { margin: 0 !important; font-size: 1.0625rem; font-weight: 600; line-height: 1.25; }
.eh-mk-c-a { margin: 2px 0 0 !important; font-size: 0.8125rem; color: #4e5b70; }
.eh-mk-c-p { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 0 !important; }
.eh-mk-c-p b { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.eh-mk-c-p span { font-size: 0.875rem; color: #4e5b70; }
.eh-mk-c-l { display: flex; align-items: baseline; margin: 6px 0 0 !important; font-weight: 500; }
.eh-mk-c-l .eh-glyph { width: 0.7em; height: 0.7em; margin-right: 0.45em; }
.eh-mk-c-l .eh-g-barata { color: #0ca30c; }
.eh-mk-c-l .eh-g-media { color: #fab219; }
.eh-mk-c-l .eh-g-cara { color: #d03b3b; }
.eh-mk-c-i { margin: 4px 0 0 !important; font-size: 0.8125rem; color: #4e5b70; }
.eh-mk-c-b { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.eh-mk-c-b a.eh-mk-c-ruta { flex: 1 1 auto; justify-content: center; background: #1b2638; border-color: #1b2638; color: #fff; }
.eh-mk-c-b a.eh-mk-c-ruta:hover { background: #2a3850; }
.eh-mk-c-f {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 auto;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid rgba(27, 38, 56, 0.18);
	border-radius: 999px;
	color: #1b2638 !important;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none !important;
}
.eh-mk-c-f:hover { border-color: #1b2638; background: #f4f6f8; }
@media (prefers-reduced-motion: reduce) {
	.eh-mk-pill,
	.is-pill .eh-mk-pill,
	.eh-mk-card.is-in { transition: none; animation: none; }
	.eh-mk-yo span::before { animation: none; opacity: 0.5; }
}

/* ---------- Texto propio ---------- */

.eh-gas .eh-gas-texto { max-width: 70ch; margin-top: 32px; }
.eh-gas .eh-gas-texto h2 { margin: 32px 0 12px; }
.eh-gas .eh-gas-texto p { margin: 0 0 16px; line-height: 1.6; }

/* ---------- Selector gasolina / gasóleo ---------- */

/* Solo se enseña la versión elegida; sin JavaScript (sin html.eh-js) se ven las dos. */
.eh-js .eh-gas-v2[data-eh-prod="1"] [data-eh-pv="3"],
.eh-js .eh-gas-v2[data-eh-prod="3"] [data-eh-pv="1"] { display: none !important; }

html:not(.eh-js) .eh-gas-pv + .eh-gas-pv { margin-top: 28px; }
.eh-gas-sw { display: none; }
.eh-js .eh-gas-sw {
	position: relative;
	isolation: isolate;
	display: inline-flex;
	max-width: 100%;
	margin: 0 0 18px;
	padding: 4px;
	background: #fff;
	border: 1px solid rgba(27, 38, 56, 0.14);
	border-radius: 999px;
	box-shadow: 0 1px 2px rgba(27, 38, 56, 0.06);
}
.eh-gas-sw button {
	position: relative;
	z-index: 1;
	min-height: 44px;
	padding: 0 20px;
	border: 0;
	border-radius: 999px;
	background: none;
	color: #1b2638;
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.eh-gas-sw button[aria-checked="true"] { color: #fff; cursor: default; }
.eh-gas-sw button:focus-visible { outline: 2px solid #1b2638; outline-offset: 3px; }
/* La pastilla de tinta que se desliza bajo la opción elegida. */
.eh-gas-sw-th {
	position: absolute;
	z-index: 0;
	top: 4px;
	bottom: 4px;
	left: 0;
	width: 0;
	border-radius: 999px;
	background: #1b2638;
	box-shadow: 0 6px 16px rgba(27, 38, 56, 0.22);
	transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1), width 450ms cubic-bezier(0.16, 1, 0.3, 1);
}
.eh-gas-sw.is-moving .eh-gas-sw-th { box-shadow: 0 8px 22px rgba(27, 38, 56, 0.28); }
/* En la portada, encima del precio. */
.eh-gas-sw-hero { margin-bottom: 22px; }
/* En la tabla de la zona, debajo de su título. */
.eh-gas-sw-w { margin: -8px 0 24px; }
/* Al cambiar, el fondo de la portada pasa al color del nuevo nivel sin saltos. */
.eh-p-hero.is-sw { transition: background-color 500ms cubic-bezier(0.16, 1, 0.3, 1), border-color 500ms cubic-bezier(0.16, 1, 0.3, 1); }
@media (prefers-reduced-motion: reduce) { .eh-p-hero.is-sw { transition: none; } }
/* Al cambiar, el bloque nuevo entra subiendo un poco. */
.eh-gas-pv.is-in { animation: eh-gas-pv-in 450ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes eh-gas-pv-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 380px) {
	.eh-gas-sw button { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.eh-gas-sw-th,
	.eh-gas-sw button { transition: none; }
	.eh-gas-pv.is-in { animation: none; }
}

/* ---------- Logo de la marca y «Cómo llegar» en los listados ---------- */

/* Los textos ocultos de las cabeceras (posición absoluta) no se escapan del contenedor con scroll. */
.eh-gas .eh-table-wrap,
.eh-gas-v2 .eh-p-tabla-w { position: relative; }

.eh-gas-st { display: flex; align-items: center; gap: 10px; }
.eh-gas-km-n { display: none; }
.eh-gas-dif-n { display: none; }
@media (max-width: 767.98px) {
	/* Panel de la zona en el móvil: sin la columna «Frente a la media»; la diferencia va bajo el precio. */
	.eh-gas-v2 .eh-p-tabla th:nth-child(3),
	.eh-gas-v2 .eh-p-tabla td:nth-child(3) { display: none; }
	.eh-gas-dif-n { display: block; margin-top: 4px; font-size: 0.75rem; color: var(--ink-2, #4e5b70); white-space: nowrap; }
	.eh-gas-v2 .eh-p-tabla .eh-p-numc { width: auto; }
	.eh-gas-v2 .eh-p-tabla th,
	.eh-gas-v2 .eh-p-tabla td { padding-left: 6px; padding-right: 6px; }
}
@media (max-width: 767.98px) {
	/* Buscador en el móvil: sin «#» ni «Distancia»; la distancia va debajo del nombre. */
	.eh-gas-results .eh-gas-pos,
	.eh-gas-results .eh-gas-km { display: none; }
	.eh-gas-km-n { display: inline; }
	/* Que todo quepa a 375 px: «No compensa» en dos líneas y los nombres partidos solo entre palabras. */
	.eh-gas .eh-gas-results td[data-out="neto"] { width: 4.6em; white-space: normal; font-size: 0.875rem; line-height: 1.25; }
	.eh-gas .eh-gas-table th[scope="row"] { min-width: 0; overflow-wrap: break-word; }
	.eh-gas .eh-gas-results th,
	.eh-gas .eh-gas-results td { padding-left: 6px; padding-right: 6px; }
	.eh-gas .eh-gas-results .eh-gas-ruta-td,
	.eh-gas .eh-gas-calc-table .eh-gas-ruta-td { padding-left: 0 !important; padding-right: 4px !important; }
}
.eh-gas-st-t { min-width: 0; }
.eh-gas-logo {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 44px;
	height: 30px;
	padding: 3px 4px;
	background: #fff;
	border: 1px solid rgba(27, 38, 56, 0.12);
	border-radius: 6px;
	overflow: hidden;
}
.eh-gas-logo img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
/* Marca sin logo libre: su inicial en su color. */
.eh-gas-logo-b { background: var(--c); border-color: var(--c); color: #fff; font-size: 0.8125rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1; }
/* Independiente: un surtidor. */
.eh-gas-logo-g { color: #4e5b70; background: #f4f6f8; border-color: transparent; }
.eh-gas-logo-g svg { width: 18px; height: 18px; }

.eh-gas-ruta-td { width: 1%; padding-left: 4px !important; padding-right: 8px !important; text-align: right; white-space: nowrap; }
a.eh-gas-ruta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid rgba(27, 38, 56, 0.18);
	border-radius: 999px;
	background: #fff;
	color: #1b2638;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none !important;
	transition: background-color 150ms cubic-bezier(0.16, 1, 0.3, 1), border-color 150ms cubic-bezier(0.16, 1, 0.3, 1);
}
a.eh-gas-ruta svg { width: 18px; height: 18px; flex: none; }
a.eh-gas-ruta:hover { border-color: #1b2638; background: #f4f6f8; }
a.eh-gas-ruta:focus-visible { outline: 2px solid #1b2638; outline-offset: 2px; }
a.eh-gas-ruta.is-full { padding: 0 16px; }
/* En el móvil, en las tablas, solo el icono (el nombre del botón lo lee el lector de pantalla). */
@media (max-width: 767.98px) {
	.eh-gas-ruta-td a.eh-gas-ruta { padding: 0; width: 44px; }
	.eh-gas-ruta-td a.eh-gas-ruta span { display: none; }
	.eh-gas-logo { width: 38px; height: 26px; }
	.eh-gas-st { gap: 8px; }
}

/* ---------- Con el diseño animado (eh-v2): mismas piezas que la luz ---------- */

.eh-gas-pcrumbs { padding-top: 16px; padding-bottom: 12px; }
.eh-gas-pcrumbs .eh-gas-crumbs { margin: 0; --eh-ink: #1b2638; --eh-ink-2: #4e5b70; }
.eh-gas-v2 .eh-gas-addr { margin: 16px 0 0 !important; color: var(--ink-2); font-size: 0.9375rem; }
.eh-gas-v2 .eh-gas-warn { margin: 12px 0 0 !important; max-width: 62ch; }
.eh-gas-v2 .eh-gas-sub { display: block; font-size: 0.8125rem; line-height: 1.4; font-weight: 400; color: var(--ink-2); }
.eh-gas-v2 .eh-p-tabla tbody th .eh-gas-sub { margin-top: 2px; }
.eh-gas-v2 .eh-p-tabla tbody th { white-space: normal; }
.eh-gas-v2 .eh-p-tabla tbody th a { color: var(--ink); }
.eh-gas-v2 .eh-p-consejo { max-width: 46ch; }
/* Las piezas del diseño de siempre (calculadora, datos, enlaces) con los títulos de la capa animada. */
.eh-gas-psec .eh-h2 { margin: 0 0 12px !important; font-size: var(--fs-h2); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
.eh-gas-psec .eh-gas-insights { font-size: 1.0625rem; max-width: 62ch; }
.eh-gas-psec .eh-gas-insights li { padding-left: 4px; }
.eh-gas-psec .eh-gas-calc,
.eh-gas-psec .eh-gas-dl,
.eh-gas-psec .eh-chart { max-width: 880px; }
.eh-gas-psec .eh-gas-calc { padding: 20px; background: var(--canvas, #f4f6f8); border-radius: 12px; }
.eh-gas-psec .eh-gas-calc .eh-table-wrap { background: #fff; }
.eh-gas-psec-links .eh-h2 { font-size: 1.44rem; }
/* Buscador dentro de la portada (gasolineras baratas). */
.eh-gas-hero-form .eh-gas-search { margin: 0; box-shadow: 0 12px 32px rgba(27, 38, 56, 0.10); border-color: rgba(27, 38, 56, 0.12); }
@media (min-width: 900px) {
	.eh-gas-hero-form .eh-gas-search { padding: 28px; }
	.eh-gas-hero-form .eh-gas-search-row { grid-template-columns: 1fr 1fr; }
	.eh-gas-hero-form .eh-gas-search-row .eh-gas-q { grid-column: 1 / -1; }
	.eh-gas-hero-form .eh-gas-search-row .eh-gas-btn { align-self: end; }
}
.eh-gas-v2-baratas .eh-gas-res .eh-gas-empty { max-width: 62ch; }

@media (prefers-reduced-motion: reduce) {
	.eh-gas .eh-gas-btn { transition: none; }
	.eh-gas .eh-gas-btn:hover { transform: none; }
}
