/* Royal Present: follow the existing mobile-navigation breakpoint. */
.rp-header-account-mobile,
.rp-header-language-short {
    display: none;
}

@media (max-width: 991.98px) {
    .rp-header-actions {
        height: 48px;
    }

    .rp-header-actions .rp-header-actions-row {
        box-sizing: border-box;
        height: 48px !important; /* Existing inline height is 40px. */
        min-height: 48px;
        padding: 0 8px !important; /* Bootstrap py-2. */
        flex-wrap: nowrap;
        gap: 0;
    }

    .rp-header-actions .rp-header-account-group,
    .rp-header-actions .rp-header-tools {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        gap: 0;
        min-width: 0;
        white-space: nowrap;
    }

    .rp-header-actions .rp-header-account-desktop {
        display: none !important;
    }

    .rp-header-actions .rp-header-account-mobile {
        display: block !important;
    }

    .rp-header-actions .rp-header-account-toggle,
    .rp-header-actions .rp-header-login-trigger,
    .rp-header-actions .rp-header-favorites,
    .rp-header-actions .rp-header-language-toggle,
    .rp-header-actions .rp-header-search,
    .rp-header-actions .rp-header-cart:not(.d-none) {
        box-sizing: border-box;
        display: inline-flex !important; /* Existing Bootstrap display utilities. */
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        min-width: 44px;
        height: 44px;
        margin: 0 !important; /* Existing Bootstrap margin utilities. */
        padding: 0 !important;
        gap: 4px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #fff;
        font-family: inherit;
        font-size: 15px;
        line-height: 1.2;
        white-space: nowrap;
        text-decoration: none;
        vertical-align: middle;
    }

    .rp-header-actions .rp-header-favorites {
        padding: 0 3px !important;
    }

    .rp-header-actions .rp-header-language {
        margin: 0 !important;
    }

    .rp-header-actions .rp-header-language-toggle {
        min-width: 48px;
        gap: 3px;
    }

    .rp-header-actions .rp-header-cart:not(.d-none) {
        min-width: 60px;
        gap: 3px;
    }

    .rp-header-actions .rp-header-favorites-label,
    .rp-header-actions .rp-header-language-short {
        display: inline !important;
    }

    .rp-header-actions .rp-header-login-label,
    .rp-header-actions .rp-header-language-long,
    .rp-header-actions .rp-header-search-label,
    .rp-header-actions .rp-header-cart:not(.empty-top-b) .rp-header-cart-label {
        display: none !important;
    }

    .rp-header-actions .rp-header-account-toggle > i,
    .rp-header-actions .rp-header-login-trigger > i,
    .rp-header-actions .rp-header-favorites > i,
    .rp-header-actions .rp-header-cart > i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        font-size: 22px;
        line-height: 1;
    }

    .rp-header-actions .rp-header-search > img {
        width: 22px;
        height: 22px !important; /* Existing inline image size. */
        margin-top: 0 !important;
        flex: 0 0 22px;
    }

    .rp-header-actions .rp-header-language-toggle > img {
        width: 19px;
        height: 19px !important; /* Existing inline image size. */
        flex: 0 0 19px;
    }

    .rp-header-actions .rp-header-account-mobile .dropdown-menu {
        min-width: 176px;
        margin-top: 2px;
    }

    .rp-header-actions .rp-header-account-mobile .dropdown-item,
    .rp-header-actions .rp-header-language .dropdown-item {
        display: flex;
        align-items: center;
        min-height: 44px;
        font-size: 15px;
    }

    .rp-header-navigation {
        margin-top: 48px !important; /* Existing inline offset is 40px. */
    }

    .rp-header-navigation > .container {
        padding-right: 6px;
        padding-left: 6px;
    }

    .rp-header-navigation .rp-header-navigation-row {
        height: 52px;
        min-height: 52px;
        flex-wrap: nowrap !important; /* Bootstrap flex-wrap utility. */
    }

    .rp-header-navigation .rp-header-brand {
        display: flex !important; /* Bootstrap d-block. */
        align-items: center;
        justify-content: center;
        width: calc(100% - 88px);
        min-width: 0;
        min-height: 44px;
        margin: 0 auto !important; /* Bootstrap my-1. */
        font-size: 20px !important; /* Bootstrap fs-4. */
        line-height: 1.2;
        letter-spacing: -.45px;
        white-space: nowrap;
    }

    .rp-header-navigation .rp-header-menu-toggle {
        box-sizing: border-box;
        position: absolute;
        top: 4px;
        right: 6px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        margin: 0;
        padding: 0;
        gap: 5px;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .rp-header-navigation .rp-header-menu-toggle.mobile-menu-catalog {
        right: auto;
        left: 6px !important; /* Catalog button's non-important inline left. */
    }

    .rp-header-navigation .rp-header-menu-toggle > span {
        position: absolute;
        left: 10px;
        right: auto;
        display: block;
        flex: 0 0 2px;
        width: 24px;
        height: 2px;
        margin: 0;
        background: currentColor;
    }

    .rp-header-navigation .rp-header-menu-toggle > span:nth-child(1) {
        top: 14px;
    }

    .rp-header-navigation .rp-header-menu-toggle > span:nth-child(2) {
        top: 21px;
    }

    .rp-header-navigation .rp-header-menu-toggle > span:nth-child(3) {
        top: 28px;
    }

    /* Header grows by 8px; keep the same visible gap after AJAX scrolls. */
    #shop-body > h1.head-1.pt-4,
    #shop-body > h1.fs-5.mt-4,
    #shop-body > div > h1.shop-product-title.mt-4 {
        padding-top: 20px !important;
    }
}

@media (max-width: 359.98px) {
    .rp-header-navigation .rp-header-brand {
        font-size: 17px !important;
        letter-spacing: -.6px;
    }
}
