/* =========================================================
   THEME & TOKENS
   ========================================================= */
:root{
  --primary:#2b7cff;
  --primary-600:#2b7cff;
  --primary-700:#1e5ed1;
  --primary-800:#174aa6;
  --primary-50:#eef4ff;

  --ring:#93c5fd;
  --ring-dark:#5fa2ff;

  --success:#28a745;
  --success-dark:#1e7e34;

  --bg:#f5f7fb;
  --text:#111827;
  --muted:#6b7280;
  --muted-2:#475569;

  --light:#e9eef6;
  --light-alt:#f8faff;

  /* Sidebar (más angosto para ganar ancho de tabla) */
  --side-left:12px;
  --side-top:110px;
  --side-width:160px;

  /* Layout */
  --content-gap:14px;         /* menos gap a la izquierda */
  --table-extra-gap:0px;      /* sin margen adicional */

  --z-side:6;

  /* Cards / modal */
  --overlay: rgba(0,0,0,.45);
  --card:#ffffff;
  --card-border:#e5e9f2;

  /* Sombras */
  --shadow-0:0 0 0 rgba(0,0,0,0);
  --shadow-sm:0 3px 0 rgba(0,0,0,.07);
  --shadow-md:0 6px 18px rgba(17,24,39,.05);
  --shadow-lg:0 14px 36px rgba(0,0,0,.18);
}

*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html,body{ height:100%; }
body{
  font-family:'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Solo lectores de pantalla */
.sr-only{
  position:absolute !important; width:1px !important; height:1px !important;
  padding:0 !important; margin:-1px !important; overflow:hidden !important;
  clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important;
}

/* =========================================================
   SIDE FILTERS
   ========================================================= */
.side-filters{
  position:fixed; left:var(--side-left); top:var(--side-top);
  width:var(--side-width); z-index:var(--z-side);
}
.side-card{
  width:100%;
  background:radial-gradient(120% 120% at 0% 0%, #ffffff 0%, #f2f6ff 85%);
  border:1px solid #e5e9f2; border-radius:12px;
  padding:10px 12px;
  box-shadow:0 10px 22px rgba(31,41,55,.08);
  transition:box-shadow .15s ease, transform .12s ease;
}
.side-card:hover{ box-shadow:0 14px 28px rgba(31,41,55,.10); transform:translateY(-1px); }
.side-card__title{
  display:flex; align-items:center; gap:8px; font-weight:800;
  letter-spacing:.2px; margin-bottom:6px; color:#111827; font-size:.98rem;
}
.side-card__icon{ width:16px; height:16px; fill:#3b82f6; }
.switch{ display:flex; align-items:center; gap:10px; padding:8px 0; cursor:pointer; user-select:none; }
.switch input{ position:absolute; opacity:0; width:0; height:0; }
.switch-ui{
  width:44px; height:24px; border-radius:999px; background:#e5e7eb; position:relative;
  box-shadow:inset 0 0 0 1px #cbd5e1; transition:all .18s ease; flex:0 0 44px;
}
.switch-ui::after{
  content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:999px; background:#fff;
  box-shadow:0 1px 2px rgba(0,0,0,.25); transition:all .18s ease;
}
.switch input:checked + .switch-ui{ background:var(--primary-600); box-shadow:inset 0 0 0 1px var(--primary-700); }
.switch input:checked + .switch-ui::after{ transform:translateX(20px); }
.switch-text{ font-size:.92rem; font-weight:700; color:#111827; line-height:1.1; overflow-wrap:anywhere; }

/* =========================================================
   LAYOUT GENERAL (más ancho y filtros arriba)
   ========================================================= */
.container{
  /* MUCHO MÁS ANCHA: usa casi todo el viewport en escritorio */
  max-width: min(1840px, 98vw);
  margin:0 auto;
  padding:12px 16px 18px 16px; /* menos padding lateral */
}

/* Encabezado + barra de acciones */
.app-header{
  display:flex; justify-content:space-between; align-items:flex-end; gap:12px;
  margin-bottom:6px;            /* más pegado al top */
}
.title-wrap{ display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; }
h1{ font-size:2rem; display:flex; align-items:center; gap:.55rem; line-height:1; }
h1 .ver{ font-size:.95rem; color:#4b5563; }
.right-bar{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.status{ color:#374151; font-size:.98rem; min-height:1.2em; }

/* Desktop: deja espacio a la izquierda para el panel pero reduce ese hueco */
@media (min-width:1100px){
  .container{ padding-left: calc(var(--side-left) + var(--side-width) + var(--content-gap)); }
  #tableWrapper{ margin-left: var(--table-extra-gap); }
}
/* En pantallas medianas/pequeñas, el panel pasa arriba */
@media (max-width:1099px){
  .side-filters{ position:static; width:auto; margin:10px 20px; }
  .side-card{ display:flex; align-items:center; gap:14px; }
  .side-card__title{ margin:0; }
}

/* =========================================================
   BOTONES
   ========================================================= */
.btn{
  border-radius:11px; cursor:pointer; font-size:.95rem; padding:10px 16px; white-space:nowrap;
  transition:transform .08s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
  border:none; display:inline-flex; align-items:center; justify-content:center; gap:8px;
}
.btn:active{ transform:translateY(1px); }
.btn.mini{ padding:6px 10px; font-size:.86rem; border:1px solid #d9e1ef; background:#fff; }
.btn.action{ background:var(--success); color:#fff; box-shadow:var(--shadow-sm); }
.btn.action:hover{ background:var(--success-dark); }
.btn.outline{ background:#fff; border:1px solid var(--primary-600); color:#0b49b3; }
.btn.outline:hover{ background:var(--primary-50); }
.btn.primary{ background:var(--primary-600); color:#fff; border:1px solid var(--primary-600); box-shadow:var(--shadow-sm); }
.btn.primary:hover{ background:var(--primary-700); border-color:var(--primary-700); }
.btn.primary:active{ background:var(--primary-800); border-color:var(--primary-800); }
.btn.view-image{
  background:var(--primary-600);
  color:#fff !important;
  border:1px solid var(--primary-600);
  box-shadow:var(--shadow-sm);
  min-width:112px;
}
.btn.view-image:hover{ background:var(--primary-700); border-color:var(--primary-700); }

/* =========================================================
   FILTROS (pegados arriba y en una sola línea amplia)
   ========================================================= */
.filters{ margin:2px 0 10px; } /* más arriba */
.filters-grid{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap:10px;
  align-items:end;
}
.f-item{ min-width:240px; } /* selects un poco más anchos */
.f-label{ display:block; font-size:.86rem; font-weight:700; color:#4b5563; margin:0 0 4px 2px; }
.f-actions{ display:flex; gap:10px; }

.select2-container{ width:100% !important; }
.select2-container--default .select2-selection--single{
  height:42px; border:1px solid #d9e1ef; border-radius:10px; outline:none; background:#fff;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
  line-height:40px; padding-left:14px; color:#111827;
}
.select2-container--default .select2-selection--single .select2-selection__arrow{ height:40px; right:8px; }
.select2-dropdown{
  border:1px solid #d9e1ef; border-radius:10px; overflow:hidden; box-shadow:0 12px 22px rgba(15,23,42,.12);
}
.select2-results__option--highlighted[aria-selected]{ background:#e7efff; color:#111827; }

/* Indicador de carga */
#loading{ display:none; text-align:center; color:var(--primary-700); margin:4px 0 12px; font-weight:700; }

/* =========================================================
   TABLA RESULTADOS (más ancha)
   ========================================================= */
#tableWrapper{
  overflow-x:auto; overflow-y:auto; max-height:76vh;
  border:1px solid #e5e7eb; border-radius:12px; background:#fff; box-shadow:var(--shadow-md);
}
.table{ width:100%; border-collapse:separate; border-spacing:0; table-layout:auto; }
.table thead th{
  position:sticky; top:0;
  background:linear-gradient(#f7f9ff, #eef2ff);
  padding:12px 10px; text-align:left;
  border-bottom:1px solid #e4e7f0; z-index:2; color:#0f172a;
  font-weight:800;
}
.table td,.table th{
  padding:12px 10px; vertical-align:top;
  border-bottom:1px solid #eef2f7;
}
.table tbody tr:last-child td{ border-bottom:none; }
.table tbody tr{ transition:background .12s ease; }
.table tbody tr:hover{ background:#f4f8ff; }
.num-col,.table thead th.num-col,.table td.num{
  text-align:center; font-variant-numeric:tabular-nums; letter-spacing:.2px;
}

/* Column widths (flexibles para aprovechar el ancho extra) */
.c-sku{ width:160px; }
.c-ano{ width:88px; }
.c-marca{ width:120px; }
.c-modelo{ width:160px; }
.c-motor{ width:260px; }       /* más espacio a motores */
.c-versiones{ width:150px; }
.c-num{ width:110px; }
.c-img{ width:125px; }

/* Chips de motor */
.motor-cell .chip{
  display:inline-block; padding:4px 8px; border-radius:999px;
  background:#eef5ff; border:1px solid #d7e4ff; margin:3px 4px 0 0;
  font-size:.88rem; font-weight:700; color:#0b49b3;
}

/* Filas de grupo (categoría) */
.group-row td{
  background:#e3edff !important; font-weight:800; letter-spacing:.2px; text-transform:uppercase;
  border-top:3px solid #c7d7ff; color:#0f172a;
}

/* =========================================================
   MODALES (SKU y Versiones XL)
   ========================================================= */
.modal{
  display:none; position:fixed; inset:0; background:var(--overlay);
  justify-content:center; align-items:center; padding:10px; z-index:9998;
}
.modal-content{
  position:relative; background:var(--card); padding:0; border-radius:18px; width:96%;
  max-width:940px; box-shadow:var(--shadow-lg); overflow:hidden; border:1px solid var(--card-border);
}
.modal-md{ max-width:720px; }
.modal-xl{ max-width:1100px; }  /* grande para ver bien las versiones */
.modal-close{
  position:absolute; top:14px; right:16px; font-size:1.8rem; line-height:1; cursor:pointer; border:none; background:transparent; color:#64748b;
}
.modal-close:hover{ color:#0f172a; }

.modal-header{
  display:flex; gap:14px; align-items:center; padding:16px 20px;
  background:linear-gradient(90deg, #eaf1ff 0%, #ffffff 100%);
  border-bottom:1px solid #e5e9f2;
}
.modal-header-icon{
  width:36px; height:36px; display:flex; align-items:center; justify-content:center;
  border-radius:999px; background:#dbeafe; font-size:20px;
}
.modal-header-text h2{ margin:0; font-size:1.18rem; color:#0f172a; }
.modal-subtitle{ margin-top:2px; font-size:.92rem; color:var(--muted-2); }
.modal-body{ padding:16px 20px 20px 20px; background:#fff; max-height:70vh; overflow:auto; }

/* Tabla de Versiones dentro del modal */
.versions-table thead th{
  background:#f1f5ff; border-bottom:1px solid #dce6ff; text-transform:uppercase; letter-spacing:.3px;
}
.versions-table tbody td{ border-bottom:1px solid #eef2f7; }
.versions-table tbody tr:hover td{ background:#f8fbff; }

/* Cards/resultado de SKU */
.sku-result{ min-height:140px; }
.sku-card{
  border:1px solid #e5e7eb; border-radius:12px; padding:14px; background:#ffffff; box-shadow:var(--shadow-md);
  display:flex; flex-direction:column; gap:10px;
}
.sku-card__body{ display:flex; flex-direction:column; gap:10px; }
.sku-line{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.sku-line__label{ font-weight:700; color:#0f172a; }
.sku-line__value{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background:#f1f5f9; border:1px solid #e2e8f0; padding:4px 8px; border-radius:8px;
}
.sku-title{ font-weight:800; font-size:1.08rem; color:#0f172a; }
.sku-desc{ color:#334155; line-height:1.35; }
.sku-stats{ margin-top:4px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.sku-price{
  display:flex; align-items:center; gap:8px; background:#f0f7ff; border:1px solid #cfe1ff;
  padding:10px 12px; border-radius:12px; width:max-content;
}
.sku-price__label{ font-weight:700; color:#0f172a; }
.sku-price__value{ font-weight:900; font-size:1.2rem; color:#0b5fff; }
.sku-qty{
  display:flex; align-items:center; gap:8px; background:#eef9f1; border:1px solid #cfead7;
  padding:10px 12px; border-radius:12px; width:max-content;
}
.sku-qty__label{ font-weight:700; color:#075e2b; }
.sku-qty__value{ font-weight:900; font-size:1.05rem; color:#0a7a36; }

/* Skeleton */
.sku-skeleton{ border:1px solid #e5e7eb; border-radius:12px; padding:14px; background:#ffffff; }
.sku-skeleton__lines{ display:flex; flex-direction:column; gap:10px; }
.sku-skeleton .line{ width:100%; height:16px; border-radius:8px; background:#eef2f7; }
.shimmer{ background: linear-gradient(90deg, #eef2f7 25%, #f5f8fc 37%, #eef2f7 63%); background-size: 400% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer{ 0%{ background-position: 100% 0; } 100%{ background-position: 0 0; } }

/* Toast */
.toast{
  visibility:hidden; position:fixed; bottom:20px; left:50%; transform:translateX(-50%);
  background:rgba(17,24,39,.92); color:#fff; padding:10px 20px; border-radius:10px; font-size:.95rem; z-index:9999;
}
.toast.show{ visibility:visible; animation:fadeIn .3s, fadeOut .3s 2.7s; }
@keyframes fadeIn{ from{opacity:0} to{opacity:1} }
@keyframes fadeOut{ from{opacity:1} to{opacity:0} }


/* =========================================================
   COMPAT2 - GALERIA POR CATEGORIA / IMAGEN INDIVIDUAL
   ========================================================= */
.group-row-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  width:100%;
}
.group-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
.group-view-all{
  flex:0 0 auto;
  border:1px solid #9fbcff;
  background:#fff;
  color:#0b49b3;
  border-radius:10px;
  padding:7px 12px;
  font:inherit;
  font-size:.84rem;
  font-weight:800;
  text-transform:none;
  cursor:pointer;
  box-shadow:0 1px 2px rgba(15,23,42,.06);
}
.group-view-all:hover{
  background:#f7faff;
  border-color:#6f9cff;
}
.group-view-all:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.group-count{
  display:inline-flex;
  min-width:22px;
  height:22px;
  margin-left:5px;
  padding:0 6px;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#e8f0ff;
  color:#16478f;
  font-size:.76rem;
  font-weight:900;
}
.modal-gallery{
  max-width:1380px;
}
.gallery-modal-body{
  max-height:78vh;
  padding:18px 20px 24px;
  background:#f8fafc;
}
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(210px, 1fr));
  gap:16px;
  align-items:stretch;
}
.gallery-grid.is-single{
  grid-template-columns:minmax(280px, 760px);
  justify-content:center;
}
.gallery-card{
  display:flex;
  min-width:0;
  flex-direction:column;
  overflow:hidden;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:16px;
  box-shadow:0 6px 18px rgba(15,23,42,.07);
}
.gallery-image-wrap{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  aspect-ratio:4 / 3;
  background:#fff;
  overflow:hidden;
}
.gallery-grid.is-single .gallery-image-wrap{
  aspect-ratio:16 / 10;
  max-height:58vh;
}
.gallery-product-image{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  padding:8px;
  background:#fff;
}
.gallery-image-empty{
  position:absolute;
  inset:0;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:7px;
  padding:18px;
  text-align:center;
  color:#64748b;
  background:linear-gradient(135deg,#f8fafc,#eef2f7);
  font-size:.9rem;
  font-weight:700;
}
.gallery-image-empty__icon{
  font-size:2rem;
}
.gallery-card-body{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:12px 14px 14px;
  border-top:1px solid #eef2f7;
}
.gallery-sku{
  color:#475569;
  font-size:.82rem;
  font-weight:750;
  overflow-wrap:anywhere;
}
.gallery-price{
  color:#0f172a;
  font-size:1.18rem;
  line-height:1.1;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.gallery-price-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-top:2px;
}
.gallery-availability{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:wrap;
}
.availability-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:25px;
  padding:5px 9px;
  border-radius:999px;
  border:1px solid transparent;
  font-size:.68rem;
  line-height:1;
  font-weight:900;
  letter-spacing:.2px;
  white-space:nowrap;
  text-transform:uppercase;
}
.availability-pill::before{
  content:"";
  width:6px;
  height:6px;
  flex:0 0 6px;
  border-radius:50%;
  background:currentColor;
}
.availability-pill--store{
  color:#c45a0a;
  background:#fff0e5;
  border-color:#ffd0ae;
}
.availability-pill--dna{
  color:#168344;
  background:#e8f8ee;
  border-color:#b9eac9;
}
.gallery-no-results{
  grid-column:1 / -1;
  padding:34px 18px;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  background:#fff;
  color:#64748b;
  text-align:center;
  font-weight:700;
}
@media (max-width:700px){
  .group-row-inner{ gap:10px; }
  .group-view-all{ padding:6px 9px; font-size:.78rem; }
  .gallery-modal-body{ padding:12px; }
  .gallery-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
  .gallery-card-body{ padding:9px 10px 11px; }
  .gallery-price{ font-size:1rem; }
  .gallery-sku{ font-size:.74rem; }
  .gallery-grid.is-single{ grid-template-columns:1fr; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:1200px){
  .filters-grid{ grid-template-columns: 1fr 1fr; }
  .f-item{ min-width:180px; }
  .right-bar{ gap:8px; }
  .btn{ padding:8px 12px; font-size:.9rem; }
  .table td,.table th{ padding:10px 8px; }
  .status{ width:100%; }
}

/* =========================================================
   MODO OSCURO
   ========================================================= */
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0f172a; --text:#e5e7eb; --muted:#a3aed0; --light:#1f2937; --light-alt:#111827;
    --card:#0b1220; --card-border:#243045;
  }
  body{ background:var(--bg); color:#e5e7eb; }
  .side-card{ background:radial-gradient(120% 120% at 0% 0%, #0f172a 0%, #111827 85%); border-color:#1f2937; }
  .select2-container--default .select2-selection--single{ background:#0b1220; border-color:#243045; color:#e5e7eb; }
  .select2-dropdown{ background:#0b1220; border-color:#243045; }
  #tableWrapper{ background:#0b1220; border-color:#243045; }
  .table thead th{ background:linear-gradient(#10192e, #0b1220); border-color:#1f2937; color:#e5e7eb; }
  .table td,.table th{ border-color:#1f2538; }
  .table tbody tr:hover{ background:#0f1b35; }
  .group-row td{ background:#152445 !important; border-top-color:#1f3566; color:#dbeafe; }

  .modal-content{ background:var(--card); border-color:var(--card-border); }
  .group-view-all{ background:#0b1220; border-color:#31579c; color:#dbeafe; }
  .group-view-all:hover{ background:#101b33; border-color:#4675c8; }
  .group-count{ background:#1d3158; color:#dbeafe; }
  .gallery-modal-body{ background:#0f172a; }
  .gallery-card{ background:#0b1220; border-color:#243045; }
  .gallery-image-wrap,.gallery-product-image{ background:#fff; }
  .gallery-card-body{ border-top-color:#243045; }
  .gallery-sku{ color:#a3aed0; }
  .gallery-price{ color:#f8fafc; }
  .gallery-no-results{ background:#0b1220; border-color:#334155; color:#a3aed0; }
  .modal-header{ background:linear-gradient(90deg, #0b1220 0%, #0b1220 100%); border-bottom-color:#1f2937; }
  .modal-header-text h2{ color:#e5e7eb; }
  .modal-subtitle{ color:#a3aed0; }
  .modal-close{ color:#93a4c8; }
  .modal-close:hover{ color:#fff; }

  .versions-table thead th{ background:#10192e; border-bottom-color:#1f2937; }
  .versions-table tbody td{ border-bottom-color:#1f2538; }

  .btn.view-image{
    background:#2d5cff; border-color:#244ec7; color:#fff !important;
  }
  .btn.view-image:hover{ background:#244ec7; border-color:#1f42ac; }
}

/* =========================================================
   ACCESIBILIDAD & OTROS
   ========================================================= */
a:focus-visible, button:focus-visible, .select2-selection:focus-visible, input:focus-visible{
  outline:3px solid var(--ring); outline-offset:2px; border-radius:10px;
}
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}
@media print{
  .side-filters{ display:none !important; }
  #tableWrapper{ max-height:none; box-shadow:none; border:none; }
  .btn.view-image{ color:#000 !important; background:#fff !important; border:1px solid #999 !important; }
}


/* KCS COMPAT2 BRANCHES + VEHICLE CATALOG + THUMBNAILS */
.vehicle-catalog{margin:14px 0 16px;padding:16px;background:var(--card,#fff);border:1px solid var(--card-border,#e5e7eb);border-radius:16px;box-shadow:0 8px 24px rgba(15,23,42,.06)}
.vehicle-catalog__head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:12px}
.vehicle-catalog__eyebrow{font-size:.68rem;font-weight:800;letter-spacing:.12em;color:#64748b}
.vehicle-catalog h2{margin:3px 0 0;font-size:1.05rem}
.vehicle-catalog__hint{color:#64748b;font-size:.78rem}
.vehicle-category-grid{display:flex;flex-wrap:wrap;gap:8px}
.vehicle-category-chip{border:1px solid #dbe4f0;background:#fff;color:#172033;border-radius:999px;padding:8px 10px 8px 12px;display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-weight:700;transition:.16s ease}
.vehicle-category-chip:hover{border-color:#8eb3ff;transform:translateY(-1px);box-shadow:0 4px 12px rgba(37,99,235,.10)}
.vehicle-category-chip__count{min-width:24px;height:24px;padding:0 7px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#eaf1ff;color:#1d4ed8;font-size:.76rem}
.c-availability{width:270px}.branch-cell{min-width:245px}
.branch-stock{display:flex;flex-direction:column;gap:5px;align-items:flex-start}
.branch-pills{display:flex;flex-wrap:wrap;gap:5px}
.branch-pill{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:5px 8px;font-size:.72rem;line-height:1;white-space:nowrap;border:1px solid transparent}
.branch-pill--matriz{background:#fff4df;border-color:#ffd99b;color:#8a4b00}
.branch-pill--ind{background:#e8f1ff;border-color:#b9d2ff;color:#174ea6}
.branch-pill--gdl{background:#e8f8ee;border-color:#bde8ca;color:#166534}
.branch-total{font-size:.7rem;color:#64748b;font-weight:700}
.branch-none{font-size:.74rem;color:#94a3b8}
.branch-stock--compact .branch-pill{font-size:.68rem;padding:4px 7px}
.gallery-branches{margin-top:8px}
.thumb-cell{width:84px;text-align:center}
.product-thumb-btn{width:66px;height:66px;padding:0;border:1px solid #dbe4f0;background:#fff;border-radius:12px;overflow:hidden;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:.16s ease}
.product-thumb-btn:hover{border-color:#7aa7ff;transform:scale(1.03);box-shadow:0 6px 14px rgba(37,99,235,.12)}
.table-product-thumb{width:100%;height:100%;object-fit:contain;background:#fff}
.table-thumb-empty{width:100%;height:100%;align-items:center;justify-content:center;padding:5px;color:#94a3b8;font-size:.62rem;text-align:center}
@media (max-width:900px){.vehicle-catalog__head{align-items:flex-start;flex-direction:column;gap:5px}.vehicle-catalog__hint{display:none}.c-availability{width:220px}.branch-cell{min-width:200px}}
@media (prefers-color-scheme: dark){.vehicle-catalog{background:#0b1220;border-color:#243045}.vehicle-category-chip{background:#10192e;border-color:#2b3d5f;color:#e5e7eb}.vehicle-category-chip__count{background:#1d3158;color:#dbeafe}.branch-pill--matriz{background:#3b2b12;border-color:#5f451a;color:#fde7b2}.branch-pill--ind{background:#14284c;border-color:#244a84;color:#cfe1ff}.branch-pill--gdl{background:#123322;border-color:#235b3b;color:#c9f4d8}.product-thumb-btn{background:#fff;border-color:#334155}}


/* KCS COMPAT2 COMPACT VEHICLE CATALOG 20261005 */
.vehicle-catalog.vehicle-catalog--compact{
  margin:10px 0 12px;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
}
.vehicle-catalog__bar{
  display:flex;
  align-items:center;
}
.vehicle-catalog-toggle{
  min-height:42px;
  max-width:100%;
  padding:8px 12px;
  display:inline-flex;
  align-items:center;
  gap:9px;
  border:1px solid #c8d7f4;
  border-radius:12px;
  background:#fff;
  color:#174ea6;
  font-size:.9rem;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(15,23,42,.04);
  transition:.16s ease;
}
.vehicle-catalog-toggle:hover{
  border-color:#7aa7ff;
  background:#f8fbff;
  box-shadow:0 5px 14px rgba(37,99,235,.10);
}
.vehicle-catalog-toggle__icon{
  width:26px;
  height:26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:#eaf1ff;
  color:#2563eb;
  font-size:.92rem;
}
.vehicle-catalog-toggle__text{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.vehicle-catalog-toggle__count{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  background:#edf3ff;
  color:#2563eb;
  font-size:.72rem;
  white-space:nowrap;
}
.vehicle-catalog-toggle__chevron{
  margin-left:1px;
  color:#64748b;
  font-size:1rem;
  line-height:1;
  transition:transform .16s ease;
}
.vehicle-catalog.is-open .vehicle-catalog-toggle__chevron{
  transform:rotate(180deg);
}
.vehicle-catalog__body{
  margin-top:8px;
  padding:13px 14px 14px;
  background:var(--card,#fff);
  border:1px solid var(--card-border,#e5e7eb);
  border-radius:14px;
  box-shadow:0 8px 24px rgba(15,23,42,.05);
}
.vehicle-catalog__body[hidden]{
  display:none !important;
}
.vehicle-catalog__body-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
#vehicleCatalogTitle{
  font-size:.92rem;
  font-weight:850;
  color:#0f172a;
}
.stock-odoo-cell{
  font-weight:800;
  color:#172033;
}
@media (max-width:900px){
  .vehicle-catalog-toggle{width:100%;justify-content:flex-start}
  .vehicle-catalog-toggle__count{margin-left:auto}
  .vehicle-catalog__body-head{align-items:flex-start;flex-direction:column;gap:3px}
}
@media (prefers-color-scheme: dark){
  .vehicle-catalog-toggle{background:#0b1220;border-color:#31507f;color:#dbeafe}
  .vehicle-catalog-toggle:hover{background:#101b33;border-color:#4675c8}
  .vehicle-catalog-toggle__icon,.vehicle-catalog-toggle__count{background:#1d3158;color:#dbeafe}
  #vehicleCatalogTitle{color:#e5e7eb}
  .stock-odoo-cell{color:#e5e7eb}
}
