.mobile-sticky-ad {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.15);
    padding: 8px;
    z-index: 10000;
    text-align: center;
    transition: transform 0.4s ease;
    display: none;
    max-height: 50vh;
    overflow-y: auto;
    border-radius: 8px 8px 0 0;
    margin: 0;
}

.mobile-sticky-ad.hidden {
    transform: translateY(100%);
}

.toggle-ad-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    z-index: 10001;
    pointer-events: none;
}

.sticky-ad-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    animation: pulse 2s infinite ease-in-out;
    pointer-events: none;
    z-index: 10001;
}

@keyframes pulse {
    0% { opacity: 0.5; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
    100% { opacity: 0.5; transform: scaleY(1); }
}

.mobile-sticky-ad.hidden .sticky-ad-bar {
    display: block; 
}

.toggle-ad-close,
.toggle-ad-open {
    background: rgba(0, 0, 0, 0.3); 
    color: #000; 
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    width: 32px;
    height: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.toggle-ad-close {
    position: absolute;
    top: 8px;
    right: 8px;
}

.toggle-ad-open {
    position: absolute;
    top: -15px; 
    right: 8px;
}

.mobile-sticky-ad.hidden .toggle-ad-close {
    display: none; 
}

.mobile-sticky-ad.hidden .toggle-ad-open {
    display: flex;
}

.toggle-ad-close .icon-arrow-down::before,
.toggle-ad-open .icon-arrow-up::before {
    font-family: 'icomoon' !important;
    font-weight: 900;
}

.toggle-ad-close .icon-arrow-down::before {
    content: "\e942";
}

.toggle-ad-open .icon-arrow-up::before {
    content: "\e919";
}

.ad-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 0;
    margin: 0;
}

.ad-item {
    width: 100%;
}

.ad-item img {
    max-width: 100%;
    width: 100%;
    height: 56px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    object-fit: cover;
}

@media only screen and (max-width: 991px), only screen and (pointer: coarse), only screen and (max-device-width: 991px) {
    .mobile-sticky-ad {
        display: block;
        visibility: visible;
        opacity: 1;
    }
}