/**
 * ElecPromo Banners Pro - Frontend CSS
 * Version: 2.1.0 - Production Ready
 */

/* ============================================
   FULL LAYOUT
   ============================================ */
.epb-full-layout {
    display: flex;
    gap: var(--epb-gap, 10px);
    align-items: flex-start;
    width: 100%;
}

.epb-main-content {
    flex: 1;
    min-width: 0;
}

/* ============================================
   MANUAL LAYOUT
   ============================================ */
.epb-manual-layout {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.epb-manual-left {
    flex-shrink: 0;
}

.epb-manual-center {
    flex: 1;
    min-width: 0;
}

.epb-manual-right {
    flex-shrink: 0;
}

/* ============================================
   COLUMNS
   ============================================ */
.epb-column {
    flex-shrink: 0;
}

.epb-column-left {
    order: -1;
}

.epb-column-right {
    order: 1;
}

/* ============================================
   STICKY WRAPPER
   ============================================ */
.epb-sticky-wrapper {
    position: sticky;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================
   BANNER ITEMS
   ============================================ */
.epb-banner-item {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.epb-banner-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Image type */
.epb-banner-type-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.epb-banner-type-image a {
    display: block;
}

/* HTML type */
.epb-banner-type-html {
    /* Custom HTML can have its own styles */
}

.epb-html-content {
    width: 100%;
}

/* Ensure iframes/embeds respect width */
.epb-html-content iframe,
.epb-html-content embed,
.epb-html-content object,
.epb-html-content video {
    max-width: 100%;
    border-radius: 8px;
}

/* Images in HTML content */
.epb-html-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   RESPONSIVE / MOBILE
   ============================================ */
@media (max-width: 992px) {
    .epb-mobile-hidden {
        display: none !important;
    }
    
    .epb-full-layout {
        flex-direction: column;
    }
    
    .epb-main-content {
        width: 100%;
    }
    
    .epb-manual-layout {
        flex-direction: column;
    }
    
    .epb-manual-center {
        width: 100%;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes epbFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.epb-banner-item {
    animation: epbFadeIn 0.5s ease;
}

/* Stagger effect */
.epb-banner-item:nth-child(1) { animation-delay: 0.1s; }
.epb-banner-item:nth-child(2) { animation-delay: 0.2s; }
.epb-banner-item:nth-child(3) { animation-delay: 0.3s; }
.epb-banner-item:nth-child(4) { animation-delay: 0.4s; }
.epb-banner-item:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   LOADING STATE
   ============================================ */
.epb-banner-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: epbLoading 1.5s infinite;
}

@keyframes epbLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
