/* =====================================================
   CART POPUP — Notifica aggiunta al carrello
   ===================================================== */

.jc-cart-popup {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999990;
    width: calc(100% - 32px);
    max-width: 520px;
    transition: bottom 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
    pointer-events: none;
}

.jc-cart-popup.jc-popup-visible {
    bottom: 24px;
    pointer-events: all;
}

.jc-cart-popup-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 0 0 1px rgba(212,99,122,0.15);
}

.jc-cart-popup-icon {
    font-size: 28px;
    flex-shrink: 0;
    animation: jcPopupBounce 0.5s ease 0.2s both;
}

@keyframes jcPopupBounce {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.jc-cart-popup-text {
    flex: 1;
    min-width: 0;
}

.jc-cart-popup-text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin-bottom: 2px;
}

.jc-cart-popup-text span {
    font-size: 13px;
    color: #666;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jc-cart-popup-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #bbb;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.15s;
}

.jc-cart-popup-close:hover { color: #666; }

/* Barra progresso timer */
.jc-cart-popup-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4637a, #e8a0b0);
    border-radius: 0 0 16px 16px;
    width: 100%;
    animation: jcPopupTimer 6s linear forwards;
}

.jc-cart-popup.jc-popup-visible .jc-cart-popup-inner {
    position: relative; /* per ::after */
    overflow: hidden;
}

@keyframes jcPopupTimer {
    from { width: 100%; }
    to   { width: 0%; }
}

@media (max-width: 600px) {
    .jc-cart-popup { width: calc(100% - 24px); }
    .jc-cart-popup.jc-popup-visible { bottom: 16px; }
    .jc-cart-popup-inner { padding: 14px 14px; gap: 10px; }
    .jc-cart-popup-text strong { font-size: 14px; }
    .jc-cart-popup-text span { display: none; }
}
