﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #faf9f6; /* soft light base */
    color: #1e1e2a;
    line-height: 1.5;
    padding: 0 1rem 3rem;
}

.app {
    max-width: 1300px;
    margin: 0 auto;
}

/* ----- header (company info) ----- */
.company-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: #ffffffd9;
    backdrop-filter: blur(4px);
    padding: 1rem 1.5rem;
    margin: 1rem 0 1.8rem;
    border-radius: 48px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid #f0ede8;
}

.logo-area h1 {
    font-weight: 600;
    font-size: 1.8rem;
    letter-spacing: -0.02em;
    color: #1e3a5f;
}

.logo-area span {
    font-weight: 400;
    font-size: 1rem;
    color: #4a657d;
    margin-left: 6px;
}

.company-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    align-items: center;
    font-size: 0.95rem;
}

    .company-details i {
        color: #2b5e7e;
        width: 1.4rem;
        text-align: center;
    }

    .company-details a {
        text-decoration: none;
        color: #1e3a5f;
        font-weight: 500;
    }

        .company-details a:hover {
            text-decoration: underline;
            color: #0f2b44;
        }

/* ----- hero / shop intro ----- */
.shop-header {
    margin-bottom: 2.5rem;
}

    .shop-header h2 {
        font-size: 2.2rem;
        font-weight: 500;
        color: #1e3a5f;
        letter-spacing: -0.02em;
    }

    .shop-header p {
        color: #546e7a;
        font-size: 1.1rem;
        margin-top: 0.3rem;
    }

/* ----- category nav (spa navigation) ----- */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 0.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid #e2dfd9;
    padding-bottom: 1.2rem;
}

.cat-btn {
    background: transparent;
    border: none;
    padding: 0.6rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 40px;
    color: #3e5468;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    background: #f3f1ed;
}

    .cat-btn i {
        margin-right: 8px;
        font-size: 1rem;
        color: #3f6b8c;
    }

    .cat-btn:hover {
        background: #e7e3dc;
        color: #0b2a41;
    }

    .cat-btn.active {
        background: #ffffff;
        border: 1px solid #cbd5e0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.02);
        color: #1e3a5f;
        font-weight: 600;
    }

    .cat-btn.all-books {
        background: #e8eef3;
        border: 1px solid #b8c9da;
    }

        .cat-btn.all-books.active {
            background: #ffffff;
            border-color: #7fa3c2;
        }

/* ----- books grid (category view) ----- */
.category-section {
    display: block;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1.8rem;
    color: #1e3a5f;
    border-left: 6px solid #a7c0d4;
    padding-left: 1.2rem;
}

.book-count {
    font-size: 1rem;
    font-weight: 400;
    color: #6a8ca3;
    margin-left: 1rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.8rem 1.2rem;
}

.book-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.2rem 0.8rem 1rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.02), 0 2px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #ece9e3;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

    .book-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 16px 28px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
        border-color: #d4d9e0;
    }

.book-cover {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 12px;
    background: #f5f2ee;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.02);
    margin-bottom: 1rem;
    border: 1px solid #e3dfd8;
}

.book-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #1a2e40;
    line-height: 1.4;
}

.book-author {
    font-size: 0.85rem;
    color: #6a7e8c;
    margin-bottom: 0.75rem;
}

.book-category-tag {
    font-size: 0.7rem;
    display: inline-block;
    background: #eaf0f6;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    color: #3a6b8c;
    margin-bottom: 0.5rem;
    align-self: flex-start;
}

.book-price {
    font-weight: 600;
    color: #1e4b6e;
    margin-top: auto;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .book-price small {
        font-weight: 400;
        font-size: 0.8rem;
        color: #7f95a8;
    }

/* footer / company extra */
.footer-note {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd9d2;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #466472;
}

    .footer-note i {
        margin-right: 6px;
        color: #2b5e7e;
    }

.footer-links a {
    color: #1e3a5f;
    margin-left: 1.5rem;
    text-decoration: none;
}

    .footer-links a:hover {
        text-decoration: underline;
    }

/* responsive */
@media (max-width: 640px) {
    body {
        padding: 0 0.8rem 2rem;
    }

    .company-bar {
        flex-direction: column;
        align-items: start;
        gap: 0.8rem;
        border-radius: 28px;
        padding: 1.2rem;
    }

    .company-details {
        gap: 0.8rem 1.2rem;
    }

    .shop-header h2 {
        font-size: 1.9rem;
    }

    .cat-btn {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 400px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
}

/* hide all categories by default, show active */
.category-content {
    display: none;
}

    .category-content.active {
        display: block;
    }

/* loading / placeholder */
.fa-spinner {
    margin-right: 4px;
}

i {
    color: inherit;
}
