/* ==========================================================
   BOOKS GRID
========================================================== */

.new-releases-section .wp-block-post-template.books-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: clamp(1.5rem, 3vw, 2rem);

    width: 100%;

    margin: 0 !important;
    padding: 0 !important;

    list-style: none;
    align-items: stretch;
}

.new-releases-section .wp-block-post-template.books-grid > li {
    display: flex;

    min-width: 0;
    height: 100%;

    margin: 0;
}

.new-releases-section .wp-block-post-template.books-grid > li > .book-card {
    width: 100%;
    height: 100%;
}


/* ==========================================================
   BOOK CARD
========================================================== */

.book-card {
    display: grid;
    grid-template-columns:
        minmax(8rem, 10rem)
        minmax(0, 1fr);

    gap: 1.5rem;

    align-items: stretch;

    min-width: 0;
    height: 100%;

    padding: 1.5rem;
}


/* ==========================================================
   MEDIA
========================================================== */

.book-card__media {
    margin: 0;
    align-self: start;
}

.book-card__media img {
    display: block;

    width: 100%;
    height: auto;

    aspect-ratio: 2 / 3;
    object-fit: cover;

    border-radius: .75rem;
}


/* ==========================================================
   CONTENT
========================================================== */

.book-card__content {
    display: grid;

    grid-template-rows:
        auto
        minmax(2lh, auto)
        1fr
        auto;

    min-width: 0;
    align-items: start;
}

.book-card__content > * {
    margin-block-start: 0 !important;
}


/* ==========================================================
   GENRE / META
========================================================== */

.book-card__genres {
    justify-self: start;

    width: fit-content;
    height: auto;

    margin: 1rem 0 .75rem !important;

    aspect-ratio: auto;
}

/* ==========================================================
   TITLE
========================================================== */

.book-card__title {
    margin: 0 0 .75rem !important;

    color: var(--text-strong);
}

.book-card__title a {
    color: inherit;
    text-decoration: none;
}


/* ==========================================================
   EXCERPT
========================================================== */

.book-card__excerpt,
.book-card .wp-block-post-excerpt,
.book-card .wp-block-post-excerpt__excerpt {
    margin: 0 !important;
}


/* ==========================================================
   CTA
========================================================== */

.book-card__link {
    margin-top: auto;
    padding-top: 1.25rem;

    align-self: flex-start;

    color: var(--wp--preset--color--primary);

    font-weight: 700;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 600px) {

    /* Ein Buch pro Zeile */
    .new-releases-section .wp-block-post-template.books-grid {
        grid-template-columns: 1fr;
    }
    
    .book-card {
        grid-template-columns: 1fr;
    }

    .book-card__media {
        width: min(11rem, 65%);
        margin-inline: auto;
    }
}