/* ── Wrapper ── */
.ad-banner-wrap {
    width: 100%;
    text-align: center;
    margin: 8px 0;
}

.ad-banner-item {
    display: inline-block;
    margin: 4px;
}

.ad-banner-item img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* ── Header / Footer ── */
.ad-banner-header,
.ad-banner-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}

.ad-banner-header img,
.ad-banner-footer img {
    max-height: 90px;
    width: auto;
}

/* ── Sidebar ── */
.ad-banner-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.ad-banner-sidebar-item img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ── Slider ── */
.ad-banner-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    margin: 8px 0;
}

.ad-banner-slider-track {
    position: relative;
    width: 100%;
}

.ad-banner-slide {
    display: none;
    width: 100%;
}

.ad-banner-slide.active {
    display: block;
}

.ad-banner-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.ad-banner-prev,
.ad-banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    z-index: 10;
    transition: background 0.2s;
}

.ad-banner-prev:hover,
.ad-banner-next:hover {
    background: rgba(0,0,0,0.8);
}

.ad-banner-prev { left: 8px; }
.ad-banner-next { right: 8px; }

.ad-banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.ad-banner-dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.ad-banner-dot.active {
    background: white;
}

/* ── Popup ── */
.ad-banner-popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.ad-banner-popup {
    position: relative;
    max-width: 600px;
    width: 90%;
}

.ad-banner-popup img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.ad-banner-popup-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 30px;
    height: 30px;
    background: white;
    color: #333;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .ad-banner-header img,
    .ad-banner-footer img {
        max-height: 60px;
    }

    .ad-banner-popup {
        width: 95%;
    }
}