/* ==========================================
   КАТАЛОГ — ШАПКА (как на странице отзывов)
========================================== */

.catalog-header {
    max-width: 900px;
    margin: 30px auto 25px;
    padding: 0 20px;
    text-align: center;
    position: relative;
}

.catalog-header h1 {
    font-size: 54px;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.catalog-header h1::after {
    content: "";
    display: block;
    width: 90px;
    height: 3px;
    margin: 22px auto 0;
    background: var(--accent);
    border-radius: 20px;
}

.catalog-header p {
    max-width: 700px;
    margin: 35px auto 0;
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 19px;
}

/* ==========================================
   АКЦЕНТНАЯ ПОЛОСА РАЗГРАНИЧЕНИЯ
========================================== */

.catalog-header::after {
    content: "";
    display: block;
    width: 50%;
    height: 2px;
    margin: 30px auto 0;
    background: var(--accent);
    border-radius: 20px;
    opacity: 0.6;
}

/* ==========================================
   СЕТКА КАТЕГОРИЙ
========================================== */

.categories {
    max-width: 1700px;
    margin: 35px auto 80px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 35px;
}

/* ==========================================
   КАРТОЧКА КАТЕГОРИИ
========================================== */

.category {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: 0.45s;
    box-shadow: 0 20px 45px var(--shadow-color);
    text-decoration: none;
    display: block;
}

.category img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    transition: 0.7s;
    display: block;
}

/* Затемнение */
.category::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(9, 9, 9, 0.92) 5%,
        rgba(9, 9, 9, 0.45) 45%,
        rgba(0, 0, 0, 0.08) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Акцентная подсветка */
.category::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: 0.45s;
    background: linear-gradient(
        135deg,
        var(--accent-light),
        transparent 45%
    );
    z-index: 3;
    pointer-events: none;
}

.category-title {
    position: absolute;
    left: 35px;
    bottom: 35px;
    z-index: 5;
    color: #ffffff !important;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.8px;
    pointer-events: none;
}

/* Акцентная линия под названием категории */
.category-title::after {
    content: "";
    display: block;
    width: 65px;
    height: 2px;
    margin-top: 16px;
    background: var(--accent);
}

.category:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 25px 70px var(--shadow-hover);
}

.category:hover img {
    transform: scale(1.08);
}

.category:hover::after {
    opacity: 1;
}

/* ==========================================
   АДАПТИВ
========================================== */

@media (max-width: 768px) {
    .catalog-header {
        margin: 20px auto 20px;
        padding: 0 15px;
    }

    .catalog-header h1 {
        font-size: 34px;
    }

    .catalog-header h1::after {
        width: 60px;
        margin: 16px auto 0;
    }

    .catalog-header p {
        font-size: 16px;
        margin: 25px auto 0;
    }

    .catalog-header::after {
        width: 70%;
        margin: 25px auto 0;
    }

    .categories {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 25px;
        margin: 25px auto 60px;
    }

    .category img {
        height: 270px;
    }

    .category-title {
        left: 25px;
        bottom: 25px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .catalog-header {
        margin: 15px auto 15px;
    }

    .catalog-header h1 {
        font-size: 28px;
    }

    .catalog-header p {
        font-size: 15px;
    }

    .catalog-header::after {
        width: 80%;
        margin: 20px auto 0;
    }

    .category img {
        height: 200px;
    }

    .category-title {
        left: 20px;
        bottom: 20px;
        font-size: 22px;
    }

    .category-title::after {
        width: 40px;
        margin-top: 10px;
    }
}