
/* ══════════════════════════════════════════
   category page — first item of each row
   ══════════════════════════════════════════ */
.slider-cats-category .native-ads-overlay,
.slider-cats-hot .native-ads-overlay,
.slider-cats .native-ads-overlay,
.slider-cats-top .native-ads-overlay {
    pointer-events: none;
}

.slider-cats-category .native-ads-overlay a,
.slider-cats-hot .native-ads-overlay a,
.slider-cats .native-ads-overlay a,
.slider-cats-top .native-ads-overlay a {
    pointer-events: all;
}
.slider-cats-category .item:nth-child(6n+1) .native-ads-overlay { display: block; }

@media (max-width: 1200px) {
    .slider-cats-category .item:nth-child(6n+1) .native-ads-overlay { display: none; }
    .slider-cats-category .item:nth-child(4n+1) .native-ads-overlay { display: block; }
}

@media (max-width: 768px) {
    .slider-cats-category .item:nth-child(4n+1) .native-ads-overlay { display: none; }
    .slider-cats-category .item:nth-child(2n+1) .native-ads-overlay { display: block; }
}

@media (max-width: 600px) {
    .slider-cats-category .item:nth-child(2n+1) .native-ads-overlay { display: none; }
    .slider-cats-category .item:nth-child(3n+1) .native-ads-overlay { display: block; }
}

/* ══════════════════════════════════════════
   home_top / home_center — banner ngang trên
   ══════════════════════════════════════════ */
.section-brand-add {
    text-align: center;
    margin-bottom: 20px;
    overflow: hidden;
    margin-top: 20px;
}

.section-brand-add--center {
    margin-top: 20px;
}

.section-brand-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.item-section-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1.3em;
}

.item-section-brand img,
.item-section-brand iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ══════════════════════════════════════════
   cashfish — banner bottom sticky
   ══════════════════════════════════════════ */
.section-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    padding: 0 10px;
    pointer-events: none;
}

.banner-wrapper {
    position: relative;
    display: inline-block;
    pointer-events: all;
    line-height: 0;
}

.banner-section-bottom {
    display: block;
    max-width: 100%;
}

.banner-section-bottom img {
    max-width: 100%;
    height: auto;
    display: block;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background-color: #c0291d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.close-btn:hover {
    background-color: #9b1a12;
}

.banner-hidden {
    display: none !important;
}

@media (max-width: 575px) {
    .section-bottom {
        display: grid;
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 0;
        align-items: start;
        justify-items: center;
        padding: 0;
        bottom: 0;
        left: 0;
        right: 0;
    }

    .section-bottom .banner-wrapper {
        box-sizing: border-box;
        width: 100%;
    }

    .section-bottom .banner-section-bottom {
        box-sizing: border-box;
        width: 100%;
        margin: 3px 0 !important;
        display: block;
    }

    .section-bottom .banner-section-bottom img,
    .section-bottom .banner-section-bottom iframe {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }
}

/* ══════════════════════════════════════════
   slide — native ads overlay
   ══════════════════════════════════════════ */
.native-ads-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    border-radius: inherit;
}

.native-ads-overlay a {
    width: 100%;
    display: block;
}

.native-ads-overlay img,
.native-ads-overlay iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.native-ads-overlay .ads-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px 8px;
    font-size: 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.native-ads-overlay .ads-text a {
    color: inherit;
    text-decoration: none;
}

/* ══════════════════════════════════════════
   sidebar_bottom — banner ngang 2 cột dưới danh sách truyện
   ══════════════════════════════════════════ */
.sidebar-bottom-ads {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.sidebar-bottom-item {
    width: 100%;
    aspect-ratio: 320 / 100;
    overflow: hidden;
    border-radius: 4px;
}

.sidebar-bottom-item img,
.sidebar-bottom-item iframe {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .sidebar-bottom-ads {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .sidebar-bottom-ads {
        display: none;
    }
}

/* ══════════════════════════════════════════
   top_movie — hot comics bottom ad bar
   ══════════════════════════════════════════ */
.hot-ad-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.65);
    padding: 5px 8px;
    gap: 6px;
    z-index: 3;
}

.hot-ad-chapter {
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.hot-ad-chapter:hover {
    color: #ddd;
}

.hot-ad-logo {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hot-ad-logo img {
    max-height: 28px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
}

/* ══════════════════════════════════════════
   movie — watermark badge góc dưới trái
   ══════════════════════════════════════════ */
.grid-watermark {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    overflow: hidden;
    pointer-events: all;
}

.grid-watermark img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    display: block;
}

.grid-watermark a {
    display: block;
}

/* ══════════════════════════════════════════
   actor — watermark
   ══════════════════════════════════════════ */
.actor-watermark {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 3;
    background: rgba(0, 0, 0, 0.62);
    padding: 5px 10px 8px;
    border-radius: 0 6px 0 0;
    max-width: 72%;
}

.actor-watermark img {
    max-width: 100%;
    max-height: 34px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ══════════════════════════════════════════
   sponsor — nhà tài trợ uy tín
   ══════════════════════════════════════════ */
.brand-container {
    margin-top: 24px;
    margin-bottom: 24px;
}

.brand-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.brand-item {
    border-radius: 6px;
    overflow: hidden;
    max-height: 82px;
    max-width: 210px;
}

.brand-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.brand-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ══════════════════════════════════════════
   content_left/right top/bottom — banner giữa ảnh chapter
   ══════════════════════════════════════════ */
.chapter-ads-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 12px auto;
}

.chapter-ads-row > .item-section-brand {
    min-width: 0;
    max-width: 480px;
    aspect-ratio: 480 / 150;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.chapter-ads-row > .item-section-brand img,
.chapter-ads-row > .item-section-brand iframe {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

@media (max-width: 576px) {
    .chapter-ads-row > .item-section-brand {
        max-width: 100%;
    }
}

/* ══════════════════════════════════════════
   home_floating — banner cố định trái/phải
   ══════════════════════════════════════════ */
.floating-ad {
    position: fixed;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 8.33vw; /* ~160px @ 1920px */
    max-width: 160px;
}

.floating-ad-left  { left: 5.33vw; }
.floating-ad-right { right: 5.33vw; }

.floating-ad img,
.floating-ad iframe {
    width: 100%;
    max-width: 160px;
    height: auto;
    display: block;
}

.floating-ad .close-floating {
    display: none;
}

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */

/* tablet */
@media (max-width: 992px) {
    .brand-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* mobile */
@media (max-width: 576px) {
    .brand-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .brand-item {
        height: 48px;
    }

    .catfish-wrap {
        gap: 6px;
        padding: 0 8px;
    }

    .section-brand-inner {
        grid-template-columns: 1fr;
        padding: 0 12px;
    }
}

/* ẩn floating trên màn hình nhỏ */
@media (max-width: 1200px) {
    .floating-ad {
        display: none;
    }

    .section-brand-inner {
        padding: 0 12px;
    }
}
