
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #3157d5;
    --primary-dark: #2343ad;
    --dark: #17213b;
    --muted: #718096;
    --background: #f7f9fd;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--dark);
    background: var(--background);
}

a {
    text-decoration: none;
    color: inherit;
}

.navbar {
    background: white;
    padding: 18px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf0f6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 23px;
    font-weight: 800;
    color: var(--primary);
}

.logo span {
    color: var(--dark);
}

.nav-links {
    display: flex;
    gap: 30px;
    font-size: 14px;
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--primary);
}

.cart {
    background: #edf2ff;
    color: var(--primary);
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
}

.hero {
    margin: 35px auto;
    width: 86%;
    min-height: 340px;
    border-radius: 24px;
    padding: 55px;
    background: linear-gradient(120deg, #203f9d, #5278ed);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.hero-content {
    max-width: 560px;
}

.hero small {
    background: #ffffff26;
    padding: 9px 15px;
    border-radius: 30px;
}

.hero h1 {
    font-size: 43px;
    line-height: 1.2;
    margin: 25px 0 15px;
}

.hero p {
    color: #e2e9ff;
    line-height: 1.8;
    margin-bottom: 27px;
}

.hero-btn {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 13px 23px;
    border-radius: 10px;
    font-weight: 700;
}

.hero-art {
    font-size: 130px;
    opacity: .9;
    margin-right: 30px;
}

.container {
    width: 86%;
    margin: 55px auto;
}

.search-box {
    display: flex;
    gap: 10px;
    margin: 30px 0;
}

.search-box input {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid #e1e6f0;
    border-radius: 12px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

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

.search-box button {
    border: none;
    background: var(--primary);
    color: white;
    padding: 0 25px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-heading h2 {
    font-size: 25px;
}

.section-heading p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 5px;
}

.categories {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 35px;
}

.category {
    padding: 10px 19px;
    background: white;
    border: 1px solid #e7eaf1;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: #536079;
}

.category.active,
.category:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.book-card {
    background: white;
    border-radius: 16px;
    padding: 14px;
    border: 1px solid #edf0f5;
    transition: .25s;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px #1e32600d;
}

.book-cover {
    height: 205px;
    border-radius: 11px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 55px;
    margin-bottom: 17px;
    background: linear-gradient(145deg, #dce7ff, #a8bdf7);
}

.book-cover.cover-1 {
    background: linear-gradient(145deg, #f8e4c7, #d9a66e);
}

.book-cover.cover-2 {
    background: linear-gradient(145deg, #d6f0e5, #78bca1);
}

.book-cover.cover-3 {
    background: linear-gradient(145deg, #f4dce9, #cf8eaf);
}

.book-cover.cover-4 {
    background: linear-gradient(145deg, #e3e0ff, #9e96dc);
}

.book-card h3 {
    font-size: 15px;
    margin-bottom: 7px;
}

.author {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 13px;
}

.price {
    color: var(--primary);
    font-size: 17px;
    font-weight: 800;
}

.stock {
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}

.detail-btn {
    display: block;
    text-align: center;
    margin-top: 15px;
    background: #edf2ff;
    color: var(--primary);
    padding: 10px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}

.empty {
    background: white;
    padding: 35px;
    text-align: center;
    border-radius: 14px;
    color: var(--muted);
}

.footer {
    margin-top: 70px;
    padding: 35px 7%;
    background: #17213b;
    color: white;
    text-align: center;
}

.footer p {
    color: #bdc8df;
    font-size: 13px;
    margin-top: 10px;
}

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

    .hero-art {
        font-size: 85px;
    }
}

@media (max-width: 600px) {
    .navbar {
        padding: 15px 5%;
    }

    .nav-links {
        display: none;
    }

    .hero {
        width: 90%;
        padding: 30px;
        min-height: 300px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero-art {
        display: none;
    }

    .container {
        width: 90%;
    }

    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .book-cover {
        height: 150px;
    }
}
