/* Extenso Header Mini Cart — painel portado para o body para escapar das camadas do Elementor/mega menu. */
.extenso-header-mini-cart-host {
    position: relative !important;
}

.extenso-header-mini-cart__panel {
    position: fixed !important;
    top: 0;
    left: 0;
    right: auto !important;
    z-index: 2147483647 !important;
    width: min(380px, calc(100vw - 28px)) !important;
    max-height: min(72vh, 620px) !important;
    overflow: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #e7e4e1 !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 14px 38px rgba(24, 43, 73, .17) !important;
    color: #202428 !important;
    font-family: Poppins, Arial, sans-serif !important;
    text-align: left !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(8px) !important;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease !important;
}

.extenso-header-mini-cart__panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -9px;
    height: 10px;
}

.extenso-header-mini-cart__panel.extenso-mini-cart-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
}

/* The custom panel replaces Elementor's own dropdown when its Menu Cart widget is used. */
.extenso-header-mini-cart-elementor .elementor-menu-cart__container {
    display: none !important;
    visibility: hidden !important;
}

.extenso-header-mini-cart__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #eee9e5;
    color: #182b49;
    font-size: 14px;
}

.extenso-header-mini-cart__header strong {
    font-weight: 600;
}

.extenso-header-mini-cart__header span {
    color: #777d84;
    font-size: 12px;
    font-weight: 500;
}

.extenso-header-mini-cart__items {
    padding: 4px 18px;
}

.extenso-header-mini-cart__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0edeb;
}

.extenso-header-mini-cart__thumb,
.extenso-header-mini-cart__thumb a {
    display: block;
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
}

.extenso-header-mini-cart__image {
    display: block;
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    border: 1px solid #efefef;
    border-radius: 7px;
    background: #fff;
}

.extenso-header-mini-cart__details {
    flex: 1 1 auto;
    min-width: 0;
}

.extenso-header-mini-cart__title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.extenso-header-mini-cart__title-row .extenso-header-mini-cart__name {
    flex: 1 1 auto;
    min-width: 0;
}

.extenso-header-mini-cart__remove {
    display: inline-flex !important;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px !important;
    height: 30px !important;
    margin: -5px -5px 0 0 !important;
    padding: 6px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: #fff6f1 !important;
    color: #f45100 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: background .16s ease, color .16s ease, opacity .16s ease !important;
}

.extenso-header-mini-cart__remove svg {
    display: block;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.extenso-header-mini-cart__remove:hover,
.extenso-header-mini-cart__remove:focus-visible {
    background: #fff0e8 !important;
    color: #c73520 !important;
}

.extenso-header-mini-cart__remove:disabled {
    opacity: .45 !important;
    cursor: wait !important;
}

.extenso-header-mini-cart__item.is-removing {
    opacity: .55;
    pointer-events: none;
}

.extenso-header-mini-cart__name {
    margin: 0 0 5px;
    color: #182b49;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 600;
}

.extenso-header-mini-cart__name a {
    color: inherit;
    text-decoration: none;
}

.extenso-header-mini-cart__name a:hover {
    color: #f45100;
}

.extenso-header-mini-cart__meta {
    margin: 2px 0 6px;
    color: #6d7278;
    font-size: 11px;
    line-height: 1.4;
}

.extenso-header-mini-cart__meta dl,
.extenso-header-mini-cart__meta p {
    margin: 0;
}

.extenso-header-mini-cart__meta dt,
.extenso-header-mini-cart__meta dd {
    display: inline;
    margin: 0 3px 0 0;
}

.extenso-header-mini-cart__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #6d7278;
    font-size: 11px;
}

.extenso-header-mini-cart__price {
    color: #182b49;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.extenso-header-mini-cart__subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px 13px;
    color: #182b49;
    font-size: 13px;
}

.extenso-header-mini-cart__subtotal strong {
    font-size: 15px;
    font-weight: 700;
}

.extenso-header-mini-cart__checkout {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0 18px 18px !important;
    padding: 11px 18px !important;
    border: 1px solid #f45100 !important;
    border-radius: 7px !important;
    background: #f45100 !important;
    color: #ffffff !important;
    font-family: Poppins, Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: background .18s ease, border-color .18s ease !important;
}

.extenso-header-mini-cart__checkout:hover,
.extenso-header-mini-cart__checkout:focus {
    border-color: #d94a00 !important;
    background: #d94a00 !important;
    color: #ffffff !important;
}

.extenso-header-mini-cart__empty,
.extenso-header-mini-cart__loading,
.extenso-header-mini-cart__error {
    padding: 22px 18px;
    color: #6d7278;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 480px) {
    .extenso-header-mini-cart__panel {
        width: min(340px, calc(100vw - 24px)) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .extenso-header-mini-cart__panel,
    .extenso-header-mini-cart__checkout {
        transition: none !important;
    }
}


/* Mobile floating cart: white circular button with dark cart and orange counter, matching the approved reference. */
.extenso-mobile-cart-fab {
    display: none !important;
}

@media (max-width: 767px) {
    .extenso-mobile-cart-fab {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: fixed !important;
        /* Keep the floating shortcut around the centered logo/header height. */
        top: calc(env(safe-area-inset-top, 0px) + clamp(105px, 16vh, 130px) - 50px) !important;
        right: 16px !important;
        z-index: 2147483000 !important;
        width: 64px !important;
        height: 64px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid rgba(32, 36, 40, .06) !important;
        border-radius: 50% !important;
        outline-offset: 3px;
        background: #ffffff !important;
        box-shadow: 0 4px 15px rgba(25, 31, 38, .22) !important;
        color: #252a2e !important;
        cursor: pointer !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition: opacity .18s ease, transform .18s ease, visibility .18s ease, box-shadow .18s ease;
        -webkit-tap-highlight-color: transparent;
    }

    /* Do not show a cart shortcut until WooCommerce confirms at least one item. */
    .extenso-mobile-cart-fab.is-empty {
        display: none !important;
    }

    .extenso-mobile-cart-fab:active {
        box-shadow: 0 2px 8px rgba(25, 31, 38, .2) !important;
        transform: scale(.97);
    }

    .extenso-mobile-cart-fab svg {
        display: block;
        width: 37px;
        height: 37px;
        overflow: visible;
        fill: none;
        stroke: #252a2e;
        stroke-width: 3.3;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .extenso-mobile-cart-fab__count {
        position: absolute;
        top: -3px;
        right: -2px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 24px;
        height: 24px;
        padding: 0 5px;
        border: 2px solid #ffffff;
        border-radius: 999px;
        background: #f45100;
        color: #ffffff;
        font-family: Poppins, Arial, sans-serif;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
        box-shadow: 0 1px 4px rgba(0,0,0,.14);
    }

    .extenso-mobile-cart-fab__count[hidden] {
        display: none !important;
    }

    .extenso-mobile-cart-fab.is-hidden {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(-7px) !important;
    }

    .extenso-header-mini-cart__panel.extenso-mobile-mini-cart-panel {
        position: fixed !important;
        right: 12px !important;
        left: auto !important;
        width: min(350px, calc(100vw - 24px)) !important;
        max-height: min(54vh, 420px) !important;
        overflow: auto !important;
        z-index: 2147483647 !important;
    }
}

@media (min-width: 768px) {
    .extenso-mobile-cart-fab,
    .extenso-header-mini-cart__panel.extenso-mobile-mini-cart-panel {
        display: none !important;
    }
}
