/* The fixed hover area stays continuous while its panel unfolds below the island. */
@media (min-width: 801px) {
  .header-shell .desktop-nav { align-self: stretch; align-items: stretch; }
  .header-shell .desktop-nav > a { display: flex; align-items: center; }
}

.vehicle-navigation {
  position: fixed;
  z-index: 39;
  top: calc(var(--nav-island-top) + var(--header-current-height, var(--header-full-height)) - 10px);
  left: var(--nav-island-inset);
  right: var(--nav-island-inset);
  width: auto;
  max-width: var(--layout-max, 1440px);
  margin-inline: auto;
  /* A stationary top mask hides the panel behind the higher header layer. */
  clip-path: inset(0 -48px -64px);
  pointer-events: none;
}

.vehicle-navigation[data-open="true"] { pointer-events: auto; }

.vehicle-nav-panel {
  --layout-row-span: 3;
  --matched-icon-width: calc(10cqw - 34px);
  display: grid;
  container-type: inline-size;
  grid-template-columns: minmax(0, 3fr) minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
  column-gap: 16px;
  padding: 26px 20px 16px;
  max-height: calc(100dvh - var(--nav-island-top) - var(--header-current-height, var(--header-full-height)) - 12px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #aa8f7166 transparent;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(115deg, #29343a 0%, #202b30 48%, #172125 100%);
  color: #e5e8e5;
  box-shadow: 0 12px 24px rgb(7 13 16 / 16%), 0 28px 48px rgb(7 13 16 / 22%);
  transform: translateY(calc(-100% - 12px));
  transition: transform 680ms cubic-bezier(.4, 0, .2, 1);
}

.vehicle-navigation[data-open="true"] .vehicle-nav-panel { transform: none; }

.vehicle-nav-group { min-width: 0; }
.vehicle-nav-group + .vehicle-nav-group { padding-left: 16px; border-left: 1px solid #cbb79f26; }
.vehicle-nav-group-links {
  display: grid;
  grid-template-columns: repeat(var(--vehicle-nav-columns), minmax(0, 1fr));
  column-gap: 6px;
}

.vehicle-nav-link {
  min-width: 0;
  min-height: 118px;
  padding: 10px 8px 8px;
  justify-items: center;
  border-radius: 6px;
  color: #dce2df;
  background: transparent;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 360ms ease, transform 520ms cubic-bezier(.22, 1, .36, 1), background-color 420ms ease, color 420ms ease;
}

.vehicle-navigation[data-open="true"] .vehicle-nav-link {
  opacity: 1;
  transform: none;
  transition-delay: calc(100ms + var(--vehicle-nav-order) * 28ms), calc(100ms + var(--vehicle-nav-order) * 28ms), 0ms, 0ms;
}

.vehicle-nav-link svg {
  width: 100%;
  max-width: 126px;
  height: 56px;
  margin-bottom: 9px;
  color: var(--vehicle-outline);
  transition: transform 560ms cubic-bezier(.22, 1, .36, 1), color 560ms ease;
}

/* Give these silhouettes the same scale even when their menu columns differ. */
.vehicle-nav-link svg:has(use:is([href$="#tarlon"], [href$="#qalqon"], [href$="#qalqon2"], [href$="#pickup"])) {
  width: min(126px, var(--matched-icon-width));
}

.vehicle-nav-name { --layout-row-span: 2; text-align: center; font-size: 13px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.vehicle-nav-drive { display: block; margin-top: 4px; color: #a6b2b5; font-size: 11px; font-weight: 500; }

.vehicle-nav-link:hover,
.vehicle-nav-link:focus-visible { color: #ddc6ab; background: #aa8f711a; }
.vehicle-nav-link:hover svg,
.vehicle-nav-link:focus-visible svg { color: #ddc6ab; transform: translateX(3px) scale(1.04); }
.vehicle-nav-link:focus-visible { outline: 2px solid var(--sand); outline-offset: -2px; }

@media (min-width: 801px) and (max-width: 1100px) {
  .vehicle-nav-panel {
    --matched-icon-width: calc((50cqw - 68px) / 3);
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: 24px 20px 14px;
  }
  .vehicle-nav-group:nth-child(-n + 2) { grid-column: span 3; }
  .vehicle-nav-group:last-child { grid-column: span 4; }
  .vehicle-nav-group:nth-child(3) { padding-left: 0; border-left: 0; }
  .vehicle-nav-group:nth-child(n + 3) { margin-top: 12px; padding-top: 14px; border-top: 1px solid #cbb79f26; }
  .vehicle-nav-link { min-height: 112px; padding-block: 8px; }
  .vehicle-nav-link svg { margin-bottom: 8px; }
}

@media (max-width: 800px) {
  .vehicle-navigation { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .vehicle-nav-panel,
  .vehicle-nav-link,
  .vehicle-nav-link svg { transition: none !important; transform: none !important; }
}
