/* Fix footer positioning - ensure footer stays at bottom when content is short */
/* This CSS only applies to the book-list page */

.dark-mode .tt-lives { 
    background-color: black;
}

.tt-container__right {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.tt-container__right > *:not(.tt-footer) {
    flex-shrink: 0;
}

.tt-container__right .tt-footer {
    margin-top: auto;
}

/* Scope: Book List page only */
#book-list-page .tt-2-top-10-slider .swiper-slide {
    width: auto;
    flex: 0 0 auto !important;
    display: flex;
    justify-content: center;
    margin-right: 20px !important;
}

#book-list-page .tt-2-top-10-item {
    width: 180px;
    text-align: center;
    color: var(--black);
}

#book-list-page .tt-2-top-10-item-img {
    width: 180px;
    height: 270px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    margin: 0 auto 10px auto;
}

#book-list-page .tt-2-top-10-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#book-list-page .tt-2-top-10-item .number {
    font-size: 1.75rem;
    color: #ff9046;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

#book-list-page .tt-2-top-10-item:hover .number {
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* Top 10 Books Navigation Buttons - Responsive */
#book-list-page .tt-2-top-10-slider-nav button {
    width: clamp(35px, 2.5vw, 50px) !important;
    height: clamp(35px, 2.5vw, 50px) !important;
    font-size: clamp(12px, 1vw, 16px) !important;
}

@media (max-width: 992px) {
    #book-list-page .tt-2-top-10-slider .swiper-slide { width: calc((100% - 10px) /7) !important; margin-right: 0px !important; }
    #book-list-page .tt-2-top-10-item { width: 100px; }
    #book-list-page .tt-2-top-10-item-img { width: 100px; height: 150px; }
    #book-list-page .tt-2-top-10-item .number { font-size: 1.35rem; }
    #book-list-page .tt-2-top-10-slider-nav button {
        width: 35px !important;
        height: 35px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 576px) {
    #book-list-page .tt-2-top-10-slider .swiper-slide { width: calc((100% - 10px) / 4) !important; margin-right: 0px !important; }
    #book-list-page .tt-2-top-10-item { width: 75px; }
    #book-list-page .tt-2-top-10-item-img { width: 75px; height: 115px; }
    #book-list-page .tt-2-top-10-item .number { font-size: 0.75rem; margin-bottom: -2px; }
    #book-list-page .tt-2-top-10-slider-nav button {
        width: 30px !important;
        height: 30px !important;
        font-size: 10px !important;
    }
}

/* Dark mode overrides */
body.dark-mode #book-list-page .tt-2-top-10-item { color: var(--white); }
body.dark-mode #book-list-page .tt-2-top-10-item-img { background: #1b1b1b; }


/* === RECENTLY ADDED & GENRE BOOKS LIST (4 books per screen) === */
#book-list-page .tt-2-web-series-slider {
    overflow: visible;
    width: 100%;
}

#book-list-page .tt-2-web-series-slider .swiper-slide {
    width: calc((100% - 60px) / 4) !important;
    min-width: 0 !important;
    margin-right: 20px;
    height: auto;
}

#book-list-page .tt-2-web-series-slider .swiper-wrapper {
    align-items: stretch;
}

#book-list-page .tt-2-web-series-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    background: var(--white);
    padding: 10px;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    color: var(--black);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

#book-list-page .tt-2-web-series-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

#book-list-page .tt-2-web-series-item-img {
    width: 40%;
    flex-shrink: 0;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

#book-list-page .tt-2-web-series-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* transition: transform 0.3s ease; */
}

#book-list-page .tt-2-web-series-item:hover .tt-2-web-series-item-img img {
    transform: scale(1.05);
}

#book-list-page .tt-2-web-series-item-txt {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    min-width: 0;
}

#book-list-page .tt-2-web-series-item-title {
    margin: 0;
    font-size: clamp(13px, 1.1vw, 16px) !important;
    font-weight: 600;
    line-height: 1.3;
}

#book-list-page .tt-2-web-series-item-title a {
    color: var(--black);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    font-size: clamp(13px, 1.1vw, 16px) !important;
}

#book-list-page .tt-2-web-series-item-title a:hover {
    color: #FF9046;
}

#book-list-page .book-author,
#book-list-page .book-publisher {
    color: var(--black);
    font-size: clamp(11px, 0.95vw, 13px) !important;
    margin: 0;
    opacity: 0.8;
    line-height: 1.2;
}

#book-list-page .book-author {
    font-style: italic;
}

#book-list-page .book-publisher {
    font-weight: 300;
}

#book-list-page .book-rating {
    color: #FF9046;
    font-size: clamp(11px, 0.95vw, 13px) !important;
    margin: 2px 0 4px 0;
    font-weight: 500;
}

#book-list-page .tt-2-web-series-item-btn {
    margin-top: auto;
    padding: 6px 12px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 6px;
    text-decoration: none;
    font-size: clamp(11px, 0.95vw, 13px) !important;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: fit-content;
}

#book-list-page .tt-2-web-series-item-btn i {
    font-size: clamp(10px, 0.85vw, 12px) !important;
}

#book-list-page .tt-2-web-series-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 144, 70, 0.4);
}

#book-list-page .tt-2-web-series-item-btn .txt {
    white-space: nowrap;
}

/* Tablet styles - 3 books per screen */
@media screen and (max-width: 1199px) {
    #book-list-page .tt-2-web-series-slider .swiper-slide {
        width: calc((100% - 40px) / 3) !important;
    }
    
    #book-list-page .tt-2-web-series-item {
        padding: 8px;
        gap: 8px;
    }
    
    #book-list-page .tt-2-web-series-item-img {
        width: 38%;
    }
}

/* Mobile styles - 4 books per screen, image only */
@media screen and (max-width: 767px) {
    #book-list-page .tt-2-web-series-slider .swiper-slide {
        width: calc((100% - 30px) / 4) !important;
        margin-right: 10px;
    }

    #book-list-page .tt-2-web-series-item {
        padding: 8px;
        gap: 0;
        cursor: pointer;
    }

    #book-list-page .tt-2-web-series-item-img {
        aspect-ratio: 2/3;
        width: 100%;
    }

    #book-list-page .tt-2-web-series-item-img a {
        display: block;
        width: 100%;
        height: 100%;
    }

    /* Hide text details on mobile */
    #book-list-page .tt-2-web-series-item-txt {
        display: none !important;
    }

    #book-list-page .tt-2-web-series-item-title,
    #book-list-page .book-author,
    #book-list-page .book-publisher,
    #book-list-page .book-rating,
    #book-list-page .tt-2-web-series-item-btn {
        display: none !important;
    }
}

/* Small mobile - still 4 books per screen */
@media screen and (max-width: 575px) {
    #book-list-page .tt-2-web-series-slider .swiper-slide {
        width: calc((100% - 30px) / 4) !important;
        margin-right: 10px;
    }
}

/* Dark mode overrides - ensure same font sizes as light mode */
body.dark-mode #book-list-page .tt-2-web-series-item {
    background: #1b1b1b;
    color: var(--white);
}

body.dark-mode #book-list-page .tt-2-web-series-item-img {
    background: #2a2a2a;
}

/* Force same font sizes in dark mode - override any base styles */
body.dark-mode #book-list-page .tt-2-web-series-item-title,
body.dark-mode #book-list-page .tt-2-web-series-item-title a {
    font-size: clamp(13px, 1.1vw, 16px) !important;
    color: var(--white) !important;
}

body.dark-mode #book-list-page .tt-2-web-series-item-title a:hover {
    color: #FF9046 !important;
}

body.dark-mode #book-list-page .book-author,
body.dark-mode #book-list-page .book-publisher {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: clamp(11px, 0.95vw, 13px) !important;
}

body.dark-mode #book-list-page .book-rating {
    color: #FF9046 !important;
    font-size: clamp(11px, 0.95vw, 13px) !important;
}

body.dark-mode #book-list-page .tt-2-web-series-item-btn {
    font-size: clamp(11px, 0.95vw, 13px) !important;
    padding: 6px 12px !important;
    color: var(--white) !important;
}

body.dark-mode #book-list-page .tt-2-web-series-item-btn i {
    font-size: clamp(10px, 0.85vw, 12px) !important;
}

body.dark-mode #book-list-page .tt-2-web-series-item:hover {
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

/* === SEARCH RESULTS GRID LAYOUT === */
/* Grid layout: 4 books per row on desktop, 4 books per row on mobile (image only) */
#book-list-page .tt-search-results-grid-container {
    width: 100%;
}

#book-list-page .tt-search-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    background: var(--white);
    padding: 10px;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    color: var(--black);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item-img {
    width: 40%;
    flex-shrink: 0;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item:hover .tt-2-web-series-item-img img {
    transform: scale(1.05);
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item-txt {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    min-width: 0;
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item-title {
    margin: 0;
    font-size: clamp(13px, 1.1vw, 16px) !important;
    font-weight: 600;
    line-height: 1.3;
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item-title a {
    color: var(--black);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
    font-size: clamp(13px, 1.1vw, 16px) !important;
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item-title a:hover {
    color: #FF9046;
}

#book-list-page .tt-search-results-grid .book-author,
#book-list-page .tt-search-results-grid .book-publisher {
    color: var(--black);
    font-size: clamp(11px, 0.95vw, 13px) !important;
    margin: 0;
    opacity: 0.8;
    line-height: 1.2;
}

#book-list-page .tt-search-results-grid .book-author {
    font-style: italic;
}

#book-list-page .tt-search-results-grid .book-publisher {
    font-weight: 300;
}

#book-list-page .tt-search-results-grid .book-rating {
    color: #FF9046;
    font-size: clamp(11px, 0.95vw, 13px) !important;
    margin: 2px 0 4px 0;
    font-weight: 500;
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item-btn {
    margin-top: auto;
    padding: 6px 12px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 6px;
    text-decoration: none;
    font-size: clamp(11px, 0.95vw, 13px) !important;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: fit-content;
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item-btn i {
    font-size: clamp(10px, 0.85vw, 12px) !important;
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 144, 70, 0.4);
}

#book-list-page .tt-search-results-grid .tt-2-web-series-item-btn .txt {
    white-space: nowrap;
}

/* Tablet styles - 3 books per row */
@media screen and (max-width: 1199px) {
    #book-list-page .tt-search-results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    #book-list-page .tt-search-results-grid .tt-2-web-series-item {
        padding: 8px;
        gap: 8px;
    }
    
    #book-list-page .tt-search-results-grid .tt-2-web-series-item-img {
        width: 38%;
    }
}

/* Mobile styles - 4 books per row, image only (no details) */
@media screen and (max-width: 767px) {
    #book-list-page .tt-search-results-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    #book-list-page .tt-search-results-grid .tt-2-web-series-item {
        padding: 0;
        gap: 0;
        cursor: pointer;
        flex-direction: column;
        align-items: stretch;
    }

    #book-list-page .tt-search-results-grid .tt-2-web-series-item-img {
        aspect-ratio: 2/3;
        width: 100%;
    }

    #book-list-page .tt-search-results-grid .tt-2-web-series-item-img a {
        display: block;
        width: 100%;
        height: 100%;
    }

    /* Hide text details on mobile */
    #book-list-page .tt-search-results-grid .tt-2-web-series-item-txt {
        display: none !important;
    }

    #book-list-page .tt-search-results-grid .tt-2-web-series-item-title,
    #book-list-page .tt-search-results-grid .book-author,
    #book-list-page .tt-search-results-grid .book-publisher,
    #book-list-page .tt-search-results-grid .book-rating,
    #book-list-page .tt-search-results-grid .tt-2-web-series-item-btn {
        display: none !important;
    }
}

/* Small mobile - still 4 books per row */
@media screen and (max-width: 575px) {
    #book-list-page .tt-search-results-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
}

/* Dark mode overrides for search results */
body.dark-mode #book-list-page .tt-search-results-grid .tt-2-web-series-item {
    background: #1b1b1b;
    color: var(--white);
}

body.dark-mode #book-list-page .tt-search-results-grid .tt-2-web-series-item-img {
    background: #2a2a2a;
}

body.dark-mode #book-list-page .tt-search-results-grid .tt-2-web-series-item-title,
body.dark-mode #book-list-page .tt-search-results-grid .tt-2-web-series-item-title a {
    font-size: clamp(13px, 1.1vw, 16px) !important;
    color: var(--white) !important;
}

body.dark-mode #book-list-page .tt-search-results-grid .tt-2-web-series-item-title a:hover {
    color: #FF9046 !important;
}

body.dark-mode #book-list-page .tt-search-results-grid .book-author,
body.dark-mode #book-list-page .tt-search-results-grid .book-publisher {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: clamp(11px, 0.95vw, 13px) !important;
}

body.dark-mode #book-list-page .tt-search-results-grid .book-rating {
    color: #FF9046 !important;
    font-size: clamp(11px, 0.95vw, 13px) !important;
}

body.dark-mode #book-list-page .tt-search-results-grid .tt-2-web-series-item-btn {
    font-size: clamp(11px, 0.95vw, 13px) !important;
    padding: 6px 12px !important;
    color: var(--white) !important;
}

body.dark-mode #book-list-page .tt-search-results-grid .tt-2-web-series-item-btn i {
    font-size: clamp(10px, 0.85vw, 12px) !important;
}

body.dark-mode #book-list-page .tt-search-results-grid .tt-2-web-series-item:hover {
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

@media (max-width: 767px) {
    #book-list-page .filter-btn {
        width: 60px;
        height: 20px;
        padding: 5px 12px;
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    #book-list-page .tt-categories {
        gap: 8px !important;
        padding-bottom: 8px !important;
        padding-right: 15px !important;
        min-width: fit-content !important;
        height: 40px !important;
        border: solid rgba(0, 0, 0, 0.2) !important;
        border-width: 1px 0 1px 0 !important;
        padding-top: 8px !important;
    }
    #book-list-page .filter-btn {
        width: auto !important;
        height: auto !important;
        padding: 4px 10px !important;
        font-size: 8px !important;
        white-space: nowrap !important;
        line-height: 1;
    }
}

/* === VIEW ALL BUTTON - Responsive === */
#book-list-page .tt-section-heading__btn {
    padding: clamp(6px, 0.7vw, 10px) clamp(14px, 1.5vw, 20px);
    font-size: clamp(11px, 0.85vw, 14px);
    white-space: nowrap;
    border-radius: 20px;
    transition: all 0.3s ease;
}

@media (max-width: 992px) {
    #book-list-page .tt-section-heading__btn {
        width: 65px;
        height: 22px;
        padding: 6px 14px;
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    #book-list-page .tt-section-heading__btn {
        width: 60px;
        height: 20px;
        padding: 5px 12px;
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    #book-list-page .tt-section-heading__btn {
        width: 56px;
        height: 18px;
        padding: 4px 10px;
        font-size: 8px;
    }
}