/* Step40: catalog alphabet navigation and optional intro spoiler */
.catalog-page-intro {
    margin: 18px 0 22px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #fafafa);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .045);
    overflow: hidden;
}

.catalog-page-intro summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    font-weight: 650;
    color: #111827;
}

.catalog-page-intro summary::-webkit-details-marker {
    display: none;
}

.catalog-page-intro summary small {
    font-size: .78rem;
    font-weight: 500;
    color: #6b7280;
}

.catalog-page-intro[open] summary {
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.catalog-page-intro[open] summary small {
    font-size: 0;
}

.catalog-page-intro[open] summary small::after {
    content: "свернуть";
    font-size: .78rem;
}

.catalog-page-intro__body {
    padding: 18px;
}

.catalog-page-intro__image {
    margin: 0 0 16px;
    border-radius: 16px;
    overflow: hidden;
    background: #f3f4f6;
}

.catalog-page-intro__image img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
}

.catalog-alphabet-box {
    margin: 20px 0 18px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
}

.catalog-alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.catalog-alphabet__letter {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: .92rem;
    font-weight: 650;
    color: #374151;
    background: #f9fafb;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.catalog-alphabet__letter:hover {
    transform: translateY(-1px);
    border-color: rgba(220, 38, 38, .35);
    color: #b91c1c;
    background: #fff5f5;
}

.catalog-alphabet__letter.is-active {
    color: #fff;
    border-color: #b91c1c;
    background: #b91c1c;
}

.catalog-letter-categories {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, .08);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-letter-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: #fff;
    color: #111827;
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.catalog-letter-category small {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #6b7280;
    font-size: .75rem;
    font-weight: 650;
}

.catalog-letter-category:hover,
.catalog-letter-category.is-active {
    border-color: rgba(185, 28, 28, .28);
    color: #991b1b;
    background: #fff7f7;
}

.catalog-letter-category.is-active small {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 640px) {
    .catalog-alphabet-box {
        padding: 12px;
        border-radius: 16px;
    }

    .catalog-alphabet {
        gap: 6px;
    }

    .catalog-alphabet__letter {
        min-width: 32px;
        height: 32px;
        font-size: .84rem;
    }

    .catalog-letter-categories {
        gap: 8px;
    }

    .catalog-letter-category {
        font-size: .86rem;
        padding: 8px 10px;
    }
}
