/* Match the Statamic header while keeping the shop's fixed navigation. */
:root {
    --ats-usp-height: 2.5rem;
    /* Existing offsets for the fixed shop header, with a breadcrumb on product pages. */
    --ats-header-offset: 150px;
    --ats-product-header-offset: 180px;
}

header.navigation ~ #wrapper {
    margin-top: calc(var(--ats-header-offset) + var(--ats-usp-height));
}

.page-product header.navigation ~ #wrapper {
    margin-top: calc(var(--ats-product-header-offset) + var(--ats-usp-height));
}

header.atsheader {
    --ats-header-inset: calc(20px + 0.5rem);

    font-family: commuters-sans, Arial, sans-serif;
}

.atsheader-usp {
    background: #ededed;
}

.atsheader-usp__list {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: var(--ats-usp-height);
    margin: 0;
    padding: 0 1rem;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
}

.atsheader-usp__list::-webkit-scrollbar {
    display: none;
}

.atsheader-usp__list:focus-visible {
    outline: 2px solid #009640;
    outline-offset: -2px;
}

.atsheader-usp__item {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.5rem;
    color: #009640;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.atsheader-usp__item:first-child {
    margin-inline-start: auto;
}

.atsheader-usp__item:last-child {
    margin-inline-end: auto;
}

.atsheader-usp__item + .atsheader-usp__item::before {
    content: '//';
    margin-inline-end: 0.25rem;
    color: #fff;
    font-weight: 800;
    letter-spacing: -1px;
}

.atsheader-usp__stars {
    color: #f5a000;
    font: 1.25em/1 Arial, sans-serif;
    letter-spacing: 0.2em;
}

header.atsheader .atsheader-top__container,
header.atsheader .atsheader-bottom__container {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
    padding-inline: var(--ats-header-inset);
}

header.atsheader .atsheader-top__lower {
    padding-inline: 0;
}

header.atsheader .atsheader-bottom,
header.atsheader .atsnavigation {
    background: #000;
}

header.atsheader .atsheader-bottom__buttons {
    gap: 0.375rem;
    padding-left: 0;
    margin-right: 0;
}

header.atsheader .atsheader-bottom__buttons .btn-cta {
    -webkit-clip-path: none;
    clip-path: none;
    margin-left: 0;
    padding-inline: 0.625rem;
    white-space: nowrap;
}

header.atsheader .atsheader-bottom__buttons .btn-cta--tel {
    color: green !important;
}

@media (max-width: 1024px) {
    header.atsheader .atsnavigation {
        max-height: calc(100vh - var(--ats-header-offset) - var(--ats-usp-height));
        max-height: calc(100dvh - var(--ats-header-offset) - var(--ats-usp-height));
        overflow-y: auto;
    }
}

@media (max-width: 550px) {
    header.atsheader .atsheader-bottom__buttons .btn-cta--tel {
        padding-inline: 1rem 0.8375rem;
    }
}

@media (max-width: 380px) {
    header.atsheader .atsheader-bottom__container {
        padding-inline: 1rem;
    }
}

@media (max-width: 340px) {
    header.atsheader .atsheader-bottom__container {
        column-gap: 0.5rem;
    }

    header.atsheader .atsheader-bottom__buttons .btn-cta {
        padding-inline: 0.375rem;
    }

    header.atsheader .atsheader-bottom__buttons .btn-cta--tel {
        padding-inline: 0.5rem 0.75rem;
    }
}

@media (min-width: 760px) {
    :root {
        --ats-header-offset: 140px;
        --ats-product-header-offset: 176px;
    }
}

@media (min-width: 761px) {
    header.atsheader {
        --ats-header-inset: calc(1.875rem + 0.5rem);
    }
}

@media (min-width: 1025px) {
    :root {
        --ats-header-offset: min(193px, 10.131vw);
        --ats-product-header-offset: min(260px, 13.648vw);
    }

    header.atsheader {
        --ats-header-inset: calc(4.0625rem + 0.5rem);
    }

    .atsheader-usp__item {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }

    header.atsheader .atsheader-top__cart {
        right: var(--ats-header-inset);
    }

    header.atsheader .atsheader-bottom__container {
        /* Override the legacy shop theme's important desktop inset. */
        padding-inline: var(--ats-header-inset) !important;
        gap: 0.5rem;
    }

    header.atsheader .atsnavigation {
        margin-right: auto;
        background: transparent;
    }

    header.atsheader .atsnavigation__item {
        white-space: nowrap;
    }

    header.atsheader .atsnavigation__item::before {
        margin-inline: 0.5rem;
    }

    header.atsheader .atsheader-bottom__buttons {
        gap: 0.5rem;
    }

    header.atsheader .atsheader-bottom__buttons .btn-cta {
        padding-inline: 1.25rem;
    }
}
