/* Rahib Tools storefront header — approved command-bar direction. */
:root {
    --rh-header-navy: #063b5b;
    --rh-header-navy-deep: #04304d;
    --rh-header-orange: #f69200;
    --rh-header-orange-hover: #dc8000;
    --rh-header-border: #d8e0e6;
    --rh-header-muted: #6c7886;
}

.rh-utility-bar {
    min-height: 42px;
    padding: 0 max(28px, calc((100vw - 1500px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    background: var(--rh-header-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .01em;
    line-height: 1.2;
    text-transform: none;
}

.rh-utility-bar__benefits,
.rh-utility-bar__links {
    display: flex;
    align-items: center;
    min-width: 0;
}

.rh-utility-bar__benefits > span,
.rh-utility-bar__links > a,
.rh-utility-bar__links > span {
    min-height: 20px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: inherit;
    white-space: nowrap;
    text-decoration: none;
    border-left: 1px solid rgb(255 255 255 / 42%);
}

.rh-utility-bar__benefits > :first-child,
.rh-utility-bar__links > :first-child {
    padding-left: 0;
    border-left: 0;
}

.rh-utility-bar__benefits > :last-child,
.rh-utility-bar__links > :last-child {
    padding-right: 0;
}

.rh-utility-bar i {
    min-width: 16px;
    color: #fff;
    font-size: 16px;
    text-align: center;
}

.rh-utility-bar a:hover,
.rh-utility-bar a:focus-visible {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tw-header-v2 {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 16px rgb(3 45 73 / 7%);
}

.tw-header-v2__main {
    border-bottom: 0;
    background: #fff;
}

.tw-header-v2__inner {
    width: min(100%, 1500px);
    min-height: 116px;
    margin: 0 auto;
    padding: 12px 28px;
    display: grid;
    grid-template-columns: 270px minmax(420px, 1fr) auto;
    align-items: center;
    gap: clamp(24px, 3.2vw, 54px);
}

.tw-header-logo {
    width: 260px;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.tw-header-logo img {
    width: 248px;
    max-width: 100%;
    max-height: 90px;
    object-fit: contain;
    object-position: left center;
}

.tw-header-search {
    height: 58px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 76px;
    align-items: stretch;
    overflow: hidden;
    border: 1.5px solid #a9b8c4;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgb(5 49 77 / 4%);
}

.tw-header-search > i {
    display: grid;
    place-items: center;
    color: #617183;
    font-size: 24px;
}

.tw-header-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 14px 0 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--rh-header-navy-deep);
    font-size: 16px;
    line-height: 1.3;
}

.tw-header-search input::placeholder {
    color: #7d8793;
    opacity: 1;
}

.tw-header-search:focus-within {
    border-color: var(--rh-header-navy);
    box-shadow: 0 0 0 3px rgb(6 59 91 / 12%);
}

.tw-header-search button {
    width: 76px;
    min-width: 76px;
    height: 100%;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: var(--rh-header-orange);
    color: #fff;
    font-size: 25px;
    cursor: pointer;
}

.tw-header-search button:hover,
.tw-header-search button:focus-visible {
    background: var(--rh-header-orange-hover);
}

.tw-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.tw-header-action,
.tw-header-account__trigger {
    min-height: 58px;
    padding: 0 18px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1.5px solid var(--rh-header-navy);
    border-radius: 7px;
    background: #fff;
    color: var(--rh-header-navy-deep);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.tw-header-action--account,
.tw-header-account__trigger {
    min-width: 154px;
}

.tw-header-action--cart {
    min-width: 126px;
}

.tw-header-action > i:first-child,
.tw-header-action__icon > i:first-child,
.tw-header-account__trigger > i:first-child {
    font-size: 25px;
}

.tw-header-action .fa-angle-down,
.tw-header-account__trigger .fa-angle-down {
    margin-left: 2px;
    font-size: 14px;
}

.tw-header-action:hover,
.tw-header-action:focus-visible,
.tw-header-account__trigger:hover,
.tw-header-account__trigger:focus-visible {
    border-color: var(--rh-header-orange);
    color: var(--rh-header-navy-deep);
    background: #fffaf1;
}

.tw-header-count,
.tw-header-action__icon .tw-header-count {
    position: static;
    width: 23px;
    height: 23px;
    margin-left: -3px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--rh-header-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.tw-header-category-bar {
    min-height: 64px;
    border-top: 1px solid var(--rh-header-border);
    border-bottom: 1px solid var(--rh-header-border);
    background: #fff;
}

.tw-header-category-bar__inner {
    width: min(100%, 1500px);
    min-height: 64px;
    margin: 0 auto;
    padding: 0 28px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 4vw, 72px);
}

.tw-header-category-trigger {
    width: 300px;
    min-width: 0;
    height: 54px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    border: 0;
    border-radius: 7px;
    background: var(--rh-header-orange);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.tw-header-category-trigger:hover,
.tw-header-category-trigger:focus-visible,
.tw-header-category-trigger.is-open {
    background: var(--rh-header-orange-hover);
    color: #fff;
}

.tw-header-category-trigger .fa-bars {
    font-size: 22px;
}

.tw-header-category-trigger .rh-nav-chevron {
    margin-left: auto;
    font-size: 15px;
    transition: transform 180ms ease;
}

.tw-header-category-trigger.is-open .rh-nav-chevron {
    transform: rotate(180deg);
}

.tw-header-categories {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 2vw, 40px);
}

.tw-header-categories > a {
    padding: 22px 2px;
    position: relative;
    color: var(--rh-header-navy-deep);
    font-size: 14px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.tw-header-categories > a::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 13px;
    left: 2px;
    height: 2px;
    background: var(--rh-header-orange);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 160ms ease;
}

.tw-header-categories > a:hover,
.tw-header-categories > a:focus-visible,
.tw-header-categories > a.active {
    color: var(--rh-header-orange-hover);
}

.tw-header-categories > a:hover::after,
.tw-header-categories > a:focus-visible::after,
.tw-header-categories > a.active::after {
    transform: scaleX(1);
}

.tw-header-menu-panel {
    border-top: 0;
    box-shadow: 0 18px 40px rgb(3 45 73 / 17%);
}

.tw-header-account {
    position: relative;
}

.tw-header-account__menu {
    top: calc(100% + 10px);
    right: 0;
    z-index: 1100;
}

.tw-header-mobile-toggle {
    display: none;
}

@media (max-width: 1260px) {
    .rh-utility-bar {
        font-size: 11px;
    }

    .rh-utility-bar__benefits > span,
    .rh-utility-bar__links > a,
    .rh-utility-bar__links > span {
        padding-right: 13px;
        padding-left: 13px;
    }

    .tw-header-v2__inner {
        grid-template-columns: 210px minmax(340px, 1fr) auto;
        gap: 22px;
    }

    .tw-header-logo,
    .tw-header-logo img {
        width: 205px;
    }

    .tw-header-action,
    .tw-header-account__trigger {
        padding: 0 14px;
    }

    .tw-header-action--account,
    .tw-header-account__trigger {
        min-width: 130px;
    }

    .tw-header-action--cart {
        min-width: 106px;
    }

    .tw-header-category-bar__inner {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 28px;
    }

    .tw-header-category-trigger {
        width: 250px;
        padding: 0 19px;
        font-size: 15px;
    }

    .tw-header-categories {
        gap: 17px;
    }

    .tw-header-categories > a {
        font-size: 13px;
    }
}

@media (max-width: 1050px) {
    .rh-utility-bar__benefits > span:nth-child(3),
    .rh-utility-bar__links > span:last-child {
        display: none;
    }

    .tw-header-v2__inner {
        grid-template-columns: 170px minmax(280px, 1fr) auto;
        gap: 16px;
        padding-right: 20px;
        padding-left: 20px;
    }

    .tw-header-logo,
    .tw-header-logo img {
        width: 166px;
    }

    .tw-header-action,
    .tw-header-account__trigger {
        width: 52px;
        min-width: 52px;
        padding: 0;
    }

    .tw-header-action > span:not(.tw-header-action__icon),
    .tw-header-action .fa-angle-down,
    .tw-header-account__trigger .fa-angle-down {
        display: none;
    }

    .tw-header-action--cart {
        gap: 2px;
    }

    .tw-header-count,
    .tw-header-action__icon .tw-header-count {
        position: absolute;
        top: -7px;
        right: -7px;
    }

    .tw-header-category-bar__inner {
        grid-template-columns: 218px minmax(0, 1fr);
        gap: 20px;
        padding-right: 20px;
        padding-left: 20px;
    }

    .tw-header-category-trigger {
        width: 218px;
        padding: 0 17px;
    }

    .tw-header-categories {
        gap: 13px;
    }

    .tw-header-categories > a {
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    .rh-utility-bar {
        min-height: 34px;
        padding: 0 14px;
        font-size: 10px;
    }

    .rh-utility-bar__benefits > span,
    .rh-utility-bar__links > a,
    .rh-utility-bar__links > span {
        min-height: 16px;
        padding: 0;
        border: 0;
    }

    .rh-utility-bar__benefits > span:not(:first-child),
    .rh-utility-bar__links > :not(:nth-child(2)) {
        display: none;
    }

    .rh-utility-bar i {
        min-width: 13px;
        font-size: 13px;
    }

    .tw-header-v2__inner {
        min-height: 116px;
        padding: 8px 14px 11px;
        display: grid;
        grid-template-columns: 42px 112px minmax(0, 1fr) 42px 42px;
        grid-template-areas:
            "menu logo spacer account cart"
            "search search search search search";
        gap: 8px;
    }

    .tw-header-mobile-toggle {
        grid-area: menu;
        width: 42px;
        height: 42px;
        display: inline-grid;
        place-items: center;
        border: 1px solid var(--rh-header-border);
        border-radius: 7px;
        background: #fff;
        color: var(--rh-header-navy);
        font-size: 20px;
    }

    .tw-header-logo {
        grid-area: logo;
        width: 112px;
        height: 48px;
    }

    .tw-header-logo img {
        width: 108px;
        max-height: 48px;
    }

    .tw-header-search {
        grid-area: search;
        width: 100%;
        height: 48px;
        grid-template-columns: 44px minmax(0, 1fr) 54px;
        border-radius: 7px;
    }

    .tw-header-search > i {
        font-size: 18px;
    }

    .tw-header-search input {
        padding: 0 10px 0 0;
        font-size: 14px;
    }

    .tw-header-search button {
        width: 54px;
        min-width: 54px;
        font-size: 20px;
    }

    .tw-header-actions {
        display: contents;
    }

    .tw-header-account {
        grid-area: account;
        width: 42px;
    }

    .tw-header-action--account {
        grid-area: account;
    }

    .tw-header-action--cart {
        grid-area: cart;
    }

    .tw-header-action,
    .tw-header-account__trigger {
        width: 42px;
        min-width: 42px;
        min-height: 42px;
        padding: 0;
        border: 1px solid var(--rh-header-border);
        border-radius: 7px;
    }

    .tw-header-action > i:first-child,
    .tw-header-action__icon > i:first-child,
    .tw-header-account__trigger > i:first-child {
        font-size: 20px;
    }

    .tw-header-count,
    .tw-header-action__icon .tw-header-count {
        top: -5px;
        right: -5px;
        width: 19px;
        height: 19px;
        font-size: 10px;
    }

    .tw-header-category-bar {
        display: none;
    }

    .tw-header-menu-panel {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1200;
        width: min(88vw, 390px);
        height: 100dvh;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform 220ms ease;
    }

    .tw-header-v2.is-menu-open .tw-header-menu-panel {
        transform: translateX(0);
    }

    .tw-header-account__menu {
        position: fixed;
        top: 80px;
        right: 12px;
        width: min(300px, calc(100vw - 24px));
    }
}

@media (max-width: 520px) {
    .rh-utility-bar {
        justify-content: center;
    }

    .rh-utility-bar__links {
        display: none;
    }

    .tw-header-v2__inner {
        grid-template-columns: 40px 104px minmax(0, 1fr) 40px 40px;
        padding-right: 10px;
        padding-left: 10px;
        column-gap: 5px;
    }

    .tw-header-logo,
    .tw-header-logo img {
        width: 102px;
    }

    .tw-header-mobile-toggle,
    .tw-header-action,
    .tw-header-account,
    .tw-header-account__trigger {
        width: 40px;
        min-width: 40px;
    }

    .tw-header-search input {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tw-header-category-trigger .rh-nav-chevron,
    .tw-header-categories > a::after,
    .tw-header-menu-panel {
        transition: none;
    }
}

/* This stylesheet intentionally loads after the compatibility design layer.
   Keep these scoped declarations last so the approved header wins at first
   paint as well as after the complete stylesheet stack has loaded. */
body.rahib-store #header-area {
    position: sticky;
    top: 0;
    border-bottom: 0;
    background: #fff;
    box-shadow: 0 4px 16px rgb(3 45 73 / 7%);
}

body.rahib-store .tw-header-v2__main {
    border: 0;
    background: #fff;
}

body.rahib-store .tw-header-v2__inner {
    width: min(100%, 1500px);
    max-width: 1500px;
    min-height: 116px;
    padding: 12px 28px;
    gap: clamp(24px, 3.2vw, 54px);
}

body.rahib-store .tw-header-logo {
    width: 260px;
    min-width: 0;
    height: 92px;
}

body.rahib-store .tw-header-logo img {
    position: static;
    width: 248px;
    max-width: 100%;
    max-height: 90px !important;
}

body.rahib-store .tw-header-search {
    height: 58px;
    border: 1.5px solid #a9b8c4;
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 1px 2px rgb(5 49 77 / 4%);
}

body.rahib-store .tw-header-search input {
    height: 100%;
    padding: 0 14px 0 0;
    background: transparent;
    font-size: 16px;
}

body.rahib-store .tw-header-search button {
    width: 76px;
    min-width: 76px;
    border-radius: 0;
    background: var(--rh-header-orange);
}

body.rahib-store .tw-header-action {
    color: var(--rh-header-navy-deep);
    font-size: 14px;
    font-weight: 700;
}

body.rahib-store .tw-header-count {
    background: var(--rh-header-orange);
    color: #fff;
}

body.rahib-store .tw-header-category-bar {
    border-top: 1px solid var(--rh-header-border);
    border-bottom: 1px solid var(--rh-header-border);
    background: #fff;
}

body.rahib-store .tw-header-category-bar__inner {
    width: min(100%, 1500px);
    max-width: 1500px;
    min-height: 64px;
    padding: 0 28px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: clamp(28px, 4vw, 72px);
}

body.rahib-store .tw-header-category-trigger {
    width: 300px;
    height: 54px;
    padding: 0 24px;
    gap: 15px;
    border: 0;
    border-radius: 7px;
    background: var(--rh-header-orange);
    color: #fff;
}

body.rahib-store .tw-header-category-trigger:hover,
body.rahib-store .tw-header-category-trigger:focus-visible,
body.rahib-store .tw-header-v2.is-menu-open .tw-header-category-trigger {
    background: var(--rh-header-orange-hover);
    color: #fff;
}

body.rahib-store .tw-header-category-trigger .rh-nav-label {
    display: inline;
    font-size: 16px;
    font-weight: 800;
}

body.rahib-store .tw-header-categories {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 2vw, 40px);
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}

body.rahib-store .tw-header-categories > a {
    flex-shrink: 0;
    padding: 22px 2px;
    color: var(--rh-header-navy-deep);
    font-size: 14px;
    font-weight: 750;
}

@media (max-width: 1260px) {
    body.rahib-store .tw-header-v2__inner {
        grid-template-columns: 210px minmax(340px, 1fr) auto;
        gap: 22px;
    }

    body.rahib-store .tw-header-logo,
    body.rahib-store .tw-header-logo img {
        width: 205px;
    }

    body.rahib-store .tw-header-category-bar__inner {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 28px;
    }

    body.rahib-store .tw-header-category-trigger {
        width: 250px;
        padding: 0 19px;
    }

    body.rahib-store .tw-header-categories {
        gap: 17px;
    }

    body.rahib-store .tw-header-categories > a {
        font-size: 13px;
    }
}

@media (max-width: 1050px) {
    body.rahib-store .tw-header-v2__inner {
        grid-template-columns: 170px minmax(280px, 1fr) auto;
        gap: 16px;
        padding-right: 20px;
        padding-left: 20px;
    }

    body.rahib-store .tw-header-logo,
    body.rahib-store .tw-header-logo img {
        width: 166px;
    }

    body.rahib-store .tw-header-category-bar__inner {
        grid-template-columns: 218px minmax(0, 1fr);
        gap: 20px;
        padding-right: 20px;
        padding-left: 20px;
    }

    body.rahib-store .tw-header-category-trigger {
        width: 218px;
        padding: 0 17px;
    }

    body.rahib-store .tw-header-categories {
        gap: 13px;
    }

    body.rahib-store .tw-header-categories > a {
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    body.rahib-store .tw-header-v2__inner {
        min-height: 116px;
        padding: 8px 14px 11px;
        grid-template-columns: 42px 112px minmax(0, 1fr) 42px 42px;
        grid-template-areas:
            "menu logo spacer account cart"
            "search search search search search";
        gap: 8px;
    }

    body.rahib-store .tw-header-logo {
        width: 112px;
        min-width: 0;
        height: 48px;
        justify-self: start;
    }

    body.rahib-store .tw-header-logo img {
        width: 108px;
        max-height: 48px !important;
    }

    body.rahib-store .tw-header-search {
        height: 48px;
    }

    body.rahib-store .tw-header-search input {
        height: 100%;
        padding: 0 10px 0 0;
        font-size: 14px;
    }

    body.rahib-store .tw-header-search button {
        width: 54px;
        min-width: 54px;
        border-radius: 0;
    }

    body.rahib-store .tw-header-category-bar {
        display: none;
    }

    body.rahib-store .tw-header-mobile-toggle {
        color: var(--rh-header-navy);
    }
}

@media (max-width: 520px) {
    body.rahib-store .tw-header-v2__inner {
        grid-template-columns: 40px 104px minmax(0, 1fr) 40px 40px;
        padding-right: 10px;
        padding-left: 10px;
        column-gap: 5px;
    }

    body.rahib-store .tw-header-logo,
    body.rahib-store .tw-header-logo img {
        width: 102px;
    }
}
