/* =========================================================================
 * La Historia con Wifi · Aviso "agregado al carrito"
 * ====================================================================== */

.lhw-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99990;
    display: grid;
    gap: 14px;
    width: min(380px, calc(100% - 24px));
    padding: 16px;
    font-family: Lora, Georgia, serif;
    color: #fff;
    background: #171512;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3), 6px 6px 0 #F4C430;
    opacity: 0;
    transform: translateY(20px) scale(.98);
    transition: opacity .25s, transform .3s;
}

.lhw-toast[hidden] {
    display: none;
}

.lhw-toast.is-on {
    opacity: 1;
    transform: none;
}

.lhw-toast-top {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.lhw-toast-pic {
    position: relative;
    display: block;
    width: 64px;
    height: 64px;
    background: #2B2723;
    border-radius: 14px;
}

.lhw-toast-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.lhw-toast-img[hidden] {
    display: none;
}

.lhw-toast-ok {
    position: absolute;
    right: -6px;
    bottom: -6px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: #171512;
    background: #F4C430;
    border: 2px solid #171512;
    border-radius: 50%;
}

.lhw-toast-ok svg {
    width: 14px;
    height: 14px;
}

.lhw-toast-txt {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.lhw-toast-txt b {
    font-family: "Bricolage Grotesque", system-ui, sans-serif;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}

.lhw-toast-name {
    overflow: hidden;
    font-size: 14px;
    line-height: 1.35;
    color: rgba(255, 255, 255, .7);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lhw-toast-x {
    align-self: start;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.lhw-toast-x:hover {
    background: rgba(255, 255, 255, .1);
}

.lhw-toast-x svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    opacity: .7;
}

.lhw-toast-btns {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 10px;
}

.lhw-toast-btns a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 14px;
    font-family: "Bricolage Grotesque", system-ui, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    border-radius: 999px;
    transition: transform .2s, background .2s;
}

.lhw-toast-btns a:hover {
    transform: translateY(-2px);
}

.lhw-toast-cart {
    color: #fff !important;
    border: 2px solid rgba(255, 255, 255, .35);
}

.lhw-toast-cart:hover {
    border-color: #fff;
}

.lhw-toast-go {
    color: #171512 !important;
    background: #F4C430;
    border: 2px solid #F4C430;
}

/* Número del carrito: centrado y legible */
.x.xh .cart .cnt {
    top: -6px;
    right: -6px;
    box-sizing: border-box;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Saltito del ícono del carrito en el header */
.x.xh .cart.lhw-bump {
    animation: lhwbump .6s ease;
}

@keyframes lhwbump {
    0%,
    100% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.25) rotate(-8deg);
    }

    60% {
        transform: scale(.95) rotate(4deg);
    }
}

/* Con el aviso no hace falta el enlace "Ver carrito" que agrega WooCommerce */
body.lhw-shop ul.products li.product .added_to_cart {
    display: none !important;
}

@media (max-width: 600px) {
    .lhw-toast {
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
    }
}
