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

body {
    overflow-x: hidden;
    background-color: #f5f5f5;
    color: #333;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    background: linear-gradient(to right, #ff7e5f, #feb47b);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    width: fit-content;
    z-index: 10;
    text-decoration: none;
}

.logo i {
    margin-right: 10px;
    font-size: 30px;
    color: white;
}

.logo span {
    color: white;
}

nav {
    display: flex;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li {
    display: inline;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s;
}

nav ul li a:hover {
    color: #ff7e5f;
}

.search-cart {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
}

.search-box input {
    border: none;
    padding: 8px;
    outline: none;
    width: 150px;
}

.search-box button {
    background-color: #ff7e5f;
    border: none;
    padding: 8px 12px;
    color: white;
    cursor: pointer;
}

.cart-icon {
    position: relative;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: red;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    z-index: 1000;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .header-container {
        flex-wrap: wrap;
    }

    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 250px;
        height: 100vh;
        background-color: #fff;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
        transition: 0.5s ease;
        z-index: 999;
        padding-top: 70px;
        flex-direction: column;
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    nav ul li {
        display: block;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

    nav ul li a {
        display: block;
        padding: 15px 20px;
        font-size: 18px;
    }

    .menu-toggle {
        display: block;
        order: 1;
    }

    .logo {
        order: 2;
        margin: 0 auto;
    }

    .search-cart {
        order: 3;
        margin-left: auto;
    }

    .search-box input {
        width: 120px;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    .overlay.active {
        display: block;
    }
}

@media (max-width: 600px) {
    .search-box {
        display: none;
    }

    .header-container {
        padding: 10px 15px;
    }

    .logo {
        font-size: 20px;
        padding: 8px 15px;
    }

    .logo i {
        font-size: 24px;
    }
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url("/assets/images/landing/background.jpeg");
    background-size: cover;
    background-position: center;
    color: white;
    padding: 4rem 2rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100px;
    height: 3px;
    background-color: #3498db;
}

.category-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.5rem 1rem;
    background-color: #ecf0f1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background-color: #3498db;
    color: white;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.book-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.book-image {
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #f9f9f9;
    position: relative;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e74c3c;
    color: white;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
}

.book-info {
    padding: 1.5rem;
}

.book-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.book-author {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.book-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.original-price {
    color: #7f8c8d;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.book-actions {
    display: flex;
    justify-content: space-between;
}

.add-to-cart {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.add-to-cart:hover {
    background-color: #27ae60;
}

.favorite {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.favorite:hover,
.favorite.active {
    color: #e74c3c;
}

.cart-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s;
    padding: 1.5rem;
    overflow-y: auto;
}

.cart-panel.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ecf0f1;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.cart-items {
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
}

.cart-item-image {
    width: 80px;
    height: 120px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.remove-item {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: auto;
}

.cart-total {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cart-total-label {
    font-weight: 500;
}

.cart-total-value {
    font-weight: 600;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #2980b9;
}

/* .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
} */

.overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
   

 

    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .cart-panel {
        width: 300px;
    }
}

footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: #3498db;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}
