.returning-popup {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 998;
    font-family: 'Inter', sans-serif;
}

.returning-popup.show {
    display: block;
}

.returning-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.returning-popup.show .returning-popup-backdrop {
    opacity: 1;
}

.returning-popup-window {
    position: absolute;
    right: 3%;
    bottom: calc(3% + env(safe-area-inset-bottom));
    width: min(340px, 85vw);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    padding: 1.5rem;
    transform: translateY(40px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.returning-popup.show .returning-popup-window {
    transform: translateY(0);
    opacity: 1;
}

.returning-popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1a1a1a;
}

.returning-popup-header .eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #d4af37;
    margin-bottom: 0.4rem;
}

.returning-popup-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #1a1a1a;
}

.returning-popup-header .subtitle {
    margin: 0.25rem 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.returning-popup-body {
    max-height: 260px;
    overflow-y: auto;
}

.returning-popup-cards {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.returning-popup-card {
    display: flex;
    gap: 0.75rem;
    border: 1px solid #f1f1f1;
    border-radius: 16px;
    padding: 0.75rem;
    background: #fafafa;
}

.returning-popup-card img {
    width: 90px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
}

.returning-popup-card h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #1a1a1a;
}

.returning-popup-card p {
    margin: 0.2rem 0;
    color: #666;
    font-size: 0.82rem;
}

.returning-popup-card .price {
    font-weight: 600;
    color: #1a1a1a;
}

.returning-popup-card .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    margin-top: 0.4rem;
}

.returning-popup-loading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #666;
    font-size: 0.85rem;
}

.returning-popup-loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: returning-spin 0.8s linear infinite;
}

@keyframes returning-spin {
    to {
        transform: rotate(360deg);
    }
}

.returning-popup-footer {
    margin-top: 1rem;
    text-align: center;
}

.returning-popup .btn-primary-custom {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
}

@media (max-width: 576px) {
    .returning-popup-window {
        right: 5vw;
        left: 5vw;
        width: auto;
        bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    .returning-popup-card {
        flex-direction: column;
        text-align: center;
    }

    .returning-popup-card img {
        width: 100%;
        height: 160px;
    }
}

