:root {
    --primary: #c32148;
    --primary-light: #e5546d;
    --text-dark: #333333;
    --text-light: #777777;
    --bg-light: #f8f8f8;
    --white: #ffffff;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.text-rook-primary{
    color: var(--primary);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif; /* Changed font to Inter */
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    /* Adjust padding-bottom based on bottom-nav visibility */
    padding-bottom: 0; /* Default for desktop */
}

.btn-primary{
    background-color: var(--primary);
    border: none;
}

.btn-primary:hover{
    background-color: var(--white);
    color:var(--primary);
    border: none;
}

.border-primary {
border-color:var(--primary) !important;
}
.text-primary{
    color: var(--primary) !important;
}
.bg-primary{
    background-color: var(--primary)!important;
}

/* Custom styles to override or complement Bootstrap */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    /* position: sticky; */
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    text-align: center;
    gap: 1px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}
.logo img{
    max-height: 90px !important;
    padding: 1rem 0 0 3rem;
}
.logo i {
    font-size: 1.8rem;
}

/* Top Navigation (Desktop) */
.top-nav .nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

.top-nav .nav-link i{
    font-size: 0.6rem;
}

.top-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease-out;
}

.top-nav .nav-link:hover::after,
.top-nav .nav-link.active::after {
    width: 100%;
}

.top-nav .nav-link.active {
    color: var(--primary);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all {
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
}

/* Quote Carousel */
.quote-carousel {
    position: relative;
    margin: 1.5rem 0;
    overflow: hidden;
}

.quotes-container {
    display: flex;
    scroll-behavior: smooth;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    padding: 1rem 1.5rem;
    gap: 1rem;
}

.quotes-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.quote-card {
    width: 100%; /* Full width */
    min-width: 280px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    flex-shrink: 0;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    border-left: 4px solid var(--primary);
    border-right: 4px solid var(--primary); /* Added right border */
}

.quote-text {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.quote-author {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Events Carousel */
.events-carousel {
    position: relative;
    margin: 1.5rem 0;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    scroll-behavior: smooth;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    padding: 1rem 1.5rem;
    gap: 1rem;
}

.carousel-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.event-card {
    max-width: 300px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    flex-shrink: 0;
    margin: 0 auto;
}

.event-image {
    height: 140px;
    background-position: center;
    background-size: cover;
}

.event-details {
    padding: 1rem;
}

.event-date {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.event-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Search Bar */
.search-container {
    margin: 1.5rem;
}

.search-bar {
    display: flex;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-btn {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 0 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Book Cards */
/* Removed .books-grid display: grid; as Bootstrap rows/cols will handle layout */
.books-grid { /* Retained for padding and margin-bottom */
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.book-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 1.5rem; /* Add margin for spacing between cards in grid */
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.book-cover {
    height: 180px;
    background-position: center;
    background-size: cover;
    position: relative;
}

.book-genre {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: rgba(195, 33, 72, 0.9);
    color: var(--white);
    padding: 5px 10px;
    font-size: 0.8rem;
    border-top-right-radius: 8px;
}

.book-details {
    padding: 1rem;
}

.book-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.1rem;
}
.book-title a {
    color: var(--text-dark);
}
.book-author {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.owner-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.owner-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 8px;
    background-position: center;
    background-size: cover;
}

.owner-name {
    font-size: 0.9rem;
    flex: 1;
}

.owner-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.85rem;
}

.owner-rating i {
    color: gold;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
}

.book-distance i {
    margin-right: 3px;
}

.book-price {
    color: var(--primary);
    font-weight: 600;
}

/* Book Clubs */
.bookclub-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem; /* Add margin for spacing between cards in grid */
}

.bookclub-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background-position: center;
    background-size: cover;
    flex-shrink: 0;
    /* Removed margin auto from here to keep desktop alignment left-aligned */
}

.bookclub-info {
    flex: 1;
}

.bookclub-name {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.bookclub-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.bookclub-members {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.join-btn {
    background-color: var(--primary-light);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background-color 0.3s;
}

.join-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary);
}

/* Quote indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-light);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: var(--primary);
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    /* padding: 12px 0 8px; */
    z-index: 99;
    right: 0;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.bottom-nav .nav-item {
    text-decoration: none;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1; /* Gives each item equal width */
    font-size: 0.75rem;
}

.bottom-nav .nav-item i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.bottom-nav .nav-item.active {
    color: #c32148; /* Your primary color */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8rem;
    transition: color 0.3s;
    width: 25%;
    text-align: center;
}

.nav-item i {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary);
}

/* Update the container for the icon and badge */
.cart-icon-btn {
    display: flex;
    align-items: center; 
    gap: 0.5rem; 
}
.cart-icon-btn i{
    color: var(--text-dark);
  font-size: 0.9rem;
}

/* Update the badge styling to remove absolute positioning */
.cartbadge {
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Media Queries for Responsiveness */
@media (min-width: 769px) {
    body {
        padding-bottom: 0; /* Remove bottom padding for desktop */
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 80px; /* Add bottom padding for mobile */
        overflow-x: hidden;
    }
    .header {
        padding: 1rem;
        position: relative;
    }
    
    .section-title {
        margin: 1.5rem 1rem 1rem;
        font-size: 1.3rem;
    }
    
    .search-container, .books-grid {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .carousel-container, .quotes-container {
        padding: 1rem 1rem;
    }
    
    .event-card, .quote-card {
        min-width: 240px;
    }
    
    /* Adjusted for Bootstrap columns */
    .books-grid .col-6, .books-grid .col-md-3 {
        padding-left: 0.75rem; /* Half of Bootstrap's default gutter */
        padding-right: 0.75rem; /* Half of Bootstrap's default gutter */
    }
    
    .book-cover {
        height: 160px;
    }
    
    .book-details {
        padding: 0.8rem;
    }
    
    .book-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .bookclub-card {
        flex-direction: column;
        align-items: center; /* Centers items horizontally in column */
        text-align: center;
    }
    
    .bookclub-logo {
        width: 100px; /* Adjusted size for mobile centering */
        height: 100px;
        margin: 0 auto 10px auto; /* Perfectly centered logo */
    }
    
    .bookclub-info {
        width: 100%;
    }

    .join-btn {
        width: 100%;
        margin-top: 10px;
    }
    
    .quote-card {
        height: auto;
        min-height: 160px;
    }
    
    .nav-item {
        font-size: 0.7rem;
    }
}
.book-availability-type{
    position: absolute;
  background-color: var(--primary);
  color: var(--white);
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: 8px;
  text-transform: capitalize;
}

.btn-outline-primary {
	--bs-btn-color:var(--primary);
	--bs-btn-border-color: var(--primary);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: var(--primary);
	--bs-btn-hover-border-color: var(--primary);
	--bs-btn-focus-shadow-rgb: 13,110,253;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: var(--primary);
	--bs-btn-active-border-color: var(--primary);
	--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
	--bs-btn-disabled-color: var(--primary);
	--bs-btn-disabled-bg: transparent;
	--bs-btn-disabled-border-color: var(--primary);
	--bs-gradient: none;
}