/* ====== ป้ายโฆษณาหลัก ====== */
.main-ads {
    display: grid;
    grid-template-columns: 204px auto 204px;
    gap: 10px;
    align-items: center;
}

.main-ads img {
    max-width: 100%;
    height: auto;
}

.main-ads .ads-widget {
    background: #f4f4f4;
    padding: 10px;
    border: 1px solid #ddd;
}

/* ====== โฆษณาทับบนเนื้อหา (Overlay) ====== */
.show-movie {
    position: relative;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.banner-content {
    position: relative;

    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1001;
    max-width: 80%;
    overflow: hidden;
}

/* ====== ปุ่มปิดโฆษณา (แก้ปัญหาตำแหน่ง) ====== */
.close-banner,
.close-ads {
    position: absolute;
    top: 10px;
    right: 10px;
    background: red;
    color: white;
    border: none;
    border-radius: 15%;
    width: 35px;
    height: 35px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 1002;
}

.close-banner:hover,
.close-ads:hover {
    background: darkred;
}

/* ====== ป้ายโฆษณาลอยด้านล่าง ====== */
.ads-fix-bottom {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1001;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    
    border-radius: 10px 10px 0 0;
}

.ads-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.ads-grid-container img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ปรับตำแหน่งปุ่มปิด */
.ads-fix-bottom .close-ads {
    position: absolute;
    top: -15px;
    right: 15px;
}

/* ====== ป้ายโฆษณาลอยด้านซ้าย ====== */
.ads-fix-left {
    position: fixed;
    top: 10%;
    left: 0;
    width: 180px;
    max-width: 200px;
    z-index: 1000;
    
    padding: 10px;
    border-radius: 0 8px 8px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ads-fix-left .close-ads {
    position: absolute;
    top: 5px;
    right: 5px;
}

/* ====== ป้ายโฆษณาลอยด้านขวา ====== */
.ads-fix-right {
    position: fixed;
    top: 10%;
    right: 0;
    width: 180px;
    max-width: 200px;
    z-index: 1000;
    
    padding: 10px;
    border-radius: 8px 0 0 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ads-fix-right .close-ads {
    position: absolute;
    top: 5px;
    left: 5px;
}
