/* ============================================================
   КАТАЛОГ — красивый, кинематографичный дизайн
   ============================================================ */

/* ============================================================
   HERO
   ============================================================ */
.catalog-hero {
    position: relative;
    margin: 1.2rem 0 2.2rem;
    padding: 2.6rem 2rem 2.4rem;
    border-radius: 22px;
    overflow: hidden;
    border: 2px solid var(--border);
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    isolation: isolate;
}

.catalog-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 94, 0, 0.18), transparent 55%),
        radial-gradient(circle at 80% 70%, rgba(255, 140, 0, 0.12), transparent 50%);
    animation: heroShine 8s ease-in-out infinite alternate;
}

@keyframes heroShine {
    0%   { filter: hue-rotate(0deg) brightness(1); }
    100% { filter: hue-rotate(-12deg) brightness(1.1); }
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    background: var(--orange-gradient);
    z-index: 1;
}

.catalog-hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: rgba(255, 94, 0, 0.12);
    border: 1px solid rgba(255, 94, 0, 0.35);
    border-radius: 30px;
    color: var(--orange);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.catalog-hero__title {
    background: var(--orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(1.8rem, 3.2vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 0.6rem;
    padding: 0.1rem 0;
}

.catalog-hero__sub {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0 0 1.4rem;
    max-width: 560px;
    line-height: 1.55;
}

.catalog-hero__stats {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 14px;
    backdrop-filter: blur(6px);
}

.catalog-hero__stat {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
}

.catalog-hero__stat-value {
    background: var(--orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
    font-weight: 800;
}

.catalog-hero__stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ============================================================
   GRID
   ============================================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.4rem;
    margin: 0 0 3rem;
}

/* ============================================================
   CARD
   ============================================================ */
.category-card {
    --delay: 0;

    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--black-card, #111);
    border: 1px solid var(--border);
    isolation: isolate;
    animation: fadeUp 0.4s ease both;
    animation-delay: calc(var(--delay) * 60ms);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.25s ease,
                box-shadow 0.35s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.category-card:hover {
    transform: translateY(-8px);
    border-color: var(--orange);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 94, 0, 0.2),
        0 0 42px rgba(255, 94, 0, 0.15);
    color: inherit;
}

/* Мерцающая линия сверху при hover */
.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--orange-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 4;
}

.category-card:hover::before {
    transform: scaleX(1);
}

/* ============================================================
   VISUAL (картинка + оверлей + текст)
   ============================================================ */
.category-card__visual {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 14;
    overflow: hidden;
    background: var(--black);
}

.category-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
    filter: saturate(0.9) brightness(0.9);
}

.category-card:hover .category-card__img {
    transform: scale(1.08);
    filter: saturate(1.1) brightness(1);
}

/* Градиентный оверлей для читаемости текста */
.category-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.75) 30%,
        rgba(0, 0, 0, 0.25) 55%,
        rgba(0, 0, 0, 0) 80%
    );
    transition: opacity 0.3s ease;
    z-index: 1;
}

.category-card:hover .category-card__overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.78) 35%,
        rgba(26, 10, 0, 0.25) 65%,
        rgba(0, 0, 0, 0) 85%
    );
}

/* ============================================================
   PATTERN PLACEHOLDER — для категорий без картинки
   ============================================================ */
.category-card__pattern {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 94, 0, 0.25), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 140, 0, 0.18), transparent 55%),
        linear-gradient(135deg, #1a1a1a, #0a0a0a);
    overflow: hidden;
}

.category-card__pattern::before,
.category-card__pattern::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--orange-gradient);
    opacity: 0.15;
    filter: blur(40px);
}

.category-card__pattern::before {
    width: 180px; height: 180px;
    top: -40px; left: -40px;
}

.category-card__pattern::after {
    width: 220px; height: 220px;
    bottom: -60px; right: -60px;
}

.category-card__pattern-letter {
    position: relative;
    z-index: 1;
    background: var(--orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 6rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1;
    opacity: 0.65;
    transition: transform 0.5s ease, opacity 0.4s ease;
}

.category-card:hover .category-card__pattern-letter {
    transform: scale(1.08) rotate(-4deg);
    opacity: 0.85;
}

/* ============================================================
   BADGES (на картинке сверху)
   ============================================================ */
.category-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    pointer-events: none;
}

.category-card__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 5px 11px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.3px;
}

.category-card__chip i {
    color: var(--orange);
    font-size: 0.85rem;
}

.category-card__chip--adult {
    background: linear-gradient(135deg, #f87171, #dc2626);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* ============================================================
   TITLEBOX (название + описание поверх низа картинки)
   ============================================================ */
.category-card__titlebox {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 1.2rem 1.3rem 1rem;
    z-index: 2;
    color: #fff;
}

.category-card__name {
    margin: 0 0 0.3rem;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    letter-spacing: -0.2px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
    word-break: break-word;
}

.category-card:hover .category-card__name {
    color: var(--orange);
}

.category-card__desc {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.87rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* ============================================================
   ПУСТОЕ СОСТОЯНИЕ
   ============================================================ */
.catalog-empty {
    text-align: center;
    padding: 5rem 1rem;
}

.catalog-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    background: rgba(255, 94, 0, 0.08);
    border: 2px dashed var(--border);
    border-radius: 50%;
    color: var(--orange);
    font-size: 2.4rem;
    margin: 0 auto 1.2rem;
}

.catalog-empty h3 {
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.catalog-empty p {
    color: var(--text-muted);
    margin: 0 0 1.6rem;
}

.btn-primary-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    background: var(--orange-gradient);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-orange);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary-link:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px var(--orange-glow);
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 992px) {
    .catalog-hero {
        padding: 2rem 1.4rem 1.8rem;
    }
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.1rem;
    }
    .category-card__visual {
        aspect-ratio: 3 / 4;
    }
}

@media (max-width: 576px) {
    .catalog-hero {
        padding: 1.6rem 1.2rem;
    }
    .catalog-hero__title { font-size: 1.6rem; }
    .catalog-hero__sub   { font-size: 0.95rem; }
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 0.9rem;
    }
    .category-card__name { font-size: 1.15rem; }
    .category-card__visual { aspect-ratio: 4 / 5; }
    .category-card__pattern-letter { font-size: 4.5rem; }
}


/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
}

.pagination a:hover {
    background: var(--orange-gradient);
    border-color: var(--orange);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
}

.pagination .current {
    background: var(--orange-gradient);
    color: white;
    border-color: var(--orange);
    font-weight: 600;
    box-shadow: var(--shadow-orange);
}

.pagination a i {
    font-size: 1.2rem;
}