body.fyb-footer-cart-open .ak-widget-container,
body.fyb-footer-cart-open .ak-widget-backdrop {
    display: none !important;
}

#cart-footer {
    z-index: 100000;
}

#cart-footer .footer-mini-cart {
    max-width: 1280px;
    min-height: 0 !important;
    margin: 0 auto;
    padding: 16px 24px;
    border: 1px solid #e1e8ee;
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: #fff !important;
    box-shadow: 0 -8px 32px rgba(26, 48, 68, 0.13);
    box-sizing: border-box;
}

#cart-footer .footer-mini-cart::before {
    display: none;
}

#cart-footer .footer-mini-cart::after {
    content: '';
    display: table;
    clear: both;
}

#cart-footer .cart-qty {
    top: -36px;
    left: max(16px, calc((100% - 1280px) / 2 + 24px));
    height: 36px;
    padding: 8px 14px;
    border: 1px solid #e1e8ee;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: #fff !important;
    color: #344957 !important;
    font-family: Roboto, Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    line-height: 20px;
    box-shadow: 0 -4px 12px rgba(26, 48, 68, 0.05);
    box-sizing: border-box;
}

#cart-footer .cart-items {
    width: calc(100% - 560px);
    margin: 0;
    padding: 0 20px 0 0;
    box-sizing: border-box;
    scrollbar-width: thin;
}

#cart-footer .cart-items .item {
    margin-right: 10px;
}

#cart-footer .cart-items .item > .product {
    width: 64px;
    height: 68px;
    padding: 4px;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}

#cart-footer .cart-items .item > .product img {
    width: 54px !important;
    height: 58px !important;
    object-fit: contain;
}

#cart-footer .cart-items .item .item-qty {
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    border-radius: 6px;
    background: var(--mobile-accent, #0f6eaf);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
}

#cart-footer .footer-cart-additional {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 560px;
    padding-left: 20px;
    border-left: 1px solid #edf1f4;
    box-sizing: border-box;
}

#cart-footer .footer-cart-summary {
    flex: 1 1 auto;
    float: none;
    width: auto;
    min-height: 0 !important;
    padding: 0;
    border: 0;
}

#cart-footer .summary-content .row {
    margin: 0;
}

#cart-footer .summary-content .col-sm-6 {
    float: none;
    width: 100%;
    padding: 0;
    color: #647482;
    font-size: 12px;
    line-height: 1.7;
    text-align: left;
}

#cart-footer .summary-content .price {
    color: #253746;
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
}

#cart-footer .footer-cart-actions {
    flex: 0 0 auto;
    float: none;
    min-height: 0 !important;
    margin: 0;
    padding: 0 !important;
    border: 0;
}

#cart-footer #footer-cart-btn-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    float: none;
    width: auto;
    min-width: 230px;
    min-height: 54px;
    margin: 0;
    padding: 14px 22px;
    border: 1px solid var(--mobile-accent, #0f6eaf);
    border-radius: 12px;
    background: var(--mobile-accent, #0f6eaf);
    color: var(--mobile-on-accent, #fff);
    font-family: Roboto, Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: none;
    box-shadow: 0 4px 12px rgba(15, 110, 175, 0.15);
    box-sizing: border-box;
}

#cart-footer #footer-cart-btn-checkout::before {
    display: none;
}

#cart-footer #footer-cart-btn-checkout::after {
    content: '\2192';
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
}

#cart-footer #footer-cart-btn-checkout:hover {
    filter: brightness(0.95);
}

#cart-footer #footer-cart-btn-checkout:focus-visible {
    outline: 3px solid #97c6e8;
    outline-offset: 3px;
}

@media only screen and (max-width: 767px) {
    #cart-footer .footer-mini-cart {
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        border-radius: 20px 20px 0 0;
    }

    #cart-footer .cart-qty {
        top: -40px;
        right: auto;
        left: 16px;
        width: 44px;
        height: 40px;
        padding: 0;
        border-radius: 12px 12px 0 0;
        line-height: 40px;
    }

    #cart-footer .cart-qty::after {
        font-size: 19px;
        line-height: 40px;
    }

    #cart-footer .cart-qty .number {
        top: 3px;
        right: 2px;
        width: 14px;
        padding: 1px;
        background: var(--mobile-accent, #0f6eaf);
        color: #fff;
    }

    #cart-footer .cart-items {
        float: none;
        width: 100%;
        margin-bottom: 12px;
        padding: 0 0 4px;
    }

    #cart-footer .footer-cart-additional {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        float: none;
        width: 100%;
        padding: 0;
        border: 0;
    }

    #cart-footer .footer-cart-summary {
        display: block !important;
    }

    #cart-footer .summary-content .row {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
    }

    #cart-footer .summary-content .col-sm-6 {
        width: auto;
        font-size: 12px;
    }

    #cart-footer .summary-content .col-sm-6:last-child {
        text-align: right;
    }

    #cart-footer .summary-content .price {
        font-size: 19px;
    }

    #cart-footer .footer-cart-actions,
    #cart-footer .footer-cart-actions > .primary {
        width: 100%;
    }

    #cart-footer #footer-cart-btn-checkout {
        width: 100%;
        min-width: 0;
        min-height: 56px;
        margin: 0;
        font-size: 16px;
    }
}

#cart-footer .cart-items .item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    vertical-align: top;
}

#cart-footer .fyb-cart-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 64px;
    min-height: 32px;
    padding: 4px 0;
    border-radius: 7px;
    color: #647482;
    font-size: 11px;
    line-height: 1.4;
    text-decoration: none;
    box-sizing: border-box;
}

#cart-footer .fyb-cart-remove::before {
    display: none;
}

#cart-footer .fyb-cart-remove:hover {
    background: #fff0ef;
    color: #b43d34;
}

#cart-footer .fyb-cart-remove:focus-visible {
    outline: 2px solid var(--mobile-accent, #0f6eaf);
    outline-offset: 2px;
}

#cart-footer .fyb-cart-remove[disabled] {
    pointer-events: none;
    opacity: 0.45;
}

body.fyb-footer-cart-open .modals-overlay {
    z-index: 100030 !important;
}

body.fyb-footer-cart-open .modal-popup.confirm,
body.fyb-footer-cart-open .modal-popup.alert {
    z-index: 100040 !important;
}

@media only screen and (max-width: 767px) {
    #cart-footer .fyb-cart-remove {
        min-height: 40px;
        background: #f5f8fa;
        font-size: 12px;
    }
}

/* Keep the customer rating clear of the mobile cart trigger and open cart. */
body.fyb-footer-cart-open #ft_w1 {
    display: none !important;
}

@media only screen and (max-width: 767px) {
    #ft_max {
        bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Mobile overlays must cover floating storefront controls. */
body.fyb-product-options-open #ft_w1,
body.fyb-product-options-open #cart-footer {
    display: none !important;
}

@media only screen and (max-width: 767px) {
    html.nav-before-open #ft_w1,
    html.nav-before-open #cart-footer,
    html.nav-before-open .ak-widget-container,
    html.nav-before-open .ak-widget-backdrop,
    html.nav-open #ft_w1,
    html.nav-open #cart-footer,
    html.nav-open .ak-widget-container,
    html.nav-open .ak-widget-backdrop {
        display: none !important;
    }
}

#cart-footer .cart-items .item > .product {
    position: relative;
}

#cart-footer .fyb-cart-gift-badge {
    position: absolute;
    right: -4px;
    bottom: -5px;
    left: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 18px;
    padding: 1px 4px;
    border: 1px solid #cce5d3;
    border-radius: 5px;
    background: #edf8f0;
    color: #246d3c;
    font-family: Roboto, Arial, sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 14px;
    box-sizing: border-box;
    pointer-events: none;
}

#cart-footer .fyb-cart-gift-badge svg {
    flex: 0 0 12px;
}
