/* Keep monetary values intact; names have their own row on small screens. */
#carritoFlotante .fila-producto>.carrito-producto-info{min-width:0;flex:1 1 auto}
#carritoFlotante .fila-producto>.carrito-producto-subtotal{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal;word-break:normal;font-variant-numeric:tabular-nums}
@media(max-width:768px){
 #carritoFlotante .fila-producto{display:grid;grid-template-columns:56px minmax(0,1fr) 36px;gap:10px;align-items:center;padding:14px 0}
 #carritoFlotante .fila-producto>.carrito-producto-info{grid-column:1/-1;display:block;width:auto;font-size:15px;line-height:1.4;overflow-wrap:anywhere}
 #carritoFlotante .carrito-producto-info>span{display:block}
 #carritoFlotante .carrito-variante{display:inline-block;margin-top:6px}
 #carritoFlotante .fila-producto>input{grid-column:1;box-sizing:border-box;width:56px!important;max-width:56px;min-height:42px;margin:0;padding:6px;text-align:center;font-size:16px}
 #carritoFlotante .fila-producto>.carrito-producto-subtotal{grid-column:2;min-width:0;font-size:16px;font-weight:700;text-align:right;line-height:1.4}
 #carritoFlotante .fila-producto>.eliminarBtn{grid-column:3;box-sizing:border-box;width:36px;min-height:36px;margin:0;padding:6px;border-radius:8px}
 #carritoFlotante .totalCarrito{white-space:nowrap;overflow-wrap:normal;font-size:clamp(17px,4.8vw,21px);font-variant-numeric:tabular-nums}
}

/* Compact launcher and shared desktop/mobile cart panel. */
#carritoMobileMini.mundoc-cart-launcher {
    position: fixed;
    top: auto;
    right: 136px;
    bottom: 18px;
    left: auto;
    z-index: 1180;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid #e6ba00;
    border-radius: 16px;
    background: #ffd600 !important;
    color: #172033 !important;
    box-shadow: 0 5px 18px #17203330;
    cursor: pointer;
}
#carritoMobileMini.mundoc-cart-launcher span {
    position: absolute;
    top: -7px;
    right: -6px;
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border: 1px solid #fff;
    border-radius: 999px;
    background: #172033;
    color: #fff;
    font: 800 11px/1 Arial, sans-serif;
}
#carritoMobileMini.mundoc-cart-launcher[aria-expanded=true],
body.assistant-chat-open #carritoMobileMini.mundoc-cart-launcher { display: none !important; }
body:not(.assistant-chat-open):has(#carritoFlotante.mundoc-cart-panel:is(.mobile-open,.activo)) :is(.mundi-float,#mundoc-assistant) {
    visibility: hidden !important;
}

#carritoFlotante.mundoc-cart-panel {
    display: none;
    grid-template-rows: auto minmax(0,1fr) auto;
    box-sizing: border-box;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #dde5ef;
    border-radius: 18px;
    background: #fff;
    color: #172033;
    box-shadow: 0 14px 48px #17203333;
    animation: none;
}
#carritoFlotante.mundoc-cart-panel:is(.mobile-open,.activo) { display: grid; }
body.assistant-chat-open #carritoFlotante.mundoc-cart-panel { display: none !important; }
.mundoc-cart-heading {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2px 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #e8edf3;
    background: #f7f9fc;
}
#carritoFlotante.mundoc-cart-panel h3 {
    display: block;
    margin: 0;
    color: #172033;
    font-size: 18px;
}
.mundoc-cart-count {
    justify-self: start;
    min-width: 24px;
    padding: 4px 6px;
    border-radius: 999px;
    background: #fff1a3;
    color: #172033;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
}
#carritoFlotante.mundoc-cart-panel #tipoPrecioCarrito {
    grid-column: 1 / -1;
    justify-self: start;
    color: #345276;
    font-size: 10px;
    font-weight: 800;
}
#carritoFlotante.mundoc-cart-panel .carrito-mobile-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #e9eef6;
    color: #172033;
    font-size: 24px;
    cursor: pointer;
}
.mundoc-cart-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 14px;
}
#mundocCartEmpty { margin: 20px 0; color: #52647a; }
#carritoFlotante.mundoc-cart-panel .fila-producto {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 6px 8px;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #e8edf3;
}
#carritoFlotante.mundoc-cart-panel .carrito-producto-info {
    grid-area: 1 / 1;
    display: grid;
    width: auto;
    gap: 2px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
#carritoFlotante.mundoc-cart-panel :is(.carrito-variante,.carrito-precio-unitario) {
    margin: 0;
    color: #52647a;
    font-size: 12px;
}
#carritoFlotante.mundoc-cart-panel .mundoc-cart-quantity {
    grid-area: 2 / 1;
    display: flex;
    align-items: center;
    gap: 2px;
}
#carritoFlotante.mundoc-cart-panel .mundoc-cart-quantity input {
    box-sizing: border-box;
    width: 42px !important;
    max-width: 42px;
    min-height: 44px;
    margin: 0;
    padding: 3px;
    appearance: textfield;
    font-size: 16px;
}
.mundoc-cart-quantity input::-webkit-inner-spin-button,
.mundoc-cart-quantity input::-webkit-outer-spin-button { appearance: none; }
#carritoFlotante.mundoc-cart-panel :is(.mundoc-cart-quantity button,.eliminarBtn) {
    box-sizing: border-box;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border-radius: 8px;
    background: #eef2f8;
    color: #172033;
    font-size: 18px;
    cursor: pointer;
}
#carritoFlotante.mundoc-cart-panel .eliminarBtn {
    grid-area: 1 / 2;
    justify-self: end;
    background: #fff1f2;
    color: #a71333;
}
#carritoFlotante.mundoc-cart-panel .carrito-producto-subtotal {
    grid-area: 2 / 2;
    color: #172033;
    text-align: right;
    font-size: 15px;
    font-weight: 800;
}
.mundoc-cart-actions {
    display: grid;
    gap: 6px;
    padding: 8px 14px 12px;
    border-top: 1px solid #e8edf3;
    background: #fff;
}
#mundocCartSaving {
    margin: 0;
    color: #176540;
    text-align: right;
    font-size: 13px;
}
#carritoFlotante.mundoc-cart-panel .totalCarrito {
    margin: 0 0 3px;
    color: #172033;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}
#carritoFlotante.mundoc-cart-panel :is(#exportarPDF,#finalizarCompraOnline,#guardarCotizacionEditada) {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #d5deea;
    border-radius: 9px;
    background: #f6f8fc;
    color: #172033;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}
#carritoFlotante.mundoc-cart-panel #finalizarCompraOnline {
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-color: #e6ba00;
    background: #ffd600;
}
#carritoFlotante.mundoc-cart-panel :focus-visible,
#carritoMobileMini.mundoc-cart-launcher:focus-visible {
    outline: 2px solid #8b6500;
    outline-offset: -2px;
}
#carritoFlotante.mundoc-cart-panel .mundoc-cart-quantity button:disabled {
    opacity: .55;
    cursor: wait;
}
#toast {
    right: auto !important;
    left: 50%;
    max-width: calc(100% - 24px);
    translate: -50% 0;
    text-align: center;
}
@media (max-width: 768px), (max-width: 1024px) and (hover: none) and (pointer: coarse) {
    body:has(#carritoMobileMini.mundoc-cart-launcher) {
        --mundoc-mobile-access-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    #carritoMobileMini.mundoc-cart-launcher {
        right: auto;
        bottom: 12px;
        bottom: var(--mundoc-mobile-access-bottom, 12px);
        left: 10px;
        left: calc(10px + env(safe-area-inset-left, 0px));
        width: 48px;
        height: 48px;
    }
    body:has(#carritoMobileMini.mundoc-cart-launcher) .whatsapp-float.mundi-float {
        left: auto !important;
        right: 10px !important;
        right: calc(10px + env(safe-area-inset-right, 0px)) !important;
        bottom: calc(var(--mundoc-mobile-access-bottom, 12px) + var(--mundi-lift, 0px)) !important;
        width: 52px !important;
        max-width: 52px !important;
        height: 52px !important;
    }
    body:has(#carritoMobileMini.mundoc-cart-launcher) .mundi-float .mundi-welcome {
        display: none !important;
    }
}
