/* ============================================
   KETABNEGAR - Premium Bookstore
   Award-Winning Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    /* Colors */
    --color-bg: #0a0a0c;
    --color-bg-secondary: #111114;
    --color-bg-tertiary: #1a1a1f;
    --color-surface: #16161a;
    --color-surface-hover: #1e1e24;
    --color-border: rgba(201, 169, 110, 0.12);
    --color-border-subtle: rgba(255, 255, 255, 0.06);
    
    --color-text: #f5f0e8;
    --color-text-secondary: #a09888;
    --color-text-muted: #6b6358;
    
    --color-gold: #c9a96e;
    --color-gold-light: #e0c992;
    --color-gold-dark: #8b6914;
    
    --color-accent: #c9a96e;
    --color-accent-glow: rgba(201, 169, 110, 0.15);
    
    /* Typography */
    --font-primary: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 4px 24px rgba(201, 169, 110, 0.2);
    
    /* Layout */
    --container-max: 1280px;
    --container-padding: 1.5rem;
    --nav-height: 80px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

input, textarea {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
}

::selection {
    background: var(--color-gold);
    color: var(--color-bg);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gold-dark);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold);
}

/* --- Container --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* --- Custom Cursor --- */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--color-gold);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease, opacity 0.15s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-gold);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
    opacity: 0.5;
}

.cursor.hover {
    transform: scale(2);
}

.cursor-follower.hover {
    width: 56px;
    height: 56px;
    border-color: var(--color-gold-light);
    opacity: 0.3;
}

@media (max-width: 768px) {
    .cursor, .cursor-follower {
        display: none;
    }
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    text-align: center;
}

.preloader-icon {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-lg);
}

.preloader-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: preloaderDraw 2s ease-in-out infinite;
}

@keyframes preloaderDraw {
    0% { stroke-dashoffset: 300; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -300; }
}

.preloader-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: var(--space-xl);
    letter-spacing: 0.05em;
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: var(--color-border-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto;
}

.preloader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--color-gold);
    border-radius: var(--radius-full);
    animation: preloaderFill 1.5s ease-in-out forwards;
}

@keyframes preloaderFill {
    to { width: 100%; }
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: all var(--transition-base);
}

.nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-subtle);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.nav.scrolled::before {
    opacity: 1;
}

.nav-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    z-index: 10;
}

.nav-logo-icon {
    width: 36px;
    height: 36px;
    color: var(--color-gold);
}

.nav-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-gold);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    z-index: 10;
}

.nav-search-btn,
.nav-cart-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-search-btn:hover,
.nav-cart-btn:hover {
    color: var(--color-text);
    background: var(--color-surface);
}

.nav-cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    background: var(--color-gold);
    color: var(--color-bg);
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px 0;
}

.nav-menu-btn span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--color-text);
    transition: all var(--transition-base);
    transform-origin: center;
}

.nav-menu-btn.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.nav-menu-btn.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-menu-btn {
        display: flex;
    }
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xl);
}

.mobile-link {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-base);
}

.mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }

.mobile-link:hover {
    color: var(--color-gold);
}

.mobile-menu-footer {
    position: absolute;
    bottom: 3rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* --- Search Overlay --- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 100%;
    max-width: 700px;
    padding: var(--container-padding);
}

.search-close {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.search-close:hover {
    color: var(--color-text);
}

.search-content {
    text-align: center;
}

.search-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
}

.search-input-wrap {
    position: relative;
    margin-bottom: var(--space-2xl);
}

.search-input {
    width: 100%;
    font-size: 2rem;
    font-weight: 300;
    color: var(--color-text);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    transition: border-color var(--transition-base);
}

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

.search-input:focus {
    border-color: var(--color-gold);
}

.search-input-wrap svg {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.search-suggestions {
    text-align: center;
}

.search-suggestion-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.search-tag {
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-tag:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: var(--color-accent-glow);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: transform 20s ease;
}

.hero:hover .hero-bg-img {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 12, 0.7) 0%,
        rgba(10, 10, 12, 0.5) 40%,
        rgba(10, 10, 12, 0.8) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: calc(var(--nav-height) + var(--space-4xl)) var(--container-padding) var(--space-4xl);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(201, 169, 110, 0.1);
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--color-gold);
    margin-bottom: var(--space-2xl);
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--color-gold);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-xl);
}

.hero-title-line {
    display: block;
}

.hero-title-accent {
    color: var(--color-gold);
    position: relative;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-inline: auto;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-4xl);
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-gold);
    color: var(--color-bg);
}

.btn-primary:hover {
    background: var(--color-gold-light);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.btn-primary svg {
    transition: transform var(--transition-base);
}

.btn-primary:hover svg {
    transform: translateX(-4px);
}

.btn-ghost {
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-ghost:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: var(--color-accent-glow);
}

.btn-outline {
    color: var(--color-gold);
    border: 1px solid var(--color-gold);
    padding: var(--space-md) var(--space-2xl);
}

.btn-outline:hover {
    background: var(--color-gold);
    color: var(--color-bg);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.btn-outline svg {
    transition: transform var(--transition-base);
}

.btn-outline:hover svg {
    transform: translateX(-4px);
}

/* --- Hero Stats --- */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2xl);
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-gold);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

/* --- Hero Scroll Indicator --- */
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    z-index: 2;
}

.hero-scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-gold), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Marquee --- */
.marquee-section {
    padding: var(--space-2xl) 0;
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border-subtle);
    border-bottom: 1px solid var(--color-border-subtle);
    overflow: hidden;
}

.marquee {
    overflow: hidden;
    white-space: nowrap;
}

.marquee-inner {
    display: inline-flex;
    animation: marquee 30s linear infinite;
}

.marquee-item {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 0 var(--space-2xl);
    white-space: nowrap;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* --- Section Header --- */
.section-header {
    text-align: center;
    margin-bottom: var(--space-4xl);
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-md);
    padding: var(--space-xs) var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
}

.section-desc {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.8;
}

/* --- Collections Section --- */
.collections {
    padding: var(--space-5xl) 0;
    background: var(--color-bg);
}

.collections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.collection-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    group: true;
}

.collection-card-large {
    grid-row: span 2;
    aspect-ratio: auto;
}

.collection-card-img {
    width: 100%;
    height: 100%;
    position: relative;
}

.collection-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.collection-card:hover .collection-card-img img {
    transform: scale(1.05);
}

.collection-card-gradient {
    width: 100%;
    height: 100%;
    position: relative;
}

.gradient-philosophy {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.collection-card-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 25% 25%, rgba(201, 169, 110, 0.1) 0%, transparent 50%),
                      radial-gradient(circle at 75% 75%, rgba(201, 169, 110, 0.08) 0%, transparent 50%);
    opacity: 0.5;
}

.collection-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(10, 10, 12, 0.95), transparent);
}

.collection-card-content {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: var(--space-xl);
    z-index: 2;
}

.collection-card-count {
    font-size: 0.75rem;
    color: var(--color-gold);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    display: block;
}

.collection-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.collection-card-large .collection-card-title {
    font-size: 2rem;
}

.collection-card-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.collection-card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gold);
    transition: gap var(--transition-base);
}

.collection-card-link svg {
    transition: transform var(--transition-base);
}

.collection-card-link:hover {
    gap: var(--space-md);
}

.collection-card-link:hover svg {
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    .collections-grid {
        grid-template-columns: 1fr;
    }
    .collection-card-large {
        grid-row: span 1;
        aspect-ratio: 4/3;
    }
}

/* --- Books Section --- */
.bestsellers {
    padding: var(--space-5xl) 0;
    background: var(--color-bg-secondary);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.book-card {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-border-subtle);
    transition: all var(--transition-base);
}

.book-card:hover {
    border-color: var(--color-border);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.book-card-badge {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    padding: var(--space-xs) var(--space-md);
    background: var(--color-gold);
    color: var(--color-bg);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    z-index: 3;
}

.book-card-badge-new {
    background: #2ecc71;
}

.book-card-img {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.book-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.book-card:hover .book-card-img img {
    transform: scale(1.05);
}

.book-card-quick {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    transition: all var(--transition-base);
}

.book-card:hover .book-card-quick {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.book-quick-btn {
    width: 48px;
    height: 48px;
    background: var(--color-gold);
    color: var(--color-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-gold);
    transition: all var(--transition-fast);
}

.book-quick-btn:hover {
    transform: scale(1.1);
    background: var(--color-gold-light);
}

.book-card-info {
    padding: var(--space-lg);
}

.book-card-category {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    display: block;
}

.book-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}

.book-card-author {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.book-card-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.book-price-current {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-gold);
}

.book-price-old {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.book-price-currency {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.book-card-rating {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.stars {
    display: flex;
    gap: 2px;
    color: var(--color-gold);
}

.rating-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.books-cta {
    text-align: center;
    margin-top: var(--space-3xl);
}

@media (max-width: 1024px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .books-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* --- Features Section --- */
.features {
    padding: var(--space-5xl) 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border-subtle);
    border-bottom: 1px solid var(--color-border-subtle);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.feature-card {
    text-align: center;
    padding: var(--space-2xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-subtle);
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-border);
    background: var(--color-surface);
    transform: translateY(-4px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-glow);
    border-radius: var(--radius-lg);
    color: var(--color-gold);
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.feature-desc {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Categories Section --- */
.categories {
    padding: var(--space-5xl) 0;
    background: var(--color-bg-secondary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.category-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 16/10;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
    transition: all var(--transition-base);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform var(--transition-slow);
}

.category-card:hover .category-card-bg {
    transform: scale(1.05);
}

.cat-bg-1 {
    background: linear-gradient(135deg, #2d1b4e 0%, #1a1035 50%, #0d0a1a 100%);
}
.cat-bg-2 {
    background: linear-gradient(135deg, #1a3a2a 0%, #0d1f15 50%, #0a1510 100%);
}
.cat-bg-3 {
    background: linear-gradient(135deg, #3a1a1a 0%, #1f0d0d 50%, #150a0a 100%);
}
.cat-bg-4 {
    background: linear-gradient(135deg, #1a2a3a 0%, #0d1520 50%, #0a0f15 100%);
}
.cat-bg-5 {
    background: linear-gradient(135deg, #3a2a1a 0%, #20150d 50%, #150f0a 100%);
}
.cat-bg-6 {
    background: linear-gradient(135deg, #2a1a3a 0%, #150d20 50%, #0f0a15 100%);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05), transparent 60%);
}

.category-card-content {
    position: relative;
    z-index: 2;
    padding: var(--space-xl);
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

.category-icon {
    color: var(--color-gold);
    margin-bottom: var(--space-md);
    opacity: 0.8;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.category-count {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Quote Section --- */
.quote-section {
    position: relative;
    padding: var(--space-5xl) 0;
    overflow: hidden;
}

.quote-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.quote-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px);
}

.quote-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.85);
}

.quote-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.quote-mark {
    color: var(--color-gold);
    margin-bottom: var(--space-xl);
}

.quote-text {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 300;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: var(--space-2xl);
}

.quote-author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    font-style: normal;
}

.quote-author-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-gold);
}

.quote-author-role {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* --- Testimonials --- */
.testimonials {
    padding: var(--space-5xl) 0;
    background: var(--color-bg);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.testimonial-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    transition: all var(--transition-base);
}

.testimonial-card:hover {
    border-color: var(--color-border);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.testimonial-stars {
    display: flex;
    gap: 2px;
    color: var(--color-gold);
    margin-bottom: var(--space-lg);
}

.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.testimonial-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.testimonial-location {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

@media (max-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* --- Newsletter --- */
.newsletter {
    padding: var(--space-5xl) 0;
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border-subtle);
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    margin-bottom: var(--space-lg);
}

.newsletter-desc {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
}

.newsletter-form {
    width: 100%;
}

.newsletter-input-wrap {
    display: flex;
    gap: var(--space-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: var(--space-xs);
    transition: border-color var(--transition-base);
}

.newsletter-input-wrap:focus-within {
    border-color: var(--color-gold);
}

.newsletter-input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    font-size: 0.95rem;
    color: var(--color-text);
    text-align: right;
}

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

.newsletter-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--color-gold);
    color: var(--color-bg);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: var(--color-gold-light);
    box-shadow: var(--shadow-gold);
}

.newsletter-note {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: var(--space-lg);
}

/* --- Footer --- */
.footer {
    padding: var(--space-4xl) 0 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border-subtle);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-3xl);
    padding-bottom: var(--space-3xl);
    border-bottom: 1px solid var(--color-border-subtle);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.footer-logo-icon {
    width: 36px;
    height: 36px;
    color: var(--color-gold);
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-brand-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: var(--color-accent-glow);
}

.footer-links-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links li {
    margin-bottom: var(--space-md);
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-gold);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--color-gold);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl) 0;
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-bottom-links a {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
    color: var(--color-gold);
}

@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 48px;
    height: 48px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: var(--color-accent-glow);
}

/* --- Animations --- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    :root {
        --container-padding: 1.25rem;
        --nav-height: 70px;
    }
    
    .hero-content {
        padding-top: calc(var(--nav-height) + var(--space-3xl));
    }
    
    .hero-stats {
        gap: var(--space-lg);
    }
    
    .hero-stat-number {
        font-size: 1.5rem;
    }
    
    .hero-scroll {
        display: none;
    }
    
    .newsletter-input-wrap {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }
    
    .newsletter-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Smooth Scroll Behavior for Anchor Links --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
