/* Tudo Mini Carrito + WhatsApp v1.0.2 */
/* v1.0.2 - reglas operativas para compra guiada y carrito vacío */
body.tmcw-hide-cart-when-empty.tmcw-cart-is-empty #tmcw-cart-float,
body.tmcw-hide-cart-when-empty.tmcw-cart-is-empty #tmcw-cart-popover {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.tmcw-hide-on-guided-landing.tcg-has-guided-landing #tmcw-toast,
body.tmcw-hide-on-guided-landing.tcg-has-guided-landing #tmcw-cart-float,
body.tmcw-hide-on-guided-landing.tcg-has-guided-landing #tmcw-cart-popover,
body.tmcw-hide-on-guided-landing.tcg-has-guided-landing #tmcw-whatsapp-float,
body.tmcw-hide-on-guided-landing.tcg-has-guided-landing .joinchat,
body.tmcw-hide-on-guided-landing.tcg-has-guided-landing .qlwapp,
body.tmcw-hide-on-guided-landing.tcg-has-guided-landing .wa__btn_popup,
body.tmcw-hide-on-guided-landing.tcg-has-guided-landing a[href*="wa.me"],
body.tmcw-hide-on-guided-landing.tcg-has-guided-landing a[href*="api.whatsapp.com"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.tmcw-hide-side-cart .xoo-wsc-modal,
body.tmcw-hide-side-cart .xoo-wsc-container,
body.tmcw-hide-side-cart .xoo-wsc-slider,
body.tmcw-hide-side-cart .woofc,
body.tmcw-hide-side-cart .wc-side-cart,
body.tmcw-hide-side-cart .side-cart-woocommerce {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.tmcw-hide-external-whatsapp a[href*="wa.me"]:not(#tmcw-whatsapp-float),
body.tmcw-hide-external-whatsapp a[href*="api.whatsapp.com"]:not(#tmcw-whatsapp-float),
body.tmcw-hide-external-whatsapp .joinchat,
body.tmcw-hide-external-whatsapp .qlwapp,
body.tmcw-hide-external-whatsapp .wa__btn_popup {
    display: none !important;
}

.tmcw-toast {
    position: fixed;
    right: 24px;
    bottom: 158px;
    z-index: 999999;
    background: #071225;
    color: #ffffff;
    border-radius: 999px;
    padding: 12px 18px;
    font-family: "Epilogue", "Nunito", Poppins, Arial, sans-serif;
    font-size: 13.5px;
    font-weight: 650;
    box-shadow: 0 16px 42px rgba(7,18,37,.22);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: .22s ease;
}

.tmcw-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tmcw-cart-float {
    position: fixed;
    right: 28px;
    bottom: 104px;
    z-index: 999990;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    border: 2px solid #ffffff;
    background: #007AFD;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 44px rgba(0,122,253,.24);
    cursor: pointer;
    transition: .22s ease;
}

.tmcw-cart-float:hover {
    transform: translateY(-2px) scale(1.03);
}

.tmcw-cart-float__icon:before {
    content: "";
    width: 23px;
    height: 23px;
    display: block;
    background: currentColor;
    mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 7V6a5 5 0 0 1 10 0v1h2.1a1 1 0 0 1 1 .9l1.1 12A2 2 0 0 1 19.2 22H4.8a2 2 0 0 1-2-2.1l1.1-12a1 1 0 0 1 1-.9H7Zm2 0h6V6a3 3 0 0 0-6 0v1Zm-1 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm8 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"/></svg>') center/contain no-repeat;
}

.tmcw-cart-float__count {
    position: absolute;
    right: -7px;
    top: -8px;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #071225;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    font-family: "Epilogue", "Nunito", Poppins, Arial, sans-serif;
}

.tmcw-cart-float.is-bumping {
    animation: tmcwBump .42s ease;
}

.tmcw-cart-float.is-added:after {
    content: "✓";
    position: absolute;
    inset: -5px;
    border-radius: 999px;
    background: rgba(0,122,253,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
    animation: tmcwPulse .7s ease forwards;
}

@keyframes tmcwBump {
    0% { transform: scale(1); }
    45% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

@keyframes tmcwPulse {
    0% { opacity: 1; transform: scale(.9); }
    100% { opacity: 0; transform: scale(1.35); }
}

body:not(.tmcw-cart-right) .tmcw-cart-float {
    left: 28px;
    right: auto;
}

body:not(.tmcw-cart-right) .tmcw-toast {
    left: 24px;
    right: auto;
}

.tmcw-whatsapp-float {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 999989;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
}

.tmcw-whatsapp-float__label {
    background: #22c55e;
    color: #ffffff;
    border-radius: 999px;
    padding: 10px 20px;
    font-family: "Epilogue", "Nunito", Poppins, Arial, sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 14px 30px rgba(34,197,94,.22);
}

.tmcw-whatsapp-float__icon {
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: #22c55e;
    border: 4px solid #ffffff;
    box-shadow: 0 18px 44px rgba(34,197,94,.28);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tmcw-whatsapp-float__icon:before {
    content: "";
    width: 31px;
    height: 31px;
    background: #ffffff;
    display: block;
    mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M16.02 3C8.84 3 3 8.82 3 15.98c0 2.45.68 4.74 1.86 6.7L3.62 29l6.52-1.71A12.95 12.95 0 0 0 16.02 29C23.18 29 29 23.18 29 16.02 29 8.84 23.18 3 16.02 3Zm0 23.6c-2.04 0-3.94-.6-5.55-1.63l-.4-.25-3.86 1.01 1.03-3.76-.26-.39a10.56 10.56 0 0 1-1.6-5.6c0-5.87 4.77-10.63 10.64-10.63 5.86 0 10.62 4.77 10.62 10.67 0 5.84-4.76 10.58-10.62 10.58Zm5.84-7.95c-.32-.16-1.9-.94-2.2-1.05-.3-.1-.51-.16-.73.16-.21.32-.83 1.05-1.02 1.27-.19.21-.38.24-.7.08-.32-.16-1.36-.5-2.6-1.6-.96-.85-1.6-1.9-1.8-2.22-.18-.32-.02-.5.14-.66.15-.15.32-.38.48-.57.16-.19.21-.32.32-.54.1-.21.05-.4-.03-.56-.08-.16-.73-1.75-1-2.4-.26-.63-.53-.54-.73-.55h-.62c-.21 0-.56.08-.86.4-.3.32-1.13 1.1-1.13 2.69 0 1.58 1.16 3.11 1.32 3.33.16.21 2.28 3.48 5.52 4.88.77.33 1.37.53 1.84.68.77.25 1.48.21 2.04.13.62-.09 1.9-.78 2.17-1.53.27-.75.27-1.4.19-1.53-.08-.13-.3-.21-.62-.37Z"/></svg>') center/contain no-repeat;
}

/* Panel */
.tmcw-cart-popover {
    position: fixed;
    right: 28px;
    bottom: 178px;
    z-index: 999991;
    width: min(390px, calc(100vw - 32px));
    max-height: 64vh;
    background: #ffffff;
    border: 1px solid #dbe7f5;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(7,18,37,.22);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: .22s ease;
    display: flex;
    flex-direction: column;
}

.tmcw-cart-popover.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.tmcw-cart-popover__head {
    padding: 22px 22px 16px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    border-bottom: 1px solid #e2e8f0;
    flex: 0 0 auto;
}

.tmcw-cart-popover__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.tmcw-cart-popover__title strong {
    display: inline-flex;
    font-family: "Epilogue", "Nunito", Poppins, Arial, sans-serif;
    font-size: 28px;
    line-height: 1;
    color: #071225;
    letter-spacing: -.04em;
    font-weight: 650;
}

.tmcw-kicker {
    display: inline-flex;
    align-items: center;
    background: #eaf3ff;
    color: #007AFD;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-weight: 800;
    font-family: "Epilogue", "Nunito", Poppins, Arial, sans-serif;
    white-space: nowrap;
}

.tmcw-cart-popover__close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #071225;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.tmcw-cart-popover__body {
    padding: 0;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.tmcw-empty {
    margin: 16px;
    padding: 22px;
    border: 1px solid #dbe7f5;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #64748b;
}

.tmcw-empty strong {
    color: #071225;
}

.tmcw-mini-scroll {
    padding: 16px;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 40vh;
    overscroll-behavior: contain;
}

.tmcw-mini-list {
    display: grid;
    gap: 12px;
}

.tmcw-mini-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #dbe7f5;
    border-radius: 18px;
    background: #ffffff;
}

.tmcw-mini-item__main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.tmcw-mini-item__main strong {
    color: #071225;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 550;
    overflow-wrap: anywhere;
}

.tmcw-mini-item__main span {
    color: #007AFD;
    font-weight: 800;
}

.tmcw-mini-item__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.tmcw-mini-item__tools em {
    font-style: normal;
    font-weight: 800;
    color: #071225;
    min-width: 16px;
    text-align: center;
}

.tmcw-qty,
.tmcw-remove {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: #eef6ff;
    color: #007AFD;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.tmcw-remove {
    background: #f8fafc;
    color: #64748b;
}

.tmcw-mini-footer {
    flex: 0 0 auto;
    padding: 14px 16px 16px;
    border-top: 1px solid #e2e8f0;
    background: rgba(255,255,255,.96);
    box-shadow: 0 -14px 34px rgba(7,18,37,.06);
}

.tmcw-mini-total {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #dbe7f5;
    background: #f8fafc;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #64748b;
    gap: 14px;
}

.tmcw-mini-total strong {
    color: #071225;
}

.tmcw-mini-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.tmcw-btn {
    min-height: 46px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-weight: 800;
    font-family: "Epilogue", "Nunito", Poppins, Arial, sans-serif;
}

.tmcw-btn--primary {
    background: #007AFD;
    color: #ffffff !important;
    box-shadow: 0 14px 30px rgba(0,122,253,.18);
}

.tmcw-btn--ghost {
    background: #ffffff;
    color: #071225 !important;
    border: 1px solid #dbe7f5;
}

@media (max-width: 720px) {
    .tmcw-toast {
        left: 14px;
        right: 14px;
        bottom: 104px;
        text-align: center;
    }

    .tmcw-cart-float {
        right: 18px;
        bottom: 96px;
        width: 54px;
        height: 54px;
    }

    .tmcw-whatsapp-float {
        right: 16px;
        bottom: 18px;
    }

    .tmcw-whatsapp-float__label {
        padding: 9px 15px;
        font-size: 12px;
    }

    .tmcw-whatsapp-float__icon {
        width: 54px;
        height: 54px;
    }

    .tmcw-cart-popover {
        left: 12px;
        right: 12px;
        bottom: 164px;
        width: auto;
        max-height: 68vh;
        border-radius: 24px;
    }

    .tmcw-cart-popover__head {
        padding: 16px 16px 14px;
        align-items: center;
    }

    .tmcw-cart-popover__title strong {
        font-size: 24px;
    }

    .tmcw-kicker {
        font-size: 9.5px;
        padding: 5px 9px;
    }

    .tmcw-cart-popover__close {
        width: 42px;
        height: 42px;
        font-size: 28px;
    }

    .tmcw-mini-scroll {
        max-height: 38vh;
        padding: 14px 14px 12px;
    }

    .tmcw-mini-item {
        align-items: center;
        padding: 13px;
    }

    .tmcw-mini-item__tools {
        gap: 7px;
    }

    .tmcw-qty,
    .tmcw-remove {
        width: 32px;
        height: 32px;
        font-size: 21px;
    }

    .tmcw-mini-footer {
        padding: 12px 14px 14px;
    }

    .tmcw-mini-actions {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .tmcw-btn {
        min-height: 44px;
        font-size: 14px;
    }
}

@media (max-width: 390px) {
    .tmcw-mini-actions {
        grid-template-columns: 1fr;
    }
}
