/* Global Styles */
:root {
    --background-color: #F7F5F0; /* licht beige */
    --sidebar-footer-color: #D4C4B1; /* zandkleur */
    --button-link-color: #C2563A; /* roest bruin */
    --accent-color: #9CAF88; /* salie groen */
    --text-color: #2E2E2E; /* donkergrijs */
    --white: #FFFFFF;
    --header-height: 100px;
    --footer-height: 300px; /* Increased from 120px to 300px */
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

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

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

p {
    margin-bottom: 1.5rem;
}

ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

button {
    cursor: pointer;
    border: none;
    background-color: var(--button-link-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--accent-color);
}

/* Header Styles */
.header {
    background-color: var(--sidebar-footer-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.logo h1 {
    font-size: 1.8rem;
    color: var(--button-link-color);
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0 1rem;
}

.main-nav a {
    color: var(--text-color);
    font-weight: bold;
    padding: 0.5rem;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--button-link-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--button-link-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: var(--button-link-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 4px;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: var(--background-color);
    color: var(--button-link-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: var(--accent-color);
}

/* Search Container Styles */
.search-container {
    display: flex;
    align-items: center;
}

.search-container input {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    width: 200px;
    font-size: 1rem;
}

.search-container button {
    padding: 0.5rem 1rem;
    background-color: var(--button-link-color);
    color: var(--white);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.search-container button:hover {
    background-color: var(--accent-color);
}

/* Hero Section Styles */
.hero-section {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
    display: none; /* Hidden by default, shown only on homepage */
}

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

/* Main Container Styles */
.main-container {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-footer-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-right: 2rem;
    display: none; /* Hidden by default, shown only on search results page */
}

.filter-container h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h4 {
    margin-bottom: 0.5rem;
}

.checkbox-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.range-slider {
    width: 100%;
}

.slider {
    width: 100%;
    margin-bottom: 0.5rem;
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.color-option {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.filter-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--button-link-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.filter-button:hover {
    background-color: var(--accent-color);
}

/* Content Styles */
.content {
    flex: 1;
}

.page-content {
    display: none;
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.page-content.active {
    display: block;
}

.page-content h2 {
    color: var(--button-link-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

/* FAQ Styles */
.faq-item {
    margin-bottom: 2rem;
}

.faq-item h3 {
    color: var(--button-link-color);
    margin-bottom: 0.5rem;
}

/* Search Results Styles */
.search-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.sort-options {
    display: flex;
    align-items: center;
}

.sort-options label {
    margin-right: 0.5rem;
}

.sort-options select {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

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

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #777;
}

/* Footer Styles - COMPLETELY REVISED */
.footer {
    background-color: var(--sidebar-footer-color);
    color: var(--text-color);
    margin-top: 2rem;
    clear: both;
    overflow: hidden; /* Ensure it contains floated children */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 2rem 1rem 4rem; /* Extra padding at bottom */
}

.footer-section h3 {
    color: var(--button-link-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

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

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

.footer-section a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

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

.footer-section p {
    margin-bottom: 0.75rem; /* Reduced paragraph margin in footer */
    line-height: 1.4; /* Tighter line height in footer */
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.05);
    text-align: center;
    padding: 1rem 0;
    width: 100%;
    clear: both;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .main-container {
        padding: 0 1rem;
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        padding-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    .header {
        height: auto;
    }
    
    .header-container {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
        width: 100%;
        text-align: center;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        margin: 1rem 0;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dropdown-container {
        order: 2;
        width: 48%;
    }
    
    .dropdown {
        width: 100%;
    }
    
    .dropbtn {
        width: 100%;
    }
    
    .search-container {
        order: 1;
        width: 48%;
    }
    
    .search-container input {
        width: 70%;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-bottom: 2rem;
    }
}

@media (max-width: 600px) {
    .header {
        height: auto;
    }
    
    .header-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .main-nav {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-nav li {
        margin: 0.5rem;
    }
    
    .dropdown-container {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container input {
        width: 70%;
    }
    
    .sidebar {
        display: none; /* Hide sidebar on mobile */
    }
    
    .search-panel {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sort-options {
        margin-top: 1rem;
    }
    
    .search-results {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        padding: 1.5rem 1rem 2rem;
    }
}

/* Special Styles for Active Pages */
body.home #hero-section {
    display: block;
}

body.zoekresultaten #sidebar {
    display: block;
}

/* Product Card Styles for Search Results */
.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.product-price {
    font-weight: bold;
    color: var(--button-link-color);
    margin-bottom: 0.5rem;
}

.product-rating {
    color: #FFD700;
    margin-bottom: 0.5rem;
}

.product-advertiser {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 1rem;
}

.product-button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background-color: var(--button-link-color);
    color: var(--white);
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.product-button:hover {
    background-color: var(--accent-color);
}

/* Mobile Search Panel Styles */
.mobile-search-panel {
    display: none;
    background-color: var(--white);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-filter-button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--button-link-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-filter-button:hover {
    background-color: var(--accent-color);
}

.mobile-filter-button svg {
    margin-right: 0.5rem;
}

.mobile-filters {
    display: none;
}

.mobile-filters.active {
    display: block;
}

@media (max-width: 600px) {
    .mobile-search-panel {
        display: block;
    }
    
    body.zoekresultaten .mobile-search-panel {
        display: block;
    }
}