
/* =========================================================
   LIBROS - HERO OSCURO
   ========================================================= */

.all-books-page {
    min-height: 70vh;
    padding: 70px 0 90px;
    background: #f5f0e6;
    color: #17243a;
}


/* =========================================================
   BANNER ATARI CORP.
   ========================================================= */

.books-featured-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 0;
    background: var(--cream, #f4efe3);
}

.books-featured {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid #243647;
    border-radius: 5px;
    background: #06111c;
    color: #fff;
    text-decoration: none;
    isolation: isolate;
}

.books-featured-text {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 26px 30px;
}

.books-featured h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(24px, 2.6vw, 34px);
    line-height: 1.12;
}

.books-featured p {
    max-width: 520px;
    margin: 0 0 18px;
    color: #e1e5e9;
    font-size: 14px;
    line-height: 1.6;
}

.books-featured-cta {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
    border: 1px solid var(--gold, #d99a21);
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: background-color 0.2s ease;
}

.books-featured:hover .books-featured-cta {
    background: #b67a0b;
}

.books-featured-image {
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.books-featured-image::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background: linear-gradient( 90deg, #06111c 0%, rgba(6, 17, 28, 0.7) 38%, rgba(6, 17, 28, 0.7) 100% );
}

.books-featured-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.books-featured:hover .books-featured-image img {
    transform: scale(1.025);
}


/* =========================================================
   CATÁLOGO
   ========================================================= */

.books-catalog {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 0px 65px;
    background: var(--cream, #f4efe3);
}

.books-catalog-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 18px;
}

.books-catalog-heading h2 {
    margin: 0;
    color: var(--navy, #071a2d);
    font-size: 30px;
    line-height: 1.1;
}


/* =========================================================
   FILTROS
   ========================================================= */

.books-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
}

.books-filter {
    padding: 9px 15px;
    border: 1px solid #d7cbb7;
    border-radius: 22px;
    background: transparent;
    color: var(--navy, #071a2d);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.books-filter:hover {
    border-color: var(--gold, #d99a21);
}

.books-filter.active {
    border-color: var(--gold, #d99a21);
    background: var(--gold, #d99a21);
    color: #fff;
}


/* =========================================================
   CUADRÍCULA DE CUATRO COLUMNAS
   ========================================================= */

.books-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.book-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border, #ddd7cc);
    border-radius: 5px;
    background: var(--card-color);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.book-card:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
}

.book-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}


/* Zona de portada */

.book-card-cover {
    display: flex;
    height: 205px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
    background:
        radial-gradient(
            ellipse at center,
            #fffdf8 0%,
            #ffffff 100%
        );
}

.book-card-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(5px 8px 5px rgba(0, 0, 0, 0.22));
    transform: rotate(-5deg) scale(0.92);
    transition: transform 0.25s ease;
}

.book-card:hover .book-card-cover img {
    transform: rotate(-2deg) scale(0.96);
}


/* Datos del libro */

.book-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 16px 18px;
    border-top: 1px solid var(--border, #ddd7cc);
}

.book-card-category {
    margin-bottom: 8px;
    color: #b57912;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.book-card-title {
    margin: 0 0 10px;
    color: var(--navy, #071a2d);
    font-size: 20px;
    line-height: 1.25;
}

.book-card-description {
    margin: 0 0 16px;
    color: var(--text, #263548);
    font-size: 13px;
    line-height: 1.6;
}

.book-card-cta {
    margin-top: auto;
    color: #a96c08;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}


/* =========================================================
   VER TODOS LOS LIBROS
   ========================================================= */

.books-more {
    display: flex;
    justify-content: center;
    padding-top: 38px;
}

.books-more-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 13px 22px;
    border: 1px solid var(--gold, #d99a21);
    border-radius: 3px;
    color: var(--navy, #071a2d);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.books-more-link:hover {
    background: var(--gold, #d99a21);
    color: #fff;
}

.books-empty {
    padding: 35px 0;
    color: var(--muted, #777);
    text-align: center;
}


/* =========================================================
   PÁGINA DE TODOS LOS LIBROS
   ========================================================= */

.books-catalog.is-all-books {
    min-height: 50vh;
    padding-top: 42px;
}

.books-catalog.is-all-books .books-catalog-heading h1 {
    margin: 0;
    color: var(--navy, #071a2d);
    font-size: 34px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
    .books-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 760px) {
    

    .books-featured-section {
        padding: 22px 20px 0;
    }

    .books-featured {
        grid-template-columns: 1fr;
    }

    .books-featured-text {
        padding: 24px;
    }

    .books-featured-image {
        min-height: 150px;
    }

    .books-featured-image img {
        min-height: 150px;
        max-height: 210px;
    }

    .books-featured-image::before {
        background: linear-gradient(
            180deg,
            #06111c 0%,
            rgba(6, 17, 28, 0) 45%
        );
    }

    .books-catalog {
        padding: 26px 20px 50px;
    }

    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .book-card-cover {
        height: 180px;
    }

    .book-card-content {
        padding: 13px 12px 15px;
    }

    .book-card-title {
        font-size: 16px;
    }
}

@media (max-width: 440px) {
    .books-grid {
        grid-template-columns: 1fr;
    }

    .book-card {
        display: grid;
        grid-template-columns: 42% 58%;
    }

    .book-card-link {
        display: contents;
    }

    .book-card-cover {
        height: 100%;
        min-height: 190px;
        padding: 8px;
    }

    .book-card-content {
        border-top: 0;
        border-left: 1px solid var(--border, #ddd7cc);
    }

    .book-card-description {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .book-card,
    .book-card-cover img,
    .books-featured-image img {
        transition: none;
    }

    .book-card:hover {
        transform: none;
    }
}


