/* Storefront navigation and product buttons. */
.hos-catalogue-actions { display: none; }

:root {
    --hos-warm-stone: #f5f2ed;
    --hos-eshop-blue: #3673aa;
    --hos-eshop-hover: #275783;
}

:is(.home, .tax-product_cat, .tax-product_tag, .tax-pa_brand, .tax-product_brand) #main ul.products > li.product > .button {
    background-color: var(--hos-warm-stone);
    color: #37312c;
    border: 1px solid #837b71;
    border-radius: 5px;
}

:is(.home, .tax-product_cat, .tax-product_tag, .tax-pa_brand, .tax-product_brand) #main ul.products > li.product > .button:hover {
    background-color: #e8e2da;
    border-color: #71695f;
}

.single-product #main form.cart .single_add_to_cart_button:where(:not(:disabled, .disabled, [aria-disabled="true"])) {
    background-color: var(--hos-eshop-blue);
    color: #fff;
    border: 1px solid var(--hos-eshop-blue);
    border-radius: 5px;
}

.single-product #main form.cart .single_add_to_cart_button:where(:not(:disabled, .disabled, [aria-disabled="true"])):hover {
    background-color: var(--hos-eshop-hover);
    border-color: var(--hos-eshop-hover);
}

:is(.home, .tax-product_cat, .tax-product_tag, .tax-pa_brand, .tax-product_brand) #main ul.products > li.product > .button:focus-visible,
.single-product #main form.cart .single_add_to_cart_button:focus-visible {
    outline: 2px solid #245f91;
    outline-offset: 2px;
}

#masthead.site-header,
#masthead .storefront-primary-navigation,
#colophon.site-footer {
    background-color: var(--hos-warm-stone);
}

:is(#masthead, .storefront-handheld-footer-bar) .site-search .search-field {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    border: 1px solid #837b71;
    border-radius: 6px;
    background: #fff;
    color: #242a31;
    box-shadow: none;
}

:is(#masthead, .storefront-handheld-footer-bar) .site-search .search-field::placeholder {
    color: #535a62;
    opacity: 1;
}

#masthead .site-search .woocommerce-product-search::before {
    color: #44505c;
}

:is(#masthead, .storefront-handheld-footer-bar) .site-search .search-field:focus {
    outline: 2px solid #245f91;
}

#masthead .site-search .search-field:focus {
    outline-offset: 2px;
}

@media (min-width: 768px) {
    #masthead .primary-navigation .hos-shop-menu-item > a {
        position: relative;
        isolation: isolate;
        color: #fff;
        font-weight: 600;
    }
    #masthead .primary-navigation .hos-shop-menu-item > a::before {
        content: "";
        display: block;
        position: absolute;
        inset: 1.1em .25em;
        z-index: -1;
        border-radius: .4rem;
        background: var(--hos-eshop-blue);
    }
    #masthead .primary-navigation .hos-shop-menu-item:hover > a::before {
        background: var(--hos-eshop-hover);
    }
}

#masthead .hos-shop-menu-item > a:focus-visible {
    outline: 2px solid #245f91;
    outline-offset: -2px;
}

@media (forced-colors: active) {
    #masthead .hos-shop-menu-item > a { color: LinkText; text-decoration: underline; }
    #masthead .primary-navigation .hos-shop-menu-item > a::before { display: none; }
}

@media (max-width: 767px) {
    .site-footer .storefront-handheld-footer-bar,
    .site-footer .storefront-handheld-footer-bar > ul > li > a {
        background-color: var(--hos-warm-stone);
    }
    .site-footer .storefront-handheld-footer-bar {
        border-top: 1px solid #d1cbc3;
    }
    :root {
        --hos-ink: #202938;
        --hos-muted: #515b68;
        --hos-rule: #dadde1;
        --hos-gutter: clamp(12px, 3.6vw, 24px);
        /* An upward jump can reveal the header while the browser scrolls to its target. */
        scroll-padding-top: calc(var(--hos-admin-offset, 0px) + var(--hos-header-height, 65px) + var(--hos-toolbar-height, 0px));
    }
    /* Storefront clips the page horizontally. Keep the viewport as the sticky scroll container. */
    #page.site { overflow: visible; overflow-x: clip; }
    #masthead.site-header {
        position: sticky;
        top: var(--hos-admin-offset, 0px);
        transition: transform 160ms ease-out;
        margin: 0;
        padding: 0;
        color: var(--hos-ink);
        background-image: none;
        border-bottom: 1px solid var(--hos-rule);
    }
    #masthead > .col-full {
        position: static;
        margin: 0;
        padding: 0;
    }
    #masthead .site-branding {
        display: flex;
        float: none;
        min-height: 64px;
        width: auto;
        margin: 0;
        padding: 6px 56px;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }
    #masthead .site-branding img {
        width: 170px;
        max-width: 100%;
        max-height: 46px;
        object-fit: contain;
    }
    #masthead .storefront-primary-navigation,
    #masthead .storefront-primary-navigation > .col-full,
    #masthead #site-navigation { position: static; }
    #masthead .storefront-primary-navigation > .col-full { margin: 0 var(--hos-gutter); }
    #masthead .menu-toggle {
        position: absolute;
        top: 10px;
        left: max(4px, calc(var(--hos-gutter) - 6px));
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--hos-ink);
        font-size: 0;
        box-shadow: none;
    }
    #masthead .menu-toggle::before,
    #masthead .menu-toggle::after,
    #masthead .menu-toggle span::before {
        left: 11px;
        width: 22px;
        height: 2px;
        background: currentColor;
    }
    #masthead .hos-catalogue-actions {
        position: absolute;
        top: 10px;
        right: 3px;
        display: flex;
        align-items: center;
    }
    .hos-catalogue-actions .hos-basket {
        display: grid;
        place-items: center;
        height: 44px;
        width: 44px;
        color: var(--hos-ink);
        cursor: pointer;
        list-style: none;
    }
    .hos-basket { position: relative; }
    .hos-basket-count:not(:empty) {
        position: absolute;
        right: 1px;
        top: 0;
        min-width: 16px;
        padding: 1px 3px;
        border-radius: 1rem;
        color: white;
        background: var(--hos-ink);
        font-size: .7rem;
        line-height: 1.35;
        text-align: center;
    }
    .hos-catalogue-actions svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.65;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    html.hos-header-away { --hos-shown-header: 0px; }
    html.hos-header-away #masthead { transform: translateY(-100%); }
    #masthead .site-search { display: none; }
    .storefront-handheld-footer-bar .site-search .search-field:focus {
        /* Keep the ring inside the field at the edges of the search panel. */
        outline-offset: -3px;
    }
    #masthead .main-navigation.toggled .handheld-navigation {
        max-height: calc(100vh - 145px - var(--hos-admin-offset, 0px));
        max-height: calc(100dvh - 145px - var(--hos-admin-offset, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    #masthead .handheld-navigation .hos-shop-menu-item > a {
        padding-inline-start: .75rem;
        border-radius: .4rem;
        background: #edf3fa;
        color: #174472;
        font-weight: 600;
    }
    .hos-catalogue-actions :focus-visible { outline: 2px solid #245f91; outline-offset: -3px; }
    @media (prefers-reduced-motion: reduce) {
        #masthead.site-header { transition: none; }
    }
}
