/* Celebrazione omaggio Mare in Fest — pagina carrello */
body.mareinfest-win-open {
    overflow: hidden;
}

.mareinfest-win {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: auto;
}

.mareinfest-win.is-closing {
    animation: mareinfest-win-fadeout 0.45s ease forwards;
}

.mareinfest-win__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 40, 62, 0.55);
    backdrop-filter: blur(4px);
    animation: mareinfest-win-fadein 0.4s ease;
}

.mareinfest-win__confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.mareinfest-win__confetti span {
    position: absolute;
    top: -12%;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0;
    animation: mareinfest-confetti-fall 2.8s ease-in forwards;
    animation-delay: calc(var(--d, 0ms) + 0.15s);
    left: calc(var(--x, 50) * 1%);
    background: var(--c, #00a8b5);
    transform: rotate(var(--r, 0deg));
}

.mareinfest-win__panel {
    position: relative;
    z-index: 2;
    width: min(100%, 380px);
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: 1.35rem;
    background: linear-gradient(165deg, #ffffff 0%, #f0fafc 55%, #e8f6fa 100%);
    box-shadow:
        0 24px 60px rgba(10, 77, 120, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    text-align: center;
    animation: mareinfest-win-pop 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) 0.1s both;
}

.mareinfest-win__burst {
    position: absolute;
    top: -28px;
    left: 50%;
    width: 120px;
    height: 120px;
    margin-left: -60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 224, 138, 0.9) 0%, rgba(0, 168, 181, 0.25) 45%, transparent 70%);
    animation: mareinfest-burst-pulse 1.8s ease-in-out infinite;
    pointer-events: none;
}

.mareinfest-win__icon {
    position: relative;
    z-index: 1;
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a4d78, #00a8b5);
    color: #fff;
    font-size: 2rem;
    line-height: 4.5rem;
    box-shadow: 0 10px 28px rgba(10, 77, 120, 0.35);
    animation: mareinfest-icon-bounce 0.9s ease 0.35s both;
}

.mareinfest-win__title {
    font-size: clamp(1.35rem, 5vw, 1.65rem);
    font-weight: 800;
    color: #0a4d78;
    margin-bottom: 0.35rem;
    line-height: 1.2;
}

.mareinfest-win__sub {
    color: #5a6a75;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.45;
}

.mareinfest-win__product {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.15rem;
    border-radius: 1rem;
    background: #fff;
    border: 2px solid rgba(0, 168, 181, 0.35);
    box-shadow: 0 8px 20px rgba(10, 77, 120, 0.1);
    text-align: left;
    animation: mareinfest-product-reveal 0.7s ease 0.5s both;
}

.mareinfest-win__product-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.mareinfest-win__product-name {
    font-weight: 700;
    color: #1a3344;
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0;
}

.mareinfest-win__product-tag {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #198754;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.mareinfest-win__hint {
    font-size: 0.82rem;
    color: #6c7a86;
    margin-bottom: 1rem;
}

.mareinfest-win__btn {
    min-height: 48px;
    font-weight: 600;
    border-radius: 999px;
    padding-inline: 1.5rem;
}

.mareinfest-cart-banner {
    border-radius: 1rem;
    border: 1px solid rgba(25, 135, 84, 0.35);
    background: linear-gradient(90deg, rgba(209, 250, 229, 0.95), rgba(240, 253, 250, 0.95));
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    animation: mareinfest-banner-in 0.6s ease both;
}

.mareinfest-cart-banner__title {
    font-weight: 700;
    color: #146c43;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.mareinfest-cart-banner__text {
    font-size: 0.85rem;
    color: #2d5a45;
    margin: 0;
    line-height: 1.45;
}

.cart-line--mareinfest-gift {
    position: relative;
    background: linear-gradient(90deg, rgba(209, 250, 229, 0.45) 0%, rgba(255, 255, 255, 0) 85%);
    animation: mareinfest-gift-line-in 0.85s cubic-bezier(0.34, 1.2, 0.64, 1) 0.2s both;
}

.cart-line--mareinfest-gift::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #198754, #00a8b5);
    border-radius: 4px 0 0 4px;
}

.cart-line--mareinfest-gift.is-highlight {
    animation: mareinfest-gift-glow 1.4s ease 2;
}

.cart-line--mareinfest-gift .badge.bg-success {
    animation: mareinfest-badge-pop 0.5s ease 0.6s both;
}

@keyframes mareinfest-win-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mareinfest-win-fadeout {
    to { opacity: 0; }
}

@keyframes mareinfest-win-pop {
    from {
        opacity: 0;
        transform: scale(0.82) translateY(24px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes mareinfest-burst-pulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.15); opacity: 1; }
}

@keyframes mareinfest-icon-bounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

@keyframes mareinfest-product-reveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mareinfest-confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(110vh) rotate(720deg);
    }
}

@keyframes mareinfest-banner-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mareinfest-gift-line-in {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes mareinfest-gift-glow {
    0%, 100% {
        box-shadow: inset 0 0 0 0 rgba(25, 135, 84, 0);
    }
    50% {
        box-shadow: inset 0 0 24px rgba(25, 135, 84, 0.2);
    }
}

@keyframes mareinfest-badge-pop {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .mareinfest-win__panel,
    .mareinfest-win__icon,
    .mareinfest-win__product,
    .mareinfest-win__confetti span,
    .mareinfest-cart-banner,
    .cart-line--mareinfest-gift,
    .cart-line--mareinfest-gift .badge {
        animation: none !important;
    }
    .mareinfest-win__burst {
        animation: none;
    }
}
