/* =====================================================
   LIVROO.FR — Design System v2
   Inspired by Valoré editorial e-commerce aesthetic
   Fonts: Cormorant Garamond (serif) + Inter (sans)
   ===================================================== */

/* --- VARIABLES --- */
:root {
    /* Couleurs */
    --bg: #F8F7F4;
    --bg-alt: #F1EFE9;
    --surface: #FFFFFF;
    --dark: #1A1A1A;
    --dark-soft: #2C2C2C;

    --text: #1A1A1A;
    --text-secondary: #6B6B6B;
    --text-muted: #9A9A9A;
    --text-inverse: #FFFFFF;
    --text-inverse-muted: rgba(255,255,255,0.5);

    --accent: #C2703E;
    --accent-hover: #A85D33;
    --accent-light: rgba(194, 112, 62, 0.08);
    --red: #D4412B;
    --green: #2D6A4F;
    --green-light: #E6F0EB;

    --border: #E8E6E1;
    --border-light: #F0EDE7;

    --error: #D4412B;
    --error-bg: #FFF5F5;
    --success: #2D6A4F;
    --success-bg: #F0FFF4;
    --warning: #D69E2E;

    /* Typographie */
    --font-serif: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --max-w: 1240px;
    --max-w-narrow: 780px;
    --header-h: 64px;
    --radius: 4px;
    --radius-sm: 2px;
    --radius-lg: 8px;
    --radius-pill: 100px;

    /* Ombres — tres subtiles */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow: 0 4px 16px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.07);

    --transition: 200ms ease;
    --transition-slow: 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.01em;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
h1, h2, h3, h4, h5 {
    font-family: var(--font-serif);
    color: var(--text);
    line-height: 1.15;
    font-weight: 400;
    letter-spacing: -0.02em;
}
h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }

::selection {
    background: rgba(194, 112, 62, 0.12);
    color: var(--text);
}

/* Skip to content */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: var(--text-inverse);
    padding: 0.5rem 1.5rem;
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 9999;
    font-size: 0.8125rem;
}
.skip-to-content:focus {
    top: 0;
    color: var(--text-inverse);
}

/* --- UTILITIES --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 2rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
[x-cloak] { display: none !important; }

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all var(--transition-slow);
    white-space: nowrap;
    line-height: 1.4;
    border-radius: var(--radius);
}
.btn-primary {
    background: var(--dark);
    color: var(--text-inverse);
    border-color: var(--dark);
}
.btn-primary:hover {
    background: var(--dark-soft);
    color: var(--text-inverse);
}
.btn-secondary {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}
.btn-secondary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--text-inverse);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--text);
}
.btn-outline:hover {
    background: var(--dark);
    color: var(--text-inverse);
}
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 0.75rem;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.8125rem;
}
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.6875rem; }
.btn-lg { padding: 0.875rem 2.25rem; font-size: 0.8125rem; }
.btn-full { width: 100%; text-align: center; }
.btn-icon {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem;
    color: var(--text);
    transition: all var(--transition);
    background: none;
    border: none;
}
.btn-icon:hover { color: var(--accent); }

/* --- HEADER --- */
.site-header {
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
    box-shadow: 0 1px 20px rgba(0,0,0,0.04);
}
.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: var(--header-h);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.logo:hover { color: var(--text); }
.logo-icon {
    display: none;
}

/* Navigation desktop */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-desktop a {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.8125rem;
    padding: 0.4rem 0.75rem;
    transition: color var(--transition);
    letter-spacing: 0.02em;
}
.nav-desktop a:hover { color: var(--text); background: none; }
.nav-desktop .nav-sale {
    color: var(--red);
    font-weight: 500;
}
.caret { font-size: 0.6em; opacity: 0.4; margin-left: 0.15rem; }

/* Genres dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: -1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 0.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.125rem;
    min-width: 320px;
    z-index: 50;
}
.dropdown-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: none;
    transition: color var(--transition);
}
.dropdown-menu a:hover { color: var(--text); background: var(--bg); }
.dropdown-all {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--accent) !important;
    font-weight: 500;
    border-top: 1px solid var(--border-light);
    margin-top: 0.25rem;
    padding-top: 0.625rem !important;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Header search */
.header-search {
    position: relative;
}
.header-search input {
    width: 0;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 0.8125rem;
    color: var(--text);
    transition: all 0.3s ease;
    opacity: 0;
}
.header-search.active input {
    width: 200px;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    opacity: 1;
}
.header-search input:focus { outline: none; }
.header-search input::placeholder { color: var(--text-muted); }
.header-search button {
    background: none;
    border: none;
    color: var(--text);
    padding: 0.3rem;
    display: flex;
    transition: color var(--transition);
}
.header-search button:hover { color: var(--accent); }

/* Fallback: standard header search for non-JS */
.header-search:not(.active) input[value]:not([value=""]) {
    width: 200px;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    opacity: 1;
}

/* User avatar */
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--text-inverse);
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
}
.user-avatar-lg { width: 36px; height: 36px; font-size: 0.8125rem; }

/* User menu */
.user-menu { position: relative; }
.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 0.25rem;
}
.user-menu-toggle:hover { color: var(--accent); }
.user-menu-toggle .user-name {
    font-size: 0.8125rem;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
}
.user-menu-toggle .caret { font-size: 0.55em; opacity: 0.4; }

/* User dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    min-width: 220px;
    z-index: 200;
}
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}
.user-dropdown-header strong { display: block; font-size: 0.8125rem; color: var(--text); font-family: var(--font-sans); }
.user-dropdown-header small { display: block; font-size: 0.6875rem; color: var(--text-muted); }
.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.user-dropdown a:hover { background: var(--bg); color: var(--text); }
.user-dropdown a svg { flex-shrink: 0; opacity: 0.4; }
.user-dropdown-divider { height: 1px; background: var(--border-light); margin: 0; }
.user-dropdown-logout { color: var(--red) !important; }
.user-dropdown-logout:hover { background: var(--error-bg) !important; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}
.hamburger span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text);
    transition: transform var(--transition), opacity var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translateY(6.5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translateY(-6.5px); }

/* Nav mobile */
.nav-mobile {
    display: none;
    flex-direction: column;
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    padding: 1.5rem 2rem 2rem;
}
.nav-mobile a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile-divider { height: 1px; background: var(--border-light); margin: 0.5rem 0; }
.nav-mobile-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0;
    font-weight: 500;
    color: var(--text);
}
.nav-mobile-logout { color: var(--red) !important; }
.nav-mobile-auth { display: flex; gap: 0.6rem; padding: 0.75rem 0; }

@media (max-width: 768px) {
    .nav-desktop, .header-search, .header-actions { display: none; }
    .hamburger { display: flex; }
    .nav-mobile { display: flex; }
    .header-inner { grid-template-columns: auto 1fr auto; gap: 1rem; }
    .logo { font-size: 1.3rem; }
}

/* --- BREADCRUMB --- */
.breadcrumb {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1rem 2rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.container .breadcrumb { max-width: none; padding-left: 0; padding-right: 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.breadcrumb li { display: flex; align-items: center; gap: 0.25rem; }
.breadcrumb li:not(:last-child)::after { content: '/'; color: var(--border); margin: 0 0.15rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }

/* --- FLASH MESSAGES --- */
.flash {
    max-width: var(--max-w);
    margin: 0.75rem auto;
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    border-left: 2px solid transparent;
}
.flash-success { background: var(--success-bg); color: #276749; border-left-color: var(--success); }
.flash-error { background: var(--error-bg); color: #9B2C2C; border-left-color: var(--error); }

/* --- SEARCH BAR COMPONENT --- */
.search-bar { position: relative; width: 100%; }
.search-bar-form {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar-form:focus-within {
    border-color: var(--text);
}
.search-bar-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    font-size: 0.875rem;
    color: var(--text);
    background: transparent;
    min-width: 0;
    letter-spacing: 0.01em;
}
.search-bar-input::placeholder { color: var(--text-muted); }
.search-bar-input:focus { outline: none; }
.search-bar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    transition: color var(--transition);
    flex-shrink: 0;
}
.search-bar-btn:hover { color: var(--text); }

/* Large search bar (hero) */
.search-bar-large .search-bar-form {
    border: none;
    border-bottom: 2px solid var(--text);
    background: transparent;
}
.search-bar-large .search-bar-input {
    padding: 1rem 0.5rem 1rem 0;
    font-size: 1.125rem;
    font-family: var(--font-sans);
    letter-spacing: 0.01em;
}
.search-bar-large .search-bar-input::placeholder {
    color: var(--text-muted);
}
.search-bar-large .search-bar-btn {
    padding: 1rem 0.25rem;
    color: var(--text);
}
.search-bar-large .search-bar-btn:hover { color: var(--accent); }
.search-bar-large .search-bar-form:focus-within {
    border-color: var(--accent);
    box-shadow: none;
}

/* Autocomplete */
.autocomplete-results {
    position: absolute;
    top: calc(100% + 0.375rem);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 360px;
    overflow-y: auto;
    z-index: 200;
}
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    color: var(--text);
}
.autocomplete-item:hover { background: var(--bg); }
.autocomplete-item img, .autocomplete-img { width: 36px; height: 52px; object-fit: cover; flex-shrink: 0; }
.autocomplete-info strong { font-size: 0.8125rem; display: block; font-weight: 500; }
.autocomplete-info small { font-size: 0.75rem; color: var(--text-muted); }

/* --- HERO --- */
.hero {
    background: var(--bg);
    padding: 6rem 2rem 5rem;
    position: relative;
    overflow: hidden;
}
.hero-inner { max-width: 680px; }
.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.hero h1 {
    font-size: 3.5rem;
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin-bottom: 1.25rem;
    font-family: var(--font-serif);
}
.hero h1 em {
    font-style: italic;
}
.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 480px;
}
.hero-search-wrap {
    margin-bottom: 2rem;
    max-width: 520px;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.hero-tag {
    display: inline-block;
    padding: 0.35rem 0.875rem;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    transition: all var(--transition-slow);
}
.hero-tag:hover {
    border-color: var(--text);
    color: var(--text);
}

@media (max-width: 768px) {
    .hero { padding: 3.5rem 1.5rem 3rem; }
    .hero h1 { font-size: 2.25rem; }
    .hero-subtitle { font-size: 0.9375rem; }
}

/* --- SECTIONS --- */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-alt { background: var(--surface); }
.section-dark {
    background: var(--dark);
    color: var(--text-inverse);
}
.section-dark h2, .section-dark h3 { color: var(--text-inverse); }
.section-dark p { color: var(--text-inverse-muted); }
.section-header {
    margin-bottom: 2.5rem;
}
.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}
.section-header p { color: var(--text-secondary); font-size: 0.9375rem; max-width: 480px; }
.section-header-center { text-align: center; }
.section-header-center p { margin: 0.5rem auto 0; }
.section-cta { margin-top: 2.5rem; }
.section-cta-center { text-align: center; margin-top: 3rem; }

/* --- STEPS --- */
.steps-section {
    padding: 4rem 0;
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}
.step { text-align: center; }
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--text);
    border-radius: 50%;
    color: var(--text);
    font-weight: 500;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    margin-bottom: 1rem;
}
.step h3 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}
.step p { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.65; max-width: 280px; margin: 0 auto; }

@media (max-width: 640px) {
    .steps-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- CATEGORIES (editorial style) --- */
.categories-editorial {
    padding: 5rem 0;
    text-align: center;
}
.categories-editorial .cat-label {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2rem;
    display: block;
}
.categories-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.categories-list a {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-muted);
    padding: 0.35rem 1rem;
    transition: all var(--transition-slow);
    letter-spacing: -0.01em;
    position: relative;
}
.categories-list a:hover {
    color: var(--text);
}
.categories-list a.active {
    color: var(--text);
}
.categories-list a.active::after {
    content: '';
    position: absolute;
    bottom: 0.3rem;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--accent);
}

@media (max-width: 768px) {
    .categories-list a { font-size: 1.5rem; }
}

/* --- GENRE CARDS (compact) --- */
.genres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
}
.genre-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    font-size: 0.8125rem;
    transition: all var(--transition-slow);
}
.genre-card:hover {
    border-color: var(--text);
    color: var(--text);
}
.genre-emoji { font-size: 1.1rem; flex-shrink: 0; }
.genre-name { letter-spacing: 0.01em; }

/* --- BOOK CARD --- */
.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}
@media (max-width: 1024px) { .books-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .books-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; } }

.book-card {
    background: transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    group: true;
}
.book-card-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.book-card-img-wrap {
    position: relative;
    background: var(--bg-alt);
    overflow: hidden;
    margin-bottom: 0.875rem;
}
.book-card-img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    padding: 1.5rem;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.book-card:hover .book-card-img {
    transform: scale(1.04);
}
.book-card-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    color: var(--text-muted);
    font-size: 3rem;
    font-family: var(--font-serif);
    height: 260px;
}
.book-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.book-card:hover .book-card-overlay {
    opacity: 1;
    transform: translateY(0);
}
.book-card-overlay .btn {
    font-size: 0.6875rem;
    padding: 0.5rem 1.5rem;
    background: var(--dark);
    color: var(--text-inverse);
    border: none;
}
.book-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--red);
    color: var(--text-inverse);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
}
.book-card-body {
    display: flex;
    flex-direction: column;
}
.book-card-title {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.book-card-author {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}
.book-card-price {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}
.book-card-price small {
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--text-muted);
}
.book-card-price-old {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.75rem;
}
.book-card-price-sale {
    color: var(--red);
}
.book-card-rating {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-top: 0.3rem;
}
.book-card-rating .star { font-size: 0.6875rem; color: var(--border); }
.book-card-rating .star.filled { color: var(--warning); }
.book-card-rating small { font-size: 0.6875rem; color: var(--text-muted); margin-left: 0.2rem; }
/* Legacy support: old book-card-btn becomes overlay-based */
.book-card-btn { display: none; }

/* Book card checkbox (for lists) */
.book-card-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* --- STATS --- */
.stats-section {
    padding: 4rem 0;
    background: var(--dark);
    color: var(--text-inverse);
}
.stats-grid {
    display: flex;
    gap: 0;
    justify-content: center;
}
.stat {
    text-align: center;
    padding: 1.5rem 3.5rem;
    position: relative;
}
.stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.12);
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 400;
    font-family: var(--font-serif);
    color: var(--text-inverse);
    letter-spacing: -0.02em;
    line-height: 1;
}
.stat-label {
    font-size: 0.6875rem;
    color: var(--text-inverse-muted);
    margin-top: 0.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: block;
}

@media (max-width: 640px) {
    .stats-grid { flex-direction: column; gap: 0; }
    .stat { padding: 1.25rem 2rem; }
    .stat:not(:last-child)::after { display: none; }
    .stat:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.08); }
    .stat-number { font-size: 2rem; }
}

/* --- BLOG CARDS --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 768px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
    display: block;
    background: transparent;
    text-decoration: none;
    color: var(--text);
}
.blog-card:hover { color: var(--text); }
.blog-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-alt);
    margin-bottom: 1rem;
    transition: opacity 0.4s ease;
}
.blog-card:hover .blog-card-img { opacity: 0.85; }
.blog-card-body { }
.blog-card-body h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0.4rem;
    transition: color var(--transition);
}
.blog-card:hover .blog-card-body h3 { color: var(--accent); }
.blog-card-body p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-date {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: block;
    letter-spacing: 0.02em;
}

/* --- FAQ --- */
.faq-list { max-width: 680px; }
.faq-item {
    border-bottom: 1px solid var(--border-light);
}
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    background: none;
    border: none;
    text-align: left;
    font-weight: 400;
    font-size: 0.9375rem;
    color: var(--text);
    cursor: pointer;
    gap: 1rem;
    transition: color var(--transition);
}
.faq-question:hover { color: var(--accent); }
.faq-toggle {
    font-size: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.faq-answer {
    padding: 0 0 1.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.75;
}

/* --- PRICE TABLE --- */
.price-comparator { margin: 2rem 0; }
.price-comparator h2 { margin-bottom: 0.25rem; }
.comparator-subtitle { color: var(--text-muted); margin-bottom: 1.25rem; font-size: 0.8125rem; }

.price-table-wrapper { overflow-x: auto; }
.price-table {
    width: 100%;
    border-collapse: collapse;
}
.price-table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--text);
}
.price-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    vertical-align: middle;
}
.price-table tbody tr { transition: background var(--transition); }
.price-table tbody tr:hover td { background: var(--bg); }
.price-table tbody tr.best-price-row td { background: var(--green-light); }

.merchant-badge {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    border: 1px solid var(--merchant-color, var(--border));
    color: var(--merchant-color, var(--text));
    font-weight: 600;
    font-size: 0.6875rem;
    letter-spacing: 0.02em;
}
.price-value { font-weight: 600; color: var(--text); font-size: 0.9375rem; }
.best-price .price-value { color: var(--green); }
.best-badge {
    display: inline-block;
    background: var(--green);
    color: var(--text-inverse);
    font-size: 0.5625rem;
    padding: 0.1rem 0.4rem;
    font-weight: 600;
    margin-left: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.price-check { color: var(--text-muted); font-size: 0.8125rem; }
.btn-affiliate {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    background: var(--dark);
    color: var(--text-inverse);
    font-size: 0.6875rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background var(--transition);
    border: none;
}
.btn-affiliate:hover { background: var(--dark-soft); color: var(--text-inverse); }
.affiliate-disclaimer { font-size: 0.6875rem; color: var(--text-muted); margin-top: 0.75rem; }

/* Price cards mobile */
.price-cards-mobile { display: none; }
@media (max-width: 768px) {
    .price-table-wrapper { display: none; }
    .price-cards-mobile {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.625rem;
    }
}
@media (max-width: 420px) {
    .price-cards-mobile { grid-template-columns: 1fr; }
}

.affiliate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    text-align: center;
}
.affiliate-card:hover { border-color: var(--text); color: var(--text); }
.affiliate-name { font-weight: 600; font-size: 0.75rem; }
.affiliate-price-value { font-weight: 600; font-size: 1.125rem; color: var(--text); }
.affiliate-btn {
    display: inline-block;
    padding: 0.35rem 0.875rem;
    background: var(--dark);
    color: var(--text-inverse);
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* --- BOOK DETAIL --- */
.book-detail-page { padding: 2rem 0 4rem; }
.book-detail-top {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 4rem;
    margin-bottom: 2.5rem;
}
.book-cover { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
.book-cover img {
    width: 100%;
    background: var(--bg-alt);
}
.book-cover-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    color: var(--text-muted);
    font-size: 4rem;
    font-family: var(--font-serif);
}
.book-info h1 { font-size: 2.25rem; margin-bottom: 0.35rem; }
.book-subtitle { color: var(--text-secondary); font-size: 1rem; margin-bottom: 0.5rem; }
.book-author {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.book-author a { color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.book-author a:hover { color: var(--accent); }
.book-rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-bottom: 1rem;
}
.star { color: var(--border); font-size: 0.875rem; }
.star.filled { color: var(--warning); }
.rating-count { font-size: 0.75rem; color: var(--text-muted); margin-left: 0.3rem; }

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin: 1.25rem 0;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}
.meta-item {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}
.meta-item strong { color: var(--text-secondary); font-weight: 500; }

.book-price {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 1.25rem 0;
    flex-wrap: wrap;
}
.book-price .price-label { font-size: 0.8125rem; color: var(--text-secondary); }
.book-price .price-value {
    font-size: 1.75rem;
    font-weight: 400;
    font-family: var(--font-serif);
    color: var(--text);
}
.book-price .price-merchant { font-size: 0.75rem; color: var(--text-muted); }

.book-actions {
    margin: 1.5rem 0;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.list-select-dropdown {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.list-select-dropdown select {
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    background: var(--surface);
}

.book-description { margin: 2.5rem 0; }
.book-description h2 { margin-bottom: 0.75rem; }
.book-description .description-text { line-height: 1.85; font-size: 0.9375rem; color: var(--text-secondary); }
.description-text.truncated { max-height: 200px; overflow: hidden; position: relative; }
.description-text.truncated::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: linear-gradient(transparent, var(--bg));
}
.btn-read-more {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8125rem;
    padding: 0.4rem 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.btn-read-more:hover { color: var(--accent); }

.section-similar { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--border-light); }
.section-similar h2 { margin-bottom: 1.5rem; }

/* Price history chart */
.price-history { margin: 3rem 0; }
.price-history h2 { margin-bottom: 1rem; }
.chart-container {
    position: relative;
    height: 280px;
    background: var(--surface);
    padding: 1.25rem;
    border: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .book-detail-top { grid-template-columns: 1fr; gap: 1.5rem; }
    .book-cover { position: static; max-width: 220px; }
    .book-info h1 { font-size: 1.5rem; }
}

/* --- SEARCH PAGE --- */
.search-page { padding: 2rem 0 4rem; }
.search-page h1 { margin-bottom: 1.25rem; }
.search-count { color: var(--text-muted); font-size: 0.8125rem; margin: 0.75rem 0 1.5rem; }

/* --- GENRE / AUTHOR PAGES --- */
.genre-header, .author-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}
.genre-emoji-large { font-size: 2.5rem; display: block; margin-bottom: 0.4rem; }
.genre-description, .author-bio { color: var(--text-secondary); max-width: 540px; font-size: 0.9375rem; line-height: 1.7; margin-top: 0.5rem; }
.genre-count, .author-count { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.3rem; letter-spacing: 0.02em; }

/* --- COMPARE PAGE --- */
.compare-hero { margin-bottom: 3rem; }
.compare-hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.compare-hero > p { color: var(--text-secondary); max-width: 640px; font-size: 0.9375rem; line-height: 1.7; }
.merchants-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.merchant-badge-card {
    padding: 0.5rem 1rem;
    border: 1px solid var(--merchant-color, var(--border));
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--merchant-color, var(--text));
    letter-spacing: 0.02em;
}
.compare-genres, .compare-authors, .compare-popular, .compare-merchants { margin-bottom: 3rem; }
.compare-genres h2, .compare-authors h2, .compare-popular h2, .compare-merchants h2, .compare-seo-content h2 { margin-bottom: 1rem; }
.authors-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.author-tag {
    display: inline-block;
    padding: 0.35rem 0.875rem;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    transition: all var(--transition);
}
.author-tag:hover { border-color: var(--text); color: var(--text); }
.author-tag small { color: var(--text-muted); font-size: 0.75rem; }
.compare-seo-content { max-width: var(--max-w-narrow); line-height: 1.8; }
.compare-seo-content ol { padding-left: 1.5rem; margin: 1rem 0; }
.compare-seo-content li { margin-bottom: 0.4rem; }

/* --- FORMS --- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    color: var(--text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 0.7rem 0.875rem;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.9375rem;
    color: var(--text);
    transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--text);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-error { color: var(--error); font-size: 0.75rem; margin-top: 0.2rem; }

/* --- AUTH PAGES --- */
.auth-page { display: flex; justify-content: center; padding: 4rem 1rem; }
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    padding: 3rem;
    max-width: 420px;
    width: 100%;
}
.auth-card h1 { font-size: 2rem; margin-bottom: 0.35rem; }
.auth-card > p { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.875rem; }
.auth-form .form-group { margin-bottom: 1.25rem; }
.auth-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
    font-size: 0.6875rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.auth-form input {
    width: 100%;
    padding: 0.7rem 0.875rem;
    border: 1px solid var(--border);
    font-size: 0.9375rem;
    color: var(--text);
    transition: border-color var(--transition);
}
.auth-form input:focus { border-color: var(--text); outline: none; }
.auth-switch { margin-top: 2rem; text-align: center; font-size: 0.8125rem; color: var(--text-muted); }
.auth-switch a { color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.auth-switch a:hover { color: var(--accent); }

/* --- LISTS --- */
.lists-page h1, .list-detail-page h1, .alerts-page h1 { margin-bottom: 1.5rem; }
.create-list-form { margin-bottom: 2rem; }
.form-inline { display: flex; gap: 0.5rem; }
.form-inline input {
    flex: 1;
    padding: 0.7rem 0.875rem;
    border: 1px solid var(--border);
    font-size: 0.9375rem;
}
.form-inline input:focus { border-color: var(--text); outline: none; }
.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.list-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    position: relative;
    transition: border-color var(--transition);
}
.list-card:hover { border-color: var(--text); }
.list-card-link { text-decoration: none; color: var(--text); display: block; }
.list-card h3 { font-size: 1.125rem; margin-bottom: 0.35rem; }
.list-count { color: var(--accent); font-weight: 500; font-size: 0.8125rem; }
.list-date { display: block; margin-top: 0.4rem; color: var(--text-muted); font-size: 0.6875rem; }
.list-delete-form { position: absolute; top: 1rem; right: 1rem; }
.btn-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color var(--transition);
}
.btn-delete:hover { color: var(--error); }
.btn-remove {
    background: none;
    border: 1px solid var(--error);
    color: var(--error);
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    font-size: 0.6875rem;
    margin-top: 0.4rem;
    letter-spacing: 0.02em;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}
.back-link:hover { color: var(--text); }

/* --- ALERTS --- */
.alerts-table-wrapper { overflow-x: auto; }
.alerts-table { width: 100%; border-collapse: collapse; }
.alerts-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--text);
}
.alerts-table td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--border-light); font-size: 0.8125rem; }
.alerts-table a { color: var(--text); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.badge { display: inline-block; padding: 0.15rem 0.5rem; font-size: 0.625rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.badge-success { background: var(--green-light); color: var(--green); }
.badge-muted { background: var(--bg-alt); color: var(--text-muted); }
.badge-genre { background: var(--bg-alt); color: var(--text-secondary); text-decoration: none; transition: background 0.2s; }
.badge-genre:hover { background: var(--green-light); color: var(--green); }
.book-genres { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }

/* --- PAGINATION --- */
.pagination { display: flex; gap: 0.25rem; justify-content: center; padding: 3rem 0 1rem; flex-wrap: wrap; }
.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: all var(--transition);
    text-decoration: none;
    border: none;
    background: none;
}
.pagination-link:hover { color: var(--text); }
.pagination-link.active { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.pagination-link.disabled { opacity: 0.3; pointer-events: none; }
.pagination-ellipsis { display: inline-flex; align-items: center; padding: 0 0.25rem; color: var(--text-muted); font-size: 0.8125rem; }

/* --- EMPTY STATE --- */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-secondary); margin-bottom: 2rem; max-width: 380px; margin-inline: auto; font-size: 0.9375rem; }

/* Search suggestions */
.search-suggestions { margin-top: 2rem; }
.search-suggestions h3 { font-size: 1.125rem; margin-bottom: 0.75rem; }
.search-categories { margin-top: 2rem; }
.search-categories h3 { font-size: 1.125rem; margin-bottom: 0.75rem; }

/* --- CONTENT / STATIC PAGES --- */
.static-page { padding: 3rem 0 4rem; }
.page-content { max-width: var(--max-w-narrow); line-height: 1.85; font-size: 0.9375rem; }
.page-content h2 { margin: 2.5rem 0 0.75rem; }
.page-content h3 { margin: 2rem 0 0.5rem; }
.page-content p { margin-bottom: 1rem; color: var(--text-secondary); }
.page-content ul, .page-content ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.page-content li { margin-bottom: 0.4rem; color: var(--text-secondary); }
.contact-form { max-width: 540px; margin-top: 2rem; }
.contact-form .form-group { margin-bottom: 1.25rem; }
.contact-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%;
    padding: 0.7rem 0.875rem;
    border: 1px solid var(--border);
    font-size: 0.9375rem;
    color: var(--text);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    border-color: var(--text);
    outline: none;
}

/* --- BLOG ARTICLE --- */
.blog-article-header { margin-bottom: 2.5rem; }
.blog-article-header h1 { font-size: 2.5rem; line-height: 1.15; }
.blog-article-meta { display: flex; gap: 1rem; color: var(--text-muted); font-size: 0.75rem; margin-top: 0.75rem; letter-spacing: 0.02em; }
.blog-article-img { width: 100%; margin-bottom: 2.5rem; }
.blog-article-content { max-width: var(--max-w-narrow); line-height: 1.85; font-size: 0.9375rem; }
.blog-article-content h2 { margin: 2.5rem 0 0.75rem; }
.blog-article-content h3 { margin: 2rem 0 0.5rem; }
.blog-article-content p { margin-bottom: 1rem; color: var(--text-secondary); }
.blog-article-content ul, .blog-article-content ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.blog-article-cta {
    max-width: var(--max-w-narrow);
    margin: 2.5rem 0;
    padding: 1.5rem 2rem;
    background: var(--bg);
    border-left: 2px solid var(--accent);
    font-size: 0.9375rem;
    line-height: 1.65;
}
.blog-article-cta p { margin: 0; }
.blog-article-cta a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.blog-article-cta a:hover { color: var(--accent); }
.blog-related { margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid var(--border-light); }
.blog-related h2 { margin-bottom: 1.25rem; }

/* --- ERROR PAGE --- */
.error-page { text-align: center; padding: 6rem 1rem; }
.error-content h1 {
    font-size: 6rem;
    color: var(--text);
    font-family: var(--font-serif);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.error-content h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.error-content p { color: var(--text-secondary); margin-bottom: 2.5rem; max-width: 400px; margin-inline: auto; }
.error-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* --- AD ZONE --- */
.ad-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    min-height: 90px;
    margin: 2rem 0;
}
.ad-placeholder { font-size: 0.5625rem; color: var(--text-muted); letter-spacing: 3px; text-transform: uppercase; }

/* --- FOOTER --- */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    padding-top: 5rem;
    margin-top: auto;
    position: relative;
}
.footer-brand {
    text-align: center;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand-name {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 400;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 0.75rem;
}
.footer-brand-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    color: rgba(255,255,255,0.35);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    padding: 3rem 0;
}
.footer-col h3 {
    color: rgba(255,255,255,0.9);
    font-family: var(--font-sans);
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col a {
    color: rgba(255,255,255,0.45);
    font-size: 0.8125rem;
    transition: color var(--transition);
}
.footer-col a:hover { color: rgba(255,255,255,0.85); }

.footer-logo {
    display: none;
}
.footer-col > p { font-size: 0.8125rem; line-height: 1.65; color: rgba(255,255,255,0.35); }
.footer-tagline { display: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.04em;
}
.footer-affiliate-notice { margin-top: 0.3rem; opacity: 0.7; font-size: 0.625rem; }

@media (max-width: 768px) {
    .footer-brand-name { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* --- SCROLL REVEAL --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.stagger-children > .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger-children > .reveal:nth-child(2) { transition-delay: 60ms; }
.stagger-children > .reveal:nth-child(3) { transition-delay: 120ms; }
.stagger-children > .reveal:nth-child(4) { transition-delay: 180ms; }
.stagger-children > .reveal:nth-child(5) { transition-delay: 240ms; }
.stagger-children > .reveal:nth-child(6) { transition-delay: 300ms; }
.stagger-children > .reveal:nth-child(7) { transition-delay: 340ms; }
.stagger-children > .reveal:nth-child(8) { transition-delay: 380ms; }
.stagger-children > .reveal:nth-child(9) { transition-delay: 420ms; }
.stagger-children > .reveal:nth-child(10) { transition-delay: 460ms; }
.stagger-children > .reveal:nth-child(11) { transition-delay: 500ms; }
.stagger-children > .reveal:nth-child(12) { transition-delay: 540ms; }

/* --- LOADING SKELETON --- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-alt) 25%, var(--bg) 50%, var(--bg-alt) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- SMOOTH PAGE ENTRY --- */
main {
    animation: pageIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- PRINT --- */
@media print {
    .site-header, .site-footer, .nav-mobile, .hamburger, .ad-zone { display: none !important; }
    body { background: white; color: black; }
    .reveal { opacity: 1 !important; transform: none !important; }
}
