.rkfvs-overlay__container {
    max-width: var(--rkfvs-overlay-maxw, 96vw) !important;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .rkfvs-overlay {
        padding: max(16px, 2vh) max(8px, 1vw);
        align-items: flex-start;
    }

    .rkfvs-overlay__container {
        max-height: 94vh;
    }
}

@media (min-width: 1920px) {
    .rkfvs-overlay {
        padding: 2vh 1vw;
    }

    .rkfvs-overlay__container {
        max-height: 94vh;
    }

    .rkfvs-filters {
        width: 280px;
    }
}

@media (min-width: 2560px) {
    .rkfvs-overlay {
        padding: 1.5vh 0.5vw;
    }

    .rkfvs-filters {
        width: 320px;
    }
}

.rkfvs-results {
    grid-template-columns: repeat(
        auto-fill,
        minmax(var(--rkfvs-results-col-min, var(--rkfvs-card-min, 180px)), 1fr)
    ) !important;
}

@media (max-width: 767px) {
    .rkfvs-results {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

#rkfreevisualsearch-popular:not(:empty) {
    display: flex !important;
}

@media (min-width: 1400px) {
    .rkfvs-overlay__container {
        max-width: var(--rkfvs-overlay-maxw, 96vw) !important;
    }

    .rkfvs-results {
        grid-template-columns: repeat(
            auto-fill,
            minmax(var(--rkfvs-results-col-min, var(--rkfvs-card-min, 180px)), 1fr)
        ) !important;
    }
}

#rkfreevisualsearch-popular {
    display: block !important;
    margin: 0 0 1.5rem 0 !important;
    padding: 0 !important;
    width: 100% !important;
    clear: both !important;
}

.rkfvs-popular__section {
    margin-bottom: 1.5rem;
    width: 100%;
}

.rkfvs-popular__section h5 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin: 0 0 0.75rem 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rkfvs-popular__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.rkfvs-popular__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.rkfvs-popular__tag:hover {
    background: var(--rkfvs-primary, #ff0000);
    border-color: var(--rkfvs-primary, #ff0000);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rkfvs-popular__tag-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: rgba(0,0,0,0.1);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    transition: all 0.2s ease;
}

.rkfvs-popular__tag:hover .rkfvs-popular__tag-num {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.rkfvs-popular__bestsellers {
    margin-top: 1rem;
}

.rkfvs-popular__bestsellers h5 {
    color: var(--rkfvs-accent, #ff0000);
}

.rkfvs-popular__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .rkfvs-popular__tags {
        gap: 0.4rem;
    }
    
    .rkfvs-popular__tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .rkfvs-popular__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    #rkfreevisualsearch-popular {
        margin: 0 0 1rem 0 !important;
    }
}

#rkfreevisualsearch-popular {
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

#rkfreevisualsearch-popular.rkfvs-popular--hidden {
    opacity: 0;
    visibility: hidden;
    display: none !important;
}

.rkfvs-results-section-header--related svg {
    margin-right: 4px;
    flex-shrink: 0;
}