/* ===================================================
   PREMIUM DIGITAL BOOKCASE — 10 THEMES
   ================================================== */

:root {
    --accent: #f39c12;
    --accent-glow: rgba(243, 156, 18, 0.35);
    --font-stack: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --shelf-depth: 34px;
    --shelf-front-height: 16px;
    --transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============ THEME 1: Classic Walnut (Klasik Ceviz & Altın) ============ */
body.theme-wood {
    --bg-wall: radial-gradient(circle at 50% 0%, #fdfbf7 0%, #ede6d9 100%);
    --cabinet-bg: #3a2618;
    --cabinet-border: #22140a;
    --cabinet-light: rgba(74, 48, 30, 0.95);
    --backboard-slat: rgba(20, 10, 5, 0.4);
    --crown-bg: linear-gradient(180deg, #482f1d 0%, #291a10 100%);
    --crown-hl: rgba(255, 215, 0, 0.4);
    --crown-text: #f5d061;
    --pillar-out: #402a1a; --pillar-mid: #2c1c11; --pillar-in: #1c110a;
    --shelf-top: linear-gradient(180deg, #5c3a21 0%, #3a2618 60%, #1f130b 100%);
    --shelf-front: linear-gradient(180deg, #4a301e 0%, #2c1a0f 100%);
    --shelf-hl: rgba(255, 255, 255, 0.15);
    --shelf-shadow: rgba(0, 0, 0, 0.85);
    --shelf-led: rgba(255, 180, 80, 0.35);
    --header-bg: rgba(253, 251, 247, 0.95);
    --header-border: rgba(58, 38, 24, 0.3);
    --text-main: #241a12;
    --text-muted: #665040;
    --card-glow: rgba(245, 208, 97, 0.4);
    --pill-bg: rgba(58, 38, 24, 0.08);
    --pill-hover: rgba(58, 38, 24, 0.15);
    --accent: #b46b25;
    --accent-glow: rgba(180, 107, 37, 0.4);
    --label-badge-bg: linear-gradient(180deg, #f5d061 0%, #c49a3b 100%);
    --label-badge-border: #8c6a21;
    --label-badge-text: #2a1f0a;
}

/* ============ THEME 2: Industrial Steel (Endüstriyel Çelik & Siyan) ============ */
body.theme-dark_glass {
    --bg-wall: radial-gradient(circle at 50% 0%, #2a2e33 0%, #121417 100%);
    --cabinet-bg: #1c2127;
    --cabinet-border: #0a0c0f;
    --cabinet-light: rgba(45, 55, 65, 0.95);
    --backboard-slat: rgba(0, 0, 0, 0.5);
    --crown-bg: linear-gradient(180deg, #2b323b 0%, #161a1f 100%);
    --crown-hl: rgba(0, 212, 255, 0.5);
    --crown-text: #00d4ff;
    --pillar-out: #242a32; --pillar-mid: #181d23; --pillar-in: #0d0f12;
    --shelf-top: linear-gradient(180deg, #323b46 0%, #1e242a 60%, #101317 100%);
    --shelf-front: linear-gradient(180deg, #2a313a 0%, #15181d 100%);
    --shelf-hl: rgba(255, 255, 255, 0.2);
    --shelf-shadow: rgba(0, 0, 0, 0.9);
    --shelf-led: rgba(0, 212, 255, 0.4);
    --header-bg: rgba(28, 33, 39, 0.95);
    --header-border: rgba(0, 212, 255, 0.3);
    --text-main: #f0f4f8;
    --text-muted: #8a9ba8;
    --card-glow: rgba(0, 212, 255, 0.45);
    --pill-bg: rgba(0, 212, 255, 0.1);
    --pill-hover: rgba(0, 212, 255, 0.2);
    --accent: #00a8cc;
    --accent-glow: rgba(0, 168, 204, 0.5);
    --label-badge-bg: linear-gradient(180deg, #1f252b 0%, #111418 100%);
    --label-badge-border: #00d4ff;
    --label-badge-text: #00d4ff;
}

/* ============ THEME 3: Nordic Oak (İskandinav Meşe & Gece Mavisi) ============ */
body.theme-nordic {
    --bg-wall: radial-gradient(circle at 50% 0%, #2c3e50 0%, #1a252f 100%);
    --cabinet-bg: #e6d7c3;
    --cabinet-border: #b8a38c;
    --cabinet-light: rgba(245, 235, 220, 0.95);
    --backboard-slat: rgba(150, 120, 90, 0.15);
    --crown-bg: linear-gradient(180deg, #f0e4d4 0%, #d5c3ac 100%);
    --crown-hl: rgba(255, 255, 255, 0.8);
    --crown-text: #34495e;
    --pillar-out: #ebdcd0; --pillar-mid: #dbccbc; --pillar-in: #c7b5a1;
    --shelf-top: linear-gradient(180deg, #f5ebde 0%, #dfccb7 60%, #c4ab8f 100%);
    --shelf-front: linear-gradient(180deg, #e0d0bc 0%, #c2ac93 100%);
    --shelf-hl: rgba(255, 255, 255, 0.9);
    --shelf-shadow: rgba(0, 0, 0, 0.4);
    --shelf-led: rgba(255, 220, 160, 0.6);
    --header-bg: rgba(230, 215, 195, 0.95);
    --header-border: rgba(184, 163, 140, 0.4);
    --text-main: #f8f9fa;
    --text-muted: #95a5a6;
    --card-glow: rgba(230, 215, 195, 0.3);
    --pill-bg: rgba(230, 215, 195, 0.15);
    --pill-hover: rgba(230, 215, 195, 0.25);
    --accent: #e67e22;
    --accent-glow: rgba(230, 126, 34, 0.5);
    --label-badge-bg: linear-gradient(180deg, #34495e 0%, #2c3e50 100%);
    --label-badge-border: #e67e22;
    --label-badge-text: #ecf0f1;
}

/* ============ THEME 4: Emerald Library (İngiliz Zümrüt & Altın) ============ */
body.theme-emerald {
    --bg-wall: radial-gradient(circle at 50% 0%, #f4eee1 0%, #d8cbb3 100%);
    --cabinet-bg: #0f3d2b;
    --cabinet-border: #061c13;
    --cabinet-light: rgba(25, 75, 55, 0.95);
    --backboard-slat: rgba(0, 0, 0, 0.35);
    --crown-bg: linear-gradient(180deg, #16573e 0%, #0a261a 100%);
    --crown-hl: rgba(212, 175, 55, 0.5);
    --crown-text: #d4af37;
    --pillar-out: #134a34; --pillar-mid: #0b3021; --pillar-in: #061c13;
    --shelf-top: linear-gradient(180deg, #1c6b4b 0%, #11422f 60%, #071f16 100%);
    --shelf-front: linear-gradient(180deg, #16573e 0%, #0b2e21 100%);
    --shelf-hl: rgba(255, 255, 255, 0.15);
    --shelf-shadow: rgba(0, 0, 0, 0.85);
    --shelf-led: rgba(212, 175, 55, 0.35);
    --header-bg: rgba(244, 238, 225, 0.95);
    --header-border: rgba(15, 61, 43, 0.2);
    --text-main: #1a1a1a;
    --text-muted: #5a5a5a;
    --card-glow: rgba(212, 175, 55, 0.4);
    --pill-bg: rgba(15, 61, 43, 0.08);
    --pill-hover: rgba(15, 61, 43, 0.15);
    --accent: #11573c;
    --accent-glow: rgba(17, 87, 60, 0.4);
    --label-badge-bg: linear-gradient(180deg, #d4af37 0%, #aa8c2c 100%);
    --label-badge-border: #75611e;
    --label-badge-text: #2a230b;
}

/* ============ THEME 5: Modern Anthracite (Modern Antrasit & Karbon) ============ */
body.theme-minimalist {
    --bg-wall: radial-gradient(circle at 50% 0%, #ffffff 0%, #e2e8f0 100%);
    --cabinet-bg: #1e2227;
    --cabinet-border: #0f1114;
    --cabinet-light: rgba(45, 50, 55, 0.95);
    --backboard-slat: rgba(0, 0, 0, 0.4);
    --crown-bg: linear-gradient(180deg, #2b3036 0%, #15181b 100%);
    --crown-hl: rgba(255, 255, 255, 0.15);
    --crown-text: #e2e8f0;
    --pillar-out: #252a30; --pillar-mid: #181b1f; --pillar-in: #0d0e11;
    --shelf-top: linear-gradient(180deg, #363c43 0%, #1e2227 60%, #101215 100%);
    --shelf-front: linear-gradient(180deg, #2b3036 0%, #15181b 100%);
    --shelf-hl: rgba(255, 255, 255, 0.2);
    --shelf-shadow: rgba(0, 0, 0, 0.85);
    --shelf-led: rgba(255, 255, 255, 0.3);
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-border: rgba(30, 34, 39, 0.2);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-glow: rgba(255, 255, 255, 0.4);
    --pill-bg: rgba(30, 34, 39, 0.05);
    --pill-hover: rgba(30, 34, 39, 0.1);
    --accent: #2c333a;
    --accent-glow: rgba(44, 51, 58, 0.4);
    --label-badge-bg: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
    --label-badge-border: #94a3b8;
    --label-badge-text: #0f172a;
}

/* ============ THEME 6: Rosewood & Ivory (Gül Ağacı & Fildişi) ============ */
body.theme-rose_gold {
    --bg-wall: radial-gradient(circle at 50% 0%, #fffdfc 0%, #f4e9e5 100%);
    --cabinet-bg: #4a1c18;
    --cabinet-border: #230a08;
    --cabinet-light: rgba(100, 42, 36, 0.95);
    --backboard-slat: rgba(0, 0, 0, 0.4);
    --crown-bg: linear-gradient(180deg, #612722 0%, #32100d 100%);
    --crown-hl: rgba(255, 204, 204, 0.3);
    --crown-text: #fbc6c0;
    --pillar-out: #52201b; --pillar-mid: #381310; --pillar-in: #1f0806;
    --shelf-top: linear-gradient(180deg, #78322c 0%, #4a1c18 60%, #260c09 100%);
    --shelf-front: linear-gradient(180deg, #612722 0%, #34110e 100%);
    --shelf-hl: rgba(255, 255, 255, 0.15);
    --shelf-shadow: rgba(0, 0, 0, 0.85);
    --shelf-led: rgba(255, 175, 165, 0.35);
    --header-bg: rgba(255, 253, 252, 0.95);
    --header-border: rgba(74, 28, 24, 0.2);
    --text-main: #2b1411;
    --text-muted: #825b57;
    --card-glow: rgba(251, 198, 192, 0.4);
    --pill-bg: rgba(74, 28, 24, 0.05);
    --pill-hover: rgba(74, 28, 24, 0.12);
    --accent: #8c2a21;
    --accent-glow: rgba(140, 42, 33, 0.4);
    --label-badge-bg: linear-gradient(180deg, #fbeae8 0%, #d8b7b3 100%);
    --label-badge-border: #a87e79;
    --label-badge-text: #3d1714;
}

/* ============ THEME 7: Midnight Sapphire (Safir Lacivert & Platin) ============ */
body.theme-midnight {
    --bg-wall: radial-gradient(circle at 50% 0%, #eef2f8 0%, #cbd8e8 100%);
    --cabinet-bg: #0b1528;
    --cabinet-border: #040810;
    --cabinet-light: rgba(25, 45, 80, 0.95);
    --backboard-slat: rgba(0, 0, 0, 0.5);
    --crown-bg: linear-gradient(180deg, #132442 0%, #070e1b 100%);
    --crown-hl: rgba(200, 220, 255, 0.4);
    --crown-text: #c8dcff;
    --pillar-out: #0f1d35; --pillar-mid: #08101e; --pillar-in: #040810;
    --shelf-top: linear-gradient(180deg, #1a3055 0%, #0b1528 60%, #050a14 100%);
    --shelf-front: linear-gradient(180deg, #122240 0%, #080f1e 100%);
    --shelf-hl: rgba(255, 255, 255, 0.15);
    --shelf-shadow: rgba(0, 0, 0, 0.9);
    --shelf-led: rgba(140, 180, 255, 0.35);
    --header-bg: rgba(238, 242, 248, 0.95);
    --header-border: rgba(11, 21, 40, 0.2);
    --text-main: #0b1528;
    --text-muted: #586a8a;
    --card-glow: rgba(140, 180, 255, 0.35);
    --pill-bg: rgba(11, 21, 40, 0.08);
    --pill-hover: rgba(11, 21, 40, 0.15);
    --accent: #19386d;
    --accent-glow: rgba(25, 56, 109, 0.4);
    --label-badge-bg: linear-gradient(180deg, #f5f8ff 0%, #b8cbe0 100%);
    --label-badge-border: #758ea8;
    --label-badge-text: #0b1528;
}

/* ============ THEME 8: Royal Mahogany (Kızıl Maun & Pirinç) ============ */
body.theme-cherry {
    --bg-wall: radial-gradient(circle at 50% 0%, #1c211f 0%, #0e1210 100%);
    --cabinet-bg: #4f1e16;
    --cabinet-border: #210a06;
    --cabinet-light: rgba(110, 48, 35, 0.95);
    --backboard-slat: rgba(0, 0, 0, 0.45);
    --crown-bg: linear-gradient(180deg, #6b2a1f 0%, #36120c 100%);
    --crown-hl: rgba(255, 190, 110, 0.4);
    --crown-text: #ffcf85;
    --pillar-out: #5b241b; --pillar-mid: #3d150e; --pillar-in: #220b06;
    --shelf-top: linear-gradient(180deg, #803527 0%, #4f1e16 60%, #2a0e09 100%);
    --shelf-front: linear-gradient(180deg, #63261c 0%, #38120c 100%);
    --shelf-hl: rgba(255, 255, 255, 0.15);
    --shelf-shadow: rgba(0, 0, 0, 0.9);
    --shelf-led: rgba(255, 150, 80, 0.35);
    --header-bg: rgba(28, 33, 31, 0.95);
    --header-border: rgba(255, 207, 133, 0.2);
    --text-main: #f0f2f0;
    --text-muted: #8b9993;
    --card-glow: rgba(255, 150, 80, 0.4);
    --pill-bg: rgba(255, 207, 133, 0.1);
    --pill-hover: rgba(255, 207, 133, 0.2);
    --accent: #c44d37;
    --accent-glow: rgba(196, 77, 55, 0.5);
    --label-badge-bg: linear-gradient(180deg, #ffcf85 0%, #b88b48 100%);
    --label-badge-border: #805c2a;
    --label-badge-text: #2a1905;
}

/* ============ THEME 9: Ocean Driftwood (Kıyı Eskitme & Turkuaz LED) ============ */
body.theme-ocean {
    --bg-wall: radial-gradient(circle at 50% 0%, #15222a 0%, #080f14 100%);
    --cabinet-bg: #4a5c66;
    --cabinet-border: #232f36;
    --cabinet-light: rgba(95, 115, 125, 0.95);
    --backboard-slat: rgba(0, 0, 0, 0.4);
    --crown-bg: linear-gradient(180deg, #5b717d 0%, #37464f 100%);
    --crown-hl: rgba(0, 255, 220, 0.4);
    --crown-text: #00ffdc;
    --pillar-out: #526670; --pillar-mid: #3b4b53; --pillar-in: #27333a;
    --shelf-top: linear-gradient(180deg, #6c8491 0%, #4a5c66 60%, #2f3e46 100%);
    --shelf-front: linear-gradient(180deg, #586c78 0%, #384852 100%);
    --shelf-hl: rgba(255, 255, 255, 0.2);
    --shelf-shadow: rgba(0, 0, 0, 0.85);
    --shelf-led: rgba(0, 255, 220, 0.4);
    --header-bg: rgba(21, 34, 42, 0.95);
    --header-border: rgba(0, 255, 220, 0.3);
    --text-main: #e8f4f8;
    --text-muted: #82a0ad;
    --card-glow: rgba(0, 255, 220, 0.45);
    --pill-bg: rgba(0, 255, 220, 0.1);
    --pill-hover: rgba(0, 255, 220, 0.2);
    --accent: #2ab8a5;
    --accent-glow: rgba(42, 184, 165, 0.5);
    --label-badge-bg: linear-gradient(180deg, #2b3a42 0%, #1a252b 100%);
    --label-badge-border: #00ffdc;
    --label-badge-text: #00ffdc;
}

/* ============ THEME 10: Amethyst Velvet (Ametist Ceviz & Gümüş) ============ */
body.theme-royal {
    --bg-wall: radial-gradient(circle at 50% 0%, #fbf8fc 0%, #ebe0f0 100%);
    --cabinet-bg: #291a2b;
    --cabinet-border: #110912;
    --cabinet-light: rgba(65, 42, 68, 0.95);
    --backboard-slat: rgba(0, 0, 0, 0.4);
    --crown-bg: linear-gradient(180deg, #37233a 0%, #1b101c 100%);
    --crown-hl: rgba(255, 255, 255, 0.3);
    --crown-text: #dcb3e8;
    --pillar-out: #2e1d30; --pillar-mid: #1d101f; --pillar-in: #120914;
    --shelf-top: linear-gradient(180deg, #452b48 0%, #291a2b 60%, #160d17 100%);
    --shelf-front: linear-gradient(180deg, #352138 0%, #1d111f 100%);
    --shelf-hl: rgba(255, 255, 255, 0.15);
    --shelf-shadow: rgba(0, 0, 0, 0.85);
    --shelf-led: rgba(220, 180, 230, 0.35);
    --header-bg: rgba(251, 248, 252, 0.95);
    --header-border: rgba(41, 26, 43, 0.2);
    --text-main: #1f1121;
    --text-muted: #735978;
    --card-glow: rgba(220, 180, 230, 0.35);
    --pill-bg: rgba(41, 26, 43, 0.08);
    --pill-hover: rgba(41, 26, 43, 0.15);
    --accent: #7b4f82;
    --accent-glow: rgba(123, 79, 130, 0.4);
    --label-badge-bg: linear-gradient(180deg, #ffffff 0%, #dcd3df 100%);
    --label-badge-border: #a48da8;
    --label-badge-text: #261629;
}

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

html {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE / Edge */
}

/* Chrome, Safari, Edge: completely hide all scrollbars as requested ("herhangi kaydırma çubuğu gelmesin") */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

body {
    background: var(--bg-wall);
    color: var(--text-main);
    font-family: var(--font-stack);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    scrollbar-width: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ FLOATING GLASS HEADER ============ */
.bookcase-header {
    margin: 18px auto 0;
    width: calc(100% - 36px);
    max-width: 1400px;
    background: var(--header-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--header-border);
    border-radius: 22px;
    position: sticky;
    top: 14px;
    z-index: 200;
    padding: 11px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.library-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    flex-shrink: 1;
}

.custom-site-logo {
    max-height: 44px;
    max-width: 160px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-fallback-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
    box-shadow: 0 4px 14px var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #fff;
    flex-shrink: 0;
}

.brand-titles { min-width: 0; }

.brand-titles h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-titles p {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Search */
.search-wrapper { position: relative; }

.search-input {
    background: var(--pill-bg);
    border: 1px solid var(--header-border);
    border-radius: 100px;
    padding: 9px 16px 9px 40px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    width: 200px;
    transition: var(--transition);
}

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

.search-input:focus {
    outline: none;
    background: var(--pill-hover);
    border-color: var(--accent);
    width: 250px;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}

/* Buttons */
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: var(--pill-bg);
    border: 1px solid var(--header-border);
    border-radius: 100px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--accent-glow);
}

.nav-btn:active { transform: translateY(1px); }

/* 🛒 Satın Al Butonu */
.nav-btn.btn-buy {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
    text-decoration: none;
    font-weight: 600;
}

.nav-btn.btn-buy:hover {
    background: linear-gradient(135deg, #059669, #047857);
    border-color: #10b981;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.55);
    transform: translateY(-1px);
    color: #fff !important;
}

/* ============ CATEGORY FILTERS ============ */
.filter-section {
    max-width: 1440px;
    margin: 14px auto 0;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;       /* wrap on mobile — NO horizontal scroll */
    align-items: center;
    gap: 8px;
}

.cat-pill {
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    background: var(--pill-bg);
    border: 1px solid var(--header-border);
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.cat-pill:hover {
    color: var(--text-main);
    background: var(--pill-hover);
}

.cat-pill.active {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* ============ BOOKCASE CABINET ============ */
.bookcase-main {
    max-width: 1440px;
    width: 100%;
    margin: 14px auto 36px;
    padding: 0 20px;
    flex: 1;
}

.shelf-cabinet {
    position: relative;
    border-radius: 28px;
    padding: 52px 42px 32px;
    background-color: var(--cabinet-bg);
    background-image:
        radial-gradient(ellipse at 50% -5%, var(--cabinet-light) 0%, transparent 65%),
        repeating-linear-gradient(90deg, transparent 0, transparent 48px, var(--backboard-slat) 48px, var(--backboard-slat) 49px);
    border: 1px solid var(--cabinet-border);
    box-shadow:
        0 40px 80px -15px rgba(0,0,0,0.14),
        0 15px 35px -10px rgba(0,0,0,0.07),
        inset 0 45px 65px rgba(0,0,0,0.07),
        inset 35px 0 50px rgba(0,0,0,0.04),
        inset -35px 0 50px rgba(0,0,0,0.04);
    overflow: hidden;
}

/* 🏛️ 3D Architectural Crown Molding Header */
.cabinet-crown {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 46px;
    background: var(--crown-bg);
    border-radius: 28px 28px 0 0;
    border-top: 1.5px solid var(--crown-hl);
    border-bottom: 1px solid var(--cabinet-border);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.crown-bevel {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 80%);
    pointer-events: none;
}

.crown-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 620px;
    padding: 0 20px;
}

.crown-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--crown-text), transparent);
    opacity: 0.28;
}

.crown-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--crown-text);
    opacity: 0.88;
}

.crown-badge i {
    font-size: 12px;
    color: var(--accent);
}

/* 🏛️ 3D Vertical Side Columns (Fluted Pilasters) */
.cabinet-pillar {
    position: absolute;
    top: 46px;
    bottom: 24px;
    width: 28px;
    z-index: 15;
    pointer-events: none;
}

.cabinet-pillar-left {
    left: 0;
    background: linear-gradient(90deg, var(--pillar-out) 0%, var(--pillar-mid) 40%, var(--pillar-in) 100%);
    box-shadow: 6px 0 16px rgba(0,0,0,0.08), inset -1.5px 0 2px rgba(255,255,255,0.25);
    border-right: 1px solid var(--cabinet-border);
}

.cabinet-pillar-right {
    right: 0;
    background: linear-gradient(90deg, var(--pillar-in) 0%, var(--pillar-mid) 60%, var(--pillar-out) 100%);
    box-shadow: -6px 0 16px rgba(0,0,0,0.08), inset 1.5px 0 2px rgba(255,255,255,0.25);
    border-left: 1px solid var(--cabinet-border);
}

/* 🏛️ 3D Architectural Base Plinth */
.cabinet-base-plinth {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: var(--crown-bg);
    border-radius: 0 0 28px 28px;
    border-top: 1px solid var(--cabinet-border);
    z-index: 20;
    box-shadow: inset 0 2px 4px var(--crown-hl);
}

.cabinet-shelves-container {
    position: relative;
    z-index: 10;
    padding: 12px 10px;
}

/* ============ SHELF ROW ============ */
.shelf-row {
    position: relative;
    margin-bottom: 48px;
}

.shelf-books {
    display: flex;
    align-items: flex-end;
    justify-content: center; /* Raftaki kitapları ortala, sağ/sol boşluk dengesizliğini gider */
    gap: 36px;
    padding: 20px 28px 0;
    overflow-x: hidden !important; /* No scrollbars on shelf */
    overflow-y: visible !important;
    scrollbar-width: none !important;
    position: relative;
    z-index: 6;
    height: 330px;
}

.shelf-books::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ============ 3D ULTRA-FLUID BOOK MODEL (MAGAZA/KITAPLIK STYLED) ============ */
.book-wrapper.grand-3d-book-unit {
    width: 175px;
    cursor: pointer;
    perspective: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
    outline: none;
    border: none;
    flex: 0 0 auto;
}

/* Sadece üzerine gelinen kitap oynar (Only the hovered book moves) */
.book-wrapper.grand-3d-book-unit:hover {
    transform: translateY(-16px);
    z-index: 30;
}

/* 3D Kitap Gövdesi (Chassis - Magaza / Kitaplik Açısı ve Akıcı Eğrisi) */
.book-3d-chassis {
    width: 160px;
    height: 235px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-18deg) rotateX(1deg);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.book-wrapper.grand-3d-book-unit:hover .book-3d-chassis {
    transform: rotateY(-4deg) rotateX(0deg) translateZ(28px);
}

/* 1. Kitap Ön Kapağı (Front Cover) */
.book-cover-facet {
    position: absolute;
    inset: 0;
    border-radius: 3px 8px 8px 3px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 8px 12px 25px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    box-sizing: border-box;
    backface-visibility: hidden;
}

.book-cover-art {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    position: absolute;
    inset: 0;
}

/* Altın Varak Zarif Çerçeve (Gold Filigree Frame) */
.cover-gold-filigree-frame {
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: 2px 6px 6px 2px;
    pointer-events: none;
    z-index: 2;
}

.cover-gold-filigree-frame::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 1px dashed rgba(251, 191, 36, 0.25);
    pointer-events: none;
}

/* Akıcı Parlama Efekti */
.cover-gloss-sheen {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.14) 50%, transparent 60%);
    pointer-events: none;
    z-index: 3;
    transition: transform 0.6s ease;
}

.book-wrapper.grand-3d-book-unit:hover .cover-gloss-sheen {
    transform: translate(25px, -25px);
}

/* 🌟 Kapak Üstünde Açılan Tam Başlık & Bilgi Katmanı */
.book-cover-reveal {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.94) 38%, rgba(10, 15, 29, 0.98) 100%);
    padding: 14px 12px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 6;
    pointer-events: none;
    box-sizing: border-box;
    border-radius: 3px 8px 8px 3px;
}

.book-wrapper.grand-3d-book-unit:hover .book-cover-reveal {
    opacity: 1;
    transform: translateY(0);
}

.reveal-badge {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(251, 191, 36, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.reveal-title {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    margin: 6px 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.reveal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.reveal-pages {
    font-size: 0.72rem;
    color: #cbd5e1;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.reveal-action {
    font-size: 0.72rem;
    color: #38bdf8;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(56, 189, 248, 0.15);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* 2. Sayfa Kenar Kalınlıkları (Page Edges - Magaza / Kitaplik 24px Masif Yapı) */
.book-right-pages-facet {
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: -24px;
    width: 24px;
    transform-origin: left center;
    transform: rotateY(90deg);
    background: repeating-linear-gradient(to right, #fcf9ea, #fcf9ea 2px, #ebdcb9 3px);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.35);
}

.book-top-pages-facet {
    position: absolute;
    top: -24px;
    left: 4px;
    right: 4px;
    height: 24px;
    transform-origin: bottom center;
    transform: rotateX(90deg);
    background: repeating-linear-gradient(to bottom, #fcf9ea, #fcf9ea 2px, #ebdcb9 3px);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.35);
}

/* 3. Masif Ahşap Raf Temas Gölgesi (Contact Shadow on Shelf) */
.book-ground-shadow {
    position: absolute;
    bottom: -16px;
    left: 10px;
    right: -10px;
    height: 24px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 75%);
    transform: rotateX(85deg);
    pointer-events: none;
    transition: all 0.4s ease;
}

.book-wrapper.grand-3d-book-unit:hover .book-ground-shadow {
    transform: rotateX(85deg) scale(1.35) translateY(12px);
    opacity: 0.5;
}

/* 🏷️ Kitap Altlığı Başlık & İnceleme Şeridi (Plinth Label) */
.book-plinth-label {
    margin-top: 14px;
    text-align: center;
    width: 100%;
    max-width: 160px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 7px 10px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    z-index: 7;
}

.book-wrapper.grand-3d-book-unit:hover .book-plinth-label {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.plinth-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.plinth-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.plinth-meta {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent, #38bdf8);
    display: flex;
    align-items: center;
    gap: 4px;
}

.plinth-btn {
    font-size: 0.72rem;
    font-weight: 700;
    color: #93c5fd;
    transition: color 0.2s ease;
}

.book-wrapper.grand-3d-book-unit:hover .plinth-btn {
    color: #38bdf8;
}

/* ============ 3D SHELF ASSEMBLY ============ */
.shelf-3d-board {
    position: relative;
    width: 100%;
    height: 14px;
    background: var(--shelf-top);
    border-radius: 2px 2px 0 0;
    margin-top: -38px;
    z-index: 4;
    box-shadow: inset 0 2px 3px var(--shelf-hl), inset 0 -1px 2px rgba(0,0,0,0.12);
}

.shelf-surface-reflection {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, transparent 60%);
    pointer-events: none;
}

/* Shelf Front Edge (Fascia Lip) */
.shelf-3d-front {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 26px;
    background: var(--shelf-front);
    border-radius: 0 0 4px 4px;
    border-top: 1px solid var(--shelf-hl);
    border-bottom: 2px solid rgba(0,0,0,0.28);
    box-shadow:
        0 4px 10px rgba(0,0,0,0.12),
        0 18px 36px var(--shelf-shadow);
}

/* Concealed Under-Shelf LED Channel */
.shelf-led-glow {
    position: absolute;
    bottom: -2px;
    left: 4%;
    right: 4%;
    height: 3px;
    border-radius: 50%;
    box-shadow: 0 14px 28px var(--shelf-led);
    pointer-events: none;
}

/* ============ EMPTY STATE ============ */
.empty-shelf { animation: fadeUp 0.5s ease; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.empty-shelf h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }

/* ============ QR MODAL ============ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-backdrop.active { opacity: 1; pointer-events: auto; }

.modal-card {
    background: var(--cabinet-bg, #1a1a2e);
    border: 1px solid var(--header-border);
    border-radius: 24px;
    width: 100%;
    max-width: 380px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    position: relative;
    transform: scale(0.96) translateY(16px);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}

.modal-backdrop.active .modal-card { transform: scale(1) translateY(0); }

.modal-close-btn {
    position: absolute;
    top: 18px; right: 18px;
    background: var(--pill-bg);
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}

.modal-close-btn:hover { background: rgba(255,255,255,0.15); color: #fff; transform: rotate(90deg); }

.qr-display {
    background: #fff;
    padding: 14px;
    border-radius: 14px;
    display: inline-block;
    margin: 18px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* ============ FOOTER ============ */
.bookcase-footer {
    text-align: center;
    padding: 24px 20px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.admin-lock-btn {
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0.35;
    font-size: 15px;
    transition: var(--transition);
}

.admin-lock-btn:hover { opacity: 1; color: var(--accent); }

/* ============ RESPONSIVE ============ */

/* Tablet */
@media (max-width: 1024px) {
    .bookcase-header { width: calc(100% - 28px); }
    .shelf-cabinet { padding: 46px 28px 24px; }
    .cabinet-crown { height: 42px; }
    .cabinet-pillar { width: 22px; }
    .shelf-books { gap: 28px; padding: 24px 20px 0; height: 300px; overflow-y: visible; }
    .book-wrapper.grand-3d-book-unit { width: 150px; }
    .book-3d-chassis { width: 140px; height: 205px; }
    .book-right-pages-facet { width: 20px; right: -20px; }
    .book-top-pages-facet { height: 20px; top: -20px; }
    .book-plinth-label { max-width: 140px; padding: 6px 8px; }
    .shelf-3d-board { height: 12px; margin-top: -36px; }
    .shelf-3d-front { height: 24px; }
}

/* Mobile ≤ 768px */
@media (max-width: 768px) {
    .bookcase-header {
        width: 100%;
        margin: 0;
        border-radius: 0;
        border-left: none; border-right: none; border-top: none;
        padding: 12px 14px;
        top: 0;
    }

    .header-container {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .brand-titles h1 { font-size: 16px; }
    .brand-titles p { display: none; }   /* hide subtitle on mobile */

    .header-controls {
        gap: 8px;
    }

    .search-wrapper { display: none; }   /* search moved to secondary row */
    .header-controls .btn-buy { display: none; } /* buy button is shown in mobile-search-bar */

    .filter-section {
        padding: 10px 14px;
        gap: 7px;
        flex-wrap: wrap;              /* categories wrap, no overflow */
    }

    .cat-pill { padding: 7px 14px; font-size: 12px; }

    .bookcase-main { padding: 0 10px; margin: 14px auto 32px; }

    .shelf-cabinet {
        border-radius: 20px;
        padding: 42px 14px 20px;
    }

    .cabinet-crown { height: 38px; font-size: 10px; }
    .crown-badge { font-size: 10px; letter-spacing: 1px; }
    .cabinet-pillar { width: 14px; }
    .cabinet-base-plinth { height: 16px; }

    .shelf-row { margin-bottom: 50px; }

    .shelf-books { gap: 18px; padding: 20px 12px 0; height: 250px; overflow-y: visible; justify-content: center; }
    .book-wrapper.grand-3d-book-unit { width: 120px; }
    .book-3d-chassis { width: 112px; height: 168px; }
    .book-right-pages-facet { width: 16px; right: -16px; }
    .book-top-pages-facet { height: 16px; top: -16px; }
    .book-plinth-label { max-width: 112px; padding: 5px 6px; }
    .plinth-title { font-size: 0.70rem; }
    .plinth-meta { font-size: 0.65rem; }
    .plinth-btn { font-size: 0.65rem; }
    .shelf-3d-board { height: 10px; margin-top: -32px; }
    .shelf-3d-front { height: 22px; }

    /* Mobile search bar below header */
    .mobile-search-bar {
        display: flex !important;
        padding: 9px 14px;
        background: var(--header-bg);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--header-border);
        align-items: center;
        gap: 10px;
    }

    .mobile-search-bar .mobile-search-box {
        position: relative;
        flex: 1;
        display: flex;
        align-items: center;
    }

    .mobile-search-bar .search-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        font-size: 13px;
        pointer-events: none;
        z-index: 2;
    }

    .mobile-search-bar .search-input {
        width: 100% !important;
        border-radius: 100px;
        padding: 8px 14px 8px 38px !important;
        font-size: 13.5px;
    }

    .mobile-buy-btn {
        padding: 8px 14px !important;
        font-size: 12px !important;
        white-space: nowrap;
        border-radius: 100px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
}

/* Mobile search bar (hidden on desktop) */
.mobile-search-bar { display: none; }

/* Small phones ≤ 480px */
@media (max-width: 480px) {
    .brand-titles h1 { font-size: 14px; }
    .nav-btn { padding: 8px 12px; font-size: 12px; }
    .cabinet-crown { height: 32px; }
    .cabinet-crown .crown-badge span { font-size: 9px; }
    .cabinet-pillar { width: 6px; }
    .shelf-cabinet { padding: 36px 6px 16px; }
    .shelf-books {
        gap: 10px;
        padding: 16px 6px 0;
        height: 220px;
        overflow-y: visible;
        justify-content: center;
    }
    .book-wrapper.grand-3d-book-unit { width: 96px; }
    .book-3d-chassis { width: 90px; height: 136px; }
    .book-right-pages-facet { width: 12px; right: -12px; }
    .book-top-pages-facet { height: 12px; top: -12px; }
    .book-plinth-label { max-width: 90px; padding: 4px 4px; }
    .plinth-title { font-size: 0.64rem; }
    .plinth-meta { font-size: 0.58rem; }
    .plinth-btn { display: none; }
    .shelf-3d-board { height: 8px; margin-top: -28px; }
    .shelf-3d-front { height: 20px; }
    .cat-pill { padding: 6px 12px; font-size: 11px; }
}
