.library-category-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.library-category-list__item {
    min-width: 0;
}

.library-category-list__item .library_brochure_widget.collection-card {
    width: 100%;
    min-height: 220px;
    height: 100%;
}

.library-category-list__item .library_brochure_widget .collection-card__content {
    align-items: center;
    text-align: center;
    justify-content: center;
}

.library-category-list__item .library_brochure_widget .collection-card__top {
    width: 100%;
}

.library-category-list__item .library_brochure_widget .collection-card__btn {
    margin: 16px auto 0;
    align-self: center;
}

.library-category-list__item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.library-category-list__item:last-child:nth-child(odd) .library_brochure_widget.collection-card {
    min-height: 400px;
}

.library-category-list__item:last-child:nth-child(odd) .library_brochure_widget .collection-card__title {
    font-size: 56px;
}

.library-category-list__item:last-child:nth-child(odd) .library_brochure_widget .collection-card__subtitle {
    font-size: 32px;
    margin-top: 8px;
}

.library-category-list__item:last-child:nth-child(odd) .library_brochure_widget .collection-card__btn {
    margin-top: 24px;
    padding: 10px 36px;
    font-size: 14px;
}

.library-category-list .collection-card__extra {
    display: none;
}

/* Single category featured layout */
.library-category-list--single {
    grid-template-columns: minmax(0, 1fr);
    container-type: inline-size;
    container-name: library-category-list;
}

.library-category-list--single .library-category-list__item {
    grid-column: 1 / -1;
}

.library-category-list__featured {
    position: relative;
    width: 100%;
    min-height: 420px;
    background-color: #c5d9e8;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
}

.library-category-list__featured-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 48px 56px;
    box-sizing: border-box;
    text-align: left;
}

.library-category-list__featured-text {
    max-width: 920px;
    text-align: left;
}

.library-category-list__featured-title {
    margin: 0 0 16px;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    color: #fff;
}

.library-category-list__featured-description {
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    color: #fff;
}

.library-category-list__featured-description p {
    margin: 0 0 0.75em;
}

.library-category-list__featured-description p:last-child {
    margin-bottom: 0;
}

.library-category-list__featured-bottom {
    display: flex;
    gap: 32px;
    align-items: center;
}

/* Match multi-tile collection-card size: half list width (gap 20px), height 220px */
.library-category-list__featured-image {
    position: relative;
    flex: 0 0 auto;
    width: calc((100cqi - 20px) / 2);
    max-width: 100%;
    height: 220px;
    min-height: 220px;
    overflow: hidden;
}

.library-category-list__featured-image img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

.library-category-list__featured-action {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.library-category-list__featured-btn {
    display: inline-block;
    border: 2px solid #f49b32;
    color: #f49b32;
    background: transparent;
    padding: 10px 36px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.library-category-list__featured-btn:hover,
.library-category-list__featured-btn:focus {
    background: #f49b32;
    color: #111;
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .library-category-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .library-category-list__item:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .library-category-list__item:last-child:nth-child(odd) .library_brochure_widget.collection-card {
        min-height: 220px;
    }

    .library-category-list__item:last-child:nth-child(odd) .library_brochure_widget .collection-card__title {
        font-size: 34px;
    }

    .library-category-list__item:last-child:nth-child(odd) .library_brochure_widget .collection-card__subtitle {
        font-size: 18px;
        margin-top: 0;
    }

    .library-category-list__item:last-child:nth-child(odd) .library_brochure_widget .collection-card__btn {
        margin-top: 16px;
        padding: 6px 18px;
        font-size: 12px;
    }

    .library-category-list__featured-content {
        gap: 24px;
        padding: 28px 20px;
    }

    .library-category-list__featured-title {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .library-category-list__featured-description {
        font-size: 14px;
    }

    .library-category-list__featured-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .library-category-list__featured-image {
        width: 100%;
        height: 220px;
        min-height: 220px;
    }

    .library-category-list__featured-action {
        justify-content: flex-start;
    }

    .library-category-list__featured-btn {
        padding: 8px 24px;
        font-size: 12px;
    }
}
