/* Category navigation.
   Three styles: "text" is the editorial default — names only, with a wide
   drop panel for sub categories. "pill" and "circle" add icons.
   Two layouts: "wrap" shows every category at once, "scroll" keeps one
   swipeable row; the mobile layout is chosen separately. */

.hb-catnav {
    position: relative;
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid var(--hb-line);
}

.hb-catnav.is-sticky {
    position: sticky;
    top: 0;
}

.hb-catnav-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hb-catnav-list {
    display: flex;
    flex: 1;
    gap: 7px;
    margin: 0;
    padding: 12px 0;
    list-style: none;
}

.hb-catnav.is-wrap .hb-catnav-list {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 8px;
}

.hb-catnav.is-scroll .hb-catnav-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.hb-catnav-list::-webkit-scrollbar {
    display: none;
}

.hb-catnav-item {
    position: relative;
    flex: 0 0 auto;
}

.hb-catnav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--hb-ink);
    white-space: nowrap;
}

.hb-catnav-chevron {
    flex: 0 0 auto;
    margin-inline-start: -2px;
    opacity: .45;
    transition: transform .22s ease, opacity .2s ease;
}

.hb-catnav-item:hover > .hb-catnav-link .hb-catnav-chevron {
    transform: rotate(-180deg);
    opacity: 1;
}

/* Everything past the primary entries lives in the panel on desktop. */
@media (min-width: 861px) {
    .hb-catnav-item.is-secondary {
        display: none;
    }
}

/* The "all categories" entry gets a touch more presence. */
.hb-catnav-item--all > .hb-catnav-link {
    font-weight: 800;
}

/* --------------------------------------------------------------------
 * Text style — the professional default
 * ----------------------------------------------------------------- */

.hb-catnav--text .hb-catnav-list {
    gap: 2px;
    row-gap: 0;
    padding: 4px 0;
}

.hb-catnav--text .hb-catnav-item {
    position: static;
}

.hb-catnav--text .hb-catnav-link {
    position: relative;
    padding: 13px 15px;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: .002em;
    transition: color .2s ease;
}

/* Hairline that grows from the middle on hover. */
.hb-catnav--text .hb-catnav-link::after {
    content: '';
    position: absolute;
    inset-inline: 15px;
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--hb-gold), var(--hb-rose));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .28s cubic-bezier(.22, .78, .3, 1);
}

.hb-catnav--text .hb-catnav-link:hover {
    color: var(--hb-rose-ink);
}

.hb-catnav--text .hb-catnav-link:hover::after,
.hb-catnav--text .hb-catnav-item.has-children:focus-within .hb-catnav-link::after {
    transform: scaleX(1);
}

.hb-catnav--text .hb-catnav-item.is-current > .hb-catnav-link {
    color: var(--hb-rose-ink);
    font-weight: 800;
}

.hb-catnav--text .hb-catnav-item.is-current > .hb-catnav-link::after {
    transform: scaleX(1);
}

.hb-catnav--text .hb-catnav-label small {
    margin-inline-start: 5px;
    color: var(--hb-muted);
    font-size: 11px;
    font-weight: 600;
}

/* Wide drop panel, aligned to the page rather than the link. */
.hb-catnav--text .hb-catnav-sub {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    z-index: 5;
    padding: 0;
    background: #fff;
    border: 0;
    border-top: 1px solid var(--hb-line);
    border-radius: 0;
    box-shadow: 0 24px 40px rgba(var(--hb-deep-rgb, 32, 0, 0), .10);
    transform: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s;
}

.hb-catnav--text .hb-catnav-item.has-children:hover .hb-catnav-sub,
.hb-catnav--text .hb-catnav-item.has-children:focus-within .hb-catnav-sub {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.hb-catnav--text .hb-catnav-sub-inner {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
    padding: 20px 0 24px;
}

.hb-catnav--text .hb-catnav-sub-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hb-line-soft);
}

.hb-catnav--text .hb-catnav-sub-title {
    color: var(--hb-burgundy);
    font-size: 17px;
    font-weight: 800;
}

.hb-catnav--text .hb-catnav-sub-all {
    color: var(--hb-rose-ink);
    font-size: 13px;
    font-weight: 700;
}

.hb-catnav--text .hb-catnav-sub ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hb-catnav--text .hb-catnav-sub li {
    flex: 0 1 auto;
    min-width: 180px;
}

.hb-catnav--text .hb-catnav-sub a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px 0;
    color: var(--hb-muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: color .18s ease, padding-inline-start .18s ease;
}

.hb-catnav--text .hb-catnav-sub a:hover {
    background: none;
    color: var(--hb-rose-ink);
    padding-inline-start: 6px;
}

.hb-catnav--text .hb-catnav-sub small {
    color: var(--hb-line);
    font-size: 11px;
}

/* --------------------------------------------------------------------
 * The full catalogue panel
 * ----------------------------------------------------------------- */

.hb-catnav-sub--all .hb-catnav-columns {
    columns: 4;
    column-gap: 40px;
}

.hb-catnav-column {
    break-inside: avoid;
    margin-bottom: 26px;
}

.hb-catnav-column-title {
    display: block;
    margin-bottom: 6px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--hb-line-soft);
    color: var(--hb-burgundy);
    font-size: 14.5px;
    font-weight: 800;
    transition: color .18s ease;
}

.hb-catnav-column-title:hover {
    color: var(--hb-rose-ink);
}

.hb-catnav--text .hb-catnav-sub--all ul {
    display: block;
}

.hb-catnav--text .hb-catnav-sub--all li {
    min-width: 0;
}

.hb-catnav--text .hb-catnav-sub--all a:not(.hb-catnav-column-title) {
    padding: 5px 0;
    font-size: 13.5px;
    font-weight: 500;
}

/* --------------------------------------------------------------------
 * Pill style — icon beside the label
 * ----------------------------------------------------------------- */

.hb-catnav--pill .hb-catnav-link,
.hb-catnav--circle .hb-catnav-link {
    background: #fff;
    border: 1px solid var(--hb-line);
    border-radius: 999px;
    color: var(--hb-burgundy);
    font-size: 14px;
    font-weight: 700;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background-color .2s ease;
}

.hb-catnav--pill .hb-catnav-link {
    padding-inline: 6px 14px;
    padding-block: 6px;
}

.hb-catnav--pill .hb-catnav-link:hover,
.hb-catnav--circle .hb-catnav-link:hover {
    border-color: var(--hb-tint, var(--hb-rose));
    box-shadow: 0 8px 18px rgba(var(--hb-deep-rgb, 32, 0, 0), .07);
    transform: translateY(-2px);
}

.hb-catnav-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    background: var(--hb-tint-soft, var(--hb-gold-soft));
    border-radius: 50%;
    color: var(--hb-tint, var(--hb-gold-ink));
    transition: background-color .2s ease, color .2s ease, transform .25s cubic-bezier(.3, 1.3, .5, 1);
}

.hb-catnav-link:hover .hb-catnav-icon {
    transform: scale(1.08) rotate(-4deg);
}

.hb-catnav--pill .hb-catnav-item.is-current > .hb-catnav-link,
.hb-catnav--circle .hb-catnav-item.is-current > .hb-catnav-link {
    background: linear-gradient(115deg, var(--hb-tint, var(--hb-rose)), var(--hb-lilac));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 22px rgba(var(--hb-rose-rgb, 201, 37, 106), .26);
}

.hb-catnav--pill .hb-catnav-item.is-current .hb-catnav-icon,
.hb-catnav--circle .hb-catnav-item.is-current .hb-catnav-icon {
    background: rgba(255, 255, 255, .24);
    color: #fff;
}

/* Playful tints for the icon styles only. */
.hb-catnav.is-colorful .hb-catnav-item:nth-child(4n + 1) { --hb-tint: var(--hb-gold-ink); --hb-tint-soft: var(--hb-gold-soft); }
.hb-catnav.is-colorful .hb-catnav-item:nth-child(4n + 2) { --hb-tint: var(--hb-rose);     --hb-tint-soft: var(--hb-rose-soft); }
.hb-catnav.is-colorful .hb-catnav-item:nth-child(4n + 3) { --hb-tint: var(--hb-lilac);    --hb-tint-soft: var(--hb-lilac-soft); }
.hb-catnav.is-colorful .hb-catnav-item:nth-child(4n + 4) { --hb-tint: var(--hb-mint);     --hb-tint-soft: var(--hb-mint-soft); }

/* --------------------------------------------------------------------
 * Circle style — icon disc above the label
 * ----------------------------------------------------------------- */

.hb-catnav--circle .hb-catnav-link {
    flex-direction: column;
    gap: 7px;
    padding: 10px 12px;
    max-width: 108px;
    background: none;
    border-color: transparent;
    font-size: 12.5px;
    text-align: center;
    white-space: normal;
}

.hb-catnav--circle .hb-catnav-icon {
    width: 52px;
    height: 52px;
    border: 1px solid var(--hb-line);
}

.hb-catnav--circle .hb-catnav-link:hover {
    box-shadow: none;
}

.hb-catnav--circle .hb-catnav-link:hover .hb-catnav-icon,
.hb-catnav--circle .hb-catnav-item.is-current .hb-catnav-icon {
    background: linear-gradient(145deg, var(--hb-tint, var(--hb-rose)), var(--hb-lilac));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 20px rgba(var(--hb-rose-rgb, 201, 37, 106), .26);
}

.hb-catnav--circle .hb-catnav-item.is-current > .hb-catnav-link {
    background: none;
    color: var(--hb-rose-ink);
    box-shadow: none;
}

/* --------------------------------------------------------------------
 * Compact dropdown for the icon styles
 * ----------------------------------------------------------------- */

.hb-catnav--pill .hb-catnav-sub,
.hb-catnav--circle .hb-catnav-sub {
    position: absolute;
    top: 100%;
    inset-inline-start: 50%;
    z-index: 5;
    min-width: 220px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--hb-line);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(var(--hb-deep-rgb, 32, 0, 0), .14);
    opacity: 0;
    visibility: hidden;
    transform: translate(50%, 8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.hb-catnav--pill .hb-catnav-item.has-children:hover .hb-catnav-sub,
.hb-catnav--pill .hb-catnav-item.has-children:focus-within .hb-catnav-sub,
.hb-catnav--circle .hb-catnav-item.has-children:hover .hb-catnav-sub,
.hb-catnav--circle .hb-catnav-item.has-children:focus-within .hb-catnav-sub {
    opacity: 1;
    visibility: visible;
    transform: translate(50%, 0);
}

.hb-catnav--pill .hb-catnav-sub-head,
.hb-catnav--circle .hb-catnav-sub-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px 10px;
    border-bottom: 1px solid var(--hb-line-soft);
}

.hb-catnav--pill .hb-catnav-sub-title,
.hb-catnav--circle .hb-catnav-sub-title {
    color: var(--hb-burgundy);
    font-size: 13px;
    font-weight: 800;
}

.hb-catnav--pill .hb-catnav-sub-all,
.hb-catnav--circle .hb-catnav-sub-all {
    color: var(--hb-rose-ink);
    font-size: 11px;
    font-weight: 700;
}

.hb-catnav--pill .hb-catnav-sub ul,
.hb-catnav--circle .hb-catnav-sub ul {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.hb-catnav--pill .hb-catnav-sub a,
.hb-catnav--circle .hb-catnav-sub a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--hb-ink);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .18s ease, color .18s ease;
}

.hb-catnav--pill .hb-catnav-sub a:hover,
.hb-catnav--circle .hb-catnav-sub a:hover {
    background: var(--hb-tint-soft, var(--hb-rose-soft));
    color: var(--hb-tint, var(--hb-rose-ink));
}

.hb-catnav--pill .hb-catnav-sub small,
.hb-catnav--circle .hb-catnav-sub small {
    color: var(--hb-muted);
    font-size: 11px;
}

/* --------------------------------------------------------------------
 * Scroll arrows (scroll layout only)
 * ----------------------------------------------------------------- */

.hb-catnav-arrow {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    background: #fff;
    border: 1px solid var(--hb-line);
    border-radius: 50% !important;
    color: var(--hb-burgundy);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.hb-catnav-arrow:hover {
    background: linear-gradient(135deg, var(--hb-rose), var(--hb-lilac));
    border-color: transparent;
    color: #fff;
}

.hb-catnav-arrow[hidden] {
    display: none;
}

/* --------------------------------------------------------------------
 * Small screens
 * ----------------------------------------------------------------- */

@media (max-width: 860px) {
    /* The drawer carries the categories instead. */
    .hb-catnav.is-mobile-hidden {
        display: none;
    }

    /* Matching the desktop selectors' specificity so these actually win. */
    .hb-catnav.is-mobile-scroll .hb-catnav-list {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none;
    }

    .hb-catnav.is-mobile-wrap .hb-catnav-list {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 4px;
    }

    .hb-catnav--text .hb-catnav-link {
        padding: 11px 12px;
        font-size: 13.5px;
    }

    .hb-catnav--text .hb-catnav-link::after {
        inset-inline: 12px;
        bottom: 4px;
    }

    .hb-catnav--pill .hb-catnav-link {
        font-size: 13px;
        padding-inline: 5px 12px;
    }

    .hb-catnav-icon {
        width: 27px;
        height: 27px;
    }

    .hb-catnav--circle .hb-catnav-link {
        max-width: 92px;
        font-size: 11.5px;
    }

    .hb-catnav--circle .hb-catnav-icon {
        width: 46px;
        height: 46px;
    }

    .hb-catnav-arrow,
    .hb-catnav-sub {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hb-catnav-list { scroll-behavior: auto; }

    .hb-catnav-icon,
    .hb-catnav-link,
    .hb-catnav-link::after,
    .hb-catnav-sub,
    .hb-catnav-sub a {
        transition-duration: .01ms !important;
    }
}
