.viewads-wrapper { max-width: 1200px; margin: 30px auto; padding: 0 20px; }

.viewads-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; }
.viewads-header h1 { margin: 0; font-size: 32px; color: #333; }
.results-count { margin: 5px 0 0; color: #888; font-size: 14px; }

.btn-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-filter:hover { background: #f9f9f9; border-color: #ff4d6d; color: #ff4d6d; }

.filters-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 5000;
    display: none;
    justify-content: flex-end;
}
.filters-panel-overlay.open { display: flex; }

.filters-container {
    width: 100%;
    max-width: 400px;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.filters-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.filters-header h3 { margin: 0; }
.close-filters { background: none; border: none; font-size: 28px; cursor: pointer; color: #999; }

.filters-body { padding: 20px; flex: 1; overflow-y: auto; }
.filter-group { margin-bottom: 25px; }
.filter-group label { display: block; font-weight: 700; margin-bottom: 10px; color: #333; font-size: 14px; }
.filter-input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 10px; font-size: 14px; }

.range-label { color: #ff4d6d; float: right; }
.modern-slider { margin: 28px 10px 38px; }
.modern-slider .noUi-tooltip { top: 24px; bottom: auto; }

.filters-footer { padding: 20px; border-top: 1px solid #eee; }
.btn-block { width: 100%; padding: 15px; }

.ads-grid-modern { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }

.modern-ad-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.modern-ad-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }

.ad-image-wrapper { position: relative; height: 220px; background: #eee; }
.ad-carousel { height: 100%; }
.carousel-img { width: 100%; height: 100%; object-fit: cover; display: none; }
.carousel-img.active { display: block; }

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.carousel-nav:hover { background: #fff; }
.carousel-nav.prev { left: 10px; }
.carousel-nav.next { right: 10px; }

.ad-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    backdrop-filter: blur(4px);
}

.favorite-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #ddd;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding-top: 2px;
}
.favorite-heart.active { color: #ff4d6d; }

.ad-content { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.ad-meta-top { display: flex; justify-content: space-between; font-size: 12px; color: #999; margin-bottom: 8px; }
.ad-location { display: flex; align-items: center; gap: 4px; }

.ad-title { margin: 0 0 10px; font-size: 18px; line-height: 1.3; }
.ad-title a { text-decoration: none; color: #333; transition: color 0.2s; }
.ad-title a:hover { color: #ff4d6d; }

.ad-excerpt { font-size: 14px; color: #666; margin: 0 0 20px; line-height: 1.5; flex: 1; }

.ad-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid #f5f5f5; }
.ad-author { font-size: 13px; color: #444; }
.btn-view { text-decoration: none; color: #ff4d6d; font-weight: 700; font-size: 14px; }

.modern-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.page-link {
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: all 0.2s;
}
.page-link:hover { border-color: #ff4d6d; color: #ff4d6d; }
.page-link.active { background: #ff4d6d; color: #fff; border-color: #ff4d6d; }
.page-link.prev-next { padding: 10px 20px; }

.empty-results { text-align: center; padding: 60px 20px; background: #fff; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.empty-icon { font-size: 50px; margin-bottom: 15px; }

@media (max-width: 600px) {
    .viewads-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .btn-filter { width: 100%; justify-content: center; }
}
