/* =========================================================================
   Sección "En venta" (catálogo y detalle de vehículos).
   Se carga solo en /en-venta/. Usa las variables, .card y .btn de style.css.
   ========================================================================= */

.ev-section { padding-block: clamp(40px, 6vw, 80px); }

/* ---------- Etiquetas ---------- */
.ev-badge {
  display: inline-block; padding: 5px 11px; border-radius: var(--radius-full);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.ev-badge--ejemplo { background: var(--brand-amber-light); color: #8a3f00; }
.ev-badge--vendido { background: var(--brand-grey-dark); color: #fff; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .ev-badge--ejemplo { background: #3a2210; color: #ffb787; }
}
/* Modo oscuro elegido con el botón del pie (misma regla que el bloque anterior). */
:where(:root[data-theme="dark"]) .ev-badge--ejemplo { background: #3a2210; color: #ffb787; }

/* ---------- Catálogo ---------- */
.ev-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.ev-barra-izq { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.ev-barra-der { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; }
.ev-count { color: var(--text-muted); font-weight: 600; margin: 0; }
.ev-ocultar-vendidos { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; font-weight: 600; font-size: 0.92rem; color: var(--text-muted); cursor: pointer; }
.ev-ocultar-vendidos input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-teal); cursor: pointer; }
.ev-ocultar-vendidos[hidden] { display: none; }
.ev-grid > li[hidden] { display: none; }

/* Filtros: a la derecha, a la altura del selector de vista. Sin JavaScript no se muestran. */
.ev-filtros { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ev-filtros[hidden], .ev-filtros-abrir[hidden] { display: none; }
.ev-filtro { position: relative; display: block; margin: 0; }
.ev-filtro-nombre { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ev-filtros select, .ev-filtro-boton, .ev-filtros-abrir {
  min-height: 38px; max-width: 11em; padding: 6px 32px 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8ea8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 15px;
  color: var(--text); font: 600 0.86rem var(--font-body); cursor: pointer; appearance: none; -webkit-appearance: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev-filtros select:hover, .ev-filtro-boton:hover, .ev-filtros-abrir:hover { border-color: var(--brand-teal); }
.ev-filtros select:focus-visible, .ev-filtro-boton:focus-visible, .ev-filtros-abrir:focus-visible, .ev-filtro-panel input:focus-visible {
  outline: none; border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(28, 107, 61, 0.22);
}
/* Filtro en uso: resaltado. */
.ev-filtros select:has(option:checked:not([value=""])), .ev-filtro.activo > .ev-filtro-boton {
  border-color: var(--brand-teal); color: var(--brand-teal-dark); background-color: color-mix(in srgb, var(--brand-teal) 9%, var(--surface));
}
.ev-filtro-panel {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: none; min-width: 250px;
  grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); box-shadow: var(--shadow-lg);
}
.ev-filtro.abierto > .ev-filtro-panel { display: grid; }
.ev-filtro-panel label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.ev-filtro-panel input {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font: 500 0.95rem var(--font-body);
}
/* "Más filtros": desplegable con el resto de campos, uno debajo de otro y con su nombre. */
.ev-filtro-panel-mas { grid-template-columns: 1fr; min-width: 290px; gap: 14px; }
.ev-filtro-panel-mas select { max-width: none; width: 100%; }
.ev-filtro-panel-mas .ev-filtro-rango > .ev-filtro-boton, .ev-filtros.abiertos .ev-filtro-rango > .ev-filtro-boton {
  display: block; min-height: 0; max-width: none; padding: 0; margin-bottom: 4px; border: 0; background: none; box-shadow: none;
  font-size: 0.8rem; color: var(--text-muted); cursor: default; pointer-events: none;
}
.ev-filtro-panel-mas .ev-filtro-rango > .ev-filtro-panel { position: static; display: grid; min-width: 0; padding: 0; border: 0; box-shadow: none; background: none; }
/* Rango en uso: punto junto al nombre (el valor, en el título del botón y dentro del desplegable). */
.ev-filtro.activo > .ev-filtro-boton::before { content: "● "; font-size: 0.7em; vertical-align: 0.15em; }
.ev-filtros-limpiar {
  min-height: 38px; padding: 6px 4px; border: 0; background: none; cursor: pointer;
  color: var(--brand-teal-dark); font: 700 0.86rem var(--font-body); text-decoration: underline; text-underline-offset: 3px;
}
.ev-filtros-limpiar[hidden] { display: none; }
.ev-filtros-abrir { display: none; align-items: center; gap: 8px; max-width: none; padding-right: 14px; background-image: none; }
.ev-filtros-abrir svg { width: 18px; height: 18px; }
.ev-filtros-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-full); background: var(--brand-teal); color: #fff; font-size: 0.75rem; }
.ev-filtros-n[hidden] { display: none; }
.ev-sin-resultados { padding: 36px 0 10px; text-align: center; color: var(--text-muted); }
.ev-sin-resultados p { margin: 0 0 14px; font-weight: 600; }
.ev-sin-resultados[hidden] { display: none; }
/* Escritorio: los filtros en una fila, alineados a la izquierda; el selector de vista, a la derecha. */
@media (min-width: 1101px) {
  .ev-barra-der { flex-basis: 100%; justify-content: space-between; flex-wrap: nowrap; }
  .ev-filtros { flex: 1 1 auto; justify-content: flex-start; flex-wrap: nowrap; min-width: 0; }
  .ev-filtros > .ev-filtro > .ev-filtro-panel { right: auto; left: 0; }   /* los desplegables se abren hacia la derecha */
}
/* Pantallas medianas y móvil: los filtros se pliegan en el botón "Filtros". */
@media (max-width: 1100px) {
  .ev-filtros-abrir:not([hidden]) { display: inline-flex; }
  .ev-filtros:not(.abiertos) { display: none; }
  .ev-barra-der { justify-content: space-between; }
  .ev-filtros.abiertos {
    order: 3; flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 14px 16px;
    align-items: end; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  }
  .ev-filtros.abiertos select { max-width: none; width: 100%; }
  .ev-filtros.abiertos .ev-filtro-mas { display: contents; }
  .ev-filtros.abiertos .ev-filtro-mas > .ev-filtro-boton { display: none; }
  .ev-filtros.abiertos .ev-filtro-panel { position: static; display: grid; min-width: 0; padding: 0; border: 0; box-shadow: none; background: none; }
  .ev-filtros.abiertos .ev-filtro-panel-mas { display: contents; }
}
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .ev-filtros { color-scheme: dark; }
  :where(:root:not([data-theme="light"])) .ev-filtros select:has(option:checked:not([value=""])),
  :where(:root:not([data-theme="light"])) .ev-filtro.activo > .ev-filtro-boton,
  :where(:root:not([data-theme="light"])) .ev-filtros-limpiar { color: #6fdba3; }
}
/* Modo oscuro elegido con el botón del pie (misma regla que el bloque anterior). */
:where(:root[data-theme="dark"]) .ev-filtros { color-scheme: dark; }
:where(:root[data-theme="dark"]) .ev-filtros select:has(option:checked:not([value=""])),
:where(:root[data-theme="dark"]) .ev-filtro.activo > .ev-filtro-boton,
:where(:root[data-theme="dark"]) .ev-filtros-limpiar { color: #6fdba3; }
.ev-vistas { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface); }
.ev-vistas[hidden] { display: none; }
.ev-vistas button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px;
  border: 0; border-radius: var(--radius-full); background: transparent; color: var(--text-muted);
  font: 600 0.86rem var(--font-body); cursor: pointer;
}
.ev-vistas button:hover { color: var(--text); }
.ev-vistas button[aria-pressed="true"] { background: var(--brand-teal); color: #fff; }
.ev-vistas svg { width: 18px; height: 18px; }
@media (max-width: 420px) { .ev-vistas span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.ev-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 26px; grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 980px) { .ev-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ev-grid { grid-template-columns: 1fr; gap: 20px; } }

/* Vista de lista: una fila por vehículo, miniatura a la izquierda e información a la derecha. */
:root[data-vista="lista"] .ev-grid { grid-template-columns: 1fr; gap: 14px; }
:root[data-vista="lista"] .ev-card { flex-direction: row; align-items: stretch; }
:root[data-vista="lista"] .ev-card-media { flex: 0 0 clamp(150px, 30%, 280px); align-self: center; }
:root[data-vista="lista"] .ev-card-body { justify-content: center; }
:root[data-vista="lista"] .ev-card-media .ev-badge { top: 8px; right: 8px; font-size: 0.66rem; padding: 4px 8px; }
:root[data-vista="lista"] .ev-card-media .ev-badge + .ev-badge { top: 36px; }
:root[data-vista="lista"] .ev-card-tipo { top: 8px; left: 8px; font-size: 0.72rem; padding: 4px 9px; }
:root[data-vista="lista"] .ev-card.is-vendido .ev-card-media::after { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.2rem); }
@media (max-width: 600px) {
  :root[data-vista="lista"] .ev-card-media { flex-basis: 132px; }
  :root[data-vista="lista"] .ev-card-body { padding: 10px 12px; }
  :root[data-vista="lista"] .ev-card .ev-card-title { font-size: 1rem; }
  :root[data-vista="lista"] .ev-card .ev-card-price { font-size: 1.15rem; }
  :root[data-vista="lista"] .ev-card-media .ev-badge { display: none; }   /* no caben; la ficha los muestra */
  :root[data-vista="lista"] .ev-card.is-vendido .ev-card-media::after { font-size: 1.15rem; }
}

.ev-card { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
/* Foto completa ajustada al hueco (sin recortar ni deformar); lo que sobra, del color de la tarjeta. */
.ev-card-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface); overflow: hidden; }
.ev-card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s var(--ease); }
/* <picture> (WebP con JPEG de reserva): no cambia la maquetación, la imagen sigue siendo la que cuenta. */
.ev-card-media picture, .ev-gallery-main picture, .ev-thumbs picture { display: contents; }
.ev-card:hover .ev-card-media img { transform: scale(1.04); }
.ev-card-media .ev-badge { position: absolute; top: 14px; right: 14px; box-shadow: var(--shadow-sm); }
.ev-card-media .ev-badge + .ev-badge { top: 48px; }
.ev-card-tipo {
  position: absolute; top: 14px; left: 14px; padding: 5px 11px; border-radius: var(--radius-full);
  background: rgba(10, 20, 36, 0.78); color: #fff; font-size: 0.78rem; font-weight: 600;
}
/* Vendido: la foto en color con "VENDIDO" grande, en diagonal y semitransparente encima. */
.ev-card.is-vendido .ev-card-media::after {
  content: "VENDIDO"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  rotate: -18deg; pointer-events: none;
  font: 800 clamp(2.4rem, 1.6rem + 3vw, 3.6rem)/1 var(--font-display); letter-spacing: 0.12em;
  color: rgba(255, 132, 61, 0.72); -webkit-text-stroke: 1.5px rgba(10, 20, 36, 0.3);   /* naranja de la web (--brand-amber) */
  text-shadow: 0 2px 14px rgba(10, 20, 36, 0.35);
}

/* Información compacta bajo la foto. */
.ev-card-body { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px 16px; flex: 1; }
.ev-card .ev-card-title { font-size: 1.12rem; line-height: 1.25; margin: 0; }
.ev-card .ev-card-version { color: var(--text-muted); font-size: 0.9rem; line-height: 1.35; margin: 0; }
.ev-card .ev-card-meta {
  display: flex; flex-wrap: wrap; gap: 0 10px; margin: 4px 0 0;
  color: var(--text-soft); font-size: 0.86rem; line-height: 1.45;
}
.ev-card-meta span + span::before { content: "·"; margin-right: 10px; color: var(--border); }
.ev-card .ev-card-price {
  margin: 0; margin-top: auto; padding-top: 6px; line-height: 1.2;
  font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--brand-teal-dark);
}

.ev-empty { text-align: center; padding: 40px 0; }
.ev-empty p { color: var(--text-muted); margin-top: 10px; }

.ev-cta { padding-block: clamp(40px, 6vw, 72px); }
.ev-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ev-cta h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
.ev-cta p { color: var(--text-muted); margin-top: 8px; }

/* ---------- Detalle ---------- */
.ev-hero { padding-block: clamp(40px, 6vw, 72px); }

.ev-detail {
  display: grid; gap: 32px 40px;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  grid-template-areas: "gallery summary" "info summary";
  align-items: start;
}
.ev-gallery { grid-area: gallery; min-width: 0; }
.ev-summary { grid-area: summary; position: sticky; top: 96px; padding: 28px; }
.ev-summary:hover { transform: none; }
.ev-info { grid-area: info; min-width: 0; }
@media (max-width: 900px) {
  .ev-detail { grid-template-columns: 1fr; grid-template-areas: "gallery" "summary" "info"; gap: 24px; }
  .ev-summary { position: static; }
}

/* Galería */
.ev-gallery-main {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--ink-900); aspect-ratio: 4 / 3;
}
.ev-gallery-open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.ev-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.ev-gallery-main > .ev-badge { position: absolute; top: 16px; left: 16px; }
.ev-gallery-main > .ev-badge + .ev-badge { top: 52px; }
.ev-gallery-count {
  position: absolute; right: 14px; bottom: 14px; padding: 5px 12px; border-radius: var(--radius-full);
  background: rgba(10, 20, 36, 0.72); color: #fff; font-size: 0.85rem; font-weight: 600; pointer-events: none;
}
.ev-gallery-nav, .ev-lightbox-nav, .ev-lightbox-close {
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.92); color: var(--ink-900); box-shadow: var(--shadow-md);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.ev-gallery-nav:hover, .ev-lightbox-nav:hover, .ev-lightbox-close:hover { transform: scale(1.06); background: #fff; }
.ev-gallery-nav svg, .ev-lightbox-nav svg, .ev-lightbox-close svg { width: 22px; height: 22px; }
.ev-gallery-nav { position: absolute; top: 50%; translate: 0 -50%; }
.ev-gallery-nav.ev-prev { left: 14px; }
.ev-gallery-nav.ev-next { right: 14px; }
.ev-gallery-nav[hidden] { display: none; }
.ev-gallery-nav { z-index: 2; }

/* Vídeos de la galería: miniatura con botón de play; se reproducen al pulsarlo (en-venta.js). */
.ev-gallery-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1;
  display: grid; place-items: center; width: 76px; height: 76px; padding: 0 0 0 5px;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(10, 20, 36, 0.72); color: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.ev-gallery-play:hover { transform: scale(1.06); background: var(--brand-teal); }
.ev-gallery-play svg { width: 34px; height: 34px; fill: currentColor; }
.ev-gallery-play[hidden] { display: none; }
.ev-gallery-main.es-video .ev-gallery-open { cursor: pointer; }
.ev-gallery-video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: #000; }
/* Mientras se reproduce, fuera lo que taparía los controles del vídeo. */
.ev-gallery-main.reproduciendo .ev-gallery-count, .ev-gallery-main.reproduciendo > .ev-badge { display: none; }
.ev-thumbs a { position: relative; }
.ev-thumb-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 30px; height: 30px; padding-left: 2px; border-radius: 50%;
  background: rgba(10, 20, 36, 0.72); color: #fff; pointer-events: none;
}
.ev-thumb-play svg { width: 16px; height: 16px; fill: currentColor; }
.ev-thumb-dur {
  position: absolute; right: 4px; bottom: 4px; padding: 1px 6px; border-radius: var(--radius-full);
  background: rgba(10, 20, 36, 0.78); color: #fff; font-size: 0.7rem; font-weight: 700; font-variant-numeric: tabular-nums; pointer-events: none;
}

.ev-thumbs {
  list-style: none; margin: 12px 0 0; padding: 0 0 6px;
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity;
}
.ev-thumbs li { flex: 0 0 auto; scroll-snap-align: start; }
.ev-thumbs a {
  display: block; width: 104px; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid transparent; opacity: 0.7; transition: opacity 0.2s, border-color 0.2s;
}
.ev-thumbs a:hover { opacity: 1; }
.ev-thumbs a[aria-current="true"] { border-color: var(--brand-teal); opacity: 1; }
.ev-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .ev-thumbs a { width: 84px; } }

/* Resumen lateral */
.ev-summary .ev-summary-price { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; line-height: 1.1; color: var(--brand-teal-dark); }
.ev-summary .ev-sold-note { margin-top: 10px; font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.ev-keyfacts {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden;
}
.ev-keyfacts li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); }
.ev-keyfacts span { font-size: 0.8rem; color: var(--text-soft); }
.ev-keyfacts strong { font-size: 0.98rem; }
.ev-summary .ev-summary-loc { display: flex; font-size: 1rem; align-items: center; gap: 8px; margin-top: 18px; color: var(--text-muted); }
.ev-summary-loc svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--brand-teal); }
.ev-share { margin-top: 22px; }
.ev-share[hidden] { display: none; }
/* "Solicitar información": mismo ancho y estilo que Compartir, justo debajo. */
.ev-info-btn { margin-top: 12px; line-height: normal; } /* igual que el <button> Compartir */
.ev-share[hidden] + .ev-info-btn { margin-top: 22px; }
.ev-summary .ev-share-status { min-height: 1.4em; margin-top: 10px; text-align: center; font-size: 0.9rem; color: var(--success); }

/* Características y descripción */
.ev-info h2 { font-size: 1.35rem; margin: 8px 0 18px; }
.ev-info h2 + * { margin-bottom: 36px; }
.ev-specs {
  margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px 24px;
}
.ev-specs div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.ev-specs div:nth-last-child(-n + 2) { border-bottom: 0; }
.ev-specs dt { color: var(--text-muted); }
.ev-specs dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 600px) {
  .ev-specs { grid-template-columns: 1fr; padding: 4px 18px; }
  .ev-specs div:nth-last-child(2) { border-bottom: 1px solid var(--border); }
}
.ev-description p { color: var(--text-muted); max-width: 70ch; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.ev-description p + p { margin-top: 14px; }
.ev-back a { font-weight: 700; color: var(--brand-teal-dark); }
.ev-summary .ev-back-ficha { margin: 16px 0 0; text-align: center; }
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .ev-back a { color: #6fdba3; }
}
/* Modo oscuro elegido con el botón del pie (misma regla que el bloque anterior). */
:where(:root[data-theme="dark"]) .ev-back a { color: #6fdba3; }

/* ---------- Visor a pantalla completa ---------- */
.ev-lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 10, 18, 0.94);
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.ev-lightbox[hidden] { display: none; }
.ev-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.ev-lightbox img[hidden] { display: none; }
.ev-lightbox-video { max-width: 100%; max-height: calc(100% - 60px); background: #000; }
.ev-lightbox-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; }
.ev-lightbox-nav { position: absolute; top: 50%; translate: 0 -50%; }
.ev-lightbox-nav.ev-prev { left: 16px; }
.ev-lightbox-nav.ev-next { right: 16px; }
.ev-lightbox-count {
  position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; translate: -50% 0;
  color: rgba(255, 255, 255, 0.85); font-weight: 600; font-size: 0.95rem;
}
body.ev-no-scroll { overflow: hidden; }
@media (max-width: 600px) {
  .ev-lightbox-nav { width: 40px; height: 40px; }
  .ev-lightbox-nav.ev-prev { left: 8px; }
  .ev-lightbox-nav.ev-next { right: 8px; }
}

/* Modo oscuro: al final para que gane a las reglas anteriores. */
@media (prefers-color-scheme: dark) {
  :where(:root:not([data-theme="light"])) .ev-card .ev-card-price, :where(:root:not([data-theme="light"])) .ev-summary .ev-summary-price { color: #6fdba3; }
}
/* Modo oscuro elegido con el botón del pie (misma regla que el bloque anterior). */
:where(:root[data-theme="dark"]) .ev-card .ev-card-price, :where(:root[data-theme="dark"]) .ev-summary .ev-summary-price { color: #6fdba3; }
