/*
Theme Name: PanoramaMotor
Description: Tema propio de panoramamotor.com. Ligero, sin constructor de páginas, claro/oscuro, fichas con datos y vídeo. Versión de pruebas.
Version: 0.1.0
Author: Borococo S.L.
Text Domain: panoramamotor
*/

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg: #0d0d0d; --surface: #1a1a1a; --panel: #141414;
  --border: #262626; --border-soft: #1f1f1f;
  --text: #ffffff; --text-2: #c8c8c8; --text-3: #aaaaaa;
  --muted: #999999; --dim: #777777; --faint: #666666;
  --accent: #ef9e0f; --accent-ink: #14140c; --accent-text: #ef9e0f;
  --china: #c8102e;
  --chip-bg: #1f1f1f; --chip-border: #2e2e2e;
  --input-bg: #0d0d0d; --input-border: #2a2a2a; --ghost-border: #333333;
  --radius: 10px;
  --gutter: 56px;
  --max: 1440px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f7f6f3; --surface: #ffffff; --panel: #ffffff;
  --border: #e4e1d9; --border-soft: #eceae3;
  --text: #141410; --text-2: #3a3a33; --text-3: #55554d;
  --muted: #6b6b62; --dim: #7d7d74; --faint: #a09d94;
  --accent-text: #9a6600;
  --chip-bg: #f0eee7; --chip-border: #e0ddd4;
  --input-bg: #ffffff; --input-border: #dcd9d0; --ghost-border: #d5d2c9;
  color-scheme: light;
}

/* ── Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text-2);
  font: 16px/1.55 Inter, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; color: var(--text); }
.dsp { font-family: "Barlow Condensed", "Arial Narrow", Inter, sans-serif; letter-spacing: -0.3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; padding: 12px 22px;
  font-weight: 700; font-size: 14px; border: 1px solid transparent; cursor: pointer; text-decoration: none !important; }
.btn-acc { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--ghost-border); color: var(--text); background: transparent; font-weight: 600; }
.kick { font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--accent-text); }
.tag { display: inline-block; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800;
  letter-spacing: .6px; text-transform: uppercase; border-radius: 4px; padding: 4px 9px; }
.tag-soft { background: var(--chip-bg); color: var(--text-3); border: 1px solid var(--chip-border); }
.meta { font-size: 12.5px; color: var(--muted); }
.sec { padding-top: 52px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.sec-head h2 { font-size: 34px; font-weight: 700; line-height: 1; }
.sec-head p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.more { font-size: 13px; font-weight: 600; }

/* ── Imágenes 16:9: las rotuladas NO se recortan nunca ─────────────── */
.ph { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: contain; }
/* Botón de play redondo, sin texto. */
.ph .dur { position: absolute; top: 9px; right: 9px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,.45); }
.ph .dur svg { width: 14px; height: 14px; fill: var(--accent-ink); margin-left: 2px; }

/* ── Cabecera ───────────────────────────────────────────────────────── */
.top { border-bottom: 1px solid var(--border-soft); background: var(--bg); position: sticky; top: 0; z-index: 50; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.logo { font-size: 25px; font-weight: 800; color: var(--text); text-decoration: none !important; white-space: nowrap; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 26px; font-size: 14px; font-weight: 500; }
.nav a { color: var(--text-3); white-space: nowrap; }
.nav a.on, .nav a:hover { color: var(--text); text-decoration: none; }
.nav a.nav-china { color: var(--china); font-weight: 600; }
:root:not([data-theme="light"]) .nav a.nav-china { color: #f05a66; }
.top-r { display: flex; align-items: center; gap: 12px; }
.q { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 14px; width: 220px; }
.q input { border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; width: 100%; outline: none; }
.q svg { width: 15px; height: 15px; stroke: var(--dim); flex-shrink: 0; }
.tg { display: flex; background: var(--chip-bg); border: 1px solid var(--chip-border); border-radius: 20px; padding: 3px; }
.tg button { display: flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--muted);
  font: 600 12px Inter, sans-serif; padding: 5px 11px; border-radius: 17px; cursor: pointer; }
.tg button svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.3; }
.tg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.canal { background: var(--accent); color: var(--accent-ink); border-radius: 20px; padding: 8px 15px; font-size: 13px;
  font-weight: 700; display: flex; gap: 7px; align-items: center; white-space: nowrap; text-decoration: none !important; }
.promesa { border-bottom: 1px solid var(--border-soft); }
.promesa .wrap { display: flex; gap: 14px; align-items: center; padding-top: 13px; padding-bottom: 13px; }
.promesa i { width: 3px; height: 16px; background: var(--accent); border-radius: 2px; flex-shrink: 0; }
.promesa p { margin: 0; font-size: 13.5px; color: var(--text-3); line-height: 1.5; }
.promesa b { color: var(--text); font-weight: 600; }
.promesa em { font-style: normal; color: var(--accent-text); font-weight: 600; }

/* ── Destacado ──────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: 7fr 5fr; gap: 32px; padding-top: 40px; align-items: center; }
.hero .ph { border-radius: var(--radius); }
.hero h1 { font-size: 56px; font-weight: 800; line-height: .96; margin: 14px 0; text-wrap: balance; }
.hero h1 a { color: inherit; text-decoration: none; }
.hero .sum { font-size: 16px; color: var(--text-3); margin: 0 0 18px; }
.hero .acts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ── Datos clave ────────────────────────────────────────────────────── */
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.datos div { background: var(--panel); padding: 14px 16px; }
.datos small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--dim); }
.datos strong { display: block; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.15; }
.datos strong u { text-decoration: none; font-size: 13px; color: var(--muted); font-weight: 600; }
.datos-nota { font-size: 11.5px; color: var(--faint); margin: 8px 0 0; }

/* ── Buscador ───────────────────────────────────────────────────────── */
.busca { margin-top: 44px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 30px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.busca h2 { font-size: 30px; font-weight: 700; line-height: 1; }
.busca p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.busca form { display: flex; gap: 10px; flex: 1; justify-content: flex-end; flex-wrap: wrap; }
.busca select, .busca input[type=search] { background: var(--input-bg); border: 1px solid var(--input-border); color: var(--text);
  border-radius: 8px; padding: 11px 13px; font: inherit; font-size: 14px; min-width: 150px; }

/* ── Rejillas de tarjetas ───────────────────────────────────────────── */
.grid { display: grid; gap: 22px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; color: inherit; text-decoration: none !important; transition: border-color .15s; }
.card:hover { border-color: var(--ghost-border); }
.card .bd { padding: 14px 16px 17px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card h3 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 22px; font-weight: 700; line-height: 1.06; }
.card .ln { font-size: 12px; color: var(--muted); }
.card .src { margin-top: auto; padding-top: 9px; border-top: 1px solid var(--border-soft); font-size: 11px; color: var(--dim); }

/* ── Colecciones ────────────────────────────────────────────────────── */
.col h3 { font-size: 21px; }
.col .ln { line-height: 1.45; }

/* ── Desde China con amor ───────────────────────────────────────────── */
.china { margin-top: 56px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.china-h { background: var(--china); padding: 22px 30px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.china-h .t { display: flex; align-items: center; gap: 16px; }
.china-h svg { width: 30px; height: 30px; fill: #f5b731; flex-shrink: 0; }
.china-h h2 { font-size: 38px; font-weight: 800; color: #fff; line-height: 1; }
.china-h p { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: #f6ccd2; }
.china-h .btn { background: #f5b731; color: #14140c; }
.china-b { background: var(--panel); padding: 26px 30px; }

/* ── Breves + programa ──────────────────────────────────────────────── */
.duo { display: grid; grid-template-columns: 8fr 4fr; gap: 32px; }
.breves { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.breve { padding: 16px 18px; border-bottom: 1px solid var(--border-soft); display: block; color: inherit; text-decoration: none !important; }
.breve:last-child { border-bottom: 0; }
.breve b { display: block; font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.35; margin: 5px 0 0; }
.prog { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.prog-h { padding: 24px 28px 20px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.prog-h h2 { font-size: 34px; font-weight: 800; line-height: 1; margin: 8px 0 6px; }
.prog-items { padding: 20px 28px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; border-bottom: 1px solid var(--border-soft); }
.prog-items a { color: inherit; text-decoration: none !important; display: flex; flex-direction: column; gap: 8px; }
.prog-items .ph { border-radius: 7px; }
.prog-items span { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.25; }
.prog-items em { font-style: normal; font-size: 10px; font-weight: 800; color: var(--accent-text); }
.donde { padding: 22px 28px 24px; }
.donde-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.donde-g div { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 9px; padding: 16px 18px; }
.donde-g b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.donde-g p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ── Ficha (single) ─────────────────────────────────────────────────── */
.migas { font-size: 12px; color: var(--dim); padding-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.migas a { color: var(--dim); }
.ficha-h { padding-top: 18px; }
.ficha-h .tags { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ficha-h h1 { font-size: 64px; font-weight: 800; line-height: .94; margin: 14px 0 12px; letter-spacing: -.8px; }
.ficha-h .sum { font-size: 18px; color: var(--text-3); max-width: 900px; margin: 0; }
.ficha-foto { margin-top: 26px; }
.ficha-foto .ph { border-radius: var(--radius); }
.ficha-datos { margin-top: 26px; }
.video { margin-top: 40px; }
.yt { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; cursor: pointer; border: 0; padding: 0; width: 100%; display: block; }
.yt img { width: 100%; height: 100%; object-fit: contain; opacity: .75; }
.yt .play { position: absolute; inset: 0; margin: auto; width: 84px; height: 60px; border-radius: 14px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; }
.yt .play svg { width: 30px; height: 30px; fill: var(--accent-ink); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cuerpo { display: grid; grid-template-columns: 8fr 4fr; gap: 40px; padding-top: 44px; }
.texto { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.texto p { margin: 0 0 1.1em; }
.texto h2, .texto h3 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 30px; margin: 1.2em 0 .5em; }
.texto img { border-radius: 8px; margin: 1em 0; }
.texto a { text-decoration: underline; }
.lado { display: flex; flex-direction: column; gap: 22px; }
.caja { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.caja h3 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.fila { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.fila:last-child { border-bottom: 0; }
.fila span:first-child { color: var(--muted); }
.fila span:last-child { color: var(--text); font-weight: 500; text-align: right; }
.lista a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; color: var(--text-2); }
.comenta { margin-top: 34px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.comenta b { color: var(--text); font-size: 17px; }
.comenta p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* ── Listados ───────────────────────────────────────────────────────── */
.arch-h { padding-top: 34px; }
.arch-h h1 { font-size: 52px; font-weight: 800; line-height: 1; }
.arch-h p { color: var(--muted); margin: 8px 0 0; }
.pag { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding-top: 40px; }
.pag .page-numbers { padding: 8px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.pag .current { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ── Pie ────────────────────────────────────────────────────────────── */
.pie { margin-top: 64px; border-top: 1px solid var(--border-soft); }
.pie .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 30px; padding-bottom: 40px; }
.pie .logo { font-size: 19px; color: var(--faint); }
.pie nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12px; }
.pie nav a { color: var(--dim); }


/* Cabecera en dos filas antes de que se apelotone */
@media (max-width: 1240px) {
  .top .wrap { flex-wrap: wrap; row-gap: 0; padding-top: 10px; }
  .top-r { flex: 1; justify-content: flex-end; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; padding: 10px 0 12px; }
  .nav::-webkit-scrollbar { display: none; }
}

/* ── Pantallas medianas ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .g4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav { gap: 18px; }
  .q { width: 170px; }
}
@media (max-width: 900px) {
  .hero, .duo, .cuerpo { grid-template-columns: 1fr; }
  .g4, .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prog-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .busca { flex-direction: column; align-items: stretch; }
  .busca form { justify-content: stretch; }
  .busca select, .busca input[type=search], .busca .btn { flex: 1 1 100%; }
}
/* ── Móvil ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .top { position: static; }
  .top-r { width: 100%; flex-wrap: wrap; }
  .q { width: 100%; flex: 1 1 100%; }
  .hero { padding-top: 22px; gap: 18px; }
  .hero h1 { font-size: 36px; }
  .ficha-h h1 { font-size: 38px; }
  .ficha-h .sum { font-size: 16px; }
  .arch-h h1, .sec-head h2, .prog-h h2 { font-size: 27px; }
  .china-h h2 { font-size: 28px; }
  .busca h2 { font-size: 24px; }
  .china-h, .china-b, .busca, .prog-h, .prog-items, .donde { padding-left: 18px; padding-right: 18px; }
  .g4, .g3 { grid-template-columns: 1fr; }
  .g4.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .g4.mini h3 { font-size: 18px; }
  .prog-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .donde-g { grid-template-columns: 1fr; }
  .datos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .texto { font-size: 16.5px; }
  .yt .play { width: 68px; height: 48px; }
}

/* ── Cabecera de móvil: estructura fija ─────────────────────────────── */
@media (max-width: 640px) {
  .top .wrap { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 12px;
    padding-top: 12px; padding-bottom: 0; min-height: 0; }
  .top-r { display: contents; }
  .logo { grid-column: 1; grid-row: 1; font-size: 23px; }
  .tg { grid-column: 2; grid-row: 1; }
  .tg button { padding: 6px 9px; font-size: 0; gap: 0; }
  .tg button svg { width: 15px; height: 15px; }
  .q { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .q input { font-size: 16px; }   /* 16px: iOS no hace zoom al escribir */
  .canal { display: none; }
  .nav { grid-column: 1 / -1; grid-row: 3; order: 0; width: auto; display: flex; flex-wrap: nowrap;
    gap: 20px; overflow-x: auto; padding: 4px 0 12px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); }
  .nav a { flex: 0 0 auto; }
}

/* ── Logotipo real: la cabecera y el pie son siempre oscuros ─────────
   El logo horizontal oficial solo existe en blanco («554-white»), así
   que en vez de retocar la marca, la banda del logo no cambia de tema. */
.logo img { height: 34px; width: auto; display: block; }
.pie .logo img { height: 26px; opacity: .85; }
:root[data-theme="light"] .top, :root[data-theme="light"] .pie {
  --bg: #0d0d0d; --surface: #1a1a1a; --panel: #141414; --border: #262626; --border-soft: #1f1f1f;
  --text: #ffffff; --text-2: #c8c8c8; --text-3: #aaaaaa; --muted: #999999; --dim: #777777; --faint: #666666;
  --accent-text: #ef9e0f; --chip-bg: #1f1f1f; --chip-border: #2e2e2e; --input-bg: #0d0d0d; --input-border: #2a2a2a;
  background: #0d0d0d; color: var(--text-2); color-scheme: dark;
}
:root[data-theme="light"] .top .nav a.nav-china { color: #f05a66; }
@media (max-width: 640px) { .logo img { height: 28px; } }

/* ══ Efectos ══════════════════════════════════════════════════════════ */
/* Tarjetas: se elevan; la foto NO se amplía (cortaría el rótulo). */
.card { transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 28px rgba(0,0,0,.18); }

/* De la tarjeta a la ficha sin corte (navegadores que lo soportan). */
@view-transition { navigation: auto; }
::view-transition-group(pm-foto) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2,.7,.2,1); }

/* Aparición suave al bajar: solo si hay JS y no se pide menos movimiento. */
.js-rv .rv { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.js-rv .rv.dentro { opacity: 1; transform: none; }

/* Barra fija de la ficha. */
.barra { position: fixed; left: 50%; bottom: 14px; transform: translate(-50%, 140%); z-index: 60;
  display: flex; gap: 4px; background: rgba(13,13,13,.92); backdrop-filter: blur(10px);
  border: 1px solid #2e2e2e; border-radius: 30px; padding: 5px; transition: transform .3s cubic-bezier(.2,.7,.2,1);
  padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px) * .3); }
.barra.ver { transform: translate(-50%, 0); }
.barra a { color: #eee; font-size: 13px; font-weight: 600; padding: 9px 15px; border-radius: 24px; white-space: nowrap; text-decoration: none !important; }
.barra a:first-child { background: var(--accent); color: var(--accent-ink); }

/* El programa del sábado, deslizable con el dedo en el móvil. */
@media (max-width: 640px) {
  .prog-items { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
    padding-right: 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .prog-items::-webkit-scrollbar { display: none; }
  .prog-items > * { flex: 0 0 72%; scroll-snap-align: start; }
  .barra a { padding: 9px 12px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .card:hover, .barra { transition: none; transform: none; }
  .barra { transform: translate(-50%, 0); }
  @view-transition { navigation: none; }
}

/* Subtítulo escrito: más presencia que el resumen automático. */
.ficha-h .sum.sub { font-size: 21px; line-height: 1.4; color: var(--text-2); font-weight: 500; }
@media (max-width: 640px) { .ficha-h .sum.sub { font-size: 18px; } }

/* Etiquetas de la ficha: carrocería, propulsión, tracción y DGT */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2);
  background: var(--chip-bg); border: 1px solid var(--chip-border); border-radius: 16px; padding: 6px 12px; text-decoration: none !important; }
a.chip:hover { border-color: var(--accent); color: var(--text); }
.chip-q { font-weight: 500; }
.dgt { color: #fff; border: 0; }
.dgt::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .9; }
.dgt-cero { background: #1a6fb5; }
.dgt-eco  { background: #2e8b57; }
.dgt-c    { background: #3f8f3a; }

/* ── Lo más visto ───────────────────────────────────────────────────── */
.pest { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.pest button { font: inherit; font-size: 13px; font-weight: 700; border: 0; border-radius: 7px; padding: 8px 14px; background: transparent; color: var(--muted); cursor: pointer; }
.pest button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.top-l { padding: 0; border-bottom: 0; }
.top-l em b { font-size: 15px; }
.top-l[hidden] { display: none !important; }
.dgt-nota { font-size: 11.5px; color: var(--faint); margin: 8px 0 0; }
.dgt-nota a { color: var(--muted); text-decoration: underline; }

/* Datos de las tarjetas con icono plano */
/* Una sola línea: si un dato no cabe entero, pasa a una segunda línea que queda oculta. */
.specs { display: flex; flex-wrap: wrap; gap: 0 10px; min-width: 0; max-width: 100%; max-height: 18px; overflow: hidden; }
.spec { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.spec svg { width: 15px; height: 15px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.spec small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 1px; }

/* Botón del canal de YouTube, en el rojo de YouTube */
.canal { background: #ff0033; color: #fff; }
.canal:hover { background: #e0002d; }
.canal svg { color: #fff; }

/* Ordenar listados */
.orden { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.orden-t { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.orden .pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); text-decoration: none !important; }
.orden .pill svg { width: 15px; height: 15px; fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.orden .pill:hover { border-color: var(--accent); color: var(--text); }
.orden .pill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.orden .pill.on svg { stroke: var(--accent-ink); }
.orden-dir { font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 999px; border: 1px dashed var(--accent); color: var(--accent-text); text-decoration: none !important; }
.orden-nota { font-size: 12px; color: var(--faint); margin: 10px 0 0; }
@media (max-width: 640px) {
  .orden { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; }
  .orden::-webkit-scrollbar { display: none; }
  .orden > * { flex: 0 0 auto; }
}

/* Desde China: breves y «Rumbo a Europa» */
.tag-eu { background: #1f4fd1; color: #fff; font-size: 9.5px; padding: 3px 7px; vertical-align: middle; margin-left: 4px; }
.breves-china { margin-top: 28px; }
.breves-china .breve .tag-eu { margin: 0 0 0 6px; }

/* Galería de fotos de prensa en los breves */
.texto .pm-galeria { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 1.4em 0 0; }
.texto .pm-galeria img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 10px; margin: 0; }
.card .ln .ex { font-size: 13.5px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-weight: 400; }
.ph.ph-cover img { object-fit: cover; }
.texto .pm-galeria img { object-fit: cover; }
/* Foto ampliada (galería de los breves) */
.texto .pm-galeria img { cursor: zoom-in; }
.pm-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 56px 16px; cursor: zoom-out; }
.pm-lb[hidden] { display: none; }
.pm-lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.pm-lb button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.pm-lb button:hover { background: var(--accent); color: var(--accent-ink); }
.pm-lb-x { top: 14px; right: 14px; }
.pm-lb-p { left: 14px; top: 50%; transform: translateY(-50%); }
.pm-lb-n { right: 14px; top: 50%; transform: translateY(-50%); }
.ficha-foto img { cursor: zoom-in; }
