/* Pop-up Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Pop-up Container */
.popup-container {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 30px 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-overlay.active .popup-container {
    transform: scale(1);
}

/* Header */
.popup-header {
    margin-bottom: 20px;
}

.black-friday-badge {
    background: linear-gradient(90deg, #FF4B2B 0%, #FF416C 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(255, 75, 43, 0.3);
}

.popup-title {
    font-size: 28px;
    font-weight: 900;
    color: #111;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.popup-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Banner Image Placeholder */
.popup-banner {
    width: 100%;
    height: 120px;
    background-color: #111;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.popup-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cards Container */
.cards-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    height: 140px;
    /* Fixed height to prevent layout jumps */
    perspective: 1000px;
}

.card-wrapper {
    width: 90px;
    height: 120px;
    position: relative;
    cursor: pointer;
    transition: transform 0.5s ease;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-wrapper.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-front {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5253 100%);
    background-image: url('../images/presente.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #ff9f43;
}

.card-front::after {
    content: '';
}

.card-back {
    background-color: #fff;
    background-image: url('../images/desconto.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: rotateY(180deg);
    border: 2px solid #FE2C55;
}

.discount-text {
    font-size: 24px;
    line-height: 1;
}

.discount-label {
    font-size: 10px;
    color: #333;
    margin-top: 5px;
}

/* Action Button */
.action-btn {
    background: linear-gradient(90deg, #FF4B2B 0%, #FF416C 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 75, 43, 0.5);
}

.action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.action-btn i {
    font-size: 20px;
}

/* Status Text */
.status-text {
    margin-top: 15px;
    font-size: 12px;
    color: #999;
}

/* Animations */
@keyframes shuffle1 {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(100%);
    }

    50% {
        transform: translateX(-100%);
    }

    75% {
        transform: translateX(0);
    }
}

@keyframes shuffle2 {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }

    75% {
        transform: translateX(0);
    }
}

@keyframes shuffle3 {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(0);
    }

    75% {
        transform: translateX(0);
    }
}

.shuffling .card-wrapper:nth-child(1) {
    animation: shuffle1 1s ease-in-out infinite;
}

.shuffling .card-wrapper:nth-child(2) {
    animation: shuffle3 1s ease-in-out infinite;
}

.shuffling .card-wrapper:nth-child(3) {
    animation: shuffle2 1s ease-in-out infinite;
}

/* Result State */
.result-message {
    background-color: #FFF8E1;
    border: 1px solid #FFE0B2;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

.result-message.visible {
    display: block;
    animation: fadeIn 0.5s;
}

.result-title {
    color: #FF6F00;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 5px;
}

.result-desc {
    font-size: 14px;
    color: #555;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}