
/* =========================================================
   VAL-U-U — DIGITAL BOOKS COLLECTION GRID
   Homepage Book Cards • Responsive Layout
========================================================= */

.books-catalog {
    --catalog-red: #9d2435;
    --catalog-gold: #e7bf85;
    --catalog-white: #ffffff;
    --catalog-muted: #d5c4c7;

    position: relative;
    padding: 70px 0;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(157, 36, 53, 0.15),
            transparent 40%
        ),
        #170d12;
    color: var(--catalog-white);
}

.books-catalog *,
.books-catalog *::before,
.books-catalog *::after {
    box-sizing: border-box;
}

.books-catalog .container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

/* =========================================================
   BOOK GRID
========================================================= */

.books-catalog-grid {
    display: grid;
    grid-template-columns: repeat(
        4,
        minmax(0, 1fr)
    );
    gap: 26px;
    margin-top: 32px;
}

/* =========================================================
   BOOK CARD
========================================================= */

.books-catalog-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    height: 100%;
    padding: 17px;
    background: #211317;
    border: 1px solid #743b47;
    border-radius: 14px;
    color: var(--catalog-white);
    text-decoration: none;
    overflow: hidden;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.books-catalog-card:hover {
    border-color: var(--catalog-gold);
    transform: translateY(-5px);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.25);
}

.books-catalog-card:focus-visible {
    outline: 3px solid var(--catalog-gold);
    outline-offset: 4px;
}

/* =========================================================
   ORIGINAL BOOK COVER
   Full visibility — no cropping
========================================================= */

.books-catalog-card img {
    display: block;
    width: 100%;
    height: 285px;
    object-fit: contain;
    object-position: center;
    border-radius: 5px;
}

/* =========================================================
   BOOK TITLE
========================================================= */

.books-catalog-card strong {
    display: block;
    margin-top: 5px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

/* =========================================================
   BOOK PRICE / STATUS
========================================================= */

.books-catalog-card span {
    display: block;
    margin-top: auto;
    color: var(--catalog-gold);
    font-size: 0.9rem;
    font-weight: 700;
}

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

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

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

@media (max-width: 700px) {
    .books-catalog {
        padding: 50px 0;
    }

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

    .books-catalog-card {
        padding: 12px;
        gap: 9px;
    }

    .books-catalog-card img {
        height: 220px;
    }

    .books-catalog-card strong {
        font-size: 0.95rem;
    }
}

@media (max-width: 380px) {
    .books-catalog .container {
        width: min(100% - 24px, 1200px);
    }

    .books-catalog-grid {
        gap: 10px;
    }

    .books-catalog-card {
        padding: 9px;
    }

    .books-catalog-card img {
        height: 175px;
    }

    .books-catalog-card strong {
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .books-catalog-card {
        transition: none;
    }
}








/* =========================================================
   VAL-U-U — PREMIUM EIGHT-BOOK GRID INTEGRATION
========================================================= */

html {
    scroll-behavior: smooth;
}

#books {
    scroll-margin-top: 100px;
}

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

.valuu-books .valuu-book-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

.valuu-books .valuu-book-cover-link {
    display: block;
    width: 100%;
    text-decoration: none;
}

.valuu-books .valuu-book-art {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

.valuu-books .valuu-book-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 330px;
    overflow: hidden;
}

.valuu-books .valuu-book-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
}

.valuu-books .valuu-book-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.valuu-books .valuu-book-info h3 {
    overflow-wrap: anywhere;
}

.valuu-books .valuu-book-discover {
    margin-top: auto;
}

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

@media (max-width: 760px) {
    .valuu-books .valuu-books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 14px;
    }

    .valuu-books .valuu-book-image-wrap {
        height: 260px;
    }
}

@media (max-width: 420px) {
    .valuu-books .valuu-book-image-wrap {
        height: 205px;
    }
}
