/*
Theme Name: Astra Child
Template: astra
Version: 1.0
*/

/* /wp-content/themes/astra-child/style.css */

/* ===== BOOKLOVERS — GENRES / CATEGORY ARCHIVE — NETFLIX STYLE ===== */

/* Page shell */
body.category,
body.archive.category,
.category-genres {
    background: #ede6dd !important;
}

body.category .site-content,
body.archive.category .site-content,
.category-genres {
    background: #ede6dd !important;
    padding-top: 0 !important;
    padding-bottom: 56px !important;
}

/* Main title */
body.category .page-title,
body.archive.category .page-title,
body.category h1.page-title,
body.archive.category h1.page-title,
.category-genres h1,
.category-genres .page-title {
    color: #b64035 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    font-size: clamp(34px, 6vw, 64px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0.5px !important;
    margin: 0 0 36px !important;
    font-weight: 800 !important;
}

/* Section titles */
.subcategory-title,
.category-genres h2,
body.category h2,
body.archive.category h2 {
    color: #1a0a08 !important;
    font-size: clamp(22px, 3vw, 30px) !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    text-transform: none !important;
    display: inline-block !important;
    margin: 0 0 22px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #c0392b !important;
    background: transparent !important;
}

/* Grid wrappers: custom + Astra/common archive loops */
.subcategory-posts,
.category-genres .subcategory-posts,
body.category .ast-row,
body.archive.category .ast-row,
body.category .site-main .posts-container,
body.archive.category .site-main .posts-container,
body.category .site-main .ast-archive-post-wrap,
body.archive.category .site-main .ast-archive-post-wrap {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
    align-items: stretch !important;
}

/* Reset common Astra article spacing */
body.category article,
body.archive.category article,
body.category .post,
body.archive.category .post,
body.category .ast-article-post,
body.archive.category .ast-article-post {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

/* Card */
.subcategory-posts .post-item,
.category-genres .post-item,
body.category article.type-post,
body.archive.category article.type-post,
body.category .ast-article-post,
body.archive.category .ast-article-post,
body.category .blog-layout-1,
body.archive.category .blog-layout-1 {
    background: #ffffff !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

/* Hover */
.subcategory-posts .post-item:hover,
.category-genres .post-item:hover,
body.category article.type-post:hover,
body.archive.category article.type-post:hover,
body.category .ast-article-post:hover,
body.archive.category .ast-article-post:hover,
body.category .blog-layout-1:hover,
body.archive.category .blog-layout-1:hover {
    transform: translateY(-6px) scale(1.01) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12) !important;
}

/* Image link wrapper */
.subcategory-posts .post-item > a:first-child,
.category-genres .post-item > a:first-child,
body.category .post-thumb a,
body.archive.category .post-thumb a,
body.category .entry-header .post-thumb a,
body.archive.category .entry-header .post-thumb a,
body.category .ast-blog-featured-section a,
body.archive.category .ast-blog-featured-section a {
    display: block !important;
    text-decoration: none !important;
    background: #f5f1ea !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Image */
.subcategory-posts .post-item img,
.category-genres .post-item img,
body.category .post-thumb img,
body.archive.category .post-thumb img,
body.category .ast-blog-featured-section img,
body.archive.category .ast-blog-featured-section img,
body.category .attachment-post-thumbnail,
body.archive.category .attachment-post-thumbnail {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
    transition: transform 0.28s ease !important;
    background: none !important;
}

.subcategory-posts .post-item:hover img,
.category-genres .post-item:hover img,
body.category article.type-post:hover img,
body.archive.category article.type-post:hover img,
body.category .ast-article-post:hover img,
body.archive.category .ast-article-post:hover img {
    transform: scale(1.03) !important;
}

/* Content area inside card */
body.category .entry-header,
body.archive.category .entry-header,
body.category .entry-content,
body.archive.category .entry-content,
body.category .entry-summary,
body.archive.category .entry-summary {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Post title */
.subcategory-posts .post-item h3,
.category-genres .post-item h3,
body.category .entry-title,
body.archive.category .entry-title,
body.category .entry-title a,
body.archive.category .entry-title a {
    color: #1a0a08 !important;
    background: transparent !important;
    text-transform: none !important;
    text-align: left !important;
    font-size: 17px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    margin: 0 !important;
    text-decoration: none !important;
}

/* Title wrapper spacing */
.subcategory-posts .post-item h3,
.category-genres .post-item h3,
body.category .entry-title,
body.archive.category .entry-title {
    padding: 18px 20px 20px 20px !important;
    border-left: 3px solid #c0392b !important;
    min-height: 118px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Title link */
.subcategory-posts .post-item h3 a,
.category-genres .post-item h3 a,
body.category .entry-title a,
body.archive.category .entry-title a {
    color: #1a0a08 !important;
    text-decoration: none !important;
}

.subcategory-posts .post-item h3 a:hover,
.category-genres .post-item h3 a:hover,
body.category .entry-title a:hover,
body.archive.category .entry-title a:hover {
    color: #7a2e3a !important;
}

/* Hide meta/excerpt/read more if you want pure card look */
.subcategory-posts .post-item p,
.category-genres .post-item p,
body.category .entry-meta,
body.archive.category .entry-meta,
body.category .entry-content,
body.archive.category .entry-content,
body.category .entry-summary,
body.archive.category .entry-summary,
body.category .read-more,
body.archive.category .read-more {
    display: none !important;
}

/* More links */
.subcategory-more-link,
a.more-link,
body.category .more-link,
body.archive.category .more-link {
    color: #c0392b !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    display: inline-block !important;
    margin-top: 8px !important;
}

.subcategory-more-link:hover,
a.more-link:hover,
body.category .more-link:hover,
body.archive.category .more-link:hover {
    color: #7a2e3a !important;
    text-decoration: underline !important;
}

/* Remove odd separators/margins Astra may add */
body.category .ast-article-single,
body.archive.category .ast-article-single,
body.category .ast-separate-container article,
body.archive.category .ast-separate-container article {
    padding: 0 !important;
    margin: 0 !important;
}

/* Tablet */
@media (max-width: 1024px) {
    .subcategory-posts,
    .category-genres .subcategory-posts,
    body.category .ast-row,
    body.archive.category .ast-row,
    body.category .site-main .posts-container,
    body.archive.category .site-main .posts-container,
    body.category .site-main .ast-archive-post-wrap,
    body.archive.category .site-main .ast-archive-post-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 20px !important;
    }

    .subcategory-posts .post-item img,
    .category-genres .post-item img,
    body.category .post-thumb img,
    body.archive.category .post-thumb img,
    body.category .ast-blog-featured-section img,
    body.archive.category .ast-blog-featured-section img {
        height: 250px !important;
    }

    .subcategory-posts .post-item h3,
    .category-genres .post-item h3,
    body.category .entry-title,
    body.archive.category .entry-title {
        font-size: 18px !important;
        min-height: 104px !important;
    }
}

/* Mobile */
@media (max-width: 680px) {
    .subcategory-posts,
    .category-genres .subcategory-posts,
    body.category .ast-row,
    body.archive.category .ast-row,
    body.category .site-main .posts-container,
    body.archive.category .site-main .posts-container,
    body.category .site-main .ast-archive-post-wrap,
    body.archive.category .site-main .ast-archive-post-wrap {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .subcategory-posts .post-item img,
    .category-genres .post-item img,
    body.category .post-thumb img,
    body.archive.category .post-thumb img,
    body.category .ast-blog-featured-section img,
    body.archive.category .ast-blog-featured-section img {
        height: 240px !important;
    }

    .subcategory-posts .post-item h3,
    .category-genres .post-item h3,
    body.category .entry-title,
    body.archive.category .entry-title {
        min-height: auto !important;
    }
}

/* Optional: only apply to the Genres category page specifically */
body.category-genres .site-main,
body.category-genres .ast-container {
    background: transparent !important;
}

/* ===== END ===== */