/* ===============================
   BOOK SLIDER SECTION STYLES
   =============================== */

.bestsellers-section {
    width: 100%;
    background: #fff;
    padding: 40px 0;
    box-sizing: border-box;
}

.bestsellers-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.slider-loader {
    width: 100%;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;        /* center horizontally */
    justify-content: center;    /* center vertically */
    text-align: center;         /* center text inside */
    padding: 30px 40px;
    box-sizing: border-box;
    border-radius: 8px;
}

.loader-text {
    display: flex;
    flex-direction: column;
    align-items: center;        /* center text block horizontally */
    justify-content: center;    /* center vertically */
    margin-right: 100px;
}

/* Title */
.loader-text h1 {
    font-size: 2.2rem;
    color: #1a1a1a;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 800;
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-transform: none;
    text-align: center;
}

/* Subtitle / Description */
.loader-text p {
    font-size: 1.3rem;
    color: #666;
    margin: 0;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    text-align: center;
}


/* ---------- Section Header ---------- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.section-header p {
    font-size: 1rem;
    color: #555;
    margin: 0 10px;
    flex: 1;
}

.section-header .see-all-link {
    color: #1e3a8a;
    font-weight: 600;
    text-decoration: none;
}

.section-header .see-all-link:hover {
    text-decoration: underline;
}

/* ---------- Book Card Layout ---------- */
.books-flex {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bestseller-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    padding: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0 100px 0 0 !important;
}

.bestseller-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.book-link {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* ---------- Book Image ---------- */
.book-image {
    flex: 0 0 120px;
    height: 160px;
    background: #f5f5f5;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* --- Wishlist Heart Styling (Same as previous page) --- */
.bestseller-card .wishlist-heart {
    position: relative; /* stays within the normal flow above image */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    margin: 0 0 8px auto; /* push to right side */
    background-color: #ffffff; /* white circle background */
    border: 2px solid #838080; /* gray outline */
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

/* Heart icon */
.bestseller-card .wishlist-heart i {
    color: #ccc5c5;
    font-size: 16px;
    transition: color 0.3s ease;
}

/* Active (book added to wishlist) */
.bestseller-card .wishlist-heart.active {
    background-color: #fff; /* red circle when active */
    border-color: #ff4d4d;
}

.bestseller-card .wishlist-heart.active i {
    color: #ff4d4d; /* white heart inside red circle */
}

/* Hover effect */
.bestseller-card .wishlist-heart:hover {
    transform: scale(1.1);
    border-color: #ff4d4d;
}

.bestseller-card .wishlist-heart:hover i {
    color: #ff4d4d;
}
/* --- Wishlist Tooltip --- */
.wishlist-tooltip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #333;
    padding: 6px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    border-left: 4px solid #28a745; /* green for success */
    white-space: nowrap;
    opacity: 0;
    transform: translateY(5px);
    animation: tooltipFade 0.3s forwards;
}

/* Error (removed or failed) */
.wishlist-tooltip.error {
    border-left-color: #ff4d4d; /* red on left border */
}

.wishlist-tooltip i {
    color: #28a745;
}

.wishlist-tooltip.error i {
    color: #ff4d4d;
}

/* ✨ Arrow (attached to tooltip, pointing upward to the heart) */
.wishlist-tooltip .wishlist-tooltip-arrow {
    position: absolute;
    bottom: 100%; /* attach arrow above tooltip */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
}

/* Animation */
@keyframes tooltipFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Book Details ---------- */
.book-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-details h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}
.author {
    font-size: 14px;
    margin: 4px 0;
}

.author .by-text {
    color: #000; /* black */
    font-weight: 500;
}

.author .author-name {
    color: #059669; /* green shade (you can change this) */
    font-weight: 600;
    margin-left: 4px; /* small gap between "By" and name */
}

.book-details .edition,
.book-details .isbn {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

.book-details .price-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 6px;
}

.book-details .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.free-price {
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    padding: 8px 16px;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);
    position: relative;
    overflow: hidden;
    animation: pulse 2s infinite;
}

.free-price::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}



/* Bestsellers FREE tag: compact green outline pill */
.bestsellers-section .free-price {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0b7a3e;
    background: rgba(11, 122, 62, 0.08);
    border: 1px solid rgba(11, 122, 62, 0.35);
    padding: 3px 8px 1px 8px;
    border-radius: 999px;
    letter-spacing: .4px;
    box-shadow: none;
    animation: none;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------- Empty State ---------- */
.bestsellers-empty-wrap {
    text-align: center;
    padding: 60px 0;
}

.slider-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
}

.slider-empty-state .empty-icon {
    font-size: 3rem;
    color: #aaa;
    margin-bottom: 10px;
}

/* Pagination Container */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 40px 0;
}

/* Page Number List */
.pagination ul.page-numbers {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
}

/* Each Page Item */
.pagination ul.page-numbers li {
    display: inline-block;
}

/* Links & Dots */
.pagination a.page-link,
.pagination span.dots {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Hover Effect */
.pagination a.page-link:hover {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

/* Active Page */
.pagination a.page-link.active {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
    font-weight: 600;
}

/* Dots (...) between pages */
.pagination span.dots {
    color: #999;
    border: none;
    background: transparent;
    padding: 8px 10px;
}
.pagination-summary-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* keeps it responsive */
    margin: 0 100px 0 0 !important;
}

.record-summary {
    font-size: 16px;
    color: #333;
}
.record-summary2 {
    font-size: 16px;
    color: #333;
    margin-top: 50px !important;
}

.pagination-wrap {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}


.count-green {
    color: #16a34a; /* modern green (tailwind's green-600) */
    font-weight: 700;
}

.count-blue {
    color: #555; /* theme blue */
    font-weight: 700;
    font-size: 18px;
}

.header-offset {
    margin-top: 40px !important;
}
.title-separator {
    width: calc(100% - 100px); /* full width minus right margin */
    height: 3px;
    background-color: #ccc;
    border: none;
    margin: 30px 100px 0 0; /* top right bottom left: top 30px, right 0, bottom 0, left 0 */
    border-radius: 2px;
}

/* Wrapper layout */
.content-wrapper {
    display: flex;
    align-items: flex-start;
}

/* Sidebar styling */
.sidebar {
    width: 150px;
    position: sticky;
    top: 50px;
    background: #fff;
    padding: 15px;
    border-radius: 5px;
    height: fit-content;
    margin: 70px 20px 0 0 !important;
}
.sidebar h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.sidebar a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: #333;
}

.sidebar a:hover {
    color: #007bff;
}

/* Main content */
.main-content {
    flex: 1;
}
/* Vertical Divider */
.vertical-divider {
    width: 3px;               /* thickness of the line */
    background: #ccc;          /* color of the line */
    margin: 70px 20px 30px 20px;            /* space around */
    align-self: stretch;
}
.sidebar-heading {
    background-color: #fff;
    padding: 12px 0 12px 0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    margin: 0;
    display: flex;
    justify-content: flex-start;
}
.dropdown-icon {
    display: none; /* hide by default (desktop) */
}

@media (max-width: 510px) {
    .header-offset {
        margin-top: 60px !important;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .record-summary {
        margin-left: 0 !important;
    }
    .bestseller-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: start;
        margin: 0 0 0 0 !important;
    }

    .book-image {
        width: 100%;
        height: 180px;
    }

    .book-details {
        align-items: flex-start;
    }
    .loader-text {
        margin-right: 0;
    }
    .title-separator {
        width: 100%;
        margin: 30px 0 0 0 !important;
    }
    .content-wrapper {
        flex-direction: column; /* stack vertically */
    }

    .sidebar {
        position: static !important;
        width: -webkit-fill-available;
        margin: 10px 0 !important;
        background: #fff;
        border-radius: 5px;
    }
    .sidebar-heading {
        justify-content: space-between;
        border: 1px solid #ccc;
        font-size: 16px !important;
        padding: 12px 15px !important;
        margin: 0 10px;
    }

    .dropdown-icon {
        display: inline; /* show only on mobile */
        font-size: 18px;
        color: #333;
        margin-left: auto; /* push icon to far right */
    }
    .sidebar-heading::after {
        content: '';
        float: right;
    }

    .sidebar-links {
        display: none; /* hidden by default */
        flex-direction: column;
        padding: 10px 15px;
    }

    .sidebar-links a {
        display: block;
        padding: 8px 0;
        color: #333;
        text-decoration: none;
        border-bottom: 1px solid #eee;
    }

    .sidebar-links a:last-child {
        border-bottom: none;
    }

    .sidebar-links.show {
        display: flex; /* show when toggled */
    }

    .vertical-divider {
        display: none;
    }

    .main-content {
        width: 100%;
    }
    .pagination-summary-wrapper {
        margin: 0 0 0 0 !important;
    }

}