/* ============ Glass card (no tocamos desktop) ============ */
#ayp-open-cart.ayp-mini {
    position: fixed;
    right: var(--ayp-mini-right, 16px);
    top: var(--ayp-mini-top, 88px);
    width: var(--ayp-mini-w, 300px);
    max-height: calc(100vh - (var(--ayp-mini-top, 88px) + 16px));
    overflow: auto;
    background: rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .12);
    z-index: 100000;
    transition: transform .25s, opacity .25s;
}

#ayp-open-cart.ayp-mini.is-collapsed {
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
}

.ayp-mini__inner {
    padding: 12px;
    color: #0f172a;
}

.ayp-mini__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ayp-mini__title {
    font-weight: 700;
    font-size: 13px;
}

.ayp-mini__controls {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.ayp-mini__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    background: var(--ayp-primary, #2563eb);
    color: #fff;
}

.ayp-mini__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ayp-mini__item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    align-items: baseline;
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, .24);
}

.ayp-mini__item:first-child {
    border-top: 0;
}

.ayp-mini__label {
    font-size: 12.5px;
    color: #334155;
}

.ayp-mini__subtotal {
    font-weight: 700;
    font-size: 13px;
    color: #0f172a;
}

.ayp-mini__note {
    font-size: 11.5px;
    color: #334155;
    opacity: .8;
    text-align: right;
    margin: -2px 0 8px;
}

.ayp-mini__btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--ayp-primary, #2563eb);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid var(--ayp-primary, #2563eb);
}

.ayp-mini__btn--ghost {
    background: transparent;
    color: var(--ayp-primary, #2563eb);
    border: 1px solid var(--ayp-primary, #2563eb);
    margin-top: 6px;
}

/* ============ Header timer (opcional) – no cambia desktop ============ */
.ayp-cart-timer-host {
    position: relative;
    z-index: 100001;
}

.ayp-cart-timer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: var(--ayp-timer-h, 36px);
    line-height: var(--ayp-timer-h, 36px);
    padding: 0 8px;
    background: rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}

.ayp-tgl {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    height: var(--ayp-timer-h, 36px);
    display: inline-flex;
    align-items: center;
}

.ayp-timer-digits {
    display: inline-block;
    width: 56px;
    min-width: 56px;
    text-align: center;
    font-weight: 900;
    font-size: 14px;
    line-height: var(--ayp-timer-h, 36px);
    font-variant-numeric: tabular-nums;
    transform: scale(var(--ayp-timer-scale, 1.28));
    transform-origin: center;
}

.ayp-timer-count {
    display: none;
    min-width: 26px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
}

.ayp-timer-subtotal {
    display: none;
    font-weight: 800;
    font-size: 13px;
    color: #0f172a;
}

.ayp-timer-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: calc(var(--ayp-timer-h, 36px) - 8px);
    padding: 0 10px;
    border-radius: 999px;
    background: var(--ayp-primary, #2563eb);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 12px;
}

/* ============ NUEVO: Barra sticky SOLO MÓVIL ============ */
.ayp-timer-sticky-host {
    display: none;
}

@media (max-width:768px) {
    .ayp-timer-sticky-host {
        position: fixed;
        left: 0;
        right: 0;
        z-index: 99999;
    }

    .ayp-timer-sticky-host.ayp-pos-top {
        top: 0;
    }

    .ayp-timer-sticky-host.ayp-pos-bottom {
        bottom: 0;
    }

    .ayp-timer-sticky {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 8px 12px;
        margin: 6px auto;
        max-width: 900px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .92);
        -webkit-backdrop-filter: saturate(160%) blur(10px);
        backdrop-filter: saturate(160%) blur(10px);
        border: 1px solid rgba(0, 0, 0, .06);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    }

    .ayp-timer-sticky .ayp-tgl {
        background: transparent;
        border: 0;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
    }

    .ayp-timer-sticky .ayp-timer-digits {
        width: 56px;
        min-width: 56px;
        text-align: center;
        font-weight: 900;
        font-size: 14px;
        line-height: 1;
    }

    .ayp-timer-sticky .ayp-timer-count {
        display: none;
        min-width: 26px;
        height: 24px;
        padding: 0 8px;
        border-radius: 999px;
        background: #0f172a;
        color: #fff;
        font-weight: 800;
        font-size: 12px;
        line-height: 24px;
        text-align: center;
    }

    .ayp-timer-sticky .ayp-timer-subtotal {
        display: none;
        font-weight: 800;
        font-size: 13px;
        color: #0f172a;
    }

    .ayp-timer-sticky .ayp-timer-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 30px;
        padding: 0 12px;
        border-radius: 999px;
        background: var(--ayp-primary, #2563eb);
        color: #fff;
        text-decoration: none;
        font-weight: 800;
        font-size: 12px;
    }
}

/* Estados visuales del tiempo */
.ay-warn {
    color: var(--ayp-warn, #f59e0b) !important;
}

.ay-danger {
    color: var(--ayp-danger, #ef4444) !important;
    animation: ayp-pulse 1200ms ease-in-out infinite;
}

.ay-danger-fast {
    animation: ayp-pulse-fast 500ms ease-in-out infinite;
}

@keyframes ayp-pulse {
    0% {
        transform: scale(1.05)
    }

    50% {
        transform: scale(1.18)
    }

    100% {
        transform: scale(1.05)
    }
}

@keyframes ayp-pulse-fast {
    0% {
        transform: scale(1.06)
    }

    50% {
        transform: scale(1.22)
    }

    100% {
        transform: scale(1.06)
    }
}

/* Modal (centrado y z-index alto) */
.ayp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ayp-modal {
    background: #fff;
    border-radius: 14px;
    width: min(92vw, 380px);
    max-width: 92vw;
    padding: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    color: #0f172a;
}

.ayp-modal .ayp-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.ayp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--ayp-primary, #2563eb);
    background: var(--ayp-primary, #2563eb);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.ayp-btn--ghost {
    background: transparent;
    color: var(--ayp-primary, #2563eb);
    border-color: var(--ayp-primary, #2563eb);
}

/* Si convive con tu .ayp-sticky-cta en bottom (modo coexist) y quieres levantar el timer: lo gestiona JS vía data-offset */