/* ============================================
   POPUP ECOMMERCE - SISTEMA CONFIGURÁVEL
   ============================================ */

/* Overlay */
.popup-ecommerce-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.popup-ecommerce-overlay.active {
    display: block;
    opacity: 1;
}

/* Container do Popup */
.popup-ecommerce {
    position: fixed;
    z-index: 99999;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: none;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-ecommerce.active {
    display: block;
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Posições */
.popup-ecommerce.position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
}

.popup-ecommerce.position-center.active {
    transform: translate(-50%, -50%) scale(1);
}

.popup-ecommerce.position-top {
    top: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
}

.popup-ecommerce.position-top.active {
    transform: translateX(-50%) scale(1);
}

.popup-ecommerce.position-bottom {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
}

.popup-ecommerce.position-bottom.active {
    transform: translateX(-50%) scale(1);
}

/* Tamanhos */
.popup-ecommerce.size-small {
    width: 400px;
    max-width: 90vw;
}

.popup-ecommerce.size-medium {
    width: 600px;
    max-width: 90vw;
}

.popup-ecommerce.size-large {
    width: 800px;
    max-width: 90vw;
}

/* Botão Fechar */
.popup-ecommerce__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.popup-ecommerce__close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Imagem */
.popup-ecommerce__image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* Conteúdo */
.popup-ecommerce__content {
    padding: 30px;
}

.popup-ecommerce__title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.25;
}

.popup-ecommerce__description {
    font-size: 1.05rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 24px;
}

.popup-ecommerce__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.4);
    border: none;
    min-width: 160px;
}

.popup-ecommerce__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.5);
    color: #ffffff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #0052CC 0%, #0044BB 100%);
}

.popup-ecommerce__button i {
    font-size: 1.1rem;
    color: #ffffff !important;
}

/* Checkbox "Não mostrar novamente" */
.popup-ecommerce__footer {
    padding: 0 30px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-ecommerce__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #666;
    cursor: pointer;
}

.popup-ecommerce__checkbox input {
    cursor: pointer;
}

/* Responsivo */
@media (max-width: 768px) {
    .popup-ecommerce {
        width: 90vw !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    .popup-ecommerce__image {
        height: 200px;
    }

    .popup-ecommerce__content {
        padding: 20px;
    }

    .popup-ecommerce__title {
        font-size: 1.5rem;
    }

    .popup-ecommerce__button {
        width: 100%;
        justify-content: center;
    }
}

/* Animações */
@keyframes popupBounce {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.popup-ecommerce.position-center.active {
    animation: popupBounce 0.6s ease;
}