/* =========================================================
   RESARSA HEADER MANAGER
   Scope principal: .rhm-header / .resarsa-header
========================================================= */

.rhm-header,
.rhm-header * {
    box-sizing: border-box;
}

.rhm-header {
    --rhm-topbar-bg: #0b477d;
    --rhm-topbar-text: #fff;
    --rhm-bg: #fff;
    --rhm-text: #0b477d;
    --rhm-accent: #246bd7;
    --rhm-border: #e6edf4;
    --rhm-logo-width: 225px;
    --rhm-logo-mobile-width: 165px;

    position: relative;
    z-index: 990;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);

    color: var(--rhm-text);
    background: var(--rhm-bg);

    font-family:
        "Manrope",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}

.rhm-header.is-sticky {
    position: sticky;
    top: 0;
}

.rhm-header a,
.rhm-header button {
    outline: none;
}

/* =========================================================
   TOP BAR
========================================================= */

.rhm-topbar {
    background: var(--rhm-topbar-bg);
    color: var(--rhm-topbar-text);
}

.rhm-topbar-inner {
    width: min(calc(100% - 56px), 1504px);
    min-height: 38px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    font-size: 12px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: .15px;
}

.rhm-topbar-inner > * {
    color: inherit !important;
    text-decoration: none !important;

    display: inline-flex;
    align-items: center;
}

.rhm-topbar-inner > * + *::before {
    content: "";
    width: 1px;
    height: 15px;
    margin: 0 22px;
    background: rgba(255,255,255,.34);
}

/* =========================================================
   MAIN
========================================================= */

.rhm-main {
    position: relative;
    background: var(--rhm-bg);
    border-bottom: 1px solid var(--rhm-border);
}

.rhm-main-inner {
    width: min(calc(100% - 56px), 1504px);
    min-height: 100px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: minmax(190px, 260px) 1fr auto;
    align-items: center;
    gap: 30px;
}

/* LOGO */

.rhm-logo {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    text-decoration: none;
}

.rhm-logo img {
    display: block;
    width: min(var(--rhm-logo-width), 100%);
    max-height: 66px;
    object-fit: contain;
}

/* NAV */

.rhm-nav {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 2.1vw, 36px);
}

.rhm-nav-link {
    position: relative;

    min-height: 100px;

    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--rhm-text) !important;
    text-decoration: none !important;

    font-size: 14px;
    line-height: 1;
    font-weight: 650;

    white-space: nowrap;

    transition: color .18s ease;
}

.rhm-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 22px;
    height: 2px;
    background: var(--rhm-accent);
    transition: right .2s ease;
}

.rhm-nav-link:hover,
.rhm-nav-link.is-open {
    color: var(--rhm-accent) !important;
}

.rhm-nav-link:hover::after,
.rhm-nav-link.is-open::after {
    right: 0;
}

.rhm-chevron {
    font-size: 16px;
    line-height: 1;
    transform: translateY(-1px);
}

/* ACTIONS */

.rhm-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.rhm-action {
    position: relative;

    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;

    border: 0;
    border-radius: 50%;
    background: transparent;

    color: var(--rhm-text) !important;
    text-decoration: none !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition: background .18s ease, color .18s ease;
}

.rhm-action:hover {
    color: var(--rhm-accent) !important;
    background: rgba(36,107,215,.06);
}

.rhm-action svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.resarsa-cart-count {
    position: absolute;
    top: 0;
    right: -1px;

    min-width: 18px;
    height: 18px;
    padding: 0 5px;

    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--rhm-accent);
    color: #fff;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 9px;
    line-height: 1;
    font-weight: 800;
}

/* =========================================================
   SEARCH PANEL
========================================================= */

.rhm-search-panel {
    position: absolute;
    z-index: 50;
    left: 0;
    right: 0;
    top: 100%;

    padding: 18px 28px;

    background: #fff;
    border-top: 1px solid var(--rhm-border);
    border-bottom: 1px solid var(--rhm-border);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);

    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.rhm-search-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rhm-search-form {
    width: min(100%, 900px);
    min-height: 54px;
    margin: 0 auto;

    border: 1px solid #d7e1ea;
    border-radius: 999px;
    background: #f8fafc;

    display: grid;
    grid-template-columns: 1fr auto;
    overflow: hidden;
}

.rhm-search-form input[type=search] {
    width: 100%;
    min-width: 0;
    min-height: 52px;

    padding: 0 24px;

    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;

    color: #173f66;
    font-size: 14px;
}

.rhm-search-form button {
    min-width: 118px;
    padding: 0 24px;

    border: 0;
    background: var(--rhm-accent);
    color: #fff;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    cursor: pointer;
    font-weight: 700;
}

.rhm-search-form button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

/* =========================================================
   MEGA MENUS
========================================================= */

.rhm-mega {
    position: absolute;
    z-index: 45;
    left: 0;
    right: 0;
    top: 100%;

    background: #fff;
    border-top: 1px solid var(--rhm-border);
    border-bottom: 1px solid var(--rhm-border);

    box-shadow: 0 18px 36px rgba(12,48,79,.10);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);

    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.rhm-mega.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rhm-mega-inner {
    width: min(calc(100% - 80px), 1450px);
    min-height: 300px;
    margin: 0 auto;
    padding: 36px 0 40px;

    display: grid;
    grid-template-columns: minmax(180px,.65fr) minmax(0,1.75fr) minmax(0,.7fr);
    gap: 42px;
}

.rhm-mega-copy {
    padding-right: 20px;
    border-right: 1px solid var(--rhm-border);
}

.rhm-mega-kicker {
    display: block;
    margin-bottom: 10px;

    color: var(--rhm-accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.1px;
}

.rhm-mega-copy h3 {
    margin: 0 0 22px;
    color: var(--rhm-text);
    font-size: 27px;
    line-height: 1.15;
    font-weight: 650;
}

.rhm-mega-copy > a {
    color: var(--rhm-text) !important;
    text-decoration: none !important;
    font-size: 10px;
    font-weight: 800;
}

.rhm-mega-copy > a:hover {
    color: var(--rhm-accent) !important;
}

.rhm-mega-groups {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 28px;
}

.rhm-mega-group h4 {
    margin: 0 0 13px;
    color: #8090a0;
    font-size: 9px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: 1px;
}

.rhm-mega-group a {
    display: block;
    padding: 6px 0;

    color: var(--rhm-text) !important;
    text-decoration: none !important;

    font-size: 13px;
    line-height: 1.35;
    font-weight: 550;

    transition: color .16s ease, transform .16s ease;
}

.rhm-mega-group a:hover {
    color: var(--rhm-accent) !important;
    transform: translateX(3px);
}

.rhm-mega-promo {
    min-height: 220px;
    overflow: hidden;
    border-radius: 12px;
    background: #eef4f8;
}

.rhm-mega-promo img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: block;
    object-fit: cover;
}

/* =========================================================
   MOBILE
========================================================= */

.rhm-mobile-toggle,
.rhm-mobile-drawer {
    display: none;
}

@media (max-width: 1120px) {
    .rhm-main-inner {
        grid-template-columns: auto 1fr auto;
        min-height: 84px;
        gap: 18px;
    }

    .rhm-mobile-toggle {
        width: 42px;
        height: 42px;
        padding: 0;

        border: 0;
        border-radius: 50%;
        background: transparent;
        color: var(--rhm-text);

        display: inline-flex;
        align-items: center;
        justify-content: center;

        cursor: pointer;
    }

    .rhm-mobile-toggle svg {
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
    }

    .rhm-logo {
        justify-self: start;
    }

    .rhm-nav {
        display: none;
    }

    .rhm-mega {
        display: none !important;
    }

    .rhm-logo img {
        width: min(var(--rhm-logo-mobile-width), 100%);
        max-height: 58px;
    }

    .rhm-mobile-drawer {
        position: absolute;
        z-index: 44;
        left: 0;
        right: 0;
        top: 100%;

        max-height: calc(100vh - 120px);
        overflow-y: auto;

        padding: 0 24px 28px;

        background: #fff;
        border-top: 1px solid var(--rhm-border);
        border-bottom: 1px solid var(--rhm-border);
        box-shadow: 0 18px 36px rgba(12,48,79,.10);

        opacity: 0;
        visibility: hidden;
        transform: translateY(-5px);

        transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    }

    .rhm-mobile-drawer.is-open {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .rhm-mobile-inner {
        width: min(100%, 720px);
        margin: 0 auto;
        padding-top: 16px;
    }

    .rhm-mobile-group {
        border-bottom: 1px solid var(--rhm-border);
    }

    .rhm-mobile-group summary {
        padding: 18px 0;
        color: var(--rhm-text);
        cursor: pointer;
        font-size: 15px;
        font-weight: 750;
        list-style: none;
    }

    .rhm-mobile-group summary::-webkit-details-marker {
        display: none;
    }

    .rhm-mobile-group a,
    .rhm-mobile-link {
        display: block;
        padding: 10px 4px;

        color: var(--rhm-text) !important;
        text-decoration: none !important;

        font-size: 13px;
        line-height: 1.4;
    }

    .rhm-mobile-link {
        padding: 17px 0;
        border-bottom: 1px solid var(--rhm-border);
        font-weight: 700;
    }

    .rhm-mobile-subtitle {
        padding: 14px 4px 4px;
        color: #8a99a7;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 1px;
    }

    .rhm-mobile-all {
        margin: 10px 0 16px;
        color: var(--rhm-accent) !important;
        font-weight: 800 !important;
    }
}

@media (max-width: 760px) {
    .rhm-topbar-inner {
        width: calc(100% - 28px);
        min-height: 32px;
        justify-content: center;
        font-size: 9px;
    }

    .rhm-topbar-inner > * + *::before {
        margin: 0 9px;
        height: 11px;
    }

    .rhm-main-inner {
        width: calc(100% - 24px);
        min-height: 74px;
        gap: 8px;
    }

    .rhm-mobile-toggle {
        width: 38px;
        height: 38px;
    }

    .rhm-logo {
        justify-self: center;
    }

    .rhm-actions {
        gap: 0;
    }

    .rhm-action {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
    }

    .rhm-action svg {
        width: 21px;
        height: 21px;
    }

    .rhm-actions .rhm-search-toggle {
        display: none;
    }

    .rhm-actions > *:nth-last-child(n+3) {
        display: none;
    }

    .rhm-search-panel {
        padding: 13px 14px;
    }

    .rhm-search-form {
        border-radius: 12px;
    }

    .rhm-search-form button {
        min-width: 52px;
        padding: 0 15px;
    }

    .rhm-search-form button span {
        display: none;
    }

    .rhm-mobile-drawer {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 430px) {
    .rhm-topbar-inner > *:nth-child(3) {
        display: none;
    }

    .rhm-logo img {
        max-width: 145px;
    }
}

/* =========================================================
   Smart Cart compatibility
   Smart Cart may enlarge this exact control.
========================================================= */

.resarsa-header .resarsa-cart-link {
    overflow: visible !important;
}

.resarsa-header .resarsa-cart-count {
    pointer-events: none;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .rhm-header *,
    .rhm-header *::before,
    .rhm-header *::after {
        transition: none !important;
        animation: none !important;
    }
}
