/*
Theme Name: Autumn Library
Theme URI: https://example.com
Author: Your Name
Description: قالب کلاسیک پاییزی برای فروشگاه کتاب - نسخه روشن
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: autumn-library
*/

:root {
    --color-deep-red: #6f1d1b;
    --color-brown-dark: #432818;
    --color-cream: #ffe6a7;
    --color-amber: #99582a;
    --color-blood: #6a040f;
    --color-parchment: #f5ead6;
    --color-blush: #f3d8c7;
    --color-leather: #9c6644;
    --color-beige: #ede0d4;
    --color-gold: #c9a227;
    --color-bg-light: #f9f1e3;
    --color-bg-medium: #f0e4d0;
    --color-text-cream: #ffe6a7;
    --color-text-dark: #432818;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    background: linear-gradient(135deg, #f9f1e3 0%, #f0e4d0 50%, #e8dcc4 100%);
    color: var(--color-text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    cursor: none;
}

/* کرسر مدادی - سفید و واضح */
.custom-cursor {
    position: fixed;
    width: 36px;
    height: 36px;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-4px, -30px) rotate(-35deg);
    transition: transform 0.15s ease;
    filter: drop-shadow(2px 4px 4px rgba(0,0,0,0.4));
}

.custom-cursor.clicking {
    transform: translate(-4px, -30px) rotate(-15deg) scale(0.85);
}

/* افکت نورپردازی روشن */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255,230,167,0.3), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(153,88,42,0.15), transparent 45%);
    pointer-events: none;
    z-index: 1;
    animation: ambientGlow 8s ease-in-out infinite alternate;
}

@keyframes ambientGlow {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* کانتینر برگ‌ها */
#leaves-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
}

/* هدر */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, rgba(249,241,227,0.95), rgba(240,228,208,0.9));
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(201,162,39,0.4);
    box-shadow: 0 4px 20px rgba(67,40,24,0.15);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 30px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-dark);
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(201,162,39,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: radial-gradient(circle, var(--color-gold), var(--color-amber));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(201,162,39,0.4);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 15px rgba(201,162,39,0.4); }
    50% { box-shadow: 0 0 25px rgba(201,162,39,0.6); }
}

.main-nav {
    display: flex;
    gap: 25px;
    flex: 1;
}

.main-nav a {
    color: var(--color-text-dark);
    font-size: 15px;
    font-weight: 600;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-amber));
    transition: all 0.3s;
    transform: translateX(-50%);
}

.main-nav a:hover {
    color: var(--color-deep-red);
}

.main-nav a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    background: rgba(255,255,255,0.7);
    border: 2px solid rgba(201,162,39,0.4);
    color: var(--color-text-dark);
    padding: 9px 38px 9px 14px;
    border-radius: 25px;
    width: 200px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.search-box input::placeholder {
    color: var(--color-leather);
}

.search-box input:focus {
    outline: none;
    width: 260px;
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(201,162,39,0.3);
    background: rgba(255,255,255,0.9);
}

.search-box button {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--color-gold);
    cursor: none;
    font-size: 16px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: 2px solid rgba(201,162,39,0.4);
    color: var(--color-text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    cursor: none;
    font-size: 18px;
    text-decoration: none;
}

.icon-btn:hover {
    background: var(--color-gold);
    border-color: var(--color-amber);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201,162,39,0.4);
}

/* کاروسل حلقه‌ای */
.hero-section {
    padding: 60px 0 40px;
    position: relative;
    z-index: 2;
}

.hero-title {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(201,162,39,0.3);
    letter-spacing: 3px;
}

.hero-subtitle {
    text-align: center;
    color: var(--color-leather);
    font-size: 18px;
    margin-bottom: 40px;
    font-style: italic;
    font-weight: 500;
}

.carousel-wrap {
    position: relative;
    overflow: hidden;
    padding: 30px 0;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.carousel-track {
    display: flex;
    gap: 40px;
    animation: scrollLoop 40s linear infinite;
    width: max-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scrollLoop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.book-card {
    flex: 0 0 220px;
    text-align: center;
    transition: transform 0.4s;
    cursor: none;
    text-decoration: none;
}

.book-card:hover {
    transform: translateY(-15px) scale(1.05);
}

.book-cover {
    width: 180px;
    height: 260px;
    margin: 0 auto 15px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(67,40,24,0.25), 0 2px 6px rgba(111,29,27,0.15);
    transition: all 0.4s;
    background: linear-gradient(135deg, var(--color-deep-red), var(--color-brown-dark));
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card:hover .book-cover {
    box-shadow: 0 20px 40px rgba(67,40,24,0.35), 0 0 25px rgba(201,162,39,0.4);
}

.book-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 5px;
}

.book-author {
    font-size: 14px;
    color: var(--color-leather);
    font-style: italic;
    font-weight: 500;
}

/* بخش دسته‌بندی */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 30px;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    letter-spacing: 2px;
}

.section-title::before,
.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.genre-carousel {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding: 20px 5px 30px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--color-gold) transparent;
}

.genre-carousel::-webkit-scrollbar {
    height: 6px;
}

.genre-carousel::-webkit-scrollbar-track {
    background: rgba(201,162,39,0.1);
    border-radius: 10px;
}

.genre-carousel::-webkit-scrollbar-thumb {
    background: var(--color-gold);
    border-radius: 10px;
}

/* کارت محصول */
.product-card {
    flex: 0 0 200px;
    background: linear-gradient(145deg, rgba(255,255,255,0.8), rgba(249,241,227,0.9));
    border: 2px solid rgba(201,162,39,0.3);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
    cursor: none;
    text-decoration: none;
}

.product-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201,162,39,0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-gold);
    box-shadow: 0 15px 30px rgba(67,40,24,0.2), 0 0 20px rgba(201,162,39,0.3);
}

.product-card:hover::before {
    opacity: 1;
}

.product-cover {
    width: 100px;
    height: 140px;
    margin: 0 auto 12px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(67,40,24,0.25);
    position: relative;
    background: linear-gradient(135deg, var(--color-deep-red), var(--color-brown-dark));
}

.product-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-dark);
    text-align: center;
    margin-bottom: 5px;
    min-height: 42px;
}

.product-author {
    font-size: 13px;
    color: var(--color-leather);
    text-align: center;
    font-style: italic;
    margin-bottom: 10px;
    font-weight: 500;
}

.product-price {
    text-align: center;
    color: var(--color-gold);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
}

.btn-details {
    display: block;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, var(--color-deep-red), var(--color-blood));
    color: var(--color-cream);
    border: 2px solid var(--color-gold);
    border-radius: 22px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: none;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn-details:hover {
    background: linear-gradient(135deg, var(--color-gold), var(--color-amber));
    color: var(--color-text-dark);
    box-shadow: 0 0 20px rgba(201,162,39,0.4);
}

/* صفحه تکی */
.single-post {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(249,241,227,0.95));
    border: 2px solid rgba(201,162,39,0.3);
    border-radius: 15px;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(67,40,24,0.1);
}

.book-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.book-main-cover {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(67,40,24,0.25);
    position: relative;
    transition: transform 0.5s;
}

.book-main-cover:hover {
    transform: rotateY(-8deg) scale(1.03);
}

.book-main-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-info h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(201,162,39,0.2);
}

.book-info .author {
    font-size: 18px;
    color: var(--color-leather);
    font-style: italic;
    margin-bottom: 20px;
    font-weight: 500;
}

.book-info .excerpt {
    color: var(--color-text-dark);
    line-height: 1.9;
    font-size: 16px;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(201,162,39,0.08);
    border-right: 4px solid var(--color-gold);
    border-radius: 6px;
    font-weight: 500;
}

.book-info .price-big {
    font-size: 32px;
    color: var(--color-gold);
    font-weight: 700;
    margin-bottom: 20px;
}

.btn-buy {
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--color-deep-red), var(--color-blood));
    color: var(--color-cream);
    border: 2px solid var(--color-gold);
    border-radius: 30px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: none;
    transition: all 0.3s;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
}

.btn-buy:hover {
    background: linear-gradient(135deg, var(--color-gold), var(--color-amber));
    color: var(--color-text-dark);
    box-shadow: 0 0 25px rgba(201,162,39,0.4);
    transform: translateY(-3px);
}

.full-description {
    margin-top: 40px;
    padding: 30px;
    background: rgba(201,162,39,0.05);
    border-radius: 10px;
    border: 2px solid rgba(201,162,39,0.15);
    line-height: 2;
    color: var(--color-text-dark);
    font-weight: 500;
}

.full-description h2 {
    color: var(--color-text-dark);
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
}

/* فوتر */
.site-footer {
    margin-top: 80px;
    padding: 40px 30px 20px;
    background: linear-gradient(180deg, transparent, rgba(240,228,208,0.8));
    border-top: 2px solid rgba(201,162,39,0.3);
    text-align: center;
    color: var(--color-text-dark);
    position: relative;
    z-index: 2;
}

.footer-ornament {
    font-size: 24px;
    color: var(--color-gold);
    margin-bottom: 15px;
    letter-spacing: 10px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .book-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .book-main-cover {
        max-width: 250px;
        margin: 0 auto;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .search-box input:focus {
        width: 180px;
    }
}