/*
 * Alf Theme — Products Quick Nav Bar
 * Figma node: 658:2761
 *
 * Sticky dark bar below the hero with two anchor tabs:
 *   "Product Portfolio"  →  #product-portfolio
 *   "Vehicle Platforms"  →  #vehicle-platforms
 *
 * Active tab: bg #cd261d (red)
 * Inactive tab: bg #373737 (dark grey)
 * Active state updated by products.js via scroll position.
 */

.products-qnav {
  position: sticky;
  top: 70px;
  /* sit just below the fixed header (70px) */
  z-index: calc(var(--z-header, 1000) - 1);
  background-color: #252525;
  border-bottom: 1px solid var(--color-primary, #cd261d);
}

.products-qnav__inner {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-block: 10px;
}

/* ── "Quick Nav" label ──────────────────────────────────────────── */
.products-qnav__label {
  flex-shrink: 0;
  border-left: 4px solid var(--color-primary, #cd261d);
  padding: 8px 12px;
}

.products-qnav__label span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #f8faf0;
  white-space: nowrap;
}

/* ── Vertical divider ───────────────────────────────────────────── */
.products-qnav__divider {
  flex-shrink: 0;
  width: 1px;
  height: 26px;
  background-color: rgba(248, 250, 240, 0.3);
}

/* ── Tab menu ───────────────────────────────────────────────────── */
.products-qnav__menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 0 0;
  min-width: 0;
}

/* ── Individual tab button ──────────────────────────────────────── */
.products-qnav__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  border-bottom: 2px solid #f8faf0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  color: #f8faf0;
  background-color: #373737;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.products-qnav__tab:hover:not(.products-qnav__tab--active) {
  background-color: #4a4a4a;
}

.products-qnav__tab--active {
  background-color: var(--color-primary, #cd261d);
}

.products-qnav__tab-icon {
  flex-shrink: 0;
  display: block;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .products-qnav {
    top: 56px;
    /* shorter header on mobile */
  }
}

@media (max-width: 480px) {

  /* Make the bar horizontally scrollable; keep label + divider visible */
  .products-qnav__inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .products-qnav__inner::-webkit-scrollbar {
    display: none;
  }

  .products-qnav__label,
  .products-qnav__divider {
    flex-shrink: 0;
  }

  .products-qnav__menu {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }
}