/* Banner Popup Styles */
.banner-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.banner-popup.popup-show {
    opacity: 1;
    visibility: visible;
}

.banner-popup.popup-hide {
    opacity: 0;
    visibility: hidden;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.popup-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.banner-popup.popup-show .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 1);
}

.popup-body {
    padding: 20px;
}

.popup-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Popup Positions */
.popup-center {
    align-items: center;
    justify-content: center;
}

.popup-bottom {
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
}

.popup-side {
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
}

.popup-fullscreen .popup-content {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
}

/* Animations */
.popup-fade-in {
    animation: fadeIn 0.3s ease;
}

.popup-slide-in {
    animation: slideIn 0.3s ease;
}

.popup-zoom-in {
    animation: zoomIn 0.3s ease;
}

.popup-bounce-in {
    animation: bounceIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(100px) scale(0.9); }
    to { transform: translateY(0) scale(1); }
}

@keyframes zoomIn {
    from { transform: scale(0.5); }
    to { transform: scale(1); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* Multi-Product Specific Styles */
.multi-product-popup .popup-content {
    min-width: 400px;
    max-width: 700px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.product-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
}

.product-image-placeholder {
    width: 100%;
    height: 80px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6c757d;
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-info h6 {
    font-size: 12px;
    margin-bottom: 4px;
    font-weight: 600;
    line-height: 1.2;
    height: 30px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-weight: bold;
    color: #28a745;
    font-size: 13px;
    margin-bottom: 3px;
}

.product-discount {
    background: #ff4757;
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    display: inline-block;
    margin-bottom: 6px;
}

.product-item .popup-btn {
    font-size: 11px;
    padding: 6px 12px;
    width: 100%;
    margin-top: auto;
}

/* Video Popup Specific Styles */
.video-popup .popup-content {
    min-width: 300px;
}

.video-popup video {
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .popup-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }
    
    .popup-body {
        padding: 15px;
    }
    
    .multi-product-popup .popup-content {
        min-width: 300px;
        max-width: calc(100vw - 20px);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .product-item {
        min-height: 180px;
        padding: 6px;
    }
    
    .product-image {
        height: 70px;
    }
    
    .product-image-placeholder {
        height: 70px;
        font-size: 16px;
    }
    
    .popup-side {
        justify-content: center;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .popup-content {
        margin: 5px;
        max-width: calc(100vw - 10px);
    }
    
    .popup-body {
        padding: 10px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .product-item {
        min-height: 160px;
        padding: 5px;
    }
    
    .product-image {
        height: 60px;
    }
    
    .product-image-placeholder {
        height: 60px;
        font-size: 14px;
    }
    
    .product-info h6 {
        font-size: 11px;
        height: 26px;
    }
    
    .product-price {
        font-size: 12px;
    }
    
    .product-item .popup-btn {
        font-size: 10px;
        padding: 5px 8px;
    }
}
