/* DUO – Headerwinkelwagen v0.1.0. Isolated styles: the other menu buttons are untouched. */
#ast-desktop-header .main-header-menu > .duo-header-cart-menu-item > .duo-header-cart-link,
#ast-desktop-header .duo-header-cart-desktop-slot .duo-header-cart-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #778266 !important;
    border-radius: 0 !important;
    color: #535B43 !important;
    background: #fff !important;
    text-align: center !important;
    text-decoration: none !important;
    line-height: 1 !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
}
#ast-desktop-header .main-header-menu > .duo-header-cart-menu-item > .duo-header-cart-link:hover,
#ast-desktop-header .duo-header-cart-desktop-slot .duo-header-cart-link:hover {
    background: #F7F4EE !important;
    border-color: #535B43 !important;
    color: #535B43 !important;
}
#ast-desktop-header .main-header-menu > .duo-header-cart-menu-item { margin-left: 12px !important; }
#ast-desktop-header .duo-header-cart-desktop-slot { margin-left: 12px; }
.duo-header-cart-link { position: relative; white-space: nowrap; }
.duo-header-cart-link .duo-header-cart-icon { display: block; flex-shrink: 0; }
.duo-header-cart-link .duo-header-cart-count {
    position: absolute; top: -8px; right: -8px;
    box-sizing: border-box; min-width: 19px; height: 19px;
    padding: 0 4px; border-radius: 100px;
    display: inline-flex; justify-content: center; align-items: center;
    font: 600 11px/1 'Montserrat', Arial, sans-serif !important;
    color: #fff !important; background: #535B43 !important;
    border: 2px solid #fff;
    pointer-events: none;
}
.duo-header-cart-link .duo-header-cart-count:empty { display: none !important; }
.duo-header-cart-link:focus-visible { outline: 2px solid #535B43 !important; outline-offset: 3px; }
/* On Astra mobile/tablet headers, show the cart beside the existing hamburger. */
.duo-header-cart-mobile-slot { display: none; align-items: center; justify-content: center; margin: 0 10px; flex: 0 0 auto; }
.duo-header-cart-mobile-slot .duo-header-cart-link {
    display: inline-flex; align-items: center; justify-content: center;
    position: relative; width: 40px; height: 40px;
    border: 1px solid #778266; border-radius: 0;
    background: #fff; color: #535B43; text-decoration: none;
    box-sizing: border-box;
}
.duo-header-cart-mobile-slot .duo-header-cart-link:hover { background: #F7F4EE; color: #535B43; }
@media (max-width: 921px) {
    .duo-header-cart-mobile-slot { display: inline-flex !important; }
    #ast-desktop-header .duo-header-cart-menu-item { display: none !important; }
}
@media (min-width: 922px) { .duo-header-cart-mobile-slot { display: none !important; } }

/* Phone: keep space for Astra's hamburger and our cart alongside a compact logo.
   Affects only the mobile header below Astra's phone breakpoint. */
@media (max-width: 544px) {
    #ast-mobile-header .ast-primary-header-bar .ast-builder-grid-row {
        grid-template-columns: minmax(0, 1fr) auto !important;
        column-gap: 8px !important;
        align-items: center !important;
    }
    #ast-mobile-header .ast-primary-header-bar .site-header-primary-section-left {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    #ast-mobile-header .ast-primary-header-bar .site-header-primary-section-right {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
        min-width: max-content !important;
        width: auto !important;
        gap: 4px !important;
    }
    #ast-mobile-header .ast-primary-header-bar .site-header-primary-section-left .ast-builder-layout-element,
    #ast-mobile-header .ast-primary-header-bar .site-header-primary-section-left .site-branding,
    #ast-mobile-header .ast-primary-header-bar .site-header-primary-section-left .ast-site-identity,
    #ast-mobile-header .ast-primary-header-bar .site-header-primary-section-left .custom-logo-link {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    #ast-mobile-header .ast-primary-header-bar .site-header-primary-section-left img.custom-logo,
    #ast-mobile-header .ast-primary-header-bar .site-header-primary-section-left .custom-logo-link img {
        display: block;
        width: auto !important;
        max-width: min(48vw, 190px) !important;
        height: auto !important;
        object-fit: contain;
    }
    #ast-mobile-header .ast-primary-header-bar [data-section="section-header-mobile-trigger"],
    #ast-mobile-header .ast-primary-header-bar .site-header-primary-section-right .ast-button-wrap {
        display: flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        visibility: visible !important;
    }
    #ast-mobile-header .ast-primary-header-bar .duo-header-cart-mobile-slot {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        margin: 0 5px 0 0 !important;
    }
    #ast-mobile-header .ast-primary-header-bar .duo-header-cart-mobile-slot .duo-header-cart-link {
        width: 38px;
        height: 38px;
    }
}
