/**
 * Browse Page Styles
 * Provides grid layout for wallpaper listings on browse pages
 * Compatible with legacy site theme
 */

/* Browse Header */
.browse-header {
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #dcdcdc;
}

.browse-header h1 {
    margin: 0 0 10px 0;
    font-size: 18pt;
    color: #46678A;
}

/* Sort Options */
.sort-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-options a {
    padding: 5px 12px;
    font-size: 9pt;
    color: #666;
    border: 1px solid #dcdcdc;
    border-radius: 3px;
    background: #f4f4f4;
    text-decoration: none;
}

.sort-options a:hover {
    background: #e8e8e8;
    text-decoration: none;
}

.sort-options a.active {
    background: #6485AE;
    color: #fff;
    border-color: #6485AE;
}

/* Wallpaper Grid */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.wallpaper-item {
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.wallpaper-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.wallpaper-item a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.wallpaper-item a:hover {
    text-decoration: none;
}

.wallpaper-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: #f0f0f0;
    display: block;
}

.wallpaper-item .title {
    display: block;
    padding: 8px 10px 4px;
    font-size: 10pt;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallpaper-item .resolution {
    display: block;
    padding: 0 10px 6px;
    font-size: 8pt;
    color: #666;
}

.wallpaper-item .meta {
    padding: 8px 10px;
    font-size: 8pt;
    color: #888;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px;
}

.wallpaper-item .meta a {
    color: #6485AE;
}

/* Pagination */
.pagination {
    text-align: center;
    padding: 15px 0;
    margin-top: 10px;
    border-top: 1px solid #dcdcdc;
}

.pagination a {
    display: inline-block;
    padding: 5px 12px;
    margin: 0 5px;
    font-size: 9pt;
    color: #6485AE;
    border: 1px solid #dcdcdc;
    border-radius: 3px;
    background: #fff;
    text-decoration: none;
}

.pagination a:hover {
    background: #6485AE;
    color: #fff;
    border-color: #6485AE;
    text-decoration: none;
}

.pagination span {
    display: inline-block;
    padding: 5px 12px;
    font-size: 9pt;
    color: #666;
}

/* Tag page specific styles */
.tag-header {
    margin-bottom: 15px;
}

.tag-header h1 {
    font-size: 18pt;
    color: #46678A;
    margin-bottom: 5px;
}

.tag-header .count {
    color: #888;
    font-size: 10pt;
}

.related-tags {
    margin: 15px 0;
    padding: 10px;
    background: #f4f4f4;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
}

.related-tags h3 {
    font-size: 10pt;
    color: #46678A;
    margin-bottom: 8px;
}

.related-tags a {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px;
    font-size: 9pt;
    color: #333;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 3px;
}

.related-tags a:hover {
    background: #6485AE;
    color: #fff;
    border-color: #6485AE;
    text-decoration: none;
}

/* Popular page period selector */
.period-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.period-selector a {
    padding: 5px 12px;
    font-size: 9pt;
    color: #666;
    border: 1px solid #dcdcdc;
    border-radius: 3px;
    background: #f4f4f4;
    text-decoration: none;
}

.period-selector a:hover {
    background: #e8e8e8;
}

.period-selector a.active {
    background: #6485AE;
    color: #fff;
    border-color: #6485AE;
}
