/* ==========================================================================
   Europa Checkout — Mini-cart (Elementor Menu Cart side panel)
   Targets Elementor's own classes (.elementor-menu-cart__*) which differ
   from the WooCommerce mini-cart template.
   ========================================================================== */

:root {
    --eu-bg:          #f6f7fb;
    --eu-surface:     #ffffff;
    --eu-border:      #e6e8ef;
    --eu-text:        #1a1d29;
    --eu-text-muted:  #6b7280;
    --eu-primary:     #111111;
    --eu-primary-hov: #2a2a2a;
    --eu-accent:      #c9a14a;
    --eu-success:     #16a34a;
    --eu-danger:      #dc2626;
    --eu-radius:      14px;
    --eu-radius-sm:   10px;
    --eu-transition:  .25s cubic-bezier(.4, 0, .2, 1);
}

/* ====================================================================== */
/* Lightbox (full-screen backdrop) — the container behind the panel       */
/* ====================================================================== */
body .elementor-menu-cart__container,
body .elementor-menu-cart__container.elementor-lightbox {
    background: rgba(0, 0, 0, .45) !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif !important;
    color: var(--eu-text) !important;
}
body .elementor-menu-cart__container *,
body .elementor-menu-cart__container *::before,
body .elementor-menu-cart__container *::after { box-sizing: border-box; }

/* The actual panel — sits on the RIGHT, full height, fixed width */
body .elementor-menu-cart__container .elementor-menu-cart__main {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    width: clamp(340px, 32vw, 440px) !important;
    max-width: 100% !important;
    height: 100% !important;
    background: var(--eu-surface) !important;
    box-shadow: -12px 0 32px rgba(20, 24, 40, .12) !important;
    padding: 26px 24px !important;
    overflow-y: auto !important;
    margin: 0 !important;
}

/* Auto title on top of the panel */
body .elementor-menu-cart__container .elementor-menu-cart__main::before {
    content: 'Meu Carrinho';
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--eu-text);
    margin: 0 0 18px;
    padding-right: 44px;
    letter-spacing: -.01em;
}

/* Close button (X) */
body .elementor-menu-cart__container .elementor-menu-cart__close-button {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: var(--eu-bg) !important;
    color: var(--eu-text) !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background var(--eu-transition), color var(--eu-transition) !important;
    margin: 0 !important;
    z-index: 2;
    padding: 0 !important;
    font-size: 0 !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__close-button::before,
body .elementor-menu-cart__container .elementor-menu-cart__close-button::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    top: 50%;
    left: 50%;
}
body .elementor-menu-cart__container .elementor-menu-cart__close-button::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
body .elementor-menu-cart__container .elementor-menu-cart__close-button::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
body .elementor-menu-cart__container .elementor-menu-cart__close-button:hover {
    background: var(--eu-primary) !important;
    color: #fff !important;
}

/* ====================================================================== */
/* Products list                                                          */
/* ====================================================================== */
body .elementor-menu-cart__container .widget_shopping_cart_content {
    padding: 0 !important;
    background: transparent !important;
}

body .elementor-menu-cart__container .elementor-menu-cart__products {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 0 16px !important;
    background: transparent !important;
    border: none !important;
    list-style: none !important;
}

body .elementor-menu-cart__container .elementor-menu-cart__product {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) 32px !important;
    grid-template-rows: auto auto !important;
    gap: 4px 12px !important;
    align-items: center !important;
    padding: 14px 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--eu-border) !important;
    list-style: none !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__product:last-child {
    border-bottom: none !important;
}

/* Thumb */
body .elementor-menu-cart__container .elementor-menu-cart__product-image {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    width: 56px !important;
    height: 56px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: var(--eu-bg) !important;
    border-radius: var(--eu-radius-sm) !important;
    overflow: hidden !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-image a,
body .elementor-menu-cart__container .elementor-menu-cart__product-image {
    display: block;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    float: none !important;
    max-width: 100% !important;
}

/* Product name */
body .elementor-menu-cart__container .elementor-menu-cart__product-name {
    grid-column: 2 !important;
    grid-row: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    min-width: 0 !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-name a {
    font-size: .9rem !important;
    font-weight: 600 !important;
    color: var(--eu-text) !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-name a:hover {
    color: var(--eu-accent) !important;
}

/* Quantity × price */
body .elementor-menu-cart__container .elementor-menu-cart__product-price {
    grid-column: 2 !important;
    grid-row: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    font-size: .8rem !important;
    color: var(--eu-text-muted) !important;
    font-weight: 500 !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-price .quantity,
body .elementor-menu-cart__container .elementor-menu-cart__product-price .product-quantity {
    color: var(--eu-text-muted) !important;
    font-weight: 500 !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-price .woocommerce-Price-amount,
body .elementor-menu-cart__container .elementor-menu-cart__product-price .amount {
    color: var(--eu-text) !important;
    font-weight: 600 !important;
}

/* Remove (X) button */
body .elementor-menu-cart__container .elementor-menu-cart__product-remove {
    grid-column: 3 !important;
    grid-row: 1 / span 2 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    position: relative;
    width: 28px;
    height: 28px;
    justify-self: end;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-remove a {
    position: absolute !important;
    inset: 0 !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: var(--eu-bg) !important;
    color: var(--eu-text-muted) !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all var(--eu-transition) !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
    font-size: 0 !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-remove a::before,
body .elementor-menu-cart__container .elementor-menu-cart__product-remove a::after {
    content: '' !important;
    position: absolute !important;
    width: 12px !important;
    height: 2px !important;
    background: currentColor !important;
    border-radius: 2px !important;
    top: 50% !important;
    left: 50% !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-remove a::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-remove a::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__product-remove a:hover {
    background: var(--eu-danger) !important;
    color: #fff !important;
}
/* Hide the second redundant <a> Elementor renders (only need one X). */
body .elementor-menu-cart__container .elementor-menu-cart__product-remove a + a {
    display: none !important;
}

/* ====================================================================== */
/* Subtotal                                                               */
/* ====================================================================== */
body .elementor-menu-cart__container .elementor-menu-cart__subtotal {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 18px 0 !important;
    margin: 0 !important;
    border-top: 2px solid var(--eu-text) !important;
    border-bottom: none !important;
    background: transparent !important;
    font-size: 1rem !important;
    text-align: left !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__subtotal strong {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--eu-text) !important;
}
body .elementor-menu-cart__container .elementor-menu-cart__subtotal .woocommerce-Price-amount,
body .elementor-menu-cart__container .elementor-menu-cart__subtotal .amount {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    color: var(--eu-primary) !important;
}

/* ====================================================================== */
/* Footer buttons                                                         */
/* ====================================================================== */
body .elementor-menu-cart__container .elementor-menu-cart__footer-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 !important;
}
body .elementor-menu-cart__container .elementor-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 14px 22px !important;
    border-radius: 999px !important;
    font-size: .95rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all var(--eu-transition) !important;
    border: 1px solid transparent !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
}
body .elementor-menu-cart__container .elementor-button-text {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    line-height: inherit !important;
}

/* "Ver carrinho" — outline */
body .elementor-menu-cart__container .elementor-button--view-cart {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--eu-text) !important;
    border: 1px solid var(--eu-border) !important;
    border-color: var(--eu-border) !important;
}
body .elementor-menu-cart__container .elementor-button--view-cart:hover {
    background: var(--eu-primary) !important;
    background-color: var(--eu-primary) !important;
    border-color: var(--eu-primary) !important;
    color: #fff !important;
}

/* "Finalização de compra" — primary */
body .elementor-menu-cart__container .elementor-button--checkout {
    background: var(--eu-primary) !important;
    background-color: var(--eu-primary) !important;
    color: #fff !important;
    border: 1px solid var(--eu-primary) !important;
    border-color: var(--eu-primary) !important;
}
body .elementor-menu-cart__container .elementor-button--checkout:hover {
    background: var(--eu-primary-hov) !important;
    background-color: var(--eu-primary-hov) !important;
    border-color: var(--eu-primary-hov) !important;
    color: #fff !important;
    transform: translateY(-1px);
}
body .elementor-menu-cart__container .elementor-button--checkout .elementor-button-text {
    color: #fff !important;
}

/* ====================================================================== */
/* Mobile optimization                                                    */
/* ====================================================================== */
@media (max-width: 600px) {
    /* Make the backdrop white-on-white so only the panel is visible */
    body .elementor-menu-cart__container,
    body .elementor-menu-cart__container.elementor-lightbox {
        background: var(--eu-surface) !important;
    }
    /* Panel takes the entire screen — flush against the right edge */
    body .elementor-menu-cart__container .elementor-menu-cart__main {
        width: 100% !important;
        max-width: 100% !important;
        right: 0 !important;
        left: 0 !important;
        box-shadow: none !important;
        padding: 22px 16px !important;
    }
    body .elementor-menu-cart__container .elementor-menu-cart__main::before {
        font-size: 1rem;
        margin-bottom: 16px;
    }
    body .elementor-menu-cart__container .elementor-menu-cart__close-button {
        top: 14px !important;
        right: 14px !important;
        width: 32px !important;
        height: 32px !important;
    }
    body .elementor-menu-cart__container .elementor-menu-cart__product {
        grid-template-columns: 48px minmax(0, 1fr) 28px !important;
        gap: 4px 10px !important;
        padding: 12px 0 !important;
    }
    body .elementor-menu-cart__container .elementor-menu-cart__product-image {
        width: 48px !important;
        height: 48px !important;
    }
    body .elementor-menu-cart__container .elementor-menu-cart__product-name a {
        font-size: .85rem !important;
    }
    body .elementor-menu-cart__container .elementor-menu-cart__product-price {
        font-size: .75rem !important;
    }
    body .elementor-menu-cart__container .elementor-menu-cart__subtotal .amount,
    body .elementor-menu-cart__container .elementor-menu-cart__subtotal .woocommerce-Price-amount {
        font-size: 1.15rem !important;
    }
    body .elementor-menu-cart__container .elementor-button {
        padding: 12px 18px !important;
        font-size: .9rem !important;
    }
}

/* ====================================================================== */
/* Legacy WC widget (fallback if used elsewhere, e.g. footer widget area) */
/* ====================================================================== */
.widget_shopping_cart .woocommerce-mini-cart {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.widget_shopping_cart .woocommerce-mini-cart-item {
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--eu-border) !important;
    list-style: none !important;
}
.widget_shopping_cart .woocommerce-mini-cart-item a:not(.remove) {
    color: var(--eu-text) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
.widget_shopping_cart .woocommerce-mini-cart__total {
    display: flex !important;
    justify-content: space-between !important;
    padding: 16px 0 !important;
    border-top: 2px solid var(--eu-text) !important;
    margin: 0 !important;
}
.widget_shopping_cart .woocommerce-mini-cart__total .amount {
    font-weight: 800 !important;
    color: var(--eu-primary) !important;
}
.widget_shopping_cart .button {
    background: var(--eu-primary) !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding: 12px 20px !important;
}
