/* Cabecera nueva del Grupo Playcar (nov-2026). Todo dentro de #header.cab para no chocar con Bootstrap ni con los estilos viejos de #header.
 * Mismo lenguaje que el footer nuevo (pie-v2.css) y el banner de cookies (cookies-v2.css). El color de la marca va en --cab-acento. */
#header.cab {
  --cab-acento: #feed01; --cab-acento-texto: #111; --cab-tinta: #1b2128; --cab-suave: #5b6672; --cab-borde: #e4e7eb;
  position: relative; z-index: 1000; margin: 0; padding: 0; background: #fff; border-bottom: 1px solid var(--cab-borde);
  font-size: 16px; line-height: 1.3; color: var(--cab-tinta);
}
#header.cab *, #header.cab *::before, #header.cab *::after { box-sizing: border-box; }
#header.cab ul { list-style: none; margin: 0; padding: 0; }
#header.cab a { color: inherit; text-decoration: none; }
#header.cab a:focus-visible, #header.cab button:focus-visible { outline: 2px solid var(--cab-tinta); outline-offset: 2px; }
/* Sin "font: inherit": quitaría la negrita y el tamaño de .cab-desp (este selector pesa más) */
#header.cab button { font-family: inherit; line-height: inherit; color: inherit; background: none; border: 0; margin: 0; cursor: pointer; }
#header.cab svg { flex: none; }

.cab-in { display: flex; align-items: center; gap: 22px; max-width: 1200px; min-height: 88px; margin: 0 auto; padding: 0 16px; }
.cab-logo { display: block; flex: none; }
.cab-logo img { display: block; width: auto; height: 74px; max-width: 190px; object-fit: contain; object-position: left center; }

/* ── Menú (escritorio) ── */
.cab-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 1 1 auto; min-width: 0; }
.cab-menu { display: flex; align-items: center; gap: 2px; }
.cab-menu > li > a,
.cab-desp { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 11px;
  font-size: 16px; font-weight: 600; color: var(--cab-tinta); white-space: nowrap; cursor: pointer; }
.cab-menu > li > a::after,
.cab-desp::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 3px; background: transparent; }
.cab-menu > li > a:hover::after,
.cab-desp:hover::after,
.cab-desp[aria-expanded="true"]::after { background: var(--cab-borde); }
.cab-menu > li > a.cab-activo::after,
.cab-desp.cab-activo::after { background: var(--cab-acento); }
.cab-desp svg { width: 16px; height: 16px; transition: transform .15s ease; }
.cab-desp[aria-expanded="true"] svg { transform: rotate(180deg); }

.cab-grupo { position: relative; }
.cab-sub { position: absolute; top: 100%; left: 0; z-index: 1001; min-width: 250px; padding: 6px 0;
  background: #fff; border: 1px solid var(--cab-borde); border-top: 3px solid var(--cab-acento); box-shadow: 0 12px 28px rgba(17,24,39,.14); }
.cab-sub[hidden] { display: none; }
.cab-sub a { display: block; padding: 11px 16px; font-size: 15px; font-weight: 500; color: var(--cab-tinta); cursor: pointer; }
.cab-sub a:hover, .cab-sub a.cab-activo { background: #f4f5f7; }
#header.cab .cab-destacado { color: #c11a1a; } /* Ofertas, Oportunidades… */
/* Muchas entradas (7 o más): un poco más juntas para que quepan en una línea */
#header.cab-muchas .cab-in { gap: 16px; }
#header.cab-muchas .cab-menu > li > a, #header.cab-muchas .cab-desp { padding: 0 8px; font-size: 15.5px; }
#header.cab-muchas .cab-menu > li > a::after, #header.cab-muchas .cab-desp::after { left: 8px; right: 8px; }
.cab-sub a.cab-activo { font-weight: 700; }

.cab-nav-pie { display: flex; align-items: center; gap: 14px; flex: none; }
.cab-contacto { font-size: 16px; font-weight: 600; color: var(--cab-tinta); cursor: pointer; }
.cab-contacto:hover { text-decoration: underline; text-underline-offset: 3px; }
.cab-tel { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px;
  background: var(--cab-acento); color: var(--cab-acento-texto) !important; font-size: 17px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cab-tel:hover { filter: brightness(.94); }

.cab-acciones { display: none; }

/* ── Móvil y tablet: barra compacta con Llamar y menú ── */
@media (max-width: 1149px) {
  .cab-in { flex-wrap: wrap; gap: 0 12px; min-height: 64px; }
  .cab-logo img { height: 50px; max-width: 150px; }
  .cab-acciones { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .cab-llamar, .cab-boton { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
  .cab-llamar { background: var(--cab-acento); color: var(--cab-acento-texto) !important; }
  .cab-boton { border: 1px solid var(--cab-borde) !important; color: var(--cab-tinta); }
  .cab-nav { display: none; order: 3; flex: 1 0 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 16px; border-top: 1px solid var(--cab-borde); }
  #header.cab.cab-abierta .cab-nav { display: flex; }
  .cab-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .cab-menu > li > a,
  .cab-desp { width: 100%; min-height: 50px; padding: 0 4px; justify-content: space-between; font-size: 17px; border-bottom: 1px solid #f0f1f3; }
  .cab-menu > li > a::after, .cab-desp::after { display: none; }
  .cab-menu > li > a.cab-activo, .cab-desp.cab-activo { box-shadow: inset 4px 0 0 var(--cab-acento); padding-left: 14px; }
  .cab-sub { position: static; min-width: 0; padding: 4px 0 8px 12px; border: 0; box-shadow: none; }
  .cab-sub a { padding: 12px 4px; font-size: 16px; }
  .cab-nav-pie { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 14px; }
  .cab-contacto { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--cab-borde); }
  .cab-tel { justify-content: center; min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) { .cab-desp svg { transition: none; } }
