:root {
    --primary-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --accent-color: #000000;
    --header-bg: rgba(255, 255, 255, 0.98);
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--primary-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.preloader-content {
    text-align: center;
    width: 200px;
}

.preloader-logo {
    width: 120px;
    margin-bottom: 20px;
    filter: brightness(0);
    animation: pulse 2s infinite ease-in-out;
}

.loader-bar-container {
    width: 100%;
    height: 2px;
    background: #eeeeee;
    overflow: hidden;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: #000000;
    transition: width 0.3s ease;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* Header */
header {
    background: var(--header-bg);
    padding: 0 4%;
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 2000;
    border-bottom: 1px solid #eeeeee;
    transition: var(--transition);
}

.header-left,
.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-center {
    flex: 0 0 auto;
    text-align: center;
}

.header-right {
    justify-content: flex-end;
}

#header-logo {
    height: 45px;
    filter: brightness(0);
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.logo-link {
    display: block;
}

.header-left a,
.header-right a,
.search-container span {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    transition: opacity 0.3s;
}

.header-left a:hover,
.header-right a:hover {
    opacity: 0.6;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    padding: 10px 0;
    z-index: 2001;
    border: 1px solid #eeeeee;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid #f9f9f9;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.cart-count {
    font-size: 0.6rem;
    margin-left: 5px;
}

/* Hero Section */
.hero {
    height: calc(100vh - 100px);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

/* Landing Hero Layout */
.landing-hero {
    align-items: flex-end;
    justify-content: flex-end;
    text-align: right;
    padding: 0 4% 6% 0;
}

.landing-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    line-height: 1.1;
    margin-bottom: 0;
}

/* Page Hero Layout */
.page-hero {
    height: 45vh;
    background-image: url('images/background gennextmedia hero section.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Sections */
.section {
    padding: 10rem 5%;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

/* Cap only DYNAMIC book/upcoming cards so a lone book in an author group
   doesn't balloon to fill the row. The static cards on index.html
   ("Featured Expeditions") are intentionally unconstrained. */
.grid .book-card,
.grid .upcoming-card {
    max-width: 380px;
    width: 100%;
}

.card {
    text-align: center;
}

.image-placeholder {
    aspect-ratio: 2/3;
    background: #f7f7f7;
    margin-bottom: 2rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.card:hover .image-placeholder {
    transform: scale(0.98);
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    padding: 0 10%;
}

.card-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Modern Play Button */
.play-btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #dddddd;
    background: #ffffff;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.play-btn-modern ion-icon {
    font-size: 1rem;
    margin-left: 2px;
    /* Center triangular play icon visually */
}

.play-btn-modern:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

/* Global CTA */
.global-cta {
    padding: 10rem 5%;
    text-align: center;
    background: #fdfdfd;
}

.cta-content h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.cta-content p {
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.btn-primary {
    display: inline-block;
    padding: 22px 55px;
    background: #000000;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #333333;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 25px;
    background: transparent;
    border: 1px solid #000000;
    color: #000000;
    text-decoration: none;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-secondary:hover {
    background: #000000;
    color: #ffffff;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.card-actions-row {
    display: flex;
    gap: 10px;
}

.card-actions-row .btn-secondary {
    flex: 1;
    padding: 10px 5px;
    font-size: 0.6rem;
}

/* Footer */
footer {
    padding: 8rem 5% 4rem;
    background: #fff;
    border-top: 1px solid #f5f5f5;
    text-align: left;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 25px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: #000;
}

.footer-bottom {
    border-top: 1px solid #f5f5f5;
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.footer-logo {
    height: 35px;
    filter: brightness(0);
    margin-bottom: 25px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    max-width: 300px;
}

@media (max-width: 968px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 500px) {
    .footer-container {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* Auth Modal */
/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    text-align: center;
}

.mobile-nav-item {
    margin: 2rem 0;
}

.mobile-nav-item a {
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-main);
    transition: opacity 0.3s;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    height: 100%;
    background: #ffffff;
    z-index: 4000;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    padding: 50px;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.05);
}

.cart-sidebar.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.cart-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cart-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: -30px;
    margin-bottom: 40px;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cart-item-info h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 5px;
    letter-spacing: 0.05em;
}

.cart-item-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.remove-item {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    line-height: 1;
}

.remove-item:hover {
    color: #ff0000;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.qty-btn {
    background: none;
    border: 1px solid #eeeeee;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: var(--transition);
}

.qty-btn:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.qty-val {
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 15px;
    text-align: center;
}

.empty-msg {
    color: var(--text-muted);
    font-size: 1rem;
}

.cart-footer {
    border-top: 1px solid #eeeeee;
    padding-top: 30px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.checkout-btn {
    width: 100%;
    padding: 22px;
    background: #000000;
    color: #ffffff;
    border: none;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.checkout-btn:hover {
    background: #333333;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 3001;
}

.hamburger .line {
    width: 30px;
    height: 1.5px;
    background: #000000;
    transition: var(--transition);
}

.hamburger.open .line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger.open .line:nth-child(2) {
    opacity: 0;
}

.hamburger.open .line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

@media (max-width: 1024px) {
    header {
        height: 80px;
    }

    .header-left,
    .header-right span {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        height: calc(100vh - 80px);
    }

    .landing-hero {
        padding: 0 6% 12% 0;
    }

    .section {
        padding: 6rem 5%;
    }

    .cart-sidebar {
        width: 100%;
        padding: 40px;
    }

    .global-cta {
        padding: 6rem 5%;
    }
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 30px;
    left: 30px;
    right: 30px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transform: translateY(150%);
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

#cookie-banner.show {
    transform: translateY(0);
}

.close-banner {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    color: var(--text-muted);
    transition: var(--transition);
}

.close-banner:hover {
    color: var(--text-main);
}

.cookie-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cookie-text a {
    color: var(--text-main);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
}

.cookie-buttons button {
    background: transparent;
    border: 1px solid #000000;
    padding: 10px 25px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition);
}

#accept-cookies {
    background: #000000;
    color: #ffffff;
}

#accept-cookies:hover {
    background: #333333;
}

#reject-cookies:hover {
    background: #f9f9f9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 5000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #ffffff;
    padding: 60px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    position: relative;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-body-scroll {
    overflow-y: auto;
    padding-right: 20px;
    margin-top: 30px;
    text-align: left;
}

.modal-body-scroll::-webkit-scrollbar {
    width: 4px;
}

.modal-body-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-body-scroll::-webkit-scrollbar-thumb {
    background: #000;
}

.modal-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.modal-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 25px 0 10px;
}

.modal-content p {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.modal-content strong {
    color: var(--text-main);
    display: block;
    margin-top: 30px;
    margin-bottom: 10px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
}

/* Auth Modal Specific */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.auth-form input {
    padding: 15px 0;
    border: none;
    border-bottom: 1px solid #eeeeee;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.auth-form input:focus {
    border-color: #000000;
}

/* Search Overlay */
#search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 6000;
    display: none;
    flex-direction: column;
    padding: 100px 8%;
    overflow-y: auto;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
}

.search-input-container {
    flex-grow: 1;
    margin-right: 40px;
}

.search-input-container input {
    width: 100%;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 4rem);
    border: none;
    border-bottom: 1px solid #eeeeee;
    padding: 20px 0;
    outline: none;
    font-weight: 300;
}

.close-search {
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.search-result-item {
    padding: 30px;
    border: 1px solid #f2f2f2;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-item:hover {
    border-color: #000000;
    transform: translateY(-5px);
}

.search-result-item h4 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 400;
}

.search-result-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.search-result-type {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #999;
}

.sign-up-nav {
    border: 1px solid #000;
    padding: 8px 20px !important;
    transition: var(--transition) !important;
}

.sign-up-nav:hover {
    background: #000 !important;
    color: #fff !important;
    opacity: 1 !important;
}

/* Reveal Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
}

.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Persistent Audio Player */
#global-audio-player {
    position: fixed;
    bottom: -180px;
    /* Hidden by default */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-top: 1px solid #eeeeee;
    padding: 20px 4%;
    z-index: 5000;
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1), bottom 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.08);
}

#global-audio-player.active {
    bottom: 0;
}

.player-main-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.player-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.player-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.player-btns {
    display: flex;
    align-items: center;
    gap: 25px;
}

.player-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-main);
}

.player-btn:hover {
    transform: scale(1.1);
}

.player-btn.play-pause {
    font-size: 2.22rem;
    width: 45px;
    height: 45px;
    border: 1px solid #eee;
    border-radius: 50%;
}

.player-btn.play-pause:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.player-progress-area {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar-container {
    flex: 1;
    height: 3px;
    background: #f0f0f0;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: height 0.2s;
}

.progress-bar-container:hover {
    height: 5px;
}

.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #000;
    border-radius: 2px;
    width: 0%;
}

.time-display {
    font-size: 0.65rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-muted);
    min-width: 35px;
}

.player-close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 5px;
}

.player-close-btn:hover {
    color: #000;
}

@media (max-width: 768px) {
    #global-audio-player {
        padding: 15px 6%;
    }

    .player-title {
        font-size: 0.95rem;
    }

    .player-subtitle {
        font-size: 0.6rem;
    }

    .player-btns {
        gap: 15px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   LIBRARY CONTROLS — Sort / Filter / Search
   ═══════════════════════════════════════════════════════════════════════════ */

.library-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 5rem;
    flex-wrap: wrap;
}

.library-search-input {
    padding: 20px;
    width: 100%;
    max-width: 500px;
    border: none;
    border-bottom: 1px solid #eeeeee;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    outline: none;
    transition: var(--transition);
}

.library-search-input:focus {
    border-color: #000000;
}

.library-filter-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    white-space: nowrap;
}

.library-sort-select {
    padding: 12px 30px 12px 15px;
    border: 1px solid #eeeeee;
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    background: #fff;
    outline: none;
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M6%208L1%203h10z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.library-sort-select:hover,
.library-sort-select:focus {
    border-color: #000000;
}

@media (max-width: 600px) {
    .library-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .library-search-input {
        max-width: 100%;
    }

    .library-filter-group {
        justify-content: space-between;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   BOOK CARDS — Enhanced with badges, pricing, series labels
   ═══════════════════════════════════════════════════════════════════════════ */

.book-card {
    position: relative;
    text-align: center;
}

/* Cover images fill their container fully */
.book-card .image-placeholder {
    aspect-ratio: 2/3;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #1a1a1a;
}

.book-card .image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Badge Container */
.badge-container {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
    z-index: 10;
    flex-wrap: wrap;
}

.book-badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
}

.badge-new {
    background: #000000;
    color: #ffffff;
}

.badge-series {
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}

.badge-upcoming {
    background: #1a1a1a;
    color: #ffffff;
}

/* Author / Genre / Date info */
.book-author {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding: 0 !important;
}

.book-genre {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    padding: 0 !important;
}

.book-release-date {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

/* Series Label */
.series-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #555;
    background: #f5f5f5;
    padding: 8px 16px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.series-label ion-icon {
    font-size: 0.85rem;
}

/* Pricing Display */
.price-display {
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.price-current {
    color: var(--text-main);
}

.price-original {
    text-decoration: line-through;
    color: var(--text-muted);
    margin-right: 10px;
    font-weight: 400;
}

.price-special {
    color: #000000;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Notify Me Button */
.btn-notify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid #cccccc;
    color: #666666;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    margin-top: 5px;
}

.btn-notify:hover {
    border-color: #000000;
    color: #000000;
    background: #fafafa;
}

.btn-notify ion-icon {
    font-size: 0.9rem;
}

/* Book description (for upcoming cards) */
.book-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding: 0 5% !important;
    line-height: 1.6;
}


/* ═══════════════════════════════════════════════════════════════════════════
   AUTHOR GROUPING
   ═══════════════════════════════════════════════════════════════════════════ */

.author-group {
    margin-bottom: 6rem;
}

.author-group:last-child {
    margin-bottom: 0;
}

.author-group-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 300;
    text-align: left;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eeeeee;
    letter-spacing: 0.05em;
}

.author-group-title ion-icon {
    vertical-align: middle;
    font-size: 1.8rem;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SPECIALS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.specials-meta {
    text-align: center;
    margin-bottom: 4rem;
}

.special-countdown {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-main);
    letter-spacing: 0.05em;
}

.specials-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.specials-section {
    margin-bottom: 5rem;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 3rem;
    text-align: center;
    letter-spacing: 0.05em;
}

/* Holiday Banner */
.holiday-banner {
    background: #1a1a1a;
    color: #ffffff;
    padding: 30px 40px;
    margin-bottom: 4rem;
    transition: var(--transition);
}

.holiday-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.holiday-banner-content ion-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    color: #ffffff;
}

.holiday-banner-content h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 5px;
    letter-spacing: 0.08em;
}

.holiday-banner-content p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

@media (max-width: 600px) {
    .holiday-banner-content {
        flex-direction: column;
        text-align: center;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   UPCOMING PROJECTS PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.upcoming-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.upcoming-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: -3rem auto 0;
    line-height: 1.6;
}

.upcoming-release-info {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding: 8px 16px;
    background: #f8f8f8;
    display: inline-block;
}

.upcoming-card .image-placeholder {
    aspect-ratio: 3/4;
}


/* ═══════════════════════════════════════════════════════════════════════════
   CLOSE MODAL (shared)
   ═══════════════════════════════════════════════════════════════════════════ */

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    line-height: 1;
    z-index: 10;
}

.close-modal:hover {
    color: var(--text-main);
}