:root {
    --azf-page-width: 1370px;
    --azf-orange-accent: #ff7803;
    --azf-orange-filled: #c25000;
    --azf-orange-hover: #af4600;
    --azf-orange-foreground: #b94d00;
    --azf-beige-surface: #faf7f4;
    --azf-beige-emphasis: #f6f2ee;
    --azf-beige-hover: #eee7df;
}

html body {
    background-color: var(--azf-beige-surface);
}

body main#maincontent {
    max-width: var(--azf-page-width) !important;
    background-color: var(--white, #fff);
}

body.catalog-category-view .products.wrapper .product-item {
    background-color: var(--white, #fff);
}

body.catalog-category-view .category-description,
body.catalog-category-view .category-description .btn-overflow,
body.catalog-category-view .bvd-category-short-description-wrap,
body.catalog-category-view .bvd-category-short-description {
    background-color: transparent;
}

body.catalog-category-view .bvd-category-short-description:not(.is-expanded) ~ .bvd-category-short-description-toggle {
    position: static;
    margin-inline-start: auto;
    padding-inline-start: 0;
    background: transparent;
    box-shadow: none;
}

html body.checkout-cart-index {
    background-color: var(--azf-beige-surface) !important;
}

body .custom-content-top,
body .custom-content-top .az-top-header-messages {
    background-color: #d6d9d9;
}

body header.page-header,
body header.page-header .search-icons-section-header {
    background-color: var(--azf-beige-surface);
}

body footer.page-footer,
body footer.page-footer .footer-section-main,
body.checkout-cart-index .cart-summary {
    background-color: var(--azf-beige-emphasis);
}

body .bvd-megamenu-host,
body #ammenu-sidebar {
    --ammenu-main-menu-background: var(--azf-beige-surface);
    --ammenu-submenu-background-color: var(--azf-beige-surface);
    --ammenu-main-menu-background-hover: var(--azf-beige-hover);
}

body #ammenu-sidebar,
body #ammenu-sidebar .bvd-mm-mobile-panel {
    background-color: var(--azf-beige-surface);
}

body .bvd-megamenu-host .main-section-li:hover,
body #ammenu-sidebar :is(.bvd-mm-mobile-next,.bvd-mm-mobile-back):hover {
    background-color: var(--azf-beige-hover);
}

body #azf-account-drawer,
body #azf-account-drawer .azf-account-head,
body #cart-drawer [role="region"] > .bg-white,
body #cart-drawer [role="dialog"] .shrink-0.bg-white,
body [data-bvd-ajaxcart-dialog],
body [data-bvd-ajaxcart-dialog] .grid.bg-white,
body .azb-market-overlay .azb-market-country-options {
    background-color: var(--azf-beige-surface);
}

body [data-bvd-ajaxcart-dialog] .bg-gray-50,
body .azb-market-overlay .azb-market-close,
body .azb-market-overlay .azb-market-country-options [role="option"]:is(.is-active,:hover) {
    background-color: var(--azf-beige-emphasis);
}

body .azb-market-overlay .azb-market-close:hover {
    background-color: var(--azf-beige-hover);
}

body .azb-market-overlay .azb-market-country-options [role="option"]:is(.is-active,:hover) {
    color: #202124;
}

body :is([class~="bg-[#f2f4f5]"], [class~="bg-[#F2F4F5]"]),
body tr[class~="odd:bg-[#f2f4f5]"]:nth-child(odd),
body tbody[class~="even:bg-[#f2f4f5]"]:nth-child(even) {
    background-color: var(--azf-beige-emphasis);
}

/* Keep the header, navigation, breadcrumbs and page on the same M1-width grid. */
body .custom-content-top .custom-content-top-section-main:has(> #azb-market-switcher),
body .page-header .main-header-section,
body .page-header .megmenu-header,
body nav.breadcrumbs {
    max-width: var(--azf-page-width);
    margin-inline: auto;
}

body nav.breadcrumbs {
    max-width: var(--azf-page-width) !important;
    padding-inline: 10px;
    padding-block-end: 16px;
    background-color: var(--white, #fff);
}

body nav.breadcrumbs > div {
    width: 100%;
    margin: 0;
}

body nav.breadcrumbs ol.items {
    min-height: 40px;
    gap: 0;
    padding: 6px 10px;
    border-radius: 0;
    background-color: var(--azf-beige-surface);
    font-weight: 500;
    line-height: 20px;
}

body nav.breadcrumbs [aria-current="page"] {
    color: #6c7072;
}

@media (max-width: 1023px) {
    body #ammenu-sidebar,
    body #ammenu-sidebar .bvd-mm-mobile-panel {
        background-color: var(--white, #fff);
    }

    body nav.breadcrumbs {
        padding-inline: 0;
        padding-block-end: 12px;
    }
}

@media (min-width: 1024px) {
    body .page-header .main-header-section { min-height: 85px; }

    body .page-header .megmenu-header,
    body .page-header .megmenu-header .bvd-mm-top,
    body #header .megmenu-header .bvd-megamenu-host :is(.bvd-mm-fly, .subsection-container-div) {
        background-color: var(--white, #fff);
    }

    body .megmenu-header .navigation.bvd-megamenu-host {
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
    }

    body .bvd-mm-top [role="menubar"] {
        flex-wrap: nowrap;
    }

    body .bvd-mm-top [role="menubar"] > li {
        min-width: 0;
    }

    body .bvd-mm-top [role="menubar"] > li > a[role="menuitem"] {
        min-height: 50px;
        gap: 7px;
        padding: 0 clamp(5px, .7vw, 12px);
        font-size: clamp(11px, 1vw, 14px);
        line-height: 17px;
        text-transform: uppercase;
    }

    body .bvd-mm-top [role="menubar"] > li > a[role="menuitem"] > span {
        font-weight: 500 !important;
        text-align: center;
        overflow-wrap: anywhere;
        text-transform: uppercase !important;
    }

    body .bvd-mm-top [data-fragment] > a[role="menuitem"]::after {
        content: "";
        width: 6px;
        height: 6px;
        flex: 0 0 6px;
        margin-block-start: -3px;
        border-inline-end: 1px solid currentColor;
        border-block-end: 1px solid currentColor;
        transform: rotate(45deg);
    }

    body #header .megmenu-header .bvd-megamenu-host .subsection-container-div {
        max-width: min(800px, calc(100vw - 24px)) !important;
        border-radius: 0;
    }

    body .bvd-mm-top .bvd-mm-grid > li > a > span:not(.shrink-0) {
        white-space: normal !important;
        overflow-wrap: anywhere;
    }
}

@media (min-width: 1100px) {
    body:not(.cms-index-index) .custom-content-top .custom-content-top-section-main:has(> #azb-market-switcher) {
        min-height: 40px;
        padding-block: 6px;
    }
}
/* Use a single icon row and give the search field its own row on compact screens. */
@media (max-width: 1023px) {
    body #header .main-header-section {
        --azf-mobile-icon-row: 68px;
        --azf-mobile-icon-target: 44px;
        --azf-mobile-header-inset: 6px;
        display: grid;
        grid-template-columns: repeat(2, var(--azf-mobile-icon-target)) minmax(0, 1fr) repeat(2, var(--azf-mobile-icon-target));
        grid-template-rows: var(--azf-mobile-icon-row) auto;
        align-items: center;
        row-gap: 10px;
        padding-block: var(--azf-mobile-header-inset) 8px;
    }

    body #header .main-header-section > .order-3 {
        display: contents;
    }

    body #header .main-header-section > :has(> .logo-link) {
        position: static;
        grid-area: 1 / 3;
        justify-self: center;
        width: auto;
        margin: 0;
        padding: 0;
    }

    body #header .main-header-section > .order-3 > :has(> #customer-menu) {
        grid-area: 1 / 4;
        margin: 0;
    }

    body #header #menu-cart-icon {
        grid-area: 1 / 5;
    }

    body #header :is(#customer-menu, #menu-cart-icon, button[aria-controls="ammenu-sidebar"]) {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 0;
    }

    body #header #menu-cart-icon .left-border {
        display: none !important;
    }

    body #header #menu-cart-icon > svg {
        position: absolute;
        inset: 50% auto auto 50%;
        transform: translate(-50%, -50%);
    }

    body #header .megmenu-header {
        inset-block-start: 18px;
        inset-inline-start: 10px;
        padding: 0;
    }

    body #header .bvd-megamenu-mobile {
        padding: 0;
    }

    body #header #bvd-header-search-container {
        grid-area: 2 / 1 / 3 / -1;
    }
}


body #header #menu-cart-icon > [x-text="cart.summary_count"] {
    box-sizing: border-box;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    top: -7px;
    right: 2px !important;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    background-color: var(--azf-orange-filled);
    color: var(--white, #fff);
}

body #header #menu-cart-icon > [x-text="cart.summary_count"]:is([x-cloak], :empty, [style*="display: none"]) {
    display: none !important;
}


@media (max-width: 1023px) {
    body #header #menu-cart-icon > [x-text="cart.summary_count"] {
        top: 1px;
    }
}

html:root {
    scrollbar-gutter: stable;
}

/* Scroll locking must keep the page gutter, while these fixed layers reach the physical viewport edge. */
body :is(.azf-account-layer, .azb-market-overlay),
body #header .amblog-bg-overflow,
body #cart-drawer .backdrop {
    width: 100vw;
    max-width: none;
}

body #cart-drawer > [role="dialog"] {
    right: calc(100% - 100vw);
    max-width: 100vw;
}
