/* RecipeNexa Classic Food — category detail extensions.
   Requires listing.css; all selectors are scoped to .cf-category.
   Color tokens are inherited from the active Classic Food skin.
*/

.cf-category .cf-category-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 275px) auto;
    align-items: center;
    gap: 22px;
    padding: 24px;
    background: #f8faf5;
    border: 1px solid #e1e5dc;
    border-bottom: 3px solid var(--cf-primary);
}

.cf-category .cf-category-intro-copy {
    min-width: 0;
}

.cf-category .cf-category-intro-copy h1 {
    overflow-wrap: anywhere;
}

.cf-category .cf-category-intro-copy p {
    max-width: 65ch;
    line-height: 1.65;
    white-space: normal;
}

.cf-category .cf-category-browse {
    display: inline-block;
    margin-top: 17px;
    padding: 10px 16px;
    border-radius: 4px;
    color: #fff;
    background: var(--cf-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

.cf-category .cf-category-browse:hover {
    color: #fff;
    filter: brightness(.92);
}

.cf-category .cf-category-hero-image {
    width: 100%;
    min-width: 0;
    max-width: 275px;
    overflow: hidden;
    border-radius: 5px;
    background: #eeeae0;
}

.cf-category .cf-category-hero-image img {
    display: block;
    width: 100%;
    height: 185px;
    object-fit: cover;
}

.cf-category .cf-list-count {
    align-self: center;
    justify-self: end;
    text-align: center;
}

.cf-category .cf-category-layout {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

.cf-category .cf-category-layout .cf-list-sidebar {
    min-width: 0;
}

.cf-category .cf-category-layout .cf-list-main {
    min-width: 0;
}

.cf-category .cf-list-results-heading h2 {
    overflow-wrap: anywhere;
}

.cf-category .cf-list-card-category {
    overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
    .cf-category .cf-category-intro {
        grid-template-columns: minmax(0, 1fr) minmax(0, 220px);
    }

    .cf-category .cf-list-count {
        grid-column: 1 / -1;
        justify-self: start;
        align-items: flex-start;
        text-align: left;
    }

    .cf-category .cf-category-hero-image {
        max-width: 220px;
    }

    .cf-category .cf-category-hero-image img {
        height: 170px;
    }

    .cf-category .cf-category-layout {
        grid-template-columns: minmax(210px, 235px) minmax(0, 1fr);
        gap: 19px;
    }
}

@media (max-width: 740px) {
    .cf-category .cf-category-intro {
        grid-template-columns: minmax(0, 1fr) minmax(0, 200px);
        gap: 16px;
        padding: 19px;
    }

    .cf-category .cf-category-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .cf-category .cf-category-layout .cf-list-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .cf-category .cf-category-layout .cf-list-sidebar-block {
        margin: 0;
    }

    .cf-category .cf-category-hero-image {
        max-width: 200px;
    }
}

@media (max-width: 500px) {
    .cf-category .cf-category-intro {
        grid-template-columns: minmax(0, 1fr);
        padding: 16px;
    }

    .cf-category .cf-category-hero-image {
        max-width: none;
    }

    .cf-category .cf-category-hero-image img {
        height: 190px;
    }

    .cf-category .cf-list-count {
        width: 100%;
    }

    .cf-category .cf-category-layout .cf-list-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .cf-category .cf-list-results-heading {
        align-items: flex-start;
    }
}

@media print {
    .cf-category .cf-category-intro {
        display: block;
        border: 0;
        padding: 0;
    }

    .cf-category .cf-category-browse,
    .cf-category .cf-category-hero-image {
        display: none;
    }
}
