/* ========================================
   ПЕРЕВИЗНАЧЕННЯ ТЕМИ TWENTYTWENTYONE
   Всі форми плагіна мають власні стилі
   ======================================== */

.vrgf-catalog input[type="text"],
.vrgf-catalog input[type="search"],
.vrgf-catalog select,
.vrgf-catalog button:not(.vrgf-btn-reset) {
    background: #1a1a2e !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 15px !important;
    outline: none !important;
    box-shadow: none !important;
}

.vrgf-catalog input[type="text"]:focus,
.vrgf-catalog input[type="search"]:focus,
.vrgf-catalog select:focus {
    border-color: #ff5151 !important;
    background: #2a2a4a !important;
    box-shadow: 0 0 0 3px rgba(255, 81, 81, 0.2) !important;
    outline: none !important;
}

.vrgf-catalog input[type="text"]:hover,
.vrgf-catalog input[type="search"]:hover,
.vrgf-catalog select:hover {
    border-color: rgba(255, 81, 81, 0.6) !important;
    background: #252542 !important;
}

.vrgf-catalog input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Пагінація — перевизначення теми */
.vrgf-page-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: #fff !important;
    text-decoration: none !important;
}

.vrgf-page-btn:hover:not(.vrgf-page-current):not(.vrgf-page-dots):not(:disabled) {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 81, 81, 0.6) !important;
    color: #fff !important;
}

.vrgf-page-btn.vrgf-page-current {
    background: linear-gradient(135deg, #ff5151 0%, #e63946 100%) !important;
    border-color: #ff5151 !important;
    color: #fff !important;
}

.vrgf-page-btn.vrgf-page-dots {
    background: transparent !important;
    border-color: transparent !important;
}

/* ======================================== */

/* VR Games Filter v4.6.14 - Bootstrap Grid System (Изолированная) */
/* ============================================
   КОНТЕЙНЕР (как в Bootstrap)
   ============================================ */
.vrgf-catalog {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
/* ============================================
   ФИЛЬТРЫ
   ============================================ */
.vrgf-filters {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}
.vrgf-filter-group {
    flex: 1 1 220px;
    min-width: 200px;
}
.vrgf-filter-label {
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.3px;
}
.vrgf-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #1a1a2e !important;
    background: #1a1a2e !important;
    color: #fff !important;
    background-image: url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg width=12 height=12 viewBox=0 0 12 12%3E%3Cpath fill=%23fff d=M6 8L1 3h10z/%3E%3C/svg%3E);
    background-repeat: no-repeat;
    background-position: right 16px center;
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}
.vrgf-select:hover {
    background: #252542;
    border-color: rgba(255, 81, 81, 0.6);
}
.vrgf-select:focus {
    outline: none;
    border-color: #ff5151;
    background: #2a2a4a;
    box-shadow: 0 0 0 3px rgba(255, 81, 81, 0.2);
}
.vrgf-select option {
    background: #1a1a2e;
    color: #fff !important;
    padding: 10px;
}
.vrgf-btn-reset {
    flex: 0 0 auto;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff5151 0%, #e63946 100%);
    color: #fff !important;
    border: none;
    border-radius: 8px !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 81, 81, 0.3);
    align-self: flex-end;
}
.vrgf-btn-reset:hover {
    background: linear-gradient(135deg, #e63946 0%, #d62828 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 81, 81, 0.4);
}
.vrgf-btn-reset:active {
    transform: translateY(0);
}
/* ============================================
   LAYOUT SPACING RHYTHM
   ============================================ */
#vrgf-filter {
    margin-bottom: 20px;
}
#vrgf-results {
    row-gap: 16px;
}
@media (min-width: 768px) {
    #vrgf-filter {
        margin-bottom: 24px;
    }
    #vrgf-results {
        row-gap: 20px;
    }
}
@media (min-width: 992px) {
    #vrgf-filter {
        margin-bottom: 28px;
    }
    #vrgf-results {
        row-gap: 24px;
    }
}
/* VRGF GRID FALLBACK (works even if Bootstrap grid CSS is absent) */
#vrgf-results.vrgf-row.row{
  display:flex;
  flex-wrap:wrap;
  margin-left:calc(-1 * var(--vrgf-gutter-x, 12px));
  margin-right:calc(-1 * var(--vrgf-gutter-x, 12px));
  row-gap:var(--vrgf-gutter-y, 16px);
}

#vrgf-results.vrgf-row.row > .col.vrgf-col{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  padding-left:var(--vrgf-gutter-x, 12px);
  padding-right:var(--vrgf-gutter-x, 12px);
}

/* >=576px: 2 columns */
@media (min-width:576px){
  #vrgf-results.vrgf-row.row > .col.vrgf-col{
    width:50%;
    max-width:50%;
  }
}

/* >=992px: 3 columns */
@media (min-width:992px){
  #vrgf-results.vrgf-row.row{
    --vrgf-gutter-x: 14px;
    --vrgf-gutter-y: 20px;
  }
  #vrgf-results.vrgf-row.row > .col.vrgf-col{
    width:33.333333%;
    max-width:33.333333%;
  }
}

/* >=1400px: 4 columns */
@media (min-width:1400px){
  #vrgf-results.vrgf-row.row > .col.vrgf-col{
    width:25%;
    max-width:25%;
  }
}
/* Ensure catalog cards stretch evenly inside Bootstrap columns */
.vrgf-col {
    height: 100%;
}
/* ============================================
   КАРТОЧКИ ИГР
   ============================================ */
/* Посилання-обгортка картки */
.vrgf-card-link {
    display: flex;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.vrgf-card {
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: 100%;
}
/* Контейнер зображення для фіксованого співвідношення сторін */
.vrgf-card-img-wrapper {
    min-height: 180px;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: inherit;
    isolation: isolate;
}
.vrgf-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
}
.vrgf-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
    border-radius: inherit;
    display: block;
}
.vrgf-card:hover .vrgf-card-image {
    transform: scale(1.04);
}
.vrgf-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 10%, rgba(0, 0, 0, 0.5) 58%, rgba(0, 0, 0, 0.86) 100%);
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
}
.vrgf-card-content {
    padding: 16px;
    background: #0f0f1f;
    color: #fff !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vrgf-card-title {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    margin: 0;
    padding: 0;
    color: #fff !important;
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 700;
    line-height: 1.2;
    max-width: calc(100% - 24px);
    background: none;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
    z-index: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}
.vrgf-card-meta {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
}
.vrgf-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #dfe7ff;
    font-size: 13px;
    line-height: 1.3;
}
.vrgf-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
    color: #fff !important;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    margin: 0;
}
.vrgf-red-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #ff5151 0%, #e63946 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.vrgf-card:hover .vrgf-red-line {
    opacity: 1;
}
/* ========================================
   НОВІ ПЛАШКИ — затемнені кути
   ======================================== */

/* База — прибираємо таблетку */
.vrgf-badge {
    position: absolute;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
    color: #fff !important;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.5);
    z-index: 3;
    white-space: nowrap;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

/* Лівий верхній кут — гравці */
.vrgf-badge-category {
    top: 0;
    left: 0;
    padding: 14px 50px 50px 14px;
    background: radial-gradient(ellipse 140px 100px at top left,
        rgba(0,0,0,0.9) 0%, 
        rgba(0,0,0,0.55) 40%,
        transparent 70%);
    border-radius: 12px 0 0 0;
}

/* Правий верхній кут — вік */
.vrgf-badge-age {
    top: 0;
    right: 0;
    padding: 14px 14px 50px 50px;
    background: radial-gradient(ellipse 140px 100px at top right,
        rgba(0,0,0,0.9) 0%, 
        rgba(0,0,0,0.55) 40%,
        transparent 70%);
    border-radius: 0 12px 0 0;
    justify-content: flex-end;
}

/* Мобільна адаптація */
@media (max-width: 991px) {
    .vrgf-badge {
        font-size: 15px;
    }
    .vrgf-badge-category {
        padding: 12px 40px 40px 12px;
    }
    .vrgf-badge-age {
        padding: 12px 12px 40px 40px;
    }
}

@media (max-width: 767px) {
    .vrgf-badge {
        font-size: 14px;
    }
    .vrgf-badge-category {
        padding: 10px 35px 35px 10px;
    }
    .vrgf-badge-age {
        padding: 10px 10px 35px 35px;
    }
}


@media (hover: hover) and (pointer: fine) {
    .vrgf-card:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6);
    }
    .vrgf-card:hover .vrgf-card-image {
        transform: scale(1.08);
    }
}
/* АДАПТИВНОСТЬ ДЛЯ БЕЙДЖЕЙ И ТЕКСТА */
@media (max-width: 991px) {

}
@media (max-width: 767px) {
    .vrgf-catalog { 
        padding-left: 10px; 
        padding-right: 10px; 
    }
    .vrgf-card-title {
        bottom: 40px;
        font-size: clamp(13px, 4.6vw, 20px);
        padding: 0;
    }
    .vrgf-filters { 
        padding: 14px; 
        gap: 10px; 
        margin-bottom: 24px; 
    }
    .vrgf-filter-group { 
        flex: 1 1 100%; 
    }
    .vrgf-btn-reset { 
        flex: 1 1 100%; 
        width: 100%; 
    }
    .vrgf-card { 
        border-radius: 10px; 
    }

    .vrgf-title { 
        font-size: clamp(16px, 5.5vw, 20px); 
        padding: 10px; 
    }
    .vrgf-red-line { 
        height: 3px; 
    }
}
/* ============================================
   ПАГИНАЦИЯ
   ============================================ */
.vrgf-pagination {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.vrgf-pagination-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}
.vrgf-pagination-info {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
}
.vrgf-pagination-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.vrgf-page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.vrgf-page-btn:hover:not(.vrgf-page-current):not(.vrgf-page-dots):not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 81, 81, 0.6);
    transform: translateY(-2px);
}
.vrgf-page-btn.vrgf-page-current {
    background: linear-gradient(135deg, #ff5151 0%, #e63946 100%);
    border-color: #ff5151;
    box-shadow: 0 4px 12px rgba(255, 81, 81, 0.4);
    cursor: default;
}
.vrgf-page-btn.vrgf-page-dots {
    cursor: default;
    border-color: transparent;
    background: transparent;
}
.vrgf-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.vrgf-no-games {
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
}
.vrgf-loading {
    position: relative;
    pointer-events: none;
}
.vrgf-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}
/* ============================================
   АДАПТИВНОСТЬ ПАГИНАЦИИ
   ============================================ */
@media (max-width: 767px) {
    .vrgf-pagination {
        margin-top: 30px;
        padding-top: 20px;
    }
    .vrgf-page-btn {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
    }
    .vrgf-pagination-info {
        font-size: 14px;
    }
}


/* Desktop containment: hide card-content, badges stay within image */
/* Desktop containment: title and badges inside image, no content strip */
@media (min-width: 992px) {
    /* Card wrapper clips content properly */
    .vrgf-card {
        overflow: hidden;
    }
    
    /* Image wrapper is the sole visible area on desktop */
    .vrgf-card-img-wrapper {
        min-height: 220px;
        overflow: hidden;
        border-radius: inherit;
    }
    
    /* Hide separate content section on desktop */
    .vrgf-card-content {
        display: none;
    }
    
    /* Title positioned inside image area */
    .vrgf-card-title {
        position: absolute;
        bottom: 48px;
        left: 16px;
        right: 16px;
        z-index: 2;
    }
    

}

.vrgf-card-img-wrapper img {
    height: 100% !important;
}

/* ========================================
   ПОШУК — стиль ідентичний фільтрам
   ======================================== */

.vrgf-search-group {
    flex: 1 1 100% !important;
    width: 100%;
    margin-bottom: 4px;
    order: -1;
}

.vrgf-search-input {
    width: 100%;
    padding: 12px 16px !important;
    font-size: 15px;
    font-family: inherit;
    color: #fff !important;
    background-color: #1a1a2e !important;
    background: #1a1a2e !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.vrgf-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.vrgf-search-input:hover {
    background: #252542 !important;
    border-color: rgba(255, 81, 81, 0.6) !important;
}

.vrgf-search-input:focus {
    outline: none !important;
    border-color: #ff5151 !important;
    background: #2a2a4a !important;
    box-shadow: 0 0 0 3px rgba(255, 81, 81, 0.2) !important;
}

@media (max-width: 767px) {
    .vrgf-search-group {
        margin-bottom: 2px;
    }
    .vrgf-search-input {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* ========================================
   ЗГОРТАННЯ ФІЛЬТРІВ НА МОБІЛЬНОМУ
   ======================================== */

/* Рядок пошуку + кнопка тогл */
.vrgf-search-row {
    display: contents;
}

/* Кнопка тогл — прихована на десктопі */
.vrgf-btn-toggle {
    display: none;
}

/* ===== МОБІЛЬНИЙ (до 767px) ===== */
@media (max-width: 767px) {

    /* Рядок пошуку — flex контейнер */
    .vrgf-search-row {
        display: flex;
        flex: 1 1 100%;
        gap: 10px;
        align-items: stretch;
        margin-bottom: 8px;
    }

    /* Пошук займає більшу частину */
    .vrgf-search-row .vrgf-search-group {
        flex: 1 1 auto;
        margin-bottom: 0;
    }

    /* Кнопка тогл — видима */
    .vrgf-btn-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 0 0 auto;
        padding: 10px 14px;
        background: rgba(255, 255, 255, 0.08);
        border: 2px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 8px !important;
        color: #fff;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .vrgf-btn-toggle:hover,
    .vrgf-btn-toggle:focus {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 81, 81, 0.5);
    }

    .vrgf-btn-toggle.active {
        background: rgba(255, 81, 81, 0.15);
        border-color: #ff5151;
    }

    .vrgf-toggle-icon {
        font-size: 16px;
        transition: transform 0.3s ease;
    }

    .vrgf-btn-toggle.active .vrgf-toggle-icon {
        transform: rotate(90deg);
    }

    /* Згортаємі фільтри — приховані за замовчуванням */
    .vrgf-filters-collapsible {
        display: none;
        flex: 1 1 100%;
        flex-wrap: wrap;
        gap: 10px;
        overflow: hidden;
        animation: vrgfSlideDown 0.3s ease;
    }

    .vrgf-filters-collapsible.open {
        display: flex;
    }

    @keyframes vrgfSlideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Sticky при скролі */
    .vrgf-filters.sticky {
        position: sticky;
        top: 0;
        z-index: 100;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
}

/* Десктоп — все як було */
@media (min-width: 768px) {
    .vrgf-filters-collapsible {
        display: contents;
    }

    .vrgf-search-row .vrgf-search-group {
        flex: 1 1 100%;
    }
}
