﻿/* =====================================================
   HOME.CSS – BookStore Homepage
   Tone: Warm editorial / refined bookstore aesthetic
   Font: Nunito (body) + Playfair Display (headings)
   Accent: Orange #ff6b35 | Background: #f7f4ef (parchment)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Playfair+Display:ital,wght@0,700;0,800;1,700&display=swap');

:root {
    --primary: #ff6b35;
    --primary-d: #e8521c;
    --primary-l: #fff0ea;
    --accent: #ffd166;
    --accent-green: #06d6a0;
    --text: #1e1a14;
    --text-muted: #7a6f62;
    --surface: #ffffff;
    --bg: #f7f4ef;
    --border: #e8e2d9;
    --shadow-sm: 0 2px 12px rgba(30,26,20,0.07);
    --shadow-md: 0 8px 28px rgba(30,26,20,0.11);
    --shadow-lg: 0 20px 60px rgba(30,26,20,0.14);
    --radius: 14px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    font-family: 'Nunito', sans-serif;
    color: var(--text);
}

/* =====================================================
   HERO BANNER
   ===================================================== */
.hero-banner {
    background: linear-gradient(130deg, #1e1a14 0%, #2d2416 45%, #3d3020 100%);
    border-radius: 0 0 40px 40px;
    padding: 72px 0 80px;
    margin-bottom: 64px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

    .hero-banner::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(255,107,53,0.18) 0%, transparent 70%), radial-gradient(ellipse 40% 60% at 10% 80%, rgba(255,209,102,0.10) 0%, transparent 60%);
        pointer-events: none;
    }

    /* Decorative lines */
    .hero-banner::after {
        content: '';
        position: absolute;
        top: -60px;
        right: -60px;
        width: 420px;
        height: 420px;
        border-radius: 50%;
        border: 60px solid rgba(255,107,53,0.06);
        pointer-events: none;
    }

.hero-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,107,53,0.18);
    border: 1px solid rgba(255,107,53,0.35);
    border-radius: 999px;
    padding: 6px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 18px;
    text-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

    .hero-title span {
        color: var(--primary);
        font-style: italic;
    }

.hero-sub {
    color: rgba(255,255,255,0.65);
    font-size: 1.05rem;
    font-weight: 500;
    max-width: 480px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-d));
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    padding: 14px 36px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(255,107,53,0.45);
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

    .hero-cta:hover {
        color: #fff;
        transform: translateY(-3px);
        box-shadow: 0 10px 32px rgba(255,107,53,0.55);
    }

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 48px;
}

.hero-stat {
    text-align: center;
    color: rgba(255,255,255,0.85);
}

    .hero-stat strong {
        display: block;
        font-family: 'Playfair Display', serif;
        font-size: 1.9rem;
        font-weight: 700;
        color: var(--accent);
        line-height: 1;
        margin-bottom: 4px;
    }

    .hero-stat span {
        font-size: 0.8rem;
        font-weight: 600;
        opacity: 0.7;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

/* =====================================================
   FEATURE BOXES
   ===================================================== */
.features-row {
    margin-bottom: 60px;
    z-index: 1;
    position: relative;
}

.feature-box {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .feature-box::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--primary), var(--accent));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .feature-box:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

        .feature-box:hover::before {
            transform: scaleX(1);
        }

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

    .feature-icon.orange {
        background: #fff0ea;
        color: var(--primary);
    }

    .feature-icon.green {
        background: #ecfdf5;
        color: #059669;
    }

    .feature-icon.blue {
        background: #eff6ff;
        color: #3b82f6;
    }

.feature-box h5 {
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-box p {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* =====================================================
   SECTION HEADERS
   ===================================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
}

    .section-title span {
        color: var(--primary);
        font-style: italic;
    }

.section-line {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 99px;
    margin-top: 8px;
}

.section-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s ease;
    padding-bottom: 2px;
}

    .section-link:hover {
        color: var(--primary-d);
        gap: 10px;
    }

/* =====================================================
   BOOK CARDS
   ===================================================== */
.book-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

    .book-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg);
        border-color: transparent;
    }

.book-card-img-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f5f1ea 0%, #ece5da 100%);
    /* Responsive height so covers don't look oversized on some screens */
    height: clamp(170px, 20vw, 220px);
}

    .book-card-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        transition: transform 0.28s ease;
        display: block;
        padding: 6px;
        background: #fff;
    }

.book-card:hover .book-card-img-wrap img {
    transform: scale(1.02);
}

.book-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.book-card-body {
    padding: 16px 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-card-title {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.book-card-author {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
}

    .book-card-author i {
        color: var(--primary);
        margin-right: 4px;
    }

.book-card-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: auto;
}

.book-card-footer {
    padding: 0 12px 14px;
    display: flex;
    gap: 8px;
}

.btn-add-cart {
    flex: 1;
    padding: 9px 0;
    border: 1.5px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

    .btn-add-cart:hover {
        background: var(--primary-l);
    }

.btn-buy-now {
    flex: 1;
    padding: 9px 0;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-d));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 3px 10px rgba(255,107,53,0.3);
}

    .btn-buy-now:hover {
        box-shadow: 0 6px 16px rgba(255,107,53,0.45);
        transform: translateY(-1px);
    }

/* =====================================================
   CATEGORY CARDS
   ===================================================== */
.categories-section {
    margin-top: 64px;
    margin-bottom: 64px;
}

.category-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 32px 20px;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .category-card::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, var(--primary), var(--accent));
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: var(--radius);
        z-index: 0;
    }

    .category-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

        .category-card:hover::after {
            opacity: 1;
        }

        .category-card:hover .cat-icon {
            background: rgba(255,255,255,0.2);
            color: #fff;
        }

        .category-card:hover .cat-name {
            color: #fff;
        }

        .category-card:hover .cat-desc {
            color: rgba(255,255,255,0.8);
        }

.cat-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

    .cat-icon.c1 {
        background: #fff0ea;
        color: var(--primary);
    }

    .cat-icon.c2 {
        background: #eff6ff;
        color: #3b82f6;
    }

    .cat-icon.c3 {
        background: #fef9c3;
        color: #ca8a04;
    }

    .cat-icon.c4 {
        background: #fef2f2;
        color: #ef4444;
    }

.cat-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 6px;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.cat-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.55;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

/* =====================================================
   PROMO BANNER
   ===================================================== */
.promo-banner {
    background: linear-gradient(130deg, #1e1a14 0%, #3d2c1e 100%);
    border-radius: 20px;
    padding: 40px 48px;
    margin: 60px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

    .promo-banner::before {
        content: '';
        position: absolute;
        right: -60px;
        top: -60px;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        background: rgba(255,107,53,0.12);
        pointer-events: none;
    }

    .promo-banner::after {
        content: '';
        position: absolute;
        right: 60px;
        bottom: -80px;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        background: rgba(255,209,102,0.08);
        pointer-events: none;
    }

.promo-text {
    position: relative;
    z-index: 1;
}

    .promo-text h3 {
        font-family: 'Playfair Display', serif;
        font-size: 1.6rem;
        font-weight: 700;
        color: #fff;
        margin-bottom: 8px;
    }

    .promo-text p {
        color: rgba(255,255,255,0.6);
        font-size: 0.9rem;
        margin: 0;
    }

    .promo-text span {
        color: var(--accent);
        font-weight: 700;
    }

.promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-d));
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    font-family: 'Nunito', sans-serif;
    padding: 13px 30px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(255,107,53,0.4);
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

    .promo-btn:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(255,107,53,0.5);
    }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .hero-stats {
        gap: 20px;
    }

    .hero-stat strong {
        font-size: 1.4rem;
    }

    .promo-banner {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }

    .section-title {
        font-size: 1.4rem;
    }
}
