/* The sticky section index under the header on product overview pages
   (/products/goodnpo/, /funktionen/): markup <nav class="product-subnav">
   <div class="content product-subnav-inner"> with #anchor chips, as the
   first element of <main>. js/subnav.js marks the chip in view. */

/* Section index as part of the fixed navbar: first element of <main>, navy like
   the header, stuck directly beneath it on scroll. Chips centered; the row
   scrolls horizontally on small screens (safe center keeps the first chip
   reachable when overflowing). */
.product-subnav {
    position: sticky;
    top: 3.5rem;
    z-index: 1000;
    margin-top: 3.5rem; /* clears the fixed header at page top */
    background: var(--header-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 8px rgba(25, 22, 51, 0.12);
}

.product-subnav-inner {
    display: flex;
    justify-content: safe center;
    gap: 0.5rem;
    overflow-x: auto;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.product-subnav a {
    white-space: nowrap;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--header-text-color);
    font-weight: 600;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.product-subnav a:hover,
.product-subnav a:focus-visible {
    background: var(--brand-peach);
    border-color: var(--brand-peach);
    color: var(--brand-navy);
}

/* Scroll-spy: chip of the section currently in view. */
.product-subnav a.is-active {
    background: var(--brand-peach);
    border-color: var(--brand-peach);
    color: var(--brand-navy);
}

/* Anchors must clear header + subnav (≈6.1rem). */
html:has(.product-subnav) {
    scroll-padding-top: 7rem;
}

/* With the subnav clearing the fixed header, the hero no longer needs its
   header-sized top padding (8rem) — halve it so no dead gap opens up. */
.product-subnav ~ .product-hero {
    padding-top: 4rem;
}

/* Phones: the sub-nav already separates the hero from the header, and the
   long intro needs the room to keep the booking button in the first screen. */
@media (max-width: 480px) {
    .product-subnav ~ .product-hero {
        padding-top: 2rem;
    }
}
