/*----------------------------------------*/
/*  HEADER                                 */
/*  Figma: header (node 470-3625)          */
/*----------------------------------------*/

header {
    position: fixed;
    z-index: 101;
    top: 0;
    left: 0;
    width: 100%;
    font-family: var(--rd-ff);
    color: var(--rd-txt-on-dark);
}

/* Content sits below the header everywhere except the home hero,
   where the header floats over the banner. */
header + * {
    margin-top: var(--rd-hdr-h);
}

body.home header + *,
body.page-template-page-home header + * {
    margin-top: 0;
}


/*--------------------*/
/* - TOP BAR          */
/*--------------------*/
.hdr__top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: var(--rd-hdr-top-h);
    padding: 0 var(--rd-gutter);
    background-color: var(--rd-dark);
}

.hdr__top-side {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
}

/* Group brand strip — one mark per brand, the current site on a light plate.
   Rendered by tamlite_the_header_brands() from functions/brands.php. */
.hdr__brands {
    display: flex;
    align-items: center;
    gap: 50px;
    flex: 0 1 auto;
    min-width: 0;
    height: var(--rd-hdr-top-h);
}

.hdr__brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 100%;
    line-height: 0;
    transition: opacity var(--rd-transition);
}

.hdr__brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
}

/* Current site: the plate spans the full bar height and bleeds 20px into the
   gaps either side, so the 50px rhythm between marks is preserved. */
.hdr__brand.is-active {
    background-color: #F6F6F6;
    padding: 0 20px;
    margin: 0 -20px;
}

/* The marks ship as white monochrome, so the active one is simply inverted
   to the design's #202020 instead of shipping a second asset per brand. */
.hdr__brand.is-active img {
    filter: invert(87.5%);
}

@media (min-width: 1200px) {
    a.hdr__brand:not(.is-active):hover {
        opacity: .7;
    }
}

.hdr__by {
    display: block;
    flex-shrink: 0;
}

.hdr__by img {
    display: block;
    width: 141px;
    height: 18px;
}


/*--------------------*/
/* - TOP DROPDOWNS    */
/*--------------------*/
.hdr-drop {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 1;
}

.hdr-drop__label {
    font-weight: 300;
    color: var(--rd-txt-on-dark);
}

.hdr-drop__current {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-weight: 400;
    color: var(--rd-accent);
    text-transform: uppercase;
}

.hdr-drop__current::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 3.67px 0 3.67px;
    border-color: var(--rd-accent) transparent transparent transparent;
    transition: transform var(--rd-transition);
}

.hdr-drop__list {
    position: absolute;
    z-index: 5;
    top: 100%;
    right: 0;
    min-width: 100%;
    display: none;
    flex-direction: column;
    background-color: var(--rd-dark);
    border: 1px solid var(--rd-glass-border);
    border-radius: 0 0 var(--rd-radius) var(--rd-radius);
    padding: 6px 0;
}

.hdr-drop__list a,
.hdr-drop__list span > a {
    display: block;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1;
    color: var(--rd-txt-on-dark);
    text-transform: uppercase;
    text-align: right;
    padding: 7px 14px;
    transition: color var(--rd-transition);
}

.hdr-drop__list .active > a,
.hdr-drop__list a.is-current {
    color: var(--rd-accent);
}

.hdr-drop.is-open .hdr-drop__list {
    display: flex;
}

.hdr-drop.is-open .hdr-drop__current::after {
    transform: rotate(180deg);
}

@media (min-width: 1200px) {
    .hdr-drop:hover .hdr-drop__list {
        display: flex;
    }

    .hdr-drop__list a:hover {
        color: var(--rd-accent);
    }
}


/*--------------------*/
/* - MAIN BAR         */
/*--------------------*/
/* The main bar has two themes: light on ordinary pages, and a dark glass
   bar over the home hero. Everything below reads these variables. */
.hdr__main {
    --hdr-bg: var(--rd-white);
    --hdr-fg: var(--rd-dark);
    --hdr-nav-active-bg: #E8E8E8;
    --hdr-nav-active-border: transparent;
    --hdr-field-bg: #E8E8E8;
    --hdr-field-fg: var(--rd-dark);
    --hdr-field-placeholder: #787878;
    --hdr-accent: var(--rd-accent);
    --hdr-logo-w: 118px;

    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: var(--rd-hdr-main-h);
    padding: 16px var(--rd-gutter);
    background-color: var(--hdr-bg);
    color: var(--hdr-fg);
    transition: background-color var(--rd-transition);
}

body.home .hdr__main,
body.page-template-page-home .hdr__main {
    --hdr-bg: rgba(0, 0, 0, .01);
    --hdr-fg: var(--rd-txt-on-dark);
    --hdr-nav-active-bg: var(--rd-glass);
    --hdr-nav-active-border: var(--rd-glass-border);
    --hdr-field-bg: var(--rd-glass);
    --hdr-field-fg: var(--rd-white);
    --hdr-field-placeholder: var(--rd-txt-faded);
    --hdr-accent: var(--rd-accent);
    --hdr-logo-w: 105px;

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

body.home header.scrolled .hdr__main,
body.page-template-page-home header.scrolled .hdr__main {
    --hdr-bg: rgba(38, 55, 70, .85);
}

.hdr__logo {
    display: block;
    flex-shrink: 0;
    line-height: 0;
}

.hdr__logo img {
    display: block;
    width: var(--hdr-logo-w);
    height: auto;
}

/* White logo over the dark hero bar, colour logo on the light bar.
   `.hdr__logo img {display:block}` above is (0,1,1), which outranked a bare
   `.hdr__logo-light` — both logos showed, the white one first — so these carry
   the parent class too.
   The light logo is matched as "any logo image that is not the dark one": on
   this site the template's light <img> carries a mistyped class attribute, so
   `.hdr__logo-light` alone never matches it. */
.hdr__logo img:not(.hdr__logo-dark),
.hdr__by-mobile {
    display: none;
}

.hdr__logo .hdr__logo-dark {
    display: block;
}

body.home .hdr__logo img:not(.hdr__logo-dark),
body.page-template-page-home .hdr__logo img:not(.hdr__logo-dark) {
    display: block;
}

body.home .hdr__logo .hdr__logo-dark,
body.page-template-page-home .hdr__logo .hdr__logo-dark {
    display: none;
}


/*--------------------*/
/* - NAVIGATION       */
/*--------------------*/
.nav-menu {
    flex: 1 1 auto;
    min-width: 0;
}

.nav-align,
.nav-menu nav {
    height: 100%;
}

.nav-menu nav > ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu nav > ul > li {
    display: block;
}

.nav-link {
    display: flex;
    align-items: center;
    height: var(--rd-control-h);
    font-size: 14px;
    line-height: 1;
    font-weight: 500;
    color: var(--hdr-fg);
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: var(--rd-radius);
    transition: background-color var(--rd-transition), border-color var(--rd-transition), color var(--rd-transition);
}

/* The submenu trigger (Products) wears the plate across the product side of
   the site — home, categories, products, shop — as the designs draw
   it, and whenever its megamenu is open. Elsewhere (Solutions, Contact…) it
   reads as a plain link so the page's own item is the only active one. It
   keeps the plate's padding everywhere, so opening the menu doesn't shift
   the row. */
body:not(.rd-inner):is(.home, .page-template-page-home, .tax-product_cat, .single-product, .woocommerce, .woocommerce-page) li.submenu > .nav-link,
li.submenu.active > .nav-link,
.nav-link.active,
.nav-menu nav > ul > li.current-menu-item > .nav-link,
.nav-menu nav > ul > li.current-menu-ancestor > .nav-link {
    background-color: var(--hdr-nav-active-bg);
    border-color: var(--hdr-nav-active-border);
    padding: 0 20px;
}

li.submenu > .nav-link {
    padding: 0 20px;
    cursor: pointer;
}

@media (min-width: 1200px) {
    .nav-link:hover {
        color: var(--hdr-accent);
    }
}


/*--------------------*/
/* - HEADER ACTIONS   */
/*--------------------*/
.hdr__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto;
    min-width: 0;
}

.hdr__btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--rd-control-h);
    height: var(--rd-control-h);
    background-color: var(--rd-dark);
    border-radius: var(--rd-radius);
    transition: background-color var(--rd-transition);
}

.hdr__btn img,
.hdr__btn svg {
    display: block;
    width: 24px;
    height: 24px;
}

.hdr__badge {
    position: absolute;
    top: 4px;
    left: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background-color: var(--rd-accent);
    border-radius: var(--rd-radius-pill);
    font-family: var(--rd-ff-alt);
    font-size: 13px;
    line-height: 1;
    letter-spacing: .065px;
    color: var(--rd-white);
}

@media (min-width: 1200px) {
    .hdr__btn:hover {
        background-color: var(--rd-dark-hover);
    }
}


/*--------------------*/
/* - HEADER SEARCH    */
/*--------------------*/
.hdr-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 518px;
    min-width: 0;
    width: 518px;
    max-width: 518px;
    height: var(--rd-control-h);
    background-color: var(--hdr-field-bg);
    border-radius: var(--rd-radius);
    overflow: hidden;
}

.hdr-search__input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 100%;
    background: none;
    border: 0;
    outline: none;
    font-family: var(--rd-ff);
    font-size: 16px;
    line-height: 1;
    color: var(--hdr-field-fg);
    padding: 0 var(--rd-control-h) 0 16px;
}

.hdr-search__input::placeholder {
    color: var(--hdr-field-placeholder);
    opacity: 1;
}

.hdr-search__type {
    position: absolute;
    left: -9999px;
}

.hdr-search__submit {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--rd-control-h);
    height: var(--rd-control-h);
    background-color: var(--rd-dark);
    border: 0;
    border-radius: var(--rd-radius);
    cursor: pointer;
    padding: 0;
    transition: background-color var(--rd-transition);
}

.hdr-search__submit img {
    display: block;
    width: 24px;
    height: 24px;
}

@media (min-width: 1200px) {
    .hdr-search__submit:hover {
        background-color: var(--rd-dark-hover);
    }
}


/* Panel-only blocks (mobile) */
.nav-align .hdr-search,
.nav-extra {
    display: none;
}

.nav-extra__link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    color: var(--rd-txt-on-dark);
    text-transform: uppercase;
}

.nav-extra__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background-color: var(--rd-accent);
    border-radius: var(--rd-radius-pill);
    font-family: var(--rd-ff-alt);
    font-size: 13px;
    line-height: 1;
    color: var(--rd-white);
}


/*--------------------*/
/* - HAMBURGER        */
/*--------------------*/
#hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--rd-control-h);
    height: var(--rd-control-h);
    background-color: var(--rd-dark);
    border-radius: var(--rd-radius);
    cursor: pointer;
}

.hamburger-inner {
    position: relative;
    width: 20px;
    height: 14px;
}

#hamburger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--rd-white);
    transition: all var(--rd-transition);
}

#hamburger span:nth-child(1) { top: 0; }
#hamburger span:nth-child(2) { top: 6px; }
#hamburger span:nth-child(3) { bottom: 0; }

#hamburger.active span:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
}

#hamburger.active span:nth-child(2) {
    transform: scaleX(0);
}

#hamburger.active span:nth-child(3) {
    bottom: 6px;
    transform: rotate(-45deg);
}


/*--------------------*/
/* - MEGAMENU         */
/* Not in the Figma file — built in the design's own language: a dark panel
   flush under the bar, columns typed like the footer's. */
/*--------------------*/
/* Positioned against .hdr__main, NOT fixed to the viewport: the glass bar's
   backdrop-filter makes .hdr__main the containing block for fixed children,
   which pushed the panel down by the height of the top bar on the home page
   while leaving it flush everywhere else. */
.megamenu {
    position: absolute;
    z-index: 100;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100vh - var(--rd-hdr-h));
    overflow-y: auto;
    background-color: var(--rd-dark);
    border-top: 1px solid var(--rd-glass-border);
    text-align: left;
    padding: 40px var(--rd-gutter);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--rd-transition), transform var(--rd-transition), visibility var(--rd-transition);
}

.megamenu.active {
    z-index: 102;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.megamenu-align {
    max-width: 1860px;
    margin: 0 auto;
}

.megamenu-content {
    position: relative;
}

/* The old three-panel structure, in the dark theme: top categories on the
   left, the chosen category's subcategories in the middle, and the photo of
   the hovered subcategory on the right (data-src-img, js/redesign/header.js).
   productCat() prints each category's links inside its own column, so the
   middle panel is the active column's .megamenu-toggle lifted out beside
   the list. */
.megamenu-align {
    display: flex;
    align-items: stretch;
    gap: 40px;
}

.megamenu-content {
    --mm-list-w: 340px;

    position: relative;
    flex: 0 0 calc(var(--mm-list-w) * 2 + 81px);
    min-height: 520px;
    padding-right: calc(var(--mm-list-w) + 81px);
}

/* divider between the two lists */
.megamenu-content::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--mm-list-w) + 40px);
    width: 1px;
    background-color: var(--rd-glass-border);
}

/* "Categories" / "Recently viewed" eyebrows */
.megamenu-content-caption,
.megamenu .megamenu-toggle .btn-caption b {
    display: block;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .06em;
    color: var(--rd-txt-faded);
    text-transform: uppercase;
}

.megamenu .megamenu-content-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.megamenu .megamenu-column {
    min-width: 0;
}

/* the builder appends a trailing empty column */
.megamenu .megamenu-column:empty {
    display: none;
}

/* rows of both lists */
.megamenu .megamenu-title,
.megamenu .megamenu-toggle-links > a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--rd-radius);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.2;
    color: var(--rd-txt-muted);
    text-transform: none;
    cursor: pointer;
    transition: background-color var(--rd-transition), color var(--rd-transition);
}

.megamenu .megamenu-title::after,
.megamenu .megamenu-toggle-links > a::after {
    content: '';
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: url("../../img/redesign/icons/arrow-cta.svg") no-repeat center / contain;
    opacity: 0;
    transition: opacity var(--rd-transition);
}

.megamenu .megamenu-column.active > .megamenu-title,
.megamenu .megamenu-toggle-links > a.is-hover,
.megamenu .megamenu-toggle-links > a.active {
    background-color: rgba(255, 255, 255, .08);
    color: var(--rd-white);
}

.megamenu .megamenu-column.active > .megamenu-title {
    font-weight: 500;
}

.megamenu .megamenu-column.active > .megamenu-title::after,
.megamenu .megamenu-toggle-links > a.is-hover::after {
    opacity: 1;
}

/* the chosen category's links, beside the list */
.megamenu .megamenu-toggle {
    position: absolute;
    top: 0;
    left: calc(var(--mm-list-w) + 81px);
    width: var(--mm-list-w);
    display: none;
}

.megamenu .megamenu-column.active > .megamenu-toggle {
    display: block;
}

.megamenu .megamenu-toggle .btn-caption span {
    display: none;
}

.megamenu .megamenu-toggle-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.megamenu .megamenu-toggle-links > a,
.megamenu .resources-drop-down a {
    font-size: 16px;
}

/* "Browse All in Category" */
.megamenu .btn-all.ctg {
    display: inline-block;
    margin: 24px 12px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--rd-white);
    text-decoration: underline;
    text-decoration-color: var(--rd-accent);
    text-underline-offset: 4px;
}

/* "Browse All Products" */
.megamenu .btn-all.prod {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 0;
    padding: 0 12px 24px;
    border-bottom: 1px solid var(--rd-glass-border);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: var(--rd-accent);
}

.megamenu .btn-all b {
    font-weight: inherit;
}

.megamenu .btn-all.prod i {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: url("../../img/redesign/icons/arrow-cta-accent.svg?v=3") no-repeat center / contain;
}

/* recently viewed products */
.viewed-prod {
    margin-top: 24px;
    padding: 0 12px;
}

.viewed-prod .row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.viewed-prod .row > [class*="col-"] {
    flex: 0 0 72px;
    width: 72px;
    max-width: none;
    padding: 0;
}

.viewed-prod .product-entry-small {
    display: block;
}

.viewed-prod .product-entry-small .preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    padding: 8px;
    background-color: var(--rd-white);
    border-radius: var(--rd-radius);
    transition: opacity var(--rd-transition);
}

.viewed-prod .product-entry-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.viewed-prod .product-entry-small .title {
    display: none;
}

/* photo of the hovered subcategory */
.megamenu-content-img {
    flex: 0 1 520px;
    min-width: 0;
    align-self: flex-start;
    margin-left: auto;
    border-radius: var(--rd-radius);
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--rd-transition);
}

.megamenu-content-img.is-visible {
    opacity: 1;
}

.megamenu-content-img img {
    display: block;
    width: 100%;
    aspect-ratio: 480 / 540;
    object-fit: cover;
}

/* close */
.megamenu > .button-close {
    position: absolute;
    top: 40px;
    right: var(--rd-gutter);
    display: none;
}

/* the mobile "back" row carries Bootstrap's d-flex utility (display !important) */
.megamenu .btn-caption.megamenu-close.d-flex {
    display: none !important;
}

@media (min-width: 1200px) {
    .megamenu .megamenu-column:not(.active) > .megamenu-title:hover,
    .megamenu .megamenu-toggle-links > a:hover {
        color: var(--rd-white);
    }

    .megamenu .btn-all.ctg:hover,
    .megamenu .btn-all.prod:hover {
        color: var(--rd-accent);
    }

    .viewed-prod .product-entry-small:hover .preview {
        opacity: .8;
    }
}

@media (max-width: 1599px) {
    .megamenu-content {
        --mm-list-w: 300px;
    }
}


/*--------------------------------*/
/* - NARROWER DESKTOPS (<1700px)  */
/* The design is drawn at 1920; below that the nav and the    */
/* search field give up room so nothing clips.                */
/*--------------------------------*/
@media (max-width: 1699px) {
    .nav-menu nav > ul {
        gap: 20px;
    }

    .nav-link {
        font-size: 13px;
    }

    .nav-link.active,
    .nav-menu nav > ul > li.current-menu-item > .nav-link,
    .nav-menu nav > ul > li.current-menu-ancestor > .nav-link,
    .nav-menu nav > ul > li.submenu.active > .nav-link {
        padding: 0 14px;
    }

    .hdr-search {
        flex: 1 1 360px;
        width: 360px;
        max-width: 360px;
    }
}

@media (max-width: 1439px) {
    .hdr__brands {
        gap: 30px;
    }
}

@media (max-width: 1399px) {
    .hdr__main {
        gap: 16px;
    }

    .nav-menu nav > ul {
        gap: 16px;
    }

    .hdr-search {
        flex: 1 1 220px;
        width: 220px;
        max-width: 220px;
    }
}


/*--------------------*/
/* - TABLET (<1200px) */
/*--------------------*/
@media (max-width: 1199px) {
    /* The brand strip slides up out of view while scrolling down and comes
       back on a scroll up (js/redesign/header.js adds .hdr-strip-hidden) */
    header {
        transition: transform .35s ease;
    }

    html.hdr-strip-hidden header {
        transform: translateY(calc(-1 * var(--rd-hdr-top-h)));
    }

    /* only the brand strip stays on top (country and language live in the
       slide-out panel); it scrolls sideways under a finger */
    .hdr__top {
        padding: 0;
    }

    .hdr__top > .hdr__top-side {
        display: none;
    }

    .hdr__brands {
        flex: 1 1 auto;
        gap: 28px;
        /* the active plate bleeds 16px, so its edge lands on the gutter */
        padding: 0 calc(var(--rd-gutter) + 16px);
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        touch-action: pan-x;
    }

    .hdr__brands::-webkit-scrollbar {
        display: none;
    }

    .hdr__brand.is-active {
        padding: 0 16px;
        margin: 0 -16px;
    }

    .hdr__brand img {
        max-width: none;
    }

    #hamburger {
        display: flex;
        width: 40px;
        height: 40px;
    }

    /* The mobile bar carries logo + brand mark + burger only;
       basket and account move into the slide-out panel. */
    .hdr__actions .hdr-search,
    .hdr__btn {
        display: none;
    }

    .hdr__main {
        --hdr-logo-w: 91px;

        position: relative;
        gap: 12px;
    }

    /* Brand mark sits centred between the logo and the burger */
    .hdr__by-mobile {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        display: block;
        line-height: 0;
    }

    .hdr__by-mobile img {
        display: block;
        width: 126px;
        height: auto;
    }

    /* No top bar here, so the hero bar needs to carry more weight */
    body.home .hdr__main,
    body.page-template-page-home .hdr__main {
        --hdr-bg: rgba(32, 32, 32, .9);
        --hdr-logo-w: 91px;
    }

    body.home .hdr__by-mobile,
    body.page-template-page-home .hdr__by-mobile {
        display: none;
    }

    body.home #hamburger,
    body.page-template-page-home #hamburger {
        background-color: var(--rd-glass);
        border: 1px solid var(--rd-glass-border);
    }

    /* Slide-in panel — always dark, whatever theme the bar is wearing */
    .nav-menu {
        --hdr-fg: var(--rd-txt-on-dark);
        --hdr-nav-active-bg: transparent;
        --hdr-nav-active-border: transparent;
        --hdr-field-fg: var(--rd-white);
        --hdr-field-placeholder: var(--rd-txt-faded);
        --hdr-accent: var(--rd-accent);

        /* hangs off the bottom of the bar — `fixed` would measure from the bar
           anyway wherever it has a backdrop-filter (home), and from the
           viewport elsewhere */
        position: absolute;
        z-index: 1;
        top: 100%;
        left: -100%;
        width: min(420px, 85%);
        height: calc(100vh - var(--rd-hdr-stick));
        height: calc(100dvh - var(--rd-hdr-stick));
        background-color: var(--rd-dark);
        opacity: 0;
        transition: left 0s .4s, opacity .4s;
    }

    header.active .nav-menu {
        left: 0;
        opacity: 1;
        transition: left 0s 0s, opacity .4s;
    }

    .nav-menu .layer {
        position: absolute;
        z-index: -1;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, .5);
    }

    .nav-align {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        overflow-y: auto;
        background-color: var(--rd-dark);
        padding-bottom: 30px;
    }

    /* the list takes its content height, not the whole panel */
    .nav-menu nav {
        height: auto;
        flex: 0 0 auto;
    }

    .nav-menu nav > ul {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 10px var(--rd-gutter);
    }

    .nav-menu nav > ul > li {
        border-bottom: 1px solid var(--rd-glass-border);
    }

    .nav-link {
        height: auto;
        justify-content: space-between;
        font-size: 16px;
        padding: 16px 0;
    }

    li.submenu > .nav-link,
    body:not(.rd-inner):is(.home, .page-template-page-home, .tax-product_cat, .single-product, .woocommerce, .woocommerce-page) li.submenu > .nav-link,
    li.submenu.active > .nav-link,
    .nav-link.active,
    .nav-menu nav > ul > li.current-menu-item > .nav-link,
    .nav-menu nav > ul > li.current-menu-ancestor > .nav-link {
        background: none;
        border-color: transparent;
        padding: 16px 0;
    }

    .nav-link.active,
    .nav-menu nav > ul > li.current-menu-item > .nav-link {
        color: var(--rd-accent);
    }

    /* Search moves into the panel */
    .hdr__actions .hdr-search {
        display: none;
    }

    .nav-align .hdr-search {
        display: flex;
        flex: 0 0 auto;
        max-width: none;
        margin: 20px var(--rd-gutter);
        width: calc(100% - var(--rd-gutter) * 2);
        background-color: rgba(255, 255, 255, .08);
    }

    .nav-extra {
        display: flex;
        flex: 0 0 auto;
        flex-direction: column;
        gap: 24px;
        margin: 8px var(--rd-gutter) 0;
        padding: 28px 0 8px;
        border-top: 1px solid var(--rd-glass-border);
    }

    /* opens upward — these rows are at the foot of the panel */
    .nav-extra .hdr-drop__list {
        top: auto;
        bottom: 100%;
        right: auto;
        left: 0;
        margin-bottom: 10px;
        border-radius: var(--rd-radius);
    }

    .nav-extra .hdr-drop__list a {
        text-align: left;
        padding: 9px 14px;
    }

    .megamenu {
        position: static;
        max-height: none;
        border: 0;
        padding: 18px var(--rd-gutter) 24px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }

    .megamenu.active {
        display: block;
    }

    /* one accordion: a category opens its links right under itself */
    .megamenu-align {
        display: block;
    }

    .megamenu-content {
        min-height: 0;
        padding: 0;
    }

    .megamenu-content::after,
    .megamenu-content-img {
        display: none;
    }

    .megamenu .megamenu-toggle {
        position: static;
        width: auto;
        padding: 4px 0 12px 12px;
    }

    .megamenu .megamenu-toggle .btn-caption {
        display: none;
    }

    .megamenu .megamenu-title::after {
        opacity: .6;
        transform: rotate(90deg);
        transition: transform var(--rd-transition);
    }

    .megamenu .megamenu-column.active > .megamenu-title::after {
        transform: rotate(-90deg);
    }

    .megamenu .megamenu-title,
    .megamenu .megamenu-toggle-links > a {
        font-size: 16px;
    }

    .megamenu .megamenu-toggle-links > a::after {
        content: none;
    }

    .megamenu .btn-all.ctg {
        margin: 12px 12px 0;
    }

    .megamenu .btn-all.prod {
        margin-top: 20px;
    }
}


/*--------------------*/
/* - PHONE (<768px)   */
/*--------------------*/
@media (max-width: 767px) {
    .nav-menu {
        width: 100%;
    }

    .hdr__logo img {
        width: 88px;
    }

    .hdr__btn,
    #hamburger {
        width: 40px;
        height: 40px;
    }

    .hdr__badge {
        left: 18px;
    }
}
