/* Компактный стиль для страницы категорий */

.compact-games-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.compact-game-item {
    width: 100%;
}

.compact-game-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.875rem 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    position: relative;
    cursor: pointer;
    display: block;
}

.compact-game-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #ff6b35;
    transform: translateY(-2px);
}

.compact-game-header {
    margin-bottom: 0.5rem;
    position: relative;
}

.compact-game-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.compact-game-report-btn {
    padding: 0.25rem;
    color: #dc3545;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.compact-game-report-btn:hover {
    color: #c82333;
    transform: scale(1.1);
}

.compact-game-report-btn svg {
    display: block;
}

.compact-game-views-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.compact-game-views-badge i {
    font-size: 0.75rem;
}

/* Автор на уровне атрибутов с аватаром */
.author-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.5rem;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.author-badge-inline:hover {
    background: #fff5f0;
    border-color: #ff6b35;
    color: #ff6b35;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.15);
}

.author-avatar-mini {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.author-avatar-img-mini {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-avatar-placeholder-mini {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.author-name-inline {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
}

.author-badge-inline:hover .author-name-inline {
    color: #ff6b35;
}

/* Контейнер для атрибутов (отдельно от автора) */
.compact-game-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.compact-game-card:hover .compact-game-title {
    color: #ff6b35;
}

.compact-game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    position: relative;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.4rem;
    background: #f8f9fa;
    border-radius: 3px;
    color: #6c757d;
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.3s ease;
}

.meta-badge.filter-badge {
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.meta-badge.filter-badge:hover {
    background: #ff6b35;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

.meta-badge.filter-badge:active {
    transform: translateY(0);
}

.meta-badge i {
    font-size: 0.7rem;
    opacity: 0.7;
}

.compact-game-description {
    margin-bottom: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #6c757d;
    position: relative;
}

.compact-game-description p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Уменьшаем размер счетчика материалов */
.shop-product-fillter {
    margin-bottom: 1rem;
}

.shop-product-fillter .totall-product p {
    font-size: 0.875rem;
    margin: 0;
    color: #6c757d;
}

.shop-product-fillter .totall-product .text-brand {
    color: #ff6b35;
    font-weight: 600;
}

/* Компактная пагинация */
.pagination-area {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.pagination {
    font-size: 0.875rem;
}

.pagination .page-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Стили для активного фильтра */
.active-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.active-filter-badge i.fi-rs-filter {
    font-size: 0.75rem;
}

.active-filter-badge .remove-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-left: 0.25rem;
}

.active-filter-badge .remove-filter:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.active-filter-badge .remove-filter i {
    font-size: 0.7rem;
}

/* Адаптивность */
@media (min-width: 768px) {
    .compact-games-list {
        gap: 1.25rem;
    }
    
    .compact-game-card {
        padding: 1.25rem 1.5rem;
    }
    
    .compact-game-title {
        font-size: 1.1rem;
    }
    
    .compact-game-meta {
        font-size: 0.8rem;
    }
    
    .compact-game-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 767px) {
    .compact-game-card {
        padding: 0.875rem 1rem;
    }
    
    .compact-game-title {
        font-size: 0.95rem;
    }
    
    .compact-game-meta {
        font-size: 0.7rem;
    }
    
    .meta-badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .compact-game-description {
        font-size: 0.8rem;
    }
    
    .compact-read-more {
        font-size: 0.8rem;
    }
}

/* Стили для сортировки */
.shop-product-fillter {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.sort-by-product-area {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.sort-by-cover {
    position: relative;
}

.sort-by-product-wrap {
    cursor: pointer;
    position: relative;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.4rem 0.875rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.sort-by-product-wrap:hover {
    border-color: #ff6b35;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.1);
}

.sort-by-product-wrap.active {
    border-color: #ff6b35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.sort-by {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: #495057;
    white-space: nowrap;
}

.sort-by i.fi-rs-apps-sort {
    font-size: 1rem;
    color: #6c757d;
}

.sort-by-current {
    font-weight: 600;
    color: #ff6b35;
    margin: 0 0.4rem;
    font-size: 0.875rem;
}

.sort-by .sort-arrow,
.sort-by i.fi-rs-angle-small-down {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
    margin-left: 0.25rem;
    color: #6c757d;
}

.sort-by-product-wrap.active .sort-by .sort-arrow,
.sort-by-product-wrap.active .sort-by i.fi-rs-angle-small-down {
    transform: rotate(180deg);
    color: #ff6b35;
}

.sort-by-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 1000;
    min-width: 180px;
}

.sort-by-dropdown ul {
    list-style: none;
    padding: 0.25rem 0;
    margin: 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: none;
    overflow: hidden;
}

/* Показываем меню когда родительский элемент активен */
.sort-by-product-wrap.active ~ .sort-by-dropdown ul,
#sort-by-toggle.active ~ .sort-by-dropdown ul,
.sort-by-cover:has(#sort-by-toggle.active) .sort-by-dropdown ul {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sort-by-dropdown ul li {
    margin: 0;
}

.sort-by-dropdown ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    color: #495057;
    text-decoration: none;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f8f9fa;
    font-size: 0.85rem;
    line-height: 1.4;
}

.sort-by-dropdown ul li:last-child a {
    border-bottom: none;
}

.sort-by-dropdown ul li a:hover {
    background: linear-gradient(90deg, #fff5f2 0%, #ffffff 100%);
    color: #ff6b35;
    padding-left: 1rem;
}

.sort-by-dropdown ul li a.active {
    background: linear-gradient(90deg, #ff6b35 0%, #f7931e 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.sort-by-dropdown ul li a.active:hover {
    background: linear-gradient(90deg, #e55a2b 0%, #e0821a 100%);
    color: #ffffff;
    padding-left: 0.875rem;
}

.sort-by-dropdown ul li a i {
    font-size: 0.75rem;
    width: 14px;
    text-align: center;
    opacity: 0.8;
}

.sort-by-dropdown ul li a.active i {
    opacity: 1;
}

/* Переключение вида отображения */
.view-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding: 0.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.view-mode-label {
    font-size: 0.875rem;
    color: #495057;
    margin-right: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
}

.view-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #6c757d;
    padding: 0;
    position: relative;
}

.view-mode-btn:hover {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
    transform: translateY(-1px);
}

.view-mode-btn.active {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.35);
    transform: translateY(-1px);
}

.view-mode-btn.active:hover {
    background: linear-gradient(135deg, #e55a2b 0%, #e0841c 100%);
    box-shadow: 0 3px 8px rgba(255, 107, 53, 0.4);
}

.view-mode-btn i {
    font-size: 1.1rem;
    line-height: 1;
}

/* Вид: Список (по умолчанию) */
.compact-games-list.view-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.compact-games-list.view-list .compact-game-item {
    width: 100%;
}

/* Вид: Прямоугольные карточки */
.compact-games-list.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.compact-games-list.view-grid .compact-game-item {
    width: 100%;
}

.compact-games-list.view-grid .compact-game-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.compact-games-list.view-grid .compact-game-description {
    flex-grow: 1;
}

/* Вид: Квадраты */
.compact-games-list.view-square {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.compact-games-list.view-square .compact-game-item {
    width: 100%;
}

.compact-games-list.view-square .compact-game-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    min-height: 200px;
}

.compact-games-list.view-square .compact-game-title {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-games-list.view-square .compact-game-meta {
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
}

.compact-games-list.view-square .compact-game-description {
    display: none;
}

.compact-games-list.view-square .compact-game-attributes {
    flex-wrap: wrap;
    gap: 0.3rem;
}

.compact-games-list.view-square .meta-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
}

@media (max-width: 767px) {
    .shop-product-fillter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-by-product-area {
        margin-left: 0;
        margin-top: 1rem;
        flex-wrap: wrap;
    }
    
    .view-mode-toggle {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .sort-by-dropdown {
        right: auto;
        left: 0;
        min-width: 100%;
    }
    
    .compact-games-list.view-grid {
        grid-template-columns: 1fr;
    }
    
    .compact-games-list.view-square {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

