/**
 * Conversion Features Styles
 * Trust Badges, Low Stock Counter, WhatsApp Button, Exit-Intent Popup
 */

/* ========================================
   TRUST BADGES (Below Add to Cart)
   ======================================== */
.trust-badges-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #333;
}

.trust-icon {
    font-size: 18px;
}

.trust-text {
    font-weight: 600;
}

@media (max-width: 768px) {
    .trust-badges-wrapper {
        gap: 10px;
    }
    .trust-badge {
        font-size: 12px;
    }
}

/* ========================================
   LOW STOCK COUNTER & VIEWING COUNTER
   ======================================== */
.low-stock-counter,
.viewing-counter {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.low-stock-counter {
    background: linear-gradient(135deg, #FFE8E8 0%, #FFD1D1 100%);
    border-left: 4px solid #FF3838;
    color: #D32F2F;
    animation: pulse-stock 2s infinite;
}

@keyframes pulse-stock {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.viewing-counter {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-left: 4px solid #2196F3;
    color: #1565C0;
}

.stock-icon,
.viewing-icon {
    font-size: 18px;
}

/* ========================================
   WHATSAPP FLOATING BUTTON
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    animation: bounce-in 0.6s ease;
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon {
    width: 28px;
    height: 28px;
}

.whatsapp-text {
    font-size: 15px;
}

@keyframes bounce-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 12px 16px;
    }
    .whatsapp-text {
        display: none;
    }
    .whatsapp-float {
        border-radius: 50%;
        width: 60px;
        height: 60px;
        padding: 16px;
    }
}

/* ========================================
   EXIT-INTENT POPUP
   ======================================== */

/* Prevent body scroll when popup is active */
body.exit-popup-active {
    overflow: hidden;
}

.exit-intent-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.exit-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.exit-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: popup-slide-in 0.4s ease;
}

@keyframes popup-slide-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.exit-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.exit-popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

.exit-popup-body {
    padding: 50px 40px 40px;
    text-align: center;
}

.exit-popup-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px;
}

.exit-popup-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0 0 25px;
}

.exit-popup-subtitle strong {
    color: #FF3838;
    font-size: 24px;
}

.exit-popup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exit-popup-email {
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.exit-popup-email:focus {
    outline: none;
    border-color: #17538F;
    box-shadow: 0 0 0 3px rgba(23, 83, 143, 0.1);
}

.exit-popup-submit {
    padding: 16px 32px;
    background: linear-gradient(135deg, #3AB8AE 0%, #17538F 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exit-popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(58, 184, 174, 0.4);
}

.exit-popup-privacy {
    font-size: 12px;
    color: #999;
    margin: 15px 0 0;
}

@media (max-width: 480px) {
    .exit-popup-content {
        width: 95%;
    }
    .exit-popup-body {
        padding: 40px 20px 30px;
    }
    .exit-popup-title {
        font-size: 22px;
    }
    .exit-popup-subtitle {
        font-size: 16px;
    }
}

/* Print styles */
@media print {
    .whatsapp-float,
    .exit-intent-popup {
        display: none !important;
    }
}
