/*
Theme Name: Compendium House
Theme URI: https://compendiumhouse.com
Author: Brian W. Robertson
Author URI: https://brianwrobertson.com
Description: Custom WordPress theme for Compendium House - Independent book publisher featuring romance, fantasy, young adult, and classic literature. Designed for showcasing a large catalog of 2,600+ titles.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: compendium-house
Tags: publishing, books, catalog, e-commerce, woocommerce
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

:root {
    --primary-color: #2c5f2d;
    --secondary-color: #97bc62;
    --accent-color: #d4a574;
    --text-dark: #2d2d2d;
    --text-light: #666666;
    --background-light: #f9f7f4;
    --white: #ffffff;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.site-logo img {
    max-height: 60px;
}

.site-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation a.current {
    background: var(--secondary-color);
    color: var(--white);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 5px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ==========================================================================
   Content Sections
   ========================================================================== */

.content-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

/* ==========================================================================
   Book Grid
   ========================================================================== */

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

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

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.book-cover {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.book-info {
    padding: 20px;
}

.book-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.book-author {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 10px;
}

.book-genre {
    display: inline-block;
    padding: 5px 12px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 15px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.book-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
}

/* ==========================================================================
   Genre Sections
   ========================================================================== */

.genre-section {
    padding: 60px 20px;
}

.genre-section:nth-child(even) {
    background: var(--white);
}

.genre-header {
    text-align: center;
    margin-bottom: 40px;
}

.genre-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px 20px;
    margin-top: 60px;
}

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

.footer-section h3 {
    color: var(--white);
    margin-bottom: 20px;
}

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

.footer-section a {
    color: rgba(255,255,255,0.8);
    display: block;
    margin-bottom: 10px;
}

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

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

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

/* ==========================================================================
   WooCommerce Styles
   ========================================================================== */

/* Buttons */
.woocommerce #respond input#submit, 
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 5px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.woocommerce #respond input#submit:hover, 
.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.woocommerce input.button:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.woocommerce #respond input#submit.alt, 
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt {
    background-color: var(--accent-color);
}

.woocommerce #respond input#submit.alt:hover, 
.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover {
    background-color: var(--primary-color);
}

/* Product Grid */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    padding-bottom: 20px;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 0 15px;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.woocommerce ul.products li.product .price {
    color: var(--text-dark);
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0 15px;
}

.woocommerce ul.products li.product .button {
    margin: 0 15px 15px;
}

/* Single Product */
.woocommerce div.product .product_title {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.woocommerce div.product p.price, 
.woocommerce div.product span.price {
    color: var(--accent-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.woocommerce-product-gallery {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

/* Cart & Checkout */
.woocommerce-cart .cart-collaterals .cart_totals tr th, 
.woocommerce-cart .cart-collaterals .cart_totals tr td {
    border-top: 1px solid #eee;
}

.woocommerce-message, 
.woocommerce-info, 
.woocommerce-error {
    border-top-color: var(--primary-color);
}

.woocommerce-message::before, 
.woocommerce-info::before {
    color: var(--primary-color);
}

/* ==========================================================================
   Background Image Handling
   ========================================================================== */

.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.genre-section {
    position: relative;
}
