/* ------------- CSS Custom Properties ------------- */
:root {
    /* Colors */
    --color-primary: #2D4E2F;
    --color-primary-dark: #1f3621;
    --color-secondary: #D2A751;
    --color-secondary-dark: #b88f44;
    --color-navy: #01172F;
    --color-bg-light: #D8E9D9;
    --color-bg-dark: #676767;
    --color-bg-page: #f5f1ed;
    --color-text: #000000;
    --color-text-muted: #666;
    --color-white: #ffffff;
    --color-danger: #d32f2f;
    --color-danger-dark: #b71c1c;

    /* Fonts */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Atkinson Hyperlegible', sans-serif;

    /* Font Sizes */
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-xs: 12px;
    --font-size-h1: 36px;
    --font-size-h2: 32px;
    --font-size-h3: 24px;
    --font-size-h4: 20px;

    /* Line Heights */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;

    /* Common Values */
    --border-radius-sm: 2px;
    --border-radius-md: 8px;
    --border-radius-lg: 10px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition-ease: 0.2s ease;
}

/* ------------- Global Styles ------------- */
/* Base typography - inherited by all elements */
main {
    background-color: var(--color-bg-page);
    padding: 48px 0; /* Top and Bottom Padding */
    min-height: 100vh; /* Ensure main takes full viewport height */
    }

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: var(--line-height-tight);
    color: var(--color-text)
}

h1 {
    font-weight: bold;
    font-size: var(--font-size-h1);
}

h2 {
    font-weight: bold;
    font-size: var(--font-size-h2);
}

h3 {
    font-weight: bold;
    font-size: var(--font-size-h3);
}

h4 {
    font-weight: normal;
    font-size: var(--font-size-h4);
}

p {
    margin: 16px 0 40px 0; /* Top, Right, Bottom, Left Margin */
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ------------- Navigation Bar ------------- */
header {
    background-color: var(--color-bg-light);
    width: 100%;
    height: 180px;
}


/* Top row of the header - logo, search, and icons */
.headerTop {
    background-color: var(--color-bg-light);
    height: 123px;
    display: flex;
    align-items: center;
    padding: 0 48px; /* Left and Right Padding */
    position: relative;
}

/* Logo styling */
.logo {
    height: 19em;
    width: 19em;
    position: absolute;
    left: 0;
    top: -75px;
}

/* Search bar container */
.searchBar {
    position: absolute; /* Relative to headerTop */
    left: 283px;
    top: 34px;
    width: 403px;
    height: 68px;
    background-color: var(--color-white);
    border: 1px solid var(--color-text);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    padding: 0 16px; /* Left and Right Padding */
    gap: 10px;
}

.searchBar input {
    border: none;
    outline: none;
    flex: 1;
    background: transparent;
    z-index: 2;
}

.searchBar input::placeholder {
    color: var(--color-text);
}

/* Button style - shared by multiple buttons */
.searchBar button,
.shoppingAccountActions button,
.carouselArrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.searchBar button {
    z-index: 2;
}

.searchBar button i {
    font-size: 1.5em;
    color: var(--color-text);
}

/* Search dropdown */
.searchDropdown {
    display: none;
    position: absolute; /* Relative to headerTop */
    top: 70px;
    left: 10px;
    width: 403px;
    max-height: 300px;
    overflow-y: auto; /* Hides scrollbar if not needed */
    background-color: var(--color-white);
    border: 1px solid var(--color-text);
    border-top: none;
    box-shadow: var(--box-shadow);
    z-index: 3; /* Ensure it appears above other elements in the header */
}

.searchDropdown.show {
    display: block;
}

.searchDropdownItem {
    padding: 12px 16px; /* Top and Bottom | Left and Right */
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color var(--transition-ease);
}

.searchDropdownItem:hover {
    background-color: #f5f5f5;
}

/* Remove border from last item */
.searchDropdownItem:last-child {
    border-bottom: none;
}

.searchDropdownItem .bookTitleResult {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.searchDropdownItem .bookAuthorResult {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.noResults {
    padding: 12px 16px; /* Top and Bottom | Left and Right */
    color: var(--color-text-muted);
    text-align: center;
}

/* Shopping and account icons */
.shoppingAccountActions {
    position: absolute; /* Relative to headerTop */
    right: 48px;
    top: 37px;
    display: flex;
    gap: 13px;
}

.shoppingAccountActions button {
    position: relative;
}

.shoppingAccountActions button i {
    font-size: 2.5em;
    color: var(--color-text);
}

/* Mobile Menu Toggle Button - Hidden on desktop */
.mobileMenuToggle {
    display: none;
    position: absolute;
    right: 20px;
    top: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.mobileMenuToggle i {
    font-size: 1.5em;
    color: var(--color-text);
}

@media screen and (max-width: 478px) {
    /* Reduce header height on mobile since navBar is hidden */
    header {
        height: 100px;
    }

    .headerTop {
        height: 100px;
    }

    .logo {
        height: 12em;
        width: 12em;
        top: -45px;
        left: 10px;
    }

    .shoppingAccountActions {
        right: 50px;
        top: 50%;
        transform: translateY(-50%);
        gap: 8px;
    }

    .shoppingAccountActions button i {
        font-size: 1.5em;
    }

    /* Show mobile menu toggle button on mobile */
    .mobileMenuToggle {
        display: flex;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Cart Badge */
.cartBadge {
    position: absolute; /* Relative to shoppingAccountActions button */
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the badge */
    background-color: var(--color-danger);
    color: var(--color-white);
    font-size: var(--font-size-xs);
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Navigation bar - bottom row */
.navBar {
    background-color: var(--color-bg-light);
    height: 57px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navMenu {
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 41px;
    display: flex; /* Horizontal layout */
    align-items: center; /* Vertically center items */
}

.navMenu li {
    margin: 0;
}

.navLink {
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 3px;
}

.navLink:hover {
    text-decoration: underline;
}

.navLink i {
    font-size: 24px;
}

/* Mobile Navigation Menu - Hidden on desktop */
.mobileNav {
    display: none;
}

/* Show and style mobile nav on mobile devices */
@media screen and (max-width: 478px) {
    .mobileNav {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: var(--color-bg-light);
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        padding-top: 60px;
    }

    .mobileNav.active {
        right: 0;
    }

    .mobileNavMenu {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobileNavMenu li {
        border-bottom: 1px solid #ddd;
    }

    .mobileNavLink {
        display: block;
        padding: 16px 20px;
        color: var(--color-text);
        text-decoration: none;
        transition: background-color var(--transition-ease);
    }
}

/* ------------- End of Navigation Bar ------------- */

/* ------------- Dropdown Menu ------------- */
.dropdown {
    position: relative;
}

.dropdownContent {
    display: none;
    position: absolute;
    left: -50%;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    flex-direction: column;
}

.dropdownContent a {
    color: var(--color-text);
    padding: 12px 16px; /* Top and Bottom | Left and Right */
    text-decoration: none;
    display: block;
}

.dropdownContent a:hover {
    background-color: #f1f1f1;
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdownContent {
    display: block;
}

/* ------------- End of Dropdown Menu ------------- */

/* ------------- Main Content Styles ------------- */
.birdOnlyLogo {
    max-width: 200px;
    height: auto;
}

.mainContentHeadings {
    color: var(--color-primary);
    text-align: center;
}

.eventCard{
    display: flex;
    flex-direction: column; /* text and image stacked */
    align-items: center;
    gap: 5px;
    text-align: center;
}

.eventCard img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow);
}

.eventText {
    color: var(--color-primary);
    margin: 0;
    width: 175px;
}

.upcomingEventsContainer{
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 2em;
    margin-bottom: 25px;
    justify-items: center; /* Center items horizontally */
}

.carouselWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Carousel Grid to hold arrows and book cards */
.carouselGrid {
    display: grid;
    /* Column 1: Left Arrow (auto width)
       Column 2: Book Cards (flexible width)
       Column 3: Right Arrow (auto width) */
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
}

.bookCardsContainer {
    grid-column: 2; /* Place in the second column of the grid */
    display: flex;
    align-items: center;
    gap: 2em;
    margin-bottom: 1em;
    width: 100%;
}
/* Ensure book cards are displayed in a row with spacing */
.carouselArrow:first-child {
    grid-column: 1; /* Place in the first column of the grid */
}
.carouselArrow:last-child {
    grid-column: 3; /* Place in the third column of the grid */
}
/* Footer of the carousel for dots and view products link */
.carouselFooter {
    grid-column: 2; /* Span across the book cards */
    width: 100%;
    /* Use flexbox to space out dots and link */
    display: flex;
    justify-content: flex-end; /* Align link to the right */
    align-items: center;
    position: relative;
    margin: 16px 0 0 0; /* Top, Right, Bottom, Left Margin */
}

.bookCard {
    background: var(--color-primary);
    border-radius: var(--border-radius-md);
    text-align: center;
    flex-shrink: 0;
    width: 130px;
    height: 255px;
    padding: 1em 0.5em;
}
/* If not datasection 1 then don't show at first (for main carousels) */
.bookCard[data-section]:not([data-section="1"]) {
    display: none;
}

/* For smaller carousels, hide all books initially - JS will show the correct ones */
.smallerCarousel .bookCard[data-section] {
    display: none;
}

.bookImageContainer {
    margin: 0 auto 4px auto; /* Top, Right, Bottom, Left Margin */
    overflow: hidden;
    border-radius: 4px;
    background: var(--color-white);
    width: 120px;
    height: 160px;
}

.bookImageContainer img {
    width: 100px;
    height: 150px;
    object-fit: cover;
    margin: 4px 0; /* Top and Bottom Margin */
}

.bookInfo {
    color: var(--color-white);
    margin: 0 0 8px 0; /* Top, Right, Bottom, Left Margin */
    text-align: left;
}

/* First bookInfo is title, second is author */
.bookCard .bookInfo:first-of-type {
    font-weight: 700;
    font-size: var(--font-size-base);
}

.bookCard .bookInfo:last-of-type {
    font-size: var(--font-size-sm);
}

/* Need to add desktop: hidden and mobile: hidden utility classes for header */

/* Mobile (Small) - 2 books per section - 2x2 Grid for upcoming events */
@media screen and (max-width: 478px) {
    /* Hide items on mobile */
    .mobileHidden {
        display: none;
    }

    .bookCard {
        width: 90px;
        height: 200px;
        padding: 0.5em 0.3em;
    }

    .bookImageContainer {
        width: 80px;
        height: 120px;
    }

    .bookImageContainer img {
        width: 70px;
        height: 115px;
    }

    .bookCardsContainer {
        gap: 1em;
    }
    /* Adjust font sizes for smaller cards on mobile */
    .bookCard .bookInfo:first-of-type {
        font-size: 11px;
    }

    .bookCard .bookInfo:last-of-type {
        font-size: 11px;
    }

    .upcomingEventsContainer{
        grid-template-columns: repeat(1, 1fr); /* 1 column */
        gap: 1em;
    }

    .carouselArrow {
        width: 44px;
        height: 44px;
    }

    .eventCard img {
        width: 120px;
        height: 120px;
    }

    .eventText {
        font-size: var(--font-size-base);
    }

    .carouselFooter {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 8px 0; /* Top, Right, Bottom, Left Margin */
    }

    .carouselDots {
        position: static; /* Remove absolute positioning */
        transform: none; /* Remove translation */
        margin-bottom: 0; /* Remove bottom margin */
    }

    .viewProductsLink {
        margin-top: 24px;
        width: 100%;
        text-align: center;
    }
}

.carouselDots{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.carouselDot{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-bg-dark);
    cursor: pointer;
}
.carouselDot.active{
    background-color: var(--color-primary);
}


.viewProductsLink a {
    color: var(--color-primary);
    text-decoration: none;
}

.viewProductsLink a:hover {
    text-decoration: underline;
}

.viewProductsLink a:visited {
    color: var(--color-primary);
}

/* ------------- Newsletter Signup Section ------------- */
.newsletterFormContainer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.newsletterInputWrapper {
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: flex-start;
}

.newsletterInputWrapper input {
    width: 183px;
    height: 23px;
    padding: 8px 12px;
    border: 1px solid var(--color-primary);
    background-color: var(--color-white);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    outline: none;
}

.newsletterInputWrapper input::placeholder {
    color: var(--color-text-muted);
}

.newsletterInputWrapper input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(45, 78, 47, 0.1);
}

.visuallyHidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden; /* Hide the element visually */
    clip: rect(0, 0, 0, 0); /* Clip the element to hide it */
    white-space: nowrap; /* Prevents the text from wrapping */
    border: 0;
}


/* ------------- End of Main Content Styles ------------- */

/* ------------- Button Styles ------------- */
.newsletterButton,
.externalPageButton,
.addToCartButton {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-ease);
}

.newsletterButton {
    padding: 8px 16px;
    border-radius: 20px;
    height: 40px;
}

.newsletterButton:hover,
.quantityButton:hover,
.addToCartButton:hover {
    background-color: var(--color-primary-dark);
}

.mapHoursButton,
.externalPageButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-secondary);
    color: var(--color-navy);
    padding: 3px 8px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    border: none;
    cursor: pointer;
    gap: 10px;
}

.mapHoursButton:hover,
.externalPageButton:hover {
    background-color: var(--color-secondary-dark);
}

.mapHoursButton {
    width: fit-content;
    gap: 3px;
}

.mapHoursButton i {
    font-size: 24px;
    background-color: var(--color-navy);
    color: var(--color-white);
    margin-right: -5px;
    width: 24px;
    height: 24px;
}

.externalPageButton {
    width: 100%;
    min-height: 40px;
    margin: 16px;
    text-align: center;
}

/* Mobile override for externalPageButton */
@media screen and (max-width: 478px) {
    .externalPageButton {
        margin: 16px 0;
        max-width: 120px;
    }
}

/* ------------- FAQ Styles ------------- */
.faqButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 5px;
    background-color: var(--color-bg-dark);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
    border: none;
    cursor: pointer;
    margin: 0 6.5px 32px 6.5px; /* Top, Right, Bottom, Left Margin */
    border-radius: var(--border-radius-lg);
    gap: 10px;
    height: 50px;
    width: 120px;
    text-align: center;
    box-sizing: border-box;
}

.faqButton:hover {
    background-color: #555555;
}

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

.faqButton.active:hover {
    background-color: var(--color-primary-dark);
}

.faqQuestionButton {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 16px 0;
    transition: opacity var(--transition-ease);
}

.faqQuestionButton h2 {
    display: flex;
    align-items: center;
    margin: 0;
    gap: 13px;
    color: var(--color-text);
    transition: color var(--transition-ease);
}
.faqQuestionButton:hover h2 {
    color: var(--color-primary);
}

.faqQuestionButton .iconoir-arrow-down {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.faqQuestionButton.active .iconoir-arrow-down {
    transform: rotate(180deg);
}

.faqAnswer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faqAnswer.active {
    max-height: 500px;
    padding: 0 0 16px 0;
    opacity: 1;
}

.faqAnswer p {
    margin: 8px 0 0 0; /* Top, Right, Bottom, Left Margin */
}

.borderSeparator {
    border-bottom: 1px solid #e0e0e0;
}

.contactUsBox {
    background-color: #d9d9d9;
    height: 247px;
    margin: 105px 132px 101px 132px; /* Top, Right, Bottom, Left Margin */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 65px;
    padding: 0 111px; /* Left and Right Padding */
    box-sizing: border-box;
}

.contactUsBox .externalPageButton {
    max-width: 150px;
}

@media screen and (max-width: 478px) {
    .contactUsBox {
        flex-direction: column;
        height: auto;
        margin: 50px 20px; /* Top and Bottom | Left and Right Margin */
        padding: 40px 20px; /* Top and Bottom | Left and Right Padding */
        gap: 30px;
    }

}

/* ------------- Staff Picks Styles ------------- */

.staffPicksContainer {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 0 3em;
    margin-bottom: 3.75em;
}

.staffPicksBox {
    display: flex;
    flex-wrap: wrap; /* Allow carousel to wrap to new row */
    border-radius: var(--border-radius-md);
    background-color: var(--color-bg-light);
    box-shadow: var(--box-shadow);
}

.staffPicksBox img {
    margin: 2em 0 2em 5em; /* Top, Right, Bottom, Left Margin */
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

/* Override img margin for book info inside carousel */
.staffPicksBox .smallerCarousel img {
    margin: 2px auto; /* Top and Bottom | Left and Right Margin */
}

.staffPicksBox h3
{
    margin: 2em 5em 0 10em;
}

.staffPicksBox p {
    margin: 1em 5em 2em 10em;
}

/* Override paragraph margin for book info inside carousel */
.staffPicksBox .smallerCarousel .bookInfo {
    margin: 0 0 4px 0;
}

.staffPicksContainer .row:nth-child(even) .staffPicksBox {
    background-color: var(--color-primary);
}

.staffPicksContainer .row:nth-child(even) .staffPicksBox h3,
.staffPicksContainer .row:nth-child(even) .staffPicksBox p {
    color: var(--color-white);
}

/* Smaller carousel for staff picks - 80% of original size */
.smallerCarousel {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1em 8em;
    flex-basis: 100%; /* Take full width to appear on new row */
}

.smallerCarousel .bookCard {
    width: 140px;   /* Increased width for better readability of author names */
    height: 204px;  /* 255px * 0.8 */
    padding: 0.8em 0.4em;
}

.smallerCarousel .bookImageContainer {
    width: 96px;    /* 120px * 0.8 */
    height: 128px;  /* 160px * 0.8 */
}

.smallerCarousel .bookImageContainer img {
    width: 80px;    /* 100px * 0.8 */
    height: 120px;  /* 150px * 0.8 */
}

.smallerCarousel .bookCardsContainer {
    gap: 1.5em;
}

.smallerCarousel .bookCard .bookInfo {
    margin: 0 0 4px 0;
    text-align: left;
}

.smallerCarousel .bookCard .bookInfo:first-of-type {
    font-size: 13px;
}

.smallerCarousel .bookCard .bookInfo:last-of-type {
    font-size: 11px;
}

.smallerCarousel .carouselArrow i {
    font-size: 1.8em;
}

/* Even row (green background) carousel overrides */
.staffPicksContainer .row:nth-child(even) .smallerCarousel .bookCard {
    background-color: var(--color-bg-light);
}

.staffPicksContainer .row:nth-child(even) .smallerCarousel .bookCard .bookInfo {
    color: var(--color-text);
}

.staffPicksContainer .row:nth-child(even) .smallerCarousel .carouselArrow i {
    color: var(--color-white);
}

.staffPicksContainer .row:nth-child(even) .smallerCarousel .carouselDot {
    background-color: rgba(255, 255, 255, 0.5);
}

.staffPicksContainer .row:nth-child(even) .smallerCarousel .carouselDot.active {
    background-color: var(--color-white);
}

.staffPicksContainer .row:nth-child(even) .smallerCarousel .viewProductsLink a {
    color: var(--color-white);
}

/* Small Screen Responsive Styles for Staff Picks */
@media screen and (max-width: 478px) {
    .staffPicksContainer {
        padding: 0 0.5em;
    }

    .staffPicksBox {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .staffPicksBox img {
        margin: 1em auto;
    }

    .staffPicksBox h3 {
        margin: 1em 1em 0 1em;
    }

    .staffPicksBox p {
        margin: 0.5em 1em 1em 1em;
    }

    .smallerCarousel {
        padding: 1em 0;
        width: 100%;
        box-sizing: border-box;
    }

    .smallerCarousel .carouselGrid {
        width: 100%;
        gap: 5px;
    }

    .smallerCarousel .bookCardsContainer {
        gap: 1em;
        justify-content: center;
    }

    /* Match the main carousel mobile book card sizes */
    .smallerCarousel .bookCard {
        width: 90px;
        height: 200px;
        padding: 0.5em 0.3em;
    }

    .smallerCarousel .bookImageContainer {
        width: 80px;
        height: 120px;
    }

    .smallerCarousel .bookImageContainer img {
        width: 70px;
        height: 115px;
    }

    .smallerCarousel .bookCard .bookInfo:first-of-type {
        font-size: 11px;
    }

    .smallerCarousel .bookCard .bookInfo:last-of-type {
        font-size: 11px;
    }

    .smallerCarousel .carouselArrow {
        flex-shrink: 0;
    }

    .smallerCarousel .carouselArrow i {
        font-size: 1.5em;
    }
}

/* ------------- Invisible Life of Addie LaRue Section ------------- */
.authorName {
    font-family: var(--font-heading);
    font-size: var(--font-size-h3);
    font-weight: 700;
    line-height: var(--line-height-tight);
}

.bookCoverImage {
    width: 100%;
    margin-top: 15px;
    object-fit: cover;
    border: 1px solid var(--color-text);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow);
}

.backgroundBox {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 1px solid var(--color-text);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius-md);
    margin: 15px 40px 20px 40px;
}


.backgroundBox h1 {
    margin: 1em 1.5em 0 1.5em;
}

.backgroundBox h2,
.backgroundBox h3 {
    margin: 0.5em 1.5em;
}
.backgroundBox h4 {
    margin: 0.5em 1.5em 0 1.5em;
}
.backgroundBox p {
    margin: 0.5em 1.5em;
}

.backgroundBox .authorName {
    margin: 0.5em 1.5em 0 2.2em;
}

.backgroundBox .authorName + p {
    margin: 1em 0 0 2.5em; /* Top, Right, Bottom, Left Margin */
}
.backgroundBox .authorName + p + p {
    margin: 0 0 1em 2.5em; /* Top, Right, Bottom, Left Margin */
}

.backgroundBox ul {
    margin: 0 0 10px 0; /* Top, Right, Bottom, Left Margin */
    list-style: none;
}

/* Bullet points for other books list */
.backgroundBox ul li::before {
    content: "- ";
    margin-right: 5px;
}

.orderSection {
    padding: 1em;
    height: fit-content;
    width: 100%;
}

.stockStatus.outOfStock {
    color: var(--color-danger);
}

.quantitySelector {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0 0 18px 0; /* Top, Right, Bottom, Left Margin */
    justify-content: center;
}

/* Quantity buttons */
.quantityButton {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
    color: var(--color-white);
    line-height: 1;
    border: none;
    cursor: pointer;
}

.quantityInput {
    width: 4em;
    height: 2em;
    text-align: center;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    appearance: textfield;
    line-height: 1;
    -moz-appearance: textfield;
}

/* Remove arrows in number input for Webkit-based browsers - misaligns otherwise */
.quantityInput::-webkit-outer-spin-button,
.quantityInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.addToCartButton
{
    width: 10em;
    height: 2.5em;
    border-radius: var(--border-radius-lg);
    line-height: 1;
    display: block;
    margin: 0 auto; /* Center the button */
}

/* TEMPORARY: Clear Cart Button for Development */
.clearCartButton {
    width: 10em;
    height: 1.5em;
    border-radius: var(--border-radius-lg);
    line-height: 1;
    background-color: var(--color-danger);
    color: var(--color-white);
    display: block;
    border: none;
    margin: 10px auto 0 auto; /* Center the button */
}

.clearCartButton:hover {
    background-color: var(--color-danger-dark);
}

/* Hide mobile buttons on desktop */
.mobileBookInfoButtons {
    display: none;
}

/* Accessibility page - make image fit on mobile */
@media screen and (max-width: 478px) {
    .column img[src="images/magpie-books-outside-accessibility.png"] {
        width: 95%;
        height: auto;
    }
}

/* Mobile book page styles */
@media screen and (max-width: 478px) {
    /* Show mobile buttons */
    .mobileBookInfoButtons {
        display: block;
        padding: 0 20px;
    }

    /* Style for the toggle buttons */
    .bookInfoButton {
        background-color: var(--color-bg-dark);
        color: var(--color-white);
        padding: 12px 16px;
        border: none;
        border-radius: var(--border-radius-lg);
        cursor: pointer;
        width: 100%;
        margin: 8px 0;
        font-size: var(--font-size-base);
        transition: background-color var(--transition-ease);
    }

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

    /* Reduce margins on all background boxes */
    .backgroundBox {
        margin: 15px 5px 20px 5px;
    }

    /* Make book cover smaller and centered */
    .bookCoverImage {
        width: 70%;
        margin: 15px auto;
        display: block;
    }

    .orderSection {
        padding: 1em 0em;
    }

    /* Hide title section on mobile - redundant with book details */
    #bookTitle {
        display: none !important;
    }

    /* Hide details and author sections by default on mobile */
    #bookDetails,
    #authorDetails,
    #orderInfo {
        display: none;
    }

    /* Show section when it has active class */
    #bookDetails.active,
    #authorDetails.active,
    #orderInfo.active {
        display: flex;
    }

    .cartBadge {
        top: 60%;
        left: 50%;
        height: 12px;
        width: 12px;
    }
}


/* ------------- Footer Styles ------------- */
footer {
    background-color: var(--color-navy);
    padding: 29px 0;
    position: relative;
}

footer img {
    height: 116px;
    width: 116px;
    object-fit: contain;
}

.footerLogoContainer {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.footerLogo{
    position: relative;
    z-index: 2;
    display: block;
}

.footerLogoContainer::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 100%;
    height: 100%;
    background: white;

    filter: blur(25px);
    opacity: 1;
    z-index: -1;
}

footer p:first-child {
    margin-bottom: 10px;
}

.footerText{
    margin: 0;
    margin-bottom: 16px;
}

footer .listNoBullets li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

footer .listNoBullets i {
    font-size: var(--font-size-sm);
    color: var(--color-white);
}

.footerSocialIcons {
    display: flex;
    gap: 3px;
    margin-bottom: 100px;
}

.socialIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--color-white);
    text-decoration: none;
}

.socialIcon i {
    font-size: 24px;
}

/* ------------- Footer/External Navigation Links ------------- */
.externalNavLinks {
    color: var(--color-white);
    text-decoration: none;
}

.externalNavLinks:hover {
    text-decoration: underline;
    color: var(--color-primary);
}

.externalNavLinks i {
    margin-right: 8px;
}

/* ------------- Individual Styles ------------- */
.hbar {
    border: 8px solid var(--color-secondary);
    width: 60%;

}

.u-section-padding-40 {
    padding: 40px 0;
}

.listNoBullets {
    list-style: none;
    margin: 0;
    padding: 0;
}

.textWhite {
    color: var(--color-white);
}

.textBlack {
    color: var(--color-text);
}

.textBold {
    font-weight: 700;
}
