/* Rahib Tools storefront layout system.
   One container width and one gutter scale shared by the header, every page
   body and the footer, so their edges line up at every screen size.
   Loaded after every other storefront stylesheet. */
:root {
    --rh-shell: 1500px;
    --rh-gutter: 28px;
    --rh-content: calc(var(--rh-shell) - (2 * var(--rh-gutter)));
}

@media (max-width: 1050px) {
    :root { --rh-gutter: 20px; }
}

@media (max-width: 900px) {
    :root { --rh-gutter: 16px; }
}

/* ---------- Header ---------- */
body.rahib-store .rh-utility-bar {
    padding-right: max(var(--rh-gutter), calc((100% - var(--rh-shell)) / 2 + var(--rh-gutter)));
    padding-left: max(var(--rh-gutter), calc((100% - var(--rh-shell)) / 2 + var(--rh-gutter)));
}

body.rahib-store .tw-header-v2__inner,
body.rahib-store .tw-header-category-bar__inner {
    width: 100%;
    max-width: var(--rh-shell);
    padding-right: var(--rh-gutter);
    padding-left: var(--rh-gutter);
}

/* Search: typed text keeps clear of the icon and the field has one focus ring. */
body.rahib-store .tw-header-search input,
body.rahib-store .tw-header-search input[type="search"] {
    padding: 0 16px 0 4px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

body.rahib-store .tw-header-search input:focus,
body.rahib-store .tw-header-search input:focus-visible {
    border: 0;
    outline: 0 !important;
    box-shadow: none;
}

body.rahib-store .tw-header-search input::-webkit-search-cancel-button {
    margin-left: 8px;
    cursor: pointer;
}

body.rahib-store .tw-header-search:focus-within {
    border-color: var(--rh-header-navy);
    box-shadow: 0 0 0 3px rgb(6 59 91 / 14%);
}

/* Account and cart: equal height to the search field, one icon size, and a
   counter that sits on the cart icon at every width. */
body.rahib-store .tw-header-actions {
    gap: 12px;
}

body.rahib-store .tw-header-action,
body.rahib-store .tw-header-account__trigger {
    min-height: 58px;
    padding: 0 20px;
    gap: 10px;
    border-width: 1.5px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

body.rahib-store .tw-header-action--account,
body.rahib-store .tw-header-account__trigger {
    min-width: 132px;
}

body.rahib-store .tw-header-action--cart {
    min-width: 124px;
    gap: 14px;
}

body.rahib-store .tw-header-action > i:first-child,
body.rahib-store .tw-header-action__icon > i:first-child,
body.rahib-store .tw-header-account__trigger > i:first-child {
    width: 22px;
    font-size: 21px;
    text-align: center;
}

body.rahib-store .tw-header-action__icon {
    position: relative;
    display: inline-grid;
    place-items: center;
}

body.rahib-store .tw-header-count,
body.rahib-store .tw-header-action__icon .tw-header-count {
    position: absolute;
    top: -9px;
    right: -11px;
    width: auto;
    min-width: 19px;
    height: 19px;
    margin: 0;
    padding: 0 5px;
    display: inline-grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--rh-header-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-sizing: content-box;
}

body.rahib-store .tw-header-count.is-empty {
    background: #8795a3;
}

@media (max-width: 1260px) {
    body.rahib-store .tw-header-action,
    body.rahib-store .tw-header-account__trigger {
        padding: 0 16px;
    }

    body.rahib-store .tw-header-action--account,
    body.rahib-store .tw-header-account__trigger {
        min-width: 118px;
    }

    body.rahib-store .tw-header-action--cart {
        min-width: 108px;
    }
}

@media (max-width: 1050px) {
    body.rahib-store .tw-header-action,
    body.rahib-store .tw-header-account__trigger,
    body.rahib-store .tw-header-action--account,
    body.rahib-store .tw-header-action--cart {
        width: 54px;
        min-width: 54px;
        min-height: 54px;
        padding: 0;
    }
}

@media (max-width: 900px) {
    body.rahib-store .tw-header-v2__inner {
        grid-template-columns: 44px auto minmax(0, 1fr) 44px 44px;
        column-gap: 8px;
    }

    body.rahib-store .tw-header-mobile-toggle,
    body.rahib-store .tw-header-action,
    body.rahib-store .tw-header-account,
    body.rahib-store .tw-header-account__trigger,
    body.rahib-store .tw-header-action--account,
    body.rahib-store .tw-header-action--cart {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        border-width: 1px;
        border-radius: 8px;
    }

    body.rahib-store .tw-header-action > i:first-child,
    body.rahib-store .tw-header-action__icon > i:first-child,
    body.rahib-store .tw-header-account__trigger > i:first-child {
        width: 20px;
        font-size: 19px;
    }

    body.rahib-store .tw-header-count,
    body.rahib-store .tw-header-action__icon .tw-header-count {
        top: -10px;
        right: -12px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        font-size: 9px;
    }

    body.rahib-store .tw-header-search input {
        padding-left: 2px;
    }
}

/* ---------- Footer ---------- */
body.rahib-store .rh-footer--executive .rh-footer-main {
    padding-right: var(--rh-gutter);
    padding-left: var(--rh-gutter);
}

body.rahib-store .rh-footer--executive .rh-footer-inner {
    width: 100%;
    max-width: var(--rh-content);
}

body.rahib-store .rh-footer--executive .rh-footer-bottom {
    width: 100%;
    max-width: var(--rh-shell);
    padding-right: var(--rh-gutter);
    padding-left: var(--rh-gutter);
}

/* ---------- Page containers ---------- */
body.rahib-store .container:not(.modal .container),
body.rahib-store .rh-reference-pdp .highlightSection > .container.pdp-container,
body.rahib-store .highlightSection > .container.pdp-container {
    width: 100%;
    max-width: var(--rh-shell);
    margin-right: auto;
    margin-left: auto;
    padding-right: var(--rh-gutter);
    padding-left: var(--rh-gutter);
}

/* ---------- Home ---------- */
body.rahib-store .rh-reference-section {
    max-width: var(--rh-shell);
    padding-right: var(--rh-gutter);
    padding-left: var(--rh-gutter);
}

body.rahib-store .rh-banner-carousel {
    width: calc(100% - (2 * var(--rh-gutter)));
    max-width: var(--rh-content);
    margin: 20px auto 0;
    border-radius: 12px;
}

body.rahib-store .rh-reference-heading {
    margin-bottom: 20px;
}

body.rahib-store .rh-reference-heading a {
    flex: 0 0 auto;
    white-space: nowrap;
}

body.rahib-store .rh-reference-categories {
    padding-top: 44px;
}

body.rahib-store .rh-reference-category-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 14px;
    border: 0;
}

body.rahib-store .rh-reference-category {
    min-width: 0;
    min-height: 0;
    padding: 22px 12px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--rh-line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

body.rahib-store .rh-reference-category:hover,
body.rahib-store .rh-reference-category:focus-visible {
    border-color: #f69200;
    background: #fff;
    box-shadow: 0 10px 22px rgb(8 43 85 / 9%);
    transform: translateY(-2px);
}

body.rahib-store .rh-reference-category__image {
    width: 64px;
    height: 64px;
    margin: 0;
    border: 0;
    border-radius: 14px;
    background: #fff3e2;
    color: #c46f00;
    font-size: 26px;
}

body.rahib-store .rh-reference-category strong {
    min-height: 2.6em;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

body.rahib-store .rh-reference-product-card {
    display: flex;
    flex-direction: column;
}

body.rahib-store .rh-reference-product-card__body {
    min-height: 96px;
    padding: 14px 14px 16px;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
}

body.rahib-store .rh-reference-product-card__body a {
    min-height: 2.6em;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body.rahib-store .rh-reference-product-card__body strong {
    min-height: 34px;
    margin-top: auto;
    padding-right: 44px;
    display: flex;
    align-items: center;
}

body.rahib-store .rh-reference-product-card__body button {
    right: 14px;
    bottom: 16px;
}

body.rahib-store .rh-reference-partnership {
    width: calc(100% - (2 * var(--rh-gutter)));
    max-width: var(--rh-content);
    margin-right: auto;
    margin-left: auto;
    padding: 44px;
    border-radius: 12px;
    gap: 40px;
}

body.rahib-store .rh-reference-partnership__copy {
    padding: 0;
}

body.rahib-store .rh-reference-solution-grid b {
    max-width: none;
    padding-right: 32px;
}

@media (max-width: 1199px) {
    body.rahib-store .rh-reference-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    body.rahib-store .rh-reference-partnership {
        padding: 32px 24px;
        gap: 0;
    }
}

@media (max-width: 600px) {
    body.rahib-store .rh-reference-categories {
        padding-top: 32px;
    }

    body.rahib-store .rh-reference-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    body.rahib-store .rh-reference-category {
        padding: 18px 10px 14px;
        gap: 12px;
    }

    body.rahib-store .rh-reference-category__image {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }

    body.rahib-store .rh-reference-heading h2 {
        font-size: 20px;
    }

    body.rahib-store .rh-reference-product-grid,
    body.rahib-store .rh-reference-solution-grid {
        gap: 10px;
    }

    body.rahib-store .rh-reference-product-card__body {
        padding: 12px 12px 14px;
    }

    body.rahib-store .rh-reference-product-card__body strong {
        padding-right: 0;
        padding-bottom: 44px;
        font-size: 12px;
    }

    body.rahib-store .rh-reference-product-card__body button {
        right: auto;
        bottom: 14px;
        left: 12px;
    }

    body.rahib-store .rh-reference-solution-grid a {
        min-height: 128px;
        padding: 14px;
    }

    body.rahib-store .rh-reference-solution-grid b {
        font-size: 12px;
        padding-right: 22px;
    }

    body.rahib-store .rh-reference-solution-grid span {
        right: 12px;
        bottom: 13px;
    }
}

/* ---------- Catalogue heading ---------- */
body.rahib-store .rh-catalogue-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

body.rahib-store .rh-catalogue-heading .tw-collection-heading {
    width: auto;
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
}

body.rahib-store .rh-catalogue-heading .tw-collection-heading > * {
    margin: 0;
}

body.rahib-store .rh-catalogue-heading p {
    max-width: 560px;
}

body.rahib-store .rh-catalogue-total {
    flex: 0 0 auto;
    min-width: 150px;
}

@media (max-width: 767px) {
    body.rahib-store .rh-catalogue-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    body.rahib-store .rh-catalogue-total {
        width: auto;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        gap: 12px;
        padding: 12px 18px;
    }

    body.rahib-store .rh-catalogue-total strong {
        font-size: 24px;
    }
}

/* ---------- Catalogue product cards ---------- */
body.rahib-store .tw-collection-page .pd_card_data {
    border-bottom: 0;
}

@media (max-width: 600px) {
    body.rahib-store .tw-collection-page .product-card-new .card_title {
        font-size: 14px;
        line-height: 1.3;
    }

    body.rahib-store .tw-collection-page .pd_price_regular--rfq,
    body.rahib-store .tw-collection-page .pd_price_regular--rfq .rfq-label {
        font-size: 14px;
        line-height: 1.3;
        white-space: nowrap;
    }

    body.rahib-store .tw-collection-page .pd_card_actions button {
        grid-auto-flow: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding-right: 6px;
        padding-left: 6px;
        min-width: 0;
        font-size: 12px;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
    }

    body.rahib-store .tw-collection-page .pd_card_actions button > i {
        display: none;
    }
}

/* ---------- Product page ---------- */
/* Quote-only products: the two actions share the full width of the price box. */
body.rahib-store .tw-pdp-purchase__row.is-quotation-only {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.rahib-store .tw-pdp-purchase__row.is-quotation-only > .tw-pdp-button--wishlist {
    grid-column: 1;
}

body.rahib-store .tw-pdp-purchase__row.is-quotation-only > .tw-pdp-button--quotation {
    grid-column: 2;
}

@media (max-width: 767px) {
    /* The full trail wraps instead of cutting the product name off. */
    body.rahib-store .tw-pdp__breadcrumb {
        min-height: 0;
        padding: 12px 0;
        flex-wrap: wrap;
        row-gap: 4px;
        column-gap: 8px;
        overflow: visible;
        line-height: 1.5;
        white-space: normal;
    }

    body.rahib-store .tw-pdp__breadcrumb-current {
        overflow: visible;
        color: var(--pdp-navy, #082b55);
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    body.rahib-store .tw-pdp-purchase__row.is-quotation-only {
        grid-template-columns: minmax(0, 1fr);
    }

    body.rahib-store .tw-pdp-purchase__row.is-quotation-only > .tw-pdp-button--wishlist,
    body.rahib-store .tw-pdp-purchase__row.is-quotation-only > .tw-pdp-button--quotation {
        grid-column: 1;
    }
}

/* ---------- Legacy theme resets ---------- */
/* style.css floats every `.container h1` left, which lets the following
   paragraph slide up underneath multi-line page titles. */
body.rahib-store .container h1 {
    float: none;
}

/* September storefront review: keep utility controls and catalogue content compact. */
body.rahib-store .tw-header-action,
body.rahib-store .tw-header-account__trigger {
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
}
body.rahib-store .tw-header-action:hover,
body.rahib-store .tw-header-action:focus-visible,
body.rahib-store .tw-header-account__trigger:hover,
body.rahib-store .tw-header-account__trigger:focus-visible {
    border-color: #e5edf2;
    background: #f3f7f9;
    color: var(--rh-header-navy-deep);
}
body.rahib-store .tw-header-action__icon .tw-header-count {
    top: -9px;
    right: -10px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    border: 2px solid #fff;
    box-sizing: border-box;
}
body.rahib-store .tw-header-search input { min-width: 0; box-sizing: border-box; }
body.rahib-store .tw-header-v2 { overflow-anchor: none; }
body.rahib-store .rh-banner-carousel { margin-top: 12px; }
body.rahib-store .rh-reference-partnership__visual {
    background: #e9f0f4 url('/images/rahib-tools-logo.svg') center center / 80% auto no-repeat;
    filter: none;
    align-items: flex-end;
}
body.rahib-store .rh-reference-partnership__visual span {
    padding: 4px 8px;
    border-radius: 4px;
    background: rgb(4 48 77 / 84%);
}
body.rahib-store .tw-collection-page { padding-top: 10px; }
body.rahib-store .tw-collection-page .breadcrumb { margin-bottom: 4px; padding: 8px 0; min-height: 0; }
body.rahib-store .tw-collection-page .tw-collection-header { margin: 4px 0 12px; padding: 8px 0 10px; }
body.rahib-store .rh-catalogue-heading .tw-collection-heading { gap: 5px; }
body.rahib-store .tw-collection-page .tw-collection-title { font-size: clamp(25px, 2.4vw, 34px); }
body.rahib-store .tw-collection-page .tw-collection-heading p { margin: 0; }
body.rahib-store .tw-collection-page .tw-filter-category-group__toggle { padding-left: 0; }
body.rahib-store .tw-collection-page .product-card-new {
    overflow: hidden;
    border: 1px solid #dce5ec;
    border-radius: 12px;
    box-shadow: 0 3px 14px rgb(5 47 74 / 5%);
}
body.rahib-store .tw-collection-page .pd_card_img { min-height: 220px; background: #f8fafb; }
body.rahib-store .tw-collection-page .pd_card_img img { width: 100%; height: 210px; object-fit: contain; }
body.rahib-store .tw-collection-page .pd_card_data { padding: 16px; }
body.rahib-store .tw-collection-page .pd_card_actions .cart_btn { background: #f69200; color: #fff; }
body.rahib-store .tw-collection-page .pd_card_actions .cart_btn:hover { background: #ce7800; color: #fff; }
body.rahib-store .tw-collection-page .pd_card_actions .quote_btn { border-color: #b5c6d0; color: #063b5b; }
body.rahib-store .rh-footer--executive { background: #04304d; }
body.rahib-store .rh-footer--executive .rh-footer-bottom {
    color: #eef5f8;
    border-top: 1px solid rgb(255 255 255 / 18%);
}
body.rahib-store .rh-footer--executive .rh-footer-bottom nav a,
body.rahib-store .rh-footer--executive .rh-footer-assurance { color: #eef5f8; }
body.rahib-store .rh-footer--executive .rh-footer-assurance { border-color: rgb(255 255 255 / 22%); }

@media (max-width: 900px) {
    body.rahib-store .rh-utility-bar { position: relative; min-height: 32px; justify-content: center; }
    body.rahib-store .tw-header-v2__inner { grid-template-areas: "menu logo spacer cart account" "search search search search search"; }
    body.rahib-store .tw-header-action--cart { grid-area: cart; }
    body.rahib-store .tw-header-action--account,
    body.rahib-store .tw-header-account { grid-area: account; }
    body.rahib-store .rh-utility-bar__links { display: none; }
    body.rahib-store .rh-utility-bar__benefits { position: relative; width: 100%; min-height: 22px; }
    body.rahib-store .rh-utility-bar__benefits > span,
    body.rahib-store .rh-utility-bar__benefits > span:not(:first-child) {
        position: absolute;
        inset: 0;
        display: flex;
        justify-content: center;
        padding: 0;
        border: 0;
        opacity: 0;
        animation: rh-benefit-rotate 12s infinite;
    }
    body.rahib-store .rh-utility-bar__benefits > span:nth-child(2) { animation-delay: 4s; }
    body.rahib-store .rh-utility-bar__benefits > span:nth-child(3) { animation-delay: 8s; }
    body.rahib-store .tw-header-account,
    body.rahib-store .tw-header-account__trigger { display: inline-grid; place-items: center; visibility: visible; opacity: 1; }
    body.rahib-store .tw-header-account__trigger > i:first-child { display: inline-block; visibility: visible; }
    body.rahib-store .tw-header-action__icon .tw-header-count { top: -8px; right: -9px; }
    body.rahib-store .rh-reference-partnership__visual { min-height: 210px; background-size: 72% auto; }
}
@keyframes rh-benefit-rotate { 0%, 29% { opacity: 1; } 33%, 100% { opacity: 0; } }
@media (max-width: 600px) {
    body.rahib-store .rh-footer--executive .rh-footer-brand h2 { font-size: 26px; line-height: 1.1; }
    body.rahib-store .rh-footer--executive .rh-footer-promises { gap: 8px; }
    body.rahib-store .rh-footer--executive .rh-footer-promises span { min-width: 0; gap: 5px; }
    body.rahib-store .rh-footer--executive .rh-footer-promises strong { font-size: 10px; line-height: 1.25; }
    body.rahib-store .rh-footer--executive .rh-footer-social { margin: 24px 0 20px; }
    body.rahib-store .tw-collection-page { padding-top: 6px; }
    body.rahib-store .tw-collection-page .tw-collection-header { gap: 9px; margin: 6px 0 12px; }
    body.rahib-store .tw-collection-page .pd_card_img { min-height: 150px; }
    body.rahib-store .tw-collection-page .pd_card_img img { height: 145px; }
    body.rahib-store .tw-collection-page .pd_card_data { padding: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    body.rahib-store .rh-utility-bar__benefits > span { animation: none !important; }
    body.rahib-store .rh-utility-bar__benefits > span:first-child { opacity: 1; }
}
