/* Zero Point Books - Main Stylesheet */

:root {
    --primary: #1a472a;
    --secondary: #d4a574;
    --accent: #e74c3c;
    --light-bg: #f8f7f3;
    --dark-text: #2c3e50;
    --border: #ddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
    line-height: 1.6;
}

/* HEADER & NAVIGATION */
header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: var(--primary);
    color: white;
    padding: 10px 0;
    font-size: 13px;
}

.header-top-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: var(--secondary);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

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

nav a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: var(--secondary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar {
    display: flex;
    background: var(--light-bg);
    border-radius: 25px;
    padding: 8px 15px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
    font-size: 14px;
}

.search-bar button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 18px;
}

.cart-icon, .user-icon {
    position: relative;
    font-size: 22px;
    cursor: pointer;
    color: var(--dark-text);
    transition: color 0.3s;
}

.cart-icon:hover, .user-icon:hover {
    color: var(--secondary);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* BANNER */
.banner {
    background: linear-gradient(135deg, var(--primary) 0%, #2a5a3f 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.banner h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.btn-primary {
    background: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background: #c99456;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--primary);
    color: white;
}

.btn-secondary:hover {
    background: #0f2d1f;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--accent);
    color: white;
}

.btn-danger:hover {
    background: #c23b31;
}

.btn-small {
    padding: 8px 15px;
    font-size: 13px;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* CATEGORIES */
.categories {
    padding: 40px 0;
}

.categories h2 {
    margin-bottom: 30px;
    font-size: 28px;
    color: var(--primary);
}

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

.category-card {
    background: white;
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--secondary);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--primary);
}

.category-card a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

/* PRODUCTS */
.products-section {
    padding: 50px 0;
}

.section-title {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 280px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-author {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.product-rating {
    color: #f39c12;
    font-size: 13px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 10px;
}

.product-discount {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-right: 10px;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-add-cart {
    flex-grow: 1;
    background: var(--secondary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-add-cart:hover {
    background: #c99456;
}

.btn-wishlist {
    background: var(--light-bg);
    border: 2px solid var(--border);
    width: 45px;
    height: 45px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
}

.btn-wishlist:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* FILTERS */
.filters-section {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.filter-sidebar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    height: fit-content;
    box-shadow: var(--shadow);
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 15px;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.filter-option input {
    margin-right: 10px;
    cursor: pointer;
}

.filter-option label {
    cursor: pointer;
    font-size: 14px;
}

/* CART */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.cart-items {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr 100px 100px 50px;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 100px;
    background: var(--light-bg);
    border-radius: 5px;
    overflow: hidden;
}

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

.cart-item-details h3 {
    margin-bottom: 5px;
    color: var(--dark-text);
}

.cart-item-details p {
    font-size: 13px;
    color: #888;
}

.quantity-control {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.quantity-control button {
    width: 30px;
    border: none;
    background: var(--light-bg);
    cursor: pointer;
    font-weight: bold;
}

.quantity-control input {
    width: 40px;
    border: none;
    text-align: center;
    outline: none;
}

.cart-summary {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.summary-row.total {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    border: none;
    padding: 0;
}

/* FOOTER */
footer {
    background: var(--primary);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
}

/* FORM STYLES */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-text);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

/* ALERTS */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }

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

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .search-bar {
        flex-grow: 1;
    }

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

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .filters-section {
        grid-template-columns: 1fr;
    }

    .cart-container {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 60px 1fr 30px;
        gap: 10px;
    }

    .cart-item-image {
        width: 60px;
        height: 80px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
