/* ═══════════════════════════════════════════
   LibraryOS — style.css
   8 Themes via [data-theme] on <html>
═══════════════════════════════════════════ */

/* ── THEME DEFINITIONS ── */

[data-theme="parchment"] {
    --bg: #f5f2eb;
    --surface: #ffffff;
    --surface2: #ede9df;
    --border: #d5cfb9;
    --text: #1c1a16;
    --muted: #7a7469;
    --accent: #2c5f2e;
    --accent-soft: #dff0df;
    --accent-text: #2c5f2e;
    --shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
    --font-display: "Playfair Display", serif;
    --font-body: "DM Sans", sans-serif;
}

[data-theme="midnight"] {
    --bg: #0d1117;
    --surface: #161b22;
    --surface2: #21262d;
    --border: #30363d;
    --text: #c9d1d9;
    --muted: #8b949e;
    --accent: #58a6ff;
    --accent-soft: #0d2040;
    --accent-text: #58a6ff;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    --font-display: "Space Mono", monospace;
    --font-body: "DM Sans", sans-serif;
}

[data-theme="rose"] {
    --bg: #fdf6f0;
    --surface: #ffffff;
    --surface2: #f8ede6;
    --border: #e8c9b8;
    --text: #3d2b1f;
    --muted: #9c7b6a;
    --accent: #c2715a;
    --accent-soft: #fdeae3;
    --accent-text: #a8503a;
    --shadow: 0 2px 14px rgba(194, 113, 90, 0.1);
    --font-display: "Crimson Pro", serif;
    --font-body: "DM Sans", sans-serif;
}

[data-theme="forest"] {
    --bg: #0e1a13;
    --surface: #152019;
    --surface2: #1c2b20;
    --border: #2d4a35;
    --text: #d8f3dc;
    --muted: #74a87e;
    --accent: #52b788;
    --accent-soft: #1a3d27;
    --accent-text: #52b788;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
    --font-display: "Playfair Display", serif;
    --font-body: "DM Sans", sans-serif;
}

[data-theme="slate"] {
    --bg: #1e2530;
    --surface: #252d3a;
    --surface2: #2d3748;
    --border: #3d4f63;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --accent: #94a3b8;
    --accent-soft: #2d3748;
    --accent-text: #cbd5e1;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
    --font-display: "DM Sans", sans-serif;
    --font-body: "DM Sans", sans-serif;
}

[data-theme="amber"] {
    --bg: #1a1200;
    --surface: #221800;
    --surface2: #2e2100;
    --border: #4a3800;
    --text: #fef3c7;
    --muted: #b89a4a;
    --accent: #f59e0b;
    --accent-soft: #3a2a00;
    --accent-text: #f59e0b;
    --shadow: 0 2px 20px rgba(245, 158, 11, 0.15);
    --font-display: "Crimson Pro", serif;
    --font-body: "DM Sans", sans-serif;
}

[data-theme="lavender"] {
    --bg: #f5f3ff;
    --surface: #ffffff;
    --surface2: #ede9fe;
    --border: #c4b5fd;
    --text: #1e1b4b;
    --muted: #7c6ea4;
    --accent: #7c3aed;
    --accent-soft: #ede9fe;
    --accent-text: #6d28d9;
    --shadow: 0 2px 14px rgba(124, 58, 237, 0.1);
    --font-display: "Playfair Display", serif;
    --font-body: "DM Sans", sans-serif;
}

[data-theme="ocean"] {
    --bg: #0a1628;
    --surface: #0f2040;
    --surface2: #162952;
    --border: #1e3d6b;
    --text: #e0f2fe;
    --muted: #7ab8d4;
    --accent: #0ea5e9;
    --accent-soft: #0c2e4a;
    --accent-text: #38bdf8;
    --shadow: 0 2px 20px rgba(14, 165, 233, 0.15);
    --font-display: "Playfair Display", serif;
    --font-body: "DM Sans", sans-serif;
}
/* --------------------ADDED------------------ */

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    transition:
        background 0.4s,
        color 0.4s;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition:
        background 0.4s,
        color 0.4s;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 200;
    transition:
        background 0.4s,
        border-color 0.4s;
}

.logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}
.logo span {
    color: var(--accent);
}

/* Search */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    flex: 1;
    max-width: 340px;
    transition:
        border-color 0.2s,
        background 0.4s;
}
.search-bar:focus-within {
    border-color: var(--accent);
}
.search-bar svg {
    color: var(--muted);
    flex-shrink: 0;
}
.search-bar input {
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    padding: 9px 0;
    width: 100%;
}
.search-bar input::placeholder {
    color: var(--muted);
}

/* ═══════════════════════════════════════════
   THEME PICKER
═══════════════════════════════════════════ */
.theme-picker {
    position: relative;
    flex-shrink: 0;
}

.theme-pick-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 12px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.4s;
    white-space: nowrap;
}
.theme-pick-btn:hover {
    border-color: var(--accent);
}
.theme-pick-btn svg {
    color: var(--accent);
}

.theme-palette {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    width: 280px;
    box-shadow:
        var(--shadow),
        0 8px 32px rgba(0, 0, 0, 0.15);
    transition: background 0.4s;
    z-index: 300;
}
.theme-palette.open {
    display: block;
    animation: fadeDown 0.18s ease;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.palette-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.875rem;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.swatch {
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s;
    text-align: left;
}
.swatch:hover {
    border-color: var(--accent);
}
.swatch.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.swatch-colors {
    display: flex;
    gap: 4px;
}
.swatch-colors i {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}
.swatch-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
}

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition:
        background 0.4s,
        border-color 0.4s;
}
.stat-num {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.1;
}
.stat-label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 3px;
}

/* Page header */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.page-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}
.page-sub {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
}

/* Filters */
.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.filter-btn {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ═══════════════════════════════════════════
   BOOK GRID & CARDS
═══════════════════════════════════════════ */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
}

.book-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition:
        background 0.4s,
        border-color 0.4s,
        transform 0.22s,
        box-shadow 0.22s;
    cursor: pointer;
    animation: cardIn 0.3s ease both;
}
@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.book-card:hover {
    transform: translateY(-4px);
    box-shadow:
        var(--shadow),
        0 10px 28px rgba(0, 0, 0, 0.12);
    border-color: var(--accent);
}

.book-cover {
    width: 100%;
    height: 130px;
    border-radius: 9px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    position: relative;
    overflow: hidden;
}
.book-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.18) 0%,
        transparent 60%
    );
    border-radius: 9px;
}

.book-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-text);
    margin-bottom: 0.5rem;
    transition:
        background 0.4s,
        color 0.4s;
}

.book-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.35;
    color: var(--text);
}
.book-author {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 0.85rem;
}

.book-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    transition: border-color 0.4s;
}

.availability {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
}
.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.dot.available {
    background: var(--accent);
}
.dot.checked {
    background: #e28c3d;
}

.borrow-btn {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: none;
    cursor: pointer;
    transition: all 0.2s;
}
.borrow-btn:hover {
    background: var(--accent);
    color: #fff;
}
.borrow-btn:disabled {
    border-color: var(--border);
    color: var(--muted);
    cursor: not-allowed;
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
    color: var(--muted);
    font-size: 15px;
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    transition: border-color 0.4s;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 640px) {
    header {
        padding: 0 1rem;
        gap: 0.75rem;
    }
    .search-bar {
        max-width: none;
    }
    .container {
        padding: 1.25rem;
    }
    .logo {
        font-size: 18px;
    }
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;

    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Playfair Display", serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: -0.5px;
    text-decoration: none;
}
.nav-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.nav-logo span {
    color: var(--cream);
}
.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}
.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover {
    color: var(--gold);
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-cta {
    background: var(--gold);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 50px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s,
        transform 0.15s;
}
.nav-cta:hover {
    background: #c98f38;
    transform: translateY(-1px);
}
.nav-dash {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold-dim);
    padding: 9px 20px;
    border-radius: 50px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-dash:hover {
    background: rgba(176, 125, 46, 0.1);
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: all 0.3s;
}
.mobile-menu {
    display: none;
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(247, 245, 242, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    flex-direction: column;
    gap: 16px;
}
.mobile-menu.open {
    display: flex;
}
.mobile-menu a {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

/* HERO */
.hero {
    padding: 140px 32px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(176, 125, 46, 0.1);
    border: 1px solid rgba(176, 125, 46, 0.3);
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 20px;
}
.hero-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
}
.hero h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    color: var(--cream);
    margin-bottom: 20px;
}
.hero h1 em {
    color: var(--gold);
    font-style: normal;
}
.hero p {
    font-size: 1.05rem;
    color: var(--text-dim);
    line-height: 1.75;
    margin-bottom: 36px;
    max-width: 440px;
}
.hero-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.btn-primary {
    background: var(--gold);
    color: #ffffff;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary:hover {
    background: #c98f38;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(176, 125, 46, 0.25);
}
.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 14px 30px;
    border-radius: 50px;
    font-family: "DM Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* Book stack visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.book-stack {
    position: relative;
    width: 280px;
    height: 340px;
}
.book {
    position: absolute;
    border-radius: 6px 14px 14px 6px;
    box-shadow: 6px 6px 24px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
}
.book:hover {
    transform: translateY(-8px) rotate(0deg) !important;
}
.book-1 {
    width: 170px;
    height: 240px;
    bottom: 0;
    left: 20px;
    background: linear-gradient(135deg, #5fc4b8, #3a8f86);
    transform: rotate(-8deg);
}
.book-2 {
    width: 160px;
    height: 220px;
    bottom: 10px;
    left: 80px;
    background: linear-gradient(135deg, #e07a78, #b85250);
    transform: rotate(3deg);
}
.book-3 {
    width: 175px;
    height: 250px;
    bottom: 5px;
    left: 50px;
    background: linear-gradient(135deg, #e8c87a, #b99a50);
    transform: rotate(-2deg);
}
.book-3::after {
    content: "Vidyalay";
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: "Playfair Display", serif;
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.4);
    font-weight: 700;
    letter-spacing: 1px;
}
.glow-ring {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(176, 125, 46, 0.08) 0%,
        transparent 70%
    );
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* LIVE STATS */
.stats-row {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: border-color 0.2s;
}
.stat-card:hover {
    border-color: var(--gold-dim);
}
.stat-num {
    font-family: "Playfair Display", serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--gold);
}
.stat-label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 4px;
}
.stat-loading {
    opacity: 0.4;
    font-size: 1.5rem;
}

/* SEARCH */
.search-section {
    max-width: 700px;
    margin: 0 auto 80px;
    padding: 0 32px;
    text-align: center;
}
.search-section h2 {
    font-family: "Playfair Display", serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 20px;
}
.search-bar {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.search-bar:focus-within {
    border-color: var(--gold);
}
.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    padding: 16px 24px;
    color: var(--text);
    font-family: "DM Sans", sans-serif;
    font-size: 0.95rem;
}
.search-bar input::placeholder {
    color: var(--muted);
}
.search-bar button {
    background: var(--gold);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    font-weight: 600;
    font-family: "DM Sans", sans-serif;
    cursor: pointer;
    margin: 6px;
    border-radius: 50px;
    transition: background 0.2s;
}
.search-bar button:hover {
    background: #c98f38;
}
.search-tags {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}
.tag {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}
.tag:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* RESULTS */
#searchResults {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 32px;
}
.results-title {
    font-family: "Playfair Display", serif;
    font-size: 1.4rem;
    color: var(--cream);
    margin-bottom: 20px;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.result-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
}
.result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--gold-dim);
}
.result-cover {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    background: linear-gradient(135deg, #e8e4dc, #d8d2c8);
}
.result-body {
    padding: 14px;
}
.result-acc {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.result-title {
    font-family: "Playfair Display", serif;
    font-size: 0.95rem;
    color: var(--cream);
    margin-bottom: 4px;
    line-height: 1.3;
}
.result-author {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 8px;
}
.result-subject {
    display: inline-block;
    background: rgba(176, 125, 46, 0.1);
    border: 1px solid rgba(176, 125, 46, 0.25);
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 50px;
}
.no-results {
    text-align: center;
    padding: 40px;
    color: var(--muted);
    font-style: italic;
}

/* SECTION HEADER */
.section-header {
    max-width: 1200px;
    margin: 0 auto 32px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section-title {
    font-family: "Playfair Display", serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cream);
}
.section-title span {
    color: var(--gold);
}
.see-all {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--gold-dim);
    padding: 8px 18px;
    border-radius: 50px;
    transition: all 0.2s;
}
.see-all:hover {
    background: rgba(176, 125, 46, 0.1);
}

/* CATEGORIES */
.categories {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 16px;
}
.cat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.cat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s;
}
.cat-card:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: var(--shadow);
}
.cat-card:hover::before {
    opacity: 1;
}
.cat-card[data-color="teal"]::before {
    background: linear-gradient(
        135deg,
        rgba(95, 196, 184, 0.15),
        rgba(95, 196, 184, 0.05)
    );
}
.cat-card[data-color="rose"]::before {
    background: linear-gradient(
        135deg,
        rgba(224, 122, 120, 0.15),
        rgba(224, 122, 120, 0.05)
    );
}
.cat-card[data-color="blue"]::before {
    background: linear-gradient(
        135deg,
        rgba(111, 168, 220, 0.15),
        rgba(111, 168, 220, 0.05)
    );
}
.cat-card[data-color="gold"]::before {
    background: linear-gradient(
        135deg,
        rgba(176, 125, 46, 0.15),
        rgba(176, 125, 46, 0.05)
    );
}
.cat-card[data-color="sage"]::before {
    background: linear-gradient(
        135deg,
        rgba(139, 196, 160, 0.15),
        rgba(139, 196, 160, 0.05)
    );
}
.cat-card[data-color="purple"]::before {
    background: linear-gradient(
        135deg,
        rgba(180, 130, 220, 0.15),
        rgba(180, 130, 220, 0.05)
    );
}
.cat-icon {
    font-size: 2.4rem;
    margin-bottom: 12px;
    display: block;
    position: relative;
    z-index: 1;
}
.cat-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    position: relative;
    z-index: 1;
}
.cat-count {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

/* BOOK CARDS */
.books-grid {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}
.book-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
}
.book-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}
.book-cover {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}
.book-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gold);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.book-badge.new {
    background: var(--accent-teal);
    color: #fff;
}
.book-badge.popular {
    background: var(--accent-rose);
    color: #fff;
}
.book-info {
    padding: 16px;
}
.book-genre {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin-bottom: 6px;
}
.book-title {
    font-family: "Playfair Display", serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 4px;
    line-height: 1.3;
}
.book-author {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 12px;
}
.book-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.book-isbn {
    font-size: 0.72rem;
    color: var(--muted);
}
.book-btn {
    background: rgba(176, 125, 46, 0.1);
    color: var(--gold);
    border: 1px solid rgba(176, 125, 46, 0.25);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.book-btn:hover {
    background: var(--gold);
    color: #ffffff;
}

/* FEATURED BANNER */
.featured-banner {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 32px;
}
.banner-inner {
    background: linear-gradient(135deg, #ede9e1 0%, #e8e3d8 50%, #f0ece4 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.banner-inner::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(176, 125, 46, 0.08) 0%,
        transparent 70%
    );
}
.banner-tag {
    display: inline-block;
    background: rgba(176, 125, 46, 0.12);
    border: 1px solid rgba(176, 125, 46, 0.3);
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 5px 12px;
    border-radius: 50px;
    margin-bottom: 16px;
}
.banner-inner h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900;
    color: var(--cream);
    line-height: 1.2;
    margin-bottom: 12px;
}
.banner-inner p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 480px;
}
.banner-books {
    display: flex;
}
.mini-book {
    width: 70px;
    height: 100px;
    border-radius: 4px 10px 10px 4px;
    box-shadow: 4px 4px 16px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.mini-book:nth-child(2) {
    margin-left: -20px;
    margin-top: 12px;
}
.mini-book:nth-child(3) {
    margin-left: -20px;
}

/* SERVICES */
.services {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all 0.25s;
}
.service-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-3px);
}
.service-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}
.service-card h3 {
    font-family: "Playfair Display", serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 8px;
}
.service-card p {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.65;
}

/* FOOTER */
footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 60px 32px 32px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo {
    font-family: "Playfair Display", serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 12px;
}
.footer-desc {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.7;
}
.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cream);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col ul li a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}
.footer-col ul li a:hover {
    color: var(--gold);
}
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom p {
    font-size: 0.8rem;
    color: var(--muted);
}

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.open {
    display: flex;
}
.modal {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from {
        transform: scale(0.94);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-dim);
    padding: 6px 10px;
    border-radius: 8px;
}
.modal-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: var(--text);
}
.modal-title {
    font-family: "Playfair Display", serif;
    font-size: 22px;
    color: var(--cream);
    margin-bottom: 6px;
}
.modal-author {
    font-size: 14px;
    color: var(--gold);
    margin-bottom: 20px;
}
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-bottom: 20px;
}
.modal-row .lbl {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
}
.modal-row .val {
    font-size: 13.5px;
    color: var(--text);
    margin-top: 2px;
    font-weight: 500;
}

/* TOAST */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    background: var(--gold);
    color: #ffffff;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.35s;
    pointer-events: none;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.hero-content > * {
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
}
.hero-content > *:nth-child(1) {
    animation-delay: 0.05s;
}
.hero-content > *:nth-child(2) {
    animation-delay: 0.15s;
}
.hero-content > *:nth-child(3) {
    animation-delay: 0.25s;
}
.hero-content > *:nth-child(4) {
    animation-delay: 0.35s;
}
.hero-visual {
    opacity: 0;
    animation: fadeUp 0.7s 0.4s ease forwards;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 110px;
    }
    .hero-visual {
        display: none;
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
    .banner-inner {
        grid-template-columns: 1fr;
    }
    .banner-books {
        display: none;
    }
}
@media (max-width: 600px) {
    nav {
        padding: 14px 20px;
    }
    .nav-links,
    .nav-cta {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    .hero {
        padding: 100px 20px 60px;
        gap: 30px;
    }
    .stats-row,
    .categories,
    .books-grid,
    .services {
        padding: 0 20px;
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .section-header,
    .featured-banner,
    .search-section {
        padding: 0 20px;
    }
    .banner-inner {
        padding: 28px;
    }
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    footer {
        padding: 40px 20px 24px;
    }
}
/* -----------dashboard ----------- */
