/* Book Quality Site Styles */
/* Color Palette:
   Primary Brown: #8B7A59
   Dark Brown: #4B3D30
   Gold Accent: #A67A2A
   Medium Tan: #B09A7A
   Cream Background: #EFEDE6
*/

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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: #EFEDE6;
    color: #4B3D30;
    line-height: 1.6;
}

/* Header Styles */
header {
    background-color: #4B3D30;
    color: #EFEDE6;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(75, 61, 48, 0.2);
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.logo-banner {
    background-color: #8B7A59;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    border: 3px solid #A67A2A;
}

.logo-placeholder {
    width: 120px;
    height: 120px;
    background-color: #EFEDE6;
    border: 2px solid #4B3D30;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #4B3D30;
    text-align: center;
    padding: 10px;
}

/* Navigation Styles */
nav {
    background-color: #8B7A59;
    border-top: 2px solid #A67A2A;
    border-bottom: 2px solid #A67A2A;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

nav ul li {
    margin: 0;
    display: flex;
    align-items: center;
}

nav ul li a {
    display: block;
    color: #EFEDE6;
    text-decoration: none;
    padding: 1rem 1.5rem;
    transition: background-color 0.3s;
    font-weight: 500;
    border-right: 1px solid #B09A7A;
}

nav ul li:last-child a {
    border-right: none;
}

nav ul li a:hover {
    background-color: #A67A2A;
}

nav ul li a.active {
    background-color: #4B3D30;
}

/* Search Input Styles */
#searchInput {
    padding: 0.65rem 0.75rem;
    border: 1px solid #B09A7A;
    border-radius: 3px;
    width: 180px;
    font-size: 1rem;
    background-color: #EFEDE6;
    color: #4B3D30;
    margin: 0 0.5rem;
}

#searchInput::placeholder {
    color: #8B7A59;
}

#searchInput:focus {
    outline: none;
    border-color: #A67A2A;
    background-color: #fff;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    min-height: 60vh;
}

/* Hero Section */
.hero {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid #A67A2A;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.hero h1 {
    color: #4B3D30;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    color: #8B7A59;
}

/* Best Sellers Grid */
.bestsellers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.book-card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 3px solid #A67A2A;
}

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

.book-cover {
    width: 100%;
    height: 350px;
    background-color: #B09A7A;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #EFEDE6;
    font-style: italic;
    border: 1px solid #8B7A59;
}

.book-card h3 {
    color: #4B3D30;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.book-card .author {
    color: #8B7A59;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.book-card .description {
    color: #4B3D30;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.amazon-button {
    display: inline-block;
    background-color: #A67A2A;
    color: #EFEDE6;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s;
    font-weight: 600;
    text-align: center;
}

.amazon-button:hover {
    background-color: #8B7A59;
}

/* Alias for main on category index pages */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Category Pages */
.category-intro {
    background-color: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid #A67A2A;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-intro h1 {
    color: #4B3D30;
    margin-bottom: 1rem;
}

.defects-list {
    background-color: #fff;
    padding: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.defect-item {
    border-bottom: 1px solid #B09A7A;
    padding: 1rem 0;
}

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

.defect-item h2 {
    color: #4B3D30;
    margin-bottom: 0.3rem;
    font-size: 1.5rem;
}

.defect-item h2 a {
    color: #4B3D30;
    text-decoration: none;
    transition: color 0.3s;
}

.defect-item h2 a:hover {
    color: #A67A2A;
}

.defect-item p {
    color: #8B7A59;
    line-height: 1.6;
}

/* Detail Pages */
.detail-content {
    background-color: #fff;
    padding: 2.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 850px;
    margin: 0 auto;
}

.detail-content h1 {
    color: #4B3D30;
    margin-bottom: 2rem;
    border-bottom: 3px solid #A67A2A;
    padding-bottom: 0.75rem;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
}

.detail-content h2 {
    color: #4B3D30;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    border-left: 4px solid #A67A2A;
    padding-left: 1rem;
    background-color: #F5F3EB;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.detail-content h3 {
    color: #4B3D30;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.detail-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: #4B3D30;
    font-size: 1rem;
}

.detail-content ul,
.detail-content ol {
    margin-left: 2rem;
    margin-bottom: 0.5rem;
    margin-top: 0.25rem;
    line-height: 1.75;
}

.detail-content li {
    margin-bottom: 0.15rem;
    color: #4B3D30;
}

.detail-content li:last-child {
    margin-bottom: 0;
}

.detail-content strong {
    color: inherit;
}

.detail-content ul ul,
.detail-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.detail-content p + ul,
.detail-content p + ol {
    margin-top: 0.25rem;
}

.detail-content ul + p,
.detail-content ol + p {
    margin-top: 0.75rem;
}

.detail-content ul + h3,
.detail-content ol + h3 {
    margin-top: 1.5rem;
}

.detail-content ul + h2,
.detail-content ol + h2 {
    margin-top: 2rem;
}

.detail-content a {
    color: #A67A2A;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.detail-content a:hover {
    color: #8B7A59;
    text-decoration: underline;
}

.intro-section {
    background-color: #F5F3EB;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid #A67A2A;
    margin-bottom: 1.5rem;
}

.intro-section p {
    margin-bottom: 0.5rem;
}

.intro-section p:last-child {
    margin-bottom: 0;
}

.intro-section ul {
    margin-bottom: 0;
}

.key-point {
    background-color: #F5F3EB;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid #8B7A59;
    margin: 1.5rem 0;
    color: #4B3D30;
}

.key-point p {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.key-point p:last-child {
    margin-bottom: 0;
}

.placeholder-text {
    color: #8B7A59;
    font-style: italic;
    padding: 2rem;
    background-color: #EFEDE6;
    border-left: 3px solid #B09A7A;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.placeholder-text p {
    margin-bottom: 0;
}

/* Back-link paragraph used at the bottom of detail pages */
.back-link {
    margin-top: 2rem;
}

/* Footer */
footer {
    background-color: #4B3D30;
    color: #EFEDE6;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #B09A7A;
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }

    nav ul li a {
        border-right: none;
        border-bottom: 1px solid #B09A7A;
    }

    nav ul li:last-child a {
        border-bottom: none;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

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

    .logo-banner {
        height: 100px;
    }

    .logo-placeholder {
        width: 80px;
        height: 80px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .book-card {
        padding: 1rem;
    }

    .detail-content {
        padding: 1.25rem;
    }

    .detail-content h1 {
        font-size: 1.75rem;
    }

    .detail-content h2 {
        font-size: 1.3rem;
    }

    .category-intro {
        padding: 1.25rem;
    }

    .defects-list {
        padding: 1.25rem;
    }

    .intro-section,
    .key-point {
        padding: 1rem 1.1rem;
    }
}
