/* =========================================================
   SADHIKA RESEARCH & PUBLICATIONS
   BOOKS PAGE
========================================================= */

:root {
    --books-blue: #102a43;
    --books-dark: #06233f;
    --books-gold: #d39b24;
    --books-gold-light: #f3c343;
    --books-border: #e5dfd2;
    --books-bg: #faf9f6;
}


/* =========================================================
   GLOBAL
========================================================= */

.books-page,
.books-page * {
    box-sizing: border-box;
}


.books-page {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--books-blue);
    background: #ffffff;
}


.books-main,
.books-main button,
.books-main input,
.books-main select {
    font-family: Georgia, "Times New Roman", serif;
}


/* =========================================================
   HERO
========================================================= */

.books-hero {
    position: relative;

    min-height: 245px;

    background-image:
        url("../images/hero/books-banner.jpg");

    background-size: cover;

    background-position: center;

    overflow: hidden;
}


.books-hero-overlay {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(4, 34, 61, 0.95) 0%,
            rgba(4, 34, 61, 0.82) 38%,
            rgba(4, 34, 61, 0.30) 72%,
            rgba(4, 34, 61, 0.10) 100%
        );
}


.books-hero-container {
    position: relative;

    z-index: 2;

    width: 90%;

    max-width: 1380px;

    min-height: 245px;

    margin: 0 auto;

    display: flex;

    flex-direction: column;

    justify-content: center;

    padding: 50px 0;
}


.books-breadcrumb {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 13px;

    font-size: 15px;
}


.books-breadcrumb a {
    color: #ffffff;

    text-decoration: none;
}


.books-breadcrumb span {
    color: #ffffff;
}


.books-breadcrumb span:last-child {
    color: var(--books-gold-light);
}


.books-hero-content {
    max-width: 750px;

    color: #ffffff;
}


.books-hero-content h1 {
    margin: 0 0 5px;

    font-size: clamp(46px, 5vw, 64px);

    line-height: 1.05;

    color: #ffffff;
}


.books-hero-content p {
    max-width: 720px;

    margin: 0;

    font-size: clamp(20px, 2vw, 27px);

    line-height: 1.3;

    color: #ffffff;

    text-align: left;
}


/* =========================================================
   MAIN
========================================================= */

.books-main {
    width: 100%;

    padding: 25px 0 45px;

    background: #ffffff;
}


.books-layout {
    width: 95%;

    max-width: 1420px;

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        245px
        minmax(0, 1fr);

    gap: 25px;

    align-items: start;
}


/* =========================================================
   LEFT SIDEBAR
========================================================= */

.books-sidebar {
    min-width: 0;
}


.book-category-box {
    width: 100%;

    border: 1px solid var(--books-border);

    background: #ffffff;
}


.book-category-box h2 {
    margin: 0;

    padding: 13px 14px 11px;

    font-size: 21px;

    line-height: 1.2;

    color: var(--books-blue);

    text-align: left;

    border-bottom: 1px solid #eee8dc;
}


.book-category-list {
    width: 100%;
}


.book-category-filter {
    width: 100%;

    min-height: 35px;

    padding: 6px 10px;

    border: 0;

    border-bottom: 1px solid #e8e8e8;

    background: #ffffff;

    color: var(--books-blue);

    display: grid;

    grid-template-columns:
        25px
        minmax(0, 1fr)
        15px;

    align-items: center;

    gap: 5px;

    cursor: pointer;

    font-size: 14px;

    text-align: left;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        padding-left 0.25s ease;
}


.book-category-filter:last-child {
    border-bottom: none;
}


.book-category-filter:hover {
    background: #fff8e7;

    color: #9d7217;

    padding-left: 14px;
}


.book-category-filter.active {
    background: #f6d98c;

    color: var(--books-blue);

    font-weight: 700;
}


.category-icon {
    color: var(--books-gold);

    text-align: center;
}


.category-name {
    min-width: 0;

    text-align: left;
}


.category-arrow {
    font-size: 20px;

    line-height: 1;

    text-align: center;
}


/* =========================================================
   BOOK CONTENT
========================================================= */

.books-content {
    min-width: 0;
}


.books-content-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 15px;
}


.books-title-area {
    display: flex;

    align-items: baseline;

    gap: 8px;

    flex-shrink: 0;
}


.books-title-area h2 {
    margin: 0;

    font-size: 27px;

    line-height: 1.2;

    color: var(--books-blue);

    text-align: left;
}


.books-count {
    font-size: 17px;

    color: #444444;
}


.books-tools {
    display: flex;

    align-items: center;

    gap: 20px;

    min-width: 0;
}


.books-search {
    display: flex;

    width: 340px;

    height: 34px;

    border: 1px solid #d7d7d7;

    background: #ffffff;
}


.books-search input {
    width: 100%;

    min-width: 0;

    padding: 7px 10px;

    border: none;

    outline: none;

    color: var(--books-blue);

    font-size: 12px;
}


.books-search button {
    width: 40px;

    flex-shrink: 0;

    border: none;

    background: var(--books-blue);

    color: #ffffff;

    cursor: pointer;
}


.books-sort {
    display: flex;

    align-items: center;

    gap: 8px;

    white-space: nowrap;
}


.books-sort label {
    font-size: 13px;

    color: var(--books-blue);

    font-weight: 700;
}


.books-sort select {
    height: 34px;

    min-width: 115px;

    padding: 5px 8px;

    border: 1px solid #d7d7d7;

    background: #ffffff;

    color: var(--books-blue);

    outline: none;

    font-size: 12px;
}


/* =========================================================
   BOOK GRID
========================================================= */

.books-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 18px;

    align-items: start;
}


.book-card {
    min-width: 0;

    background: #ffffff;

    border: 1px solid #eeeeee;

    overflow: hidden;

    opacity: 1;

    transform: translateY(0);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        opacity 0.35s ease;
}


.book-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 8px 20px rgba(16, 42, 67, 0.12);
}


.book-card.book-filter-hide {
    display: none;
}


.book-image {
    width: 100%;

    aspect-ratio: 0.72 / 1;

    overflow: hidden;

    background: #f1f1f1;
}


.book-image img {
    display: block;

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition: transform 0.5s ease;
}


.book-card:hover .book-image img {
    transform: scale(1.035);
}


/* =========================================================
   BOOK CONTENT
========================================================= */

.book-content {
    padding: 8px 8px 10px;

    text-align: left;
}


.book-content h3 {
    margin: 0 0 2px;

    color: var(--books-blue);

    font-size: 15px;

    line-height: 1.2;

    font-weight: 700;

    text-align: left;
}


.book-subtitle {
    min-height: 30px;

    margin: 0 0 4px;

    color: #333333;

    font-size: 12px;

    line-height: 1.25;

    text-align: left;
}


.book-author {
    margin: 0 0 4px;

    color: #444444;

    font-size: 12px;

    line-height: 1.2;

    text-align: left;
}


.book-price {
    margin: 0;

    color: var(--books-blue);

    font-size: 13px;

    font-weight: 700;

    text-align: left;
}


/* =========================================================
   NO RESULT
========================================================= */

.books-no-result {
    display: none;

    padding: 35px 15px;

    border: 1px solid var(--books-border);

    margin-top: 10px;

    color: var(--books-blue);

    text-align: center;

    font-size: 17px;
}


.books-no-result.show {
    display: block;
}


/* =========================================================
   MOTION
========================================================= */

.book-card.book-reveal {
    opacity: 0;

    transform: translateY(18px);
}


.book-card.book-visible {
    opacity: 1;

    transform: translateY(0);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1250px) {

    .books-layout {
        width: 94%;

        grid-template-columns:
            220px
            minmax(0, 1fr);

        gap: 20px;
    }


    .books-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        gap: 16px;
    }


    .books-tools {
        gap: 10px;
    }


    .books-search {
        width: 270px;
    }

}


/* =========================================================
   SMALL DESKTOP / TABLET
========================================================= */

@media (max-width: 1000px) {

    .books-hero,
    .books-hero-container {
        min-height: 270px;
    }


    .books-layout {
        grid-template-columns:
            200px
            minmax(0, 1fr);

        gap: 18px;
    }


    .books-content-header {
        align-items: flex-start;

        flex-direction: column;
    }


    .books-tools {
        width: 100%;

        justify-content: space-between;
    }


    .books-search {
        width: 60%;
    }


    .books-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 15px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .books-hero,
    .books-hero-container {
        min-height: 360px;
    }


    .books-hero-container {
        width: 90%;

        justify-content: center;

        padding: 30px 0;
    }


    .books-breadcrumb {
        font-size: 14px;

        margin-bottom: 15px;
    }


    .books-hero-content h1 {
        font-size: 43px;

        line-height: 1.05;
    }


    .books-hero-content p {
        font-size: 19px;

        line-height: 1.4;
    }


    .books-main {
        padding: 25px 0 35px;
    }


    .books-layout {
        width: 92%;

        display: flex;

        flex-direction: column;

        gap: 25px;
    }


    .books-sidebar,
    .books-content {
        width: 100%;
    }


    .book-category-box h2 {
        font-size: 20px;
    }


    .book-category-filter {
        min-height: 40px;

        font-size: 14px;
    }


    .books-content-header {
        width: 100%;

        margin-bottom: 18px;
    }


    .books-title-area {
        width: 100%;
    }


    .books-title-area h2 {
        font-size: 25px;
    }


    .books-tools {
        width: 100%;

        flex-direction: column;

        align-items: stretch;

        gap: 12px;
    }


    .books-search {
        width: 100%;

        height: 40px;
    }


    .books-search button {
        width: 45px;
    }


    .books-sort {
        width: 100%;

        justify-content: space-between;
    }


    .books-sort select {
        flex: 1;

        max-width: 180px;

        height: 38px;
    }


    .books-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;
    }


    .book-content {
        padding: 9px;
    }


    .book-content h3 {
        font-size: 15px;
    }


    .book-subtitle,
    .book-author {
        font-size: 11px;
    }


    .book-price {
        font-size: 12px;
    }


    .books-pagination {
        flex-wrap: wrap;

        margin-top: 25px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .books-hero,
    .books-hero-container {
        min-height: 400px;
    }


    .books-hero-content h1 {
        font-size: 38px;
    }


    .books-hero-content p {
        font-size: 18px;
    }


    .books-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }


    .book-image {
        aspect-ratio: 0.78 / 1;
    }


    .book-content h3 {
        font-size: 17px;
    }


    .book-subtitle,
    .book-author {
        font-size: 13px;
    }


    .book-price {
        font-size: 14px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .book-card,
    .book-image img,
    .book-category-filter {
        transition: none;
    }

}