/* ---------- Tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #1a202c;
  --ink-soft: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --celeste: #29AECC;
  --celeste-dark: #1f8aa3;
  --celeste-soft: #e0f4f9;
  --accent: var(--celeste);
  --accent-dark: var(--celeste-dark);
  --accent-2: #f57c00;
  --hl: var(--celeste-soft);
  --hl-border: var(--celeste);
  --ok: #16a34a;
  --warn: #dc2626;
  --shadow: 0 4px 16px rgba(15,23,42,.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --radius: 8px;
  --tap: 44px;
}
html, body { margin: 0; padding: 0; }
html { height: 100%; }
html[data-theme="light"], html:not([data-theme]) { color-scheme: light; }

/* Modo oscuro: redefine los tokens del :root */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #273449;
  --ink: #e2e8f0;
  --ink-soft: #94a3b8;
  --border: #334155;
  --border-strong: #475569;
  --celeste: #38bdd6;
  --celeste-dark: #29aecc;
  --celeste-soft: #1e3a44;
  --hl: var(--celeste-soft);
  --hl-border: var(--celeste);
  --shadow: 0 4px 16px rgba(0,0,0,.45);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
}

/* Imágenes del despiece: invertir para que vayan en negativo (líneas claras sobre fondo oscuro) */
html[data-theme="dark"] .fig-wrap img { filter: invert(1) hue-rotate(180deg); background: #fff; }
html[data-theme="dark"] .fig-grid li img { filter: invert(.92) hue-rotate(180deg); background: #f3f4f6; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  font-size: 15px;
  line-height: 1.4;
  /* dvh: altura dinámica real (Safari iOS recalcula cuando colapsa/expande la barra). vh como fallback */
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
[hidden] { display: none !important; }

.mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
button, input { font: inherit; color: inherit; }
a { color: var(--accent); }
.icon-btn {
  width: var(--tap); height: var(--tap); min-width: var(--tap);
  border: 0; background: transparent; cursor: pointer; border-radius: 6px;
  font-size: 22px; line-height: 1; padding: 0; color: var(--ink);
  touch-action: manipulation;
}
.icon-btn:hover { background: rgba(0,0,0,.05); }
.icon-btn:active { background: rgba(0,0,0,.1); }

/* ---------- Shop chrome ---------- */
.shop-chrome {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.chrome-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; }
.brand img {
  height: 52px; width: auto;
  display: block;
}
.chrome-nav { display: flex; gap: 18px; align-items: center; }
.chrome-nav a {
  color: var(--ink); text-decoration: none;
  font-size: .92rem; font-weight: 500;
  padding: 8px 10px; border-radius: 6px;
  transition: background .12s, color .12s;
}
.chrome-nav a:hover { background: var(--celeste-soft); color: var(--celeste-dark); }

/* Selector idioma */
.lang-select { position: relative; flex-shrink: 0; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 20px;
  cursor: pointer;
  font-size: .82rem; font-weight: 600;
  transition: background .15s, border-color .15s;
}
.lang-btn:hover { background: var(--celeste-soft); border-color: var(--celeste); color: var(--celeste-dark); }
.lang-btn .lang-current { line-height: 1; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  list-style: none; margin: 0; padding: 6px 0;
  min-width: 160px;
  z-index: 50;
}
.lang-menu li {
  padding: 8px 14px;
  cursor: pointer;
  font-size: .88rem;
  color: var(--ink);
  white-space: nowrap;
}
.lang-menu li:hover { background: var(--celeste-soft); color: var(--celeste-dark); }
.lang-menu li.active { background: var(--celeste-soft); color: var(--celeste-dark); font-weight: 600; }

/* Toggle modo claro/oscuro */
.theme-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
  padding: 0;
}
.theme-btn:hover { background: var(--celeste-soft); border-color: var(--celeste); color: var(--celeste-dark); }
.theme-btn svg { width: 20px; height: 20px; display: block; }
.theme-btn .theme-icon-sun { display: none; }
.theme-btn .theme-icon-moon { display: block; }
html[data-theme="dark"] .theme-btn .theme-icon-sun { display: block; }
html[data-theme="dark"] .theme-btn .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-btn { color: #fbbf24; border-color: var(--border-strong); }
.chrome-crumb {
  max-width: 1400px; margin: 0 auto;
  padding: 8px 16px 10px;
  font-size: .82rem; color: var(--ink-soft);
  display: flex; gap: 8px; align-items: center;
  border-top: 1px solid var(--border);
}
.chrome-crumb a { color: var(--ink-soft); text-decoration: none; }
.chrome-crumb a:hover { color: var(--celeste-dark); }
.chrome-crumb .sep { color: var(--border-strong); }
.chrome-crumb [aria-current="page"] { color: var(--ink); font-weight: 500; }

/* ---------- Footer ---------- */
.shop-foot {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: .82rem;
  color: var(--ink-soft);
  flex-shrink: 0;
}
.shop-foot a { color: var(--celeste-dark); text-decoration: none; }
.shop-foot a:hover { text-decoration: underline; }
.shop-foot .sep { margin: 0 6px; color: var(--border-strong); }
.foot-inner { max-width: 1400px; margin: 0 auto; }

/* ---------- App (landing + viewer) ---------- */
.app {
  flex: 1;
  min-height: 0;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ---------- Landing ---------- */
.landing {
  flex: 1;
  overflow-y: auto;
  max-width: 1400px; width: 100%; margin: 0 auto; padding: 24px 16px 40px;
}
.landing-header { text-align: center; margin-bottom: 24px; }
.landing-header h1 { margin: 0 0 4px; font-size: 1.6rem; color: var(--celeste-dark); }
.landing-header .variants { margin: 0 0 16px; color: var(--ink-soft); font-size: .9rem; }
.search-wrap { max-width: 420px; margin: 0 auto 12px; }
#search-landing {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); outline: 0; box-shadow: var(--shadow-sm);
}
#search-landing:focus { border-color: var(--celeste); box-shadow: 0 0 0 3px rgba(41,174,204,.2); }
.landing-header .stats { margin: 0; color: var(--ink-soft); font-size: .85rem; }

.fig-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.fig-grid li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.fig-grid li:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--celeste); }
.fig-grid li img { width: 100%; height: 120px; object-fit: contain; background: var(--surface-2); display: block; }
.fig-grid li .meta { padding: 8px 10px; font-size: .8rem; }
.fig-grid li .num { color: var(--celeste-dark); font-weight: 700; }
.fig-grid li .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); margin-top: 2px; line-height: 1.25; font-weight: 500; }

/* ---------- Search results ---------- */
.search-results {
  position: fixed; left: 0; right: 0; top: auto; bottom: 0;
  /* colocamos bajo el header pero como overlay a toda la app */
  top: 0;
  z-index: 100;
  background: var(--surface);
  overflow-y: auto;
}
.search-results .item {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; align-items: center;
}
.search-results .item:hover { background: var(--surface-2); }
.search-results .item .ref {
  font-weight: 700; color: var(--celeste-dark); min-width: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--celeste-soft); padding: 2px 8px; border-radius: 10px;
  font-size: .85rem;
}
.search-results .item .part { flex: 1; min-width: 0; }
.search-results .item .partno { font-size: .8rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- Viewer ---------- */
.viewer {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--surface);
}
.viewer-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas: "back crumb nav" "back title nav";
  align-items: center;
  column-gap: 12px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
#btn-back { grid-area: back; }
.crumb { grid-area: crumb; display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-soft); overflow: hidden; }
.crumb-link { text-decoration: none; color: var(--ink-soft); }
.crumb-link:hover { color: var(--celeste-dark); }
.crumb-sep { color: var(--border-strong); }
.crumb-sub { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; color: var(--ink); font-weight: 500; }
#v-title { grid-area: title; margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--celeste-dark); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.viewer-nav { grid-area: nav; display: flex; align-items: center; gap: 4px; }
.counter { font-size: .78rem; color: var(--ink-soft); min-width: 40px; text-align: center; }

.mobile-tabs { display: none; border-bottom: 1px solid var(--border); background: var(--surface); }
.mobile-tabs .tab {
  flex: 1; border: 0; background: transparent; padding: 12px 0;
  font-weight: 600; color: var(--ink-soft); cursor: pointer; border-bottom: 3px solid transparent;
  touch-action: manipulation;
}
.mobile-tabs .tab.active { color: var(--celeste-dark); border-bottom-color: var(--celeste); }

.viewer-main {
  flex: 1; display: flex; min-height: 0;
  background: var(--surface-2);
  gap: 16px;
  padding: 16px;
}

/* Panel diagrama */
.panel-diagram {
  flex: 1 1 60%; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stage-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.stage { position: absolute; inset: 0; touch-action: none; overflow: hidden; }
.stage-center {
  position: absolute; inset: 0;
  padding: 16px;
}
.fig-wrap {
  position: relative;
  width: 100%; height: 100%;
  user-select: none; -webkit-user-drag: none;
  transform-origin: center center;
  line-height: 0;
}
.fig-wrap img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.fig-wrap svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }

/* SIN honeyspots — todo invisible. El número ya está en el dibujo del PDF.
   Solo el área hit captura clicks. NO se muestra nada al hover ni al hacer click. */
.co { cursor: pointer; }
.co-hit { fill: transparent; stroke: none; pointer-events: all; cursor: pointer; }
.co-dot, .co-label {
  fill: transparent; stroke: transparent;
  pointer-events: none;
}

/* Controls bar */
.controls-bar {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.ctrl-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--celeste);
  color: white; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(41,174,204,.35);
  transition: background .12s, transform .08s, box-shadow .12s;
  touch-action: manipulation;
  padding: 0;
}
.ctrl-btn svg { width: 22px; height: 22px; display: block; }
.ctrl-btn:hover { background: var(--celeste-dark); box-shadow: 0 3px 10px rgba(31,138,163,.45); }
.ctrl-btn:active { transform: scale(.94); box-shadow: 0 1px 3px rgba(31,138,163,.5); }
.ctrl-btn:focus-visible { outline: 3px solid var(--celeste-soft); outline-offset: 2px; }
.ctrl-btn#btn-nav-prev, .ctrl-btn#btn-nav-next { width: 48px; height: 48px; }
.ctrl-btn#btn-nav-prev svg, .ctrl-btn#btn-nav-next svg { width: 24px; height: 24px; }

/* Panel lista */
.panel-list {
  flex: 1 1 40%; min-width: 340px; max-width: 480px;
  display: flex; flex-direction: column;
  background: var(--surface);
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.list-toolbar { padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
#search-inline {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface-2); outline: 0;
}
#search-inline:focus { border-color: var(--celeste); background: var(--surface); }

.parts-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
  flex: 1 1 auto;
  min-height: 0;
  display: flex; flex-direction: column;
}
.parts-table thead, .parts-table tbody { display: block; width: 100%; }
.parts-table thead { flex: 0 0 auto; }
.parts-table tbody {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.parts-table thead tr, .parts-table tbody tr { display: table; width: 100%; table-layout: fixed; }
.parts-table thead th {
  background: var(--surface-2);
  text-align: left; padding: 10px 12px;
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--border);
}
.parts-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.parts-table .col-ref, .parts-table th.col-ref { width: 64px; text-align: center; white-space: nowrap; }
.parts-table .col-price, .parts-table th.col-price { width: 120px; text-align: right; white-space: nowrap; padding-right: 8px; }
.parts-table tr.row { cursor: pointer; transition: background .1s; }
.parts-table tr.row:hover { background: var(--surface-2); }
.parts-table tr.row.active {
  background: var(--celeste-soft);
  box-shadow: inset 4px 0 0 var(--celeste);
}
.parts-table tr.row.active td { border-bottom-color: var(--celeste); }
.parts-table .ref-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 28px; padding: 0 8px;
  border-radius: 14px; border: 1.5px solid var(--celeste);
  color: var(--celeste-dark); font-weight: 700; font-size: .82rem;
  background: var(--surface);
  white-space: nowrap; word-break: keep-all;
}
tr.row.active .ref-chip { background: var(--celeste); color: white; border-color: var(--celeste); }
.parts-table .desc strong { display: block; font-weight: 600; }
.parts-table .desc .partno { font-size: .78rem; color: var(--ink-soft); margin-top: 2px; font-family: "SF Mono", Menlo, monospace; }
.parts-table .desc .qty { font-size: .72rem; color: var(--ink-soft); margin-top: 2px; }
.parts-table .desc .compat { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .72rem; }
.parts-table .desc .compat.all { color: var(--ink-soft); font-style: italic; }
.parts-table .desc .compat-label { color: var(--ink-soft); font-weight: 600; }
.parts-table .desc .compat-qty { color: var(--ink-soft); margin-left: 2px; }
.parts-table .desc .model-chip {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 7px; border-radius: 10px;
  background: var(--celeste-soft); color: var(--celeste-dark);
  font-weight: 600; font-size: .7rem; white-space: nowrap;
}
.parts-table .desc .model-chip em { font-style: normal; font-weight: 500; opacity: .85; }
.parts-table .actions { margin-top: 6px; display: none; gap: 6px; flex-wrap: wrap; }
.parts-table tr.row.active .actions { display: flex; }
.parts-table .btn-sm {
  font-size: .76rem; padding: 6px 10px; border-radius: 5px; border: 0; cursor: pointer;
  text-decoration: none; font-weight: 600; touch-action: manipulation;
}
.btn-shop { background: var(--celeste); color: white; }
.btn-shop:hover { background: var(--celeste-dark); }
.btn-dutch { background: white; color: var(--accent-2); border: 1px solid var(--accent-2); }
.btn-dutch:hover { background: #fff3e0; }

.price-cell .price { font-weight: 700; color: var(--celeste-dark); white-space: nowrap; display: block; margin-top: 3px; }
.price-cell .src { font-size: .7rem; color: var(--ink-soft); display: block; }
.price-cell .badge { display: inline-block; background: var(--ok); color: white; padding: 2px 6px; border-radius: 10px; font-size: .68rem; font-weight: 600; }
.price-cell .none { color: var(--ink-soft); font-size: .82rem; }
.price-cell .ask-wa {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 7px; border-radius: 12px;
  background: #25D366; color: #fff; text-decoration: none;
  font-size: .68rem; font-weight: 600; white-space: nowrap;
  transition: background .15s;
}
.price-cell .ask-wa:hover { background: #1ebe5a; }
.price-cell .ask-wa .wa-icon { flex-shrink: 0; }

/* CTAs estilo buscador-volvo (vista previa / ver / añadir) */
.cta-btns { display: inline-flex; gap: 3px; align-items: center; margin-top: 4px; }
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; border-radius: 4px;
  font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .3px;
  cursor: pointer; border: none; padding: 4px 7px; line-height: 1;
  transition: transform .08s ease, filter .12s ease, background .15s;
}
.cta-btn:hover { filter: brightness(1.05); }
.cta-btn:active { transform: translateY(1px); }
.cta-btn:disabled { opacity: .6; cursor: wait; }
.cta-btn svg { display: block; }
.cta-btn.cta-preview {
  background: #fff; color: var(--celeste-dark); border: 1.5px solid var(--celeste);
  width: 26px; height: 24px; padding: 0;
}
.cta-btn.cta-view {
  background: var(--celeste); color: #fff;
  height: 24px;
}
.cta-btn.cta-view:hover { background: var(--celeste-dark); }
.cta-btn.cta-add {
  background: #00a64f; color: #fff;
  width: 26px; height: 24px; padding: 0;
}
.cta-btn.cta-add:hover { background: #008f43; }
.cta-btn.loading { position: relative; }
.cta-btn.loading svg, .cta-btn.loading > * { opacity: .3; }
.cta-btn.loading::after {
  content: ''; position: absolute;
  width: 10px; height: 10px; border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast cart feedback */
.cart-toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #00a64f; color: #fff; padding: 12px 20px; border-radius: 8px;
  font-weight: 600; font-size: .9rem; opacity: 0; transition: opacity .2s, transform .2s;
  z-index: 10000; box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.cart-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.cart-toast.warn { background: #d97706; }

/* Modal de vista previa */
#prod-modal { position: fixed; inset: 0; z-index: 9999; }
#prod-modal[hidden] { display: none; }
.pm-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.pm-content {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 12px; padding: 24px;
  width: 90%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.pm-close {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: 0; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: #666; padding: 4px 8px;
}
.pm-close:hover { color: #000; }
.pm-name { margin: 0 30px 6px 0; font-size: 1.05rem; font-weight: 700; }
.pm-ref { color: var(--ink-soft); font-size: .82rem; margin-bottom: 14px; font-family: "SF Mono", Menlo, monospace; }
.pm-price { font-size: 1.3rem; font-weight: 800; color: var(--celeste-dark); margin-bottom: 8px; }
.pm-desc { color: var(--ink); font-size: .85rem; margin-bottom: 20px; line-height: 1.4; }
.pm-actions { display: flex; gap: 8px; }
.pm-btn {
  flex: 1; padding: 10px 14px; border-radius: 6px; font-weight: 700;
  text-decoration: none; text-align: center; border: 0; cursor: pointer;
  font-size: .85rem;
}
.pm-view { background: var(--celeste); color: #fff; }
.pm-view:hover { background: var(--celeste-dark); }
.pm-add { background: #00a64f; color: #fff; }
.pm-add:hover { background: #008f43; }
.pm-cancel { background: #e2e8f0; color: #333; }
.pm-cancel:hover { background: #cbd5e1; }
.pm-feedback { margin-top: 12px; padding: 8px 12px; border-radius: 6px; font-size: .85rem; }
.pm-feedback.ok { background: #d1fae5; color: #065f46; }
.pm-feedback.warn { background: #fef3c7; color: #92400e; }

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .chrome-inner { padding: 8px 12px; }
  .brand img { height: 40px; }
  .chrome-nav { display: none; }
  .chrome-crumb { padding: 6px 12px 8px; font-size: .76rem; }
  /* Footer no aporta valor en móvil, gana espacio vertical */
  .shop-foot { display: none; }

  .viewer-header { grid-template-columns: auto 1fr auto; grid-template-rows: auto; grid-template-areas: "back title nav"; }
  .crumb { display: none; }
  #v-title { font-size: 1rem; }
  .mobile-tabs { display: flex; }
  .viewer-main { flex-direction: column; gap: 0; padding: 0; }
  .panel-diagram { flex: 1 1 auto; border: 0; border-radius: 0; height: 100%; }
  .panel-list { flex: 1 1 auto; min-width: 0; max-width: none; height: 100%; border: 0; border-radius: 0; }
  .viewer[data-mobile-tab="diagram"] .panel-list { display: none; }
  .viewer[data-mobile-tab="list"] .panel-diagram { display: none; }

  .landing { padding: 16px 12px 30px; }
  .landing-header h1 { font-size: 1.35rem; }
}

@media (min-width: 900px) {
  .mobile-tabs { display: none; }
  .panel-list { flex: 0 0 420px; }
}
@media (min-width: 1400px) {
  .panel-list { flex: 0 0 480px; }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
