/* COLLECTION PAGE */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f4f4f4;
    color: #333;
}

/* HEADER */

header {
    background: #1e3a5f;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 32px;
}

.logo p {
    font-size: 14px;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
}

nav a:hover {
    color: #ffd700;
}

/* HERO SECTION */

.hero {
    background:
        linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
        url('https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?q=80&w=1200&auto=format&fit=crop');

    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 20px;
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: auto;
}

.btn {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 25px;
    background: #ffd700;
    color: #000;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
}

/* SECTIONS */

.about,
.categories,
.business-details,
.collection-section,
.cart-section {
    padding: 50px 20px;
}

.about h2,
.categories h2,
.business-details h2,
.collection-section h2,
.cart-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #1e3a5f;
}

/* CATEGORY GRID */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
}

/* COLLECTION */

.collection-subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-size: 18px;
}

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

.book-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-5px);
}

.book-card img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

.book-card h3 {
    color: #1e3a5f;
    margin-bottom: 10px;
    font-size: 22px;
}

.book-card p {
    line-height: 1.6;
    margin-bottom: 10px;
    flex-grow: 0;
}

.price {
    color: #1e3a5f;
    font-size: 24px;
    font-weight: bold;
    margin: 15px 0;
}

/* BUTTONS */

button {
    background: #1e3a5f;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    margin-top: auto;
}

button:hover {
    background: #16304d;
}

/* BUSINESS DETAILS */

.details-box {
    background: white;
    max-width: 700px;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: left;
}

.details-box p,
.details-box li {
    margin: 10px 0;
}

/* CART */

.cart-section {
    text-align: center;
}

#cart-list {
    list-style: none;
    max-width: 600px;
    margin: auto;
}

#cart-list li {
    background: white;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* FOOTER */

footer {
    background: #1e3a5f;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* TABLET */

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

/* MOBILE */

@media (max-width: 768px) {

    header {
        flex-direction: column;
        text-align: center;
    }

    nav {
        margin-top: 15px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 18px;
    }

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

/* SMALL MOBILE */

@media (max-width: 480px) {

    .book-grid {
        grid-template-columns: 1fr;
    }

    .book-card img {
        height: 280px;
    }
}
.cart-section {
    margin-top: 50px;
}

.cart-item {
    background: white;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cart-item img {
    width: 80px;
    height: 120px;
    object-fit: contain;
}

.cart-details {
    flex: 1;
}

.cart-details h4 {
    margin-bottom: 5px;
}

#total-price {
    margin-top: 20px;
    color: #1e3a5f;
    font-size: 24px;
}
.cart-link {
    position: relative;
    text-decoration: none;
    color: white;
    font-weight: bold;
}

#cart-count {
    background: red;
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 12px;
    margin-left: 5px;
}
.checkout-section {

    max-width: 800px;

    margin: 40px auto;

    background: white;

    padding: 30px;

    border-radius: 10px;

    box-shadow: 0 4px 10px rgba(0,0,0,.1);

}

.checkout-section h2 {

    margin-bottom: 20px;

}

.checkout-section form {

    display: flex;

    flex-direction: column;

    gap: 15px;

}

.checkout-section input,
.checkout-section textarea {

    padding: 12px;

    border: 1px solid #ccc;

    border-radius: 6px;

    font-size: 16px;

}

.cart-item {

    display: flex;

    align-items: center;

    gap: 20px;

    background: white;

    padding: 20px;

    margin-bottom: 15px;

    border-radius: 10px;

}

.cart-item img {

    width: 80px;

    height: 120px;

    object-fit: contain;
}
