/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Rustic, warm earth-tone color palette */
    --primary-color: #8b6f47;
    --primary-dark: #6b5637;
    --primary-light: #a6896b;
    --secondary-color: #c9a96b;
    --accent-color: #d4a574;
    --accent-light: #e5c19a;
    --text-dark: #3d3526;
    --text-light: #6b5d4a;
    --bg-light: #f5f1eb;
    --bg-white: #faf8f5;
    --bg-cream: #f7f4ef;
    --border-color: #d4c4b0;
    --shadow: 0 2px 8px rgba(61, 53, 38, 0.1);
    --shadow-hover: 0 4px 16px rgba(61, 53, 38, 0.15);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Lora', serif, Georgia, 'Times New Roman', Times, serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    scroll-padding-top: 0;
    overflow-x: hidden;
    position: relative;
}

/* Rustic texture overlay for warmth */
.hero::before,
.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero,
.blog-header {
    position: relative;
}

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

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
}

/* Header & Navigation */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow-x: hidden;
    padding-top: 20px;
    padding-bottom: 20px;
    /* Prevent scroll jump issues */
    will-change: transform;
    transform: translateZ(0);
}

/* On mobile, remove transform to prevent stacking context issues */
@media (max-width: 768px) {
    .header {
        transform: none;
        will-change: auto;
    }
}

.navbar {
    padding: 0;
    height: 50px;
    overflow: visible;
    position: relative;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    align-items: center;
    width: 100%;
    gap: 1.5rem;
    position: relative;
    padding: 0 20px;
    overflow: visible;
    /* Prevent grid items from overflowing */
    min-width: 0;
}

/* Desktop: Ensure proper layout on large screens */
@media (min-width: 1201px) {
    .navbar .container {
        grid-template-columns: 250px 1fr 280px;
        gap: 1.5rem;
        min-width: 0;
    }
    
    .nav-brand {
        width: 250px;
        min-width: 250px;
        flex-shrink: 0;
    }
    
    .nav-brand img.logo {
        height: 150px;
        max-width: 200px;
        left: 0;
    }
    
    .search-container {
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        flex-shrink: 0;
        overflow: visible;
        z-index: 10;
    }
    
    .nav-menu {
        flex-wrap: nowrap;
        gap: 1rem;
        min-width: 0;
        overflow: visible;
        max-width: 100%;
        padding-right: 0.5rem;
    }
    
    .nav-menu a {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
        flex-shrink: 0;
    }
}

.nav-brand {
    position: relative;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    z-index: 10;
    width: 250px;
    min-width: 250px;
    overflow: visible;
}

.nav-brand a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    height: 50px;
    position: relative;
    min-width: 0;
}

.nav-brand img.logo {
    height: 150px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 10;
    transition: all 0.3s ease;
}

/* Ensure logo doesn't overflow and scales properly */
@media (max-width: 1100px) {
    .nav-brand {
        overflow: visible;
    }
    
    .nav-brand img.logo {
        max-width: 100%;
        height: auto;
        max-height: 120px;
    }
}

/* Prevent horizontal overflow on all screen sizes */
@media (max-width: 1400px) {
    .header {
        overflow-x: hidden;
    }
    
    .navbar .container {
        overflow-x: visible;
    }
}

/* Ensure mobile menu appears above all content */
@media (max-width: 768px) {
    /* Prevent parent containers from creating stacking contexts */
    .navbar .container {
        position: static !important;
        transform: none !important;
        z-index: auto !important;
    }
    
    .header {
        z-index: 10002;
        position: relative;
    }
    
    .navbar {
        z-index: 10002;
        position: relative;
    }
    
    /* Ensure hero and all page content is below mobile menu */
    .hero,
    .blog-header,
    section,
    main {
        position: relative;
        z-index: 1;
    }
    
    /* Ensure mobile menu is above everything - break out of stacking context */
    .nav-menu {
        z-index: 99999 !important;
        position: fixed !important;
        transform: translateZ(0) !important;
        /* Prevent menu from scrolling with page */
        top: 0 !important;
        left: -100% !important;
    }
    
    .nav-menu.active {
        left: 0 !important;
    }
    
    .mobile-menu-toggle {
        z-index: 100000 !important;
        position: relative !important;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        height: 100%;
    }
}

/* Additional responsive fixes for medium screens */
@media (max-width: 1100px) and (min-width: 769px) {
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .nav-menu a {
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
    }
}

.nav-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: none; /* Hidden by default when logo image is used */
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* Responsive breakpoints for navigation */
@media (max-width: 1200px) {
    .navbar .container {
        grid-template-columns: 200px 1fr 250px;
        gap: 1.5rem;
    }
    
    .nav-brand {
        width: 200px;
        min-width: 200px;
    }
    
    .nav-brand img.logo {
        height: 120px;
        max-width: 180px;
    }
    
    .search-container {
        width: 250px;
        min-width: 250px;
        max-width: 250px;
    }
    
    .nav-menu {
        gap: 0.75rem;
        overflow: visible;
        max-width: 100%;
        padding-right: 0.5rem;
    }
    
    .nav-menu a {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 992px) {
    .navbar .container {
        grid-template-columns: 180px 1fr 220px;
        gap: 1rem;
    }
    
    .nav-brand {
        width: 180px;
        min-width: 180px;
    }
    
    .nav-brand img.logo {
        height: 100px;
        max-width: 160px;
    }
    
    .search-container {
        width: 220px;
        min-width: 220px;
        max-width: 220px;
    }
    
    .nav-menu {
        gap: 0.5rem;
        overflow: visible;
        max-width: 100%;
        padding-right: 0.5rem;
    }
    
    .nav-menu a {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 5;
    width: 100%;
    flex-wrap: nowrap;
    min-width: 0;
    /* Allow items to be visible, but prevent overflow into search */
    overflow: visible;
    max-width: 100%;
    padding-right: 0.5rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background-color: rgba(139, 111, 71, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(139, 111, 71, 0.15);
}

.nav-menu a:hover::before {
    width: 80%;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-hover);
    border-radius: 8px;
    list-style: none;
    min-width: 180px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.arrow {
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10001;
    position: relative;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s;
}

/* Search Bar */
.search-container {
    flex-shrink: 0;
    position: relative;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    overflow: visible;
    z-index: 10;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0;
}

.search-input {
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px 0 0 8px;
    font-family: 'Lora', serif;
    font-size: 0.9rem;
    color: var(--text-dark);
    background-color: var(--bg-white);
    width: 100%;
    max-width: 250px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.search-button svg {
    width: 18px;
    height: 18px;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-light);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.blog-tags {
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.blog-tags h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.no-results p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.no-results a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #faf8f5;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    color: #faf8f5;
    border-color: #faf8f5;
}

.btn-secondary:hover {
    background-color: #faf8f5;
    color: var(--primary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* Category Sections */
.featured-categories,
.product-categories,
.featured-posts,
.about-preview {
    padding: 4rem 0;
}

.featured-categories {
    background-color: var(--bg-light);
}

.featured-categories h2,
.product-categories h2,
.featured-posts h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

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

.category-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.category-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.category-links {
    list-style: none;
    margin-bottom: 1.5rem;
    text-align: left;
}

.category-links li {
    padding: 0.5rem 0;
}

.category-links a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.category-links a:hover {
    color: var(--primary-color);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.product-category-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

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

.product-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.product-category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.product-category-card p {
    color: var(--text-light);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

.post-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--bg-light);
}

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

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

.post-content {
    padding: 1.5rem;
}

.post-category {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-content h3 {
    margin-bottom: 0.75rem;
}

.post-content h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.post-content h3 a:hover {
    color: var(--primary-color);
}

.post-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--primary-dark);
}

/* About Pitch Section */
.about-pitch {
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-light) 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.about-pitch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(139, 111, 71, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(139, 111, 71, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.pitch-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.pitch-text {
    text-align: center;
}

.pitch-text h2 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.pitch-lead {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.pitch-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    text-align: left;
}

.pitch-feature {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.pitch-feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(139, 111, 71, 0.3);
}

.feature-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
}

.feature-content p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1rem;
}

.pitch-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* About Preview */
.about-preview {
    background-color: var(--bg-cream);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-content p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: #faf8f5;
    padding: 3rem 0 1.5rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

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

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

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

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(250, 248, 245, 0.6);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.affiliate-note {
    font-size: 0.75rem;
}

/* Blog Post Styles */
.blog-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #faf8f5;
    padding: 3rem 0;
}

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

.blog-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    opacity: 0.9;
}

.blog-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 20px;
}

.blog-content h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 2.5rem 0 1rem;
}

.blog-content h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin: 2rem 0 1rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.blog-content ul,
.blog-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.product-review {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.product-review h3 {
    margin-top: 0;
}

.amazon-link {
    display: inline-block;
    background-color: #ff9900;
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.amazon-link:hover {
    background-color: #e68900;
}

.product-comparison {
    overflow-x: auto;
    margin: 2rem 0;
}

.product-comparison table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    box-shadow: var(--shadow);
}

.product-comparison th,
.product-comparison td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.product-comparison th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.product-comparison tr:hover {
    background-color: var(--bg-light);
}

/* Responsive Design */
@media (max-width: 850px) {
    .navbar .container {
        grid-template-columns: auto 1fr auto;
        gap: 0.75rem;
        padding: 0 15px;
    }
    
    .nav-brand img.logo {
        height: 80px;
        max-width: 100px;
        left: 0;
    }
    
    .nav-menu {
        gap: 0.4rem;
    }
    
    .nav-menu a {
        padding: 0.5rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .search-container {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: auto;
        min-height: 50px;
        padding: 0.5rem 0;
    }
    
    .navbar .container {
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .nav-brand {
        width: auto;
        min-width: auto;
        height: 45px;
        order: 1;
        overflow: visible;
    }
    
    .nav-brand a {
        height: 45px;
    }
    
    .nav-brand img.logo {
        height: 70px;
        max-width: 90px;
        left: 0;
        position: relative;
        transform: none;
        top: auto;
    }
    
    .nav-brand .logo-text {
        display: block;
        font-size: 1rem;
        margin-left: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 3;
        z-index: 100000 !important;
        position: relative;
    }
    
    .search-container {
        order: 2;
        width: 100%;
        min-width: auto;
        max-width: 100%;
        grid-column: 1 / -1;
        margin-top: 0.5rem;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-input {
        flex: 1;
        min-width: 0;
        font-size: 0.9rem;
    }
    
    .nav-menu {
        order: 4;
        grid-column: 1 / -1;
        position: fixed !important;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        max-width: 300px;
        height: 100vh;
        text-align: left;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-hover);
        padding: 4rem 0 2rem;
        z-index: 99999 !important;
        overflow-y: auto;
        overflow-x: hidden;
        gap: 0;
        margin: 0;
        /* Break out of any parent stacking context */
        transform: translateZ(0);
        will-change: transform;
        /* Ensure menu is always on top and clickable */
        pointer-events: auto;
    }

    .nav-menu.active {
        left: 0;
    }
    
    /* Mobile menu overlay - ensure it's above content but below menu */
    /* The overlay should only cover the area NOT covered by the menu */
    body.menu-open::before {
        content: '';
        position: fixed !important;
        top: 0;
        left: 300px; /* Start after menu width */
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99998 !important;
        /* Block clicks on background only */
        pointer-events: auto;
    }
    
    /* On smaller screens, overlay covers everything except menu */
    @media (max-width: 480px) {
        body.menu-open::before {
            left: 280px; /* Adjust for smaller menu width */
        }
    }
    
    /* Ensure menu and all its children are clickable and above overlay */
    .nav-menu.active,
    .nav-menu.active * {
        pointer-events: auto;
        position: relative;
        z-index: 99999;
    }
    
    /* Ensure menu items are clickable */
    .nav-menu.active li {
        position: relative;
        z-index: 100000;
        pointer-events: auto;
    }
    
    .nav-menu.active a {
        pointer-events: auto;
        z-index: 100001;
        position: relative;
    }
    
    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        padding: 0.75rem 1.5rem;
        width: 100%;
        white-space: normal;
        font-size: 0.95rem;
    }

    .nav-menu a:hover {
        transform: translateX(5px);
    }
    
    .header {
        padding-top: 12px;
        padding-bottom: 12px;
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }
    
    .nav-brand img.logo {
        height: 60px;
        max-width: 80px;
    }
    
    .nav-brand .logo-text {
        font-size: 0.9rem;
        margin-left: 0.25rem;
    }
    
    .search-container {
        margin-top: 0.25rem;
    }
}
    
    .pitch-text h2 {
        font-size: 2rem;
    }

    .pitch-lead {
        font-size: 1.1rem;
    }

    .pitch-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pitch-feature {
        flex-direction: column;
        text-align: center;
    }

    .feature-icon {
        margin: 0 auto;
    }

    .pitch-cta {
        flex-direction: column;
        align-items: center;
    }

    .pitch-cta .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .header {
        padding-top: 12px;
        padding-bottom: 12px;
        overflow-x: hidden;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .featured-categories h2,
    .product-categories h2,
    .featured-posts h2 {
        font-size: 2rem;
    }

    .category-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin: 0.5rem 0 0 1rem;
    }
}

/* Pagination Styles */
.pagination-container {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    padding: 0.75rem 1.25rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    font-family: 'Lora', serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

.pagination-btn span {
    display: inline-block;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    font-family: 'Lora', serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-number:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination-number.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
}

@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
    }

    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        min-width: 100px;
    }

    .pagination-number {
        min-width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    /* Ensure header doesn't overflow on mobile */
    .header {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 1rem;
    }
}


