/* === GLOBALE STIJLEN & VARIABELEN === */
:root {
  --orange: #E57415; /* Changed from #BF6200 for more pop */
  --green: #11610C; /* Primary green for other elements (e.g., product buttons, chat) */
  --dark: #333333;
  --bg-light: #F9F6F1;
  --font: 'Poppins', sans-serif;
  --shadow-light: 0 2px 5px rgba(0,0,0,0.1);
  --shadow-medium: 0 6px 15px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
  --focus-outline: 2px solid #005fcc;
}

/* Universal Box-Sizing for consistent layout */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg-light);
  color: var(--dark);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh; /* Ensure body takes full viewport height */
  display: flex; /* Make body a flex container */
  flex-direction: column; /* Stack children vertically */
  overflow-x: hidden; /* Prevent horizontal scroll due to mobile menu animation */
}
/* Disable scrolling when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Accessible Focus State */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
  box-shadow: none;
  border-radius: 2px;
}

/* === TYPOGRAFIE === */
h1, .h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2, .h2 { font-size: 2rem; margin-top: 2rem; margin-bottom: 1rem; }
h3, .h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p, .body { font-size: 1rem; }

/* === HEADER & FOOTER - UNIFIED === */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
  background-color: #2D4E1A; /* Specific green for header */
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-light);
}
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 10px;
}
.site-header .logo { height: 50px; }
.brand-name {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
}
.brand-name .oranje { color: var(--orange); }

nav.desktop-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}
nav.desktop-nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
}
nav.desktop-nav a:hover { color: var(--orange); }

.hamburger-menu {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    position: relative;
    z-index: 1100;
    width: 40px;
    height: 40px;
    display: none; /* Hidden by default, shown by media query */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.hamburger-menu .bar {
    width: 28px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* Hamburger menu animation */
.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links-mobile {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100%;
    background-color: #2D4E1A;
    z-index: 1050;
    box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    transform: translateX(100%); /* Start off-screen */
    transition: transform 0.4s ease-out;
    padding-top: 80px;
    display: none; /* Always hidden by default, JS toggles 'active' and 'display: flex' */
    flex-direction: column; /* Added for mobile menu layout */
}
.nav-links-mobile.active {
    transform: translateX(0); /* Slide into view */
    display: flex; /* Show when active */
}
/* Ensure mobile menu items have correct styles */
.nav-links-mobile ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.nav-links-mobile li a {
    display: block;
    padding: 1rem;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-top: 1px solid rgba(255,255,255,0.1);
    transition: background-color 0.3s ease;
}
.nav-links-mobile li:first-child a {
    border-top: none;
}
.nav-links-mobile li a:hover {
    background-color: var(--dark);
}

/* Overlay to click outside and close menu */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none; /* Hidden by default */
}
.menu-overlay.active {
    display: block;
}


.site-footer {
  background-color: #2D4E1A; /* Specific green for footer */
  color: white;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  margin-top: auto; /* Pushes the footer to the bottom */
}
.site-footer a { color: #ADD8E6; text-decoration: underline; }

/* === GENERAL LAYOUT & SECTIONS === */
.main-content {
  padding: 2rem;
  flex-grow: 1; /* Allows main content to take up available space */
}
.legal-content, .about-section, .checkout-container, .contact-container {
  max-width: 900px;
  margin: 2rem auto;
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
}
.about-section {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}
.about-image { max-width: 300px; height: auto; border-radius: 8px; flex-shrink: 0; }
.about-text { flex: 1; min-width: 280px; /* Ensure text doesn't get too narrow */ }

.hero {
  background-color: var(--green);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
}
.hero h1 { color: white; }
.hero p { color: white; }

.cta-button {
  background-color: var(--orange);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 5px;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
  cursor: pointer;
}
.cta-button:hover, .cta-button:focus-visible {
  background-color: var(--dark);
  transform: scale(1.05);
}

/* === PRODUCT & SHOPPING === */
.product-listing-section { padding: 4rem 2rem; text-align: center; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Adjusted minmax for better responsiveness */
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.product-card {
  display: flex;
  flex-direction: column;
  text-align: center;
  background-color: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-medium); }
.product-card img { max-width: 100%; height: auto; border-radius: 8px; margin-bottom: 1rem; } /* Adjusted max-width */
.product-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.product-info p {
  min-height: 70px;
  flex-grow: 1;
}
.product-price { font-size: 1.5rem; color: var(--orange); margin-bottom: 1.5rem; font-weight: bold; }
.product-actions { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; margin-top: auto; }
.product-actions .cta-button { width: 100%; box-sizing: border-box; }
.product-actions .add-to-cart { background-color: var(--green); color: white; }
.product-actions .add-to-cart:hover { background-color: var(--dark); }
.product-disclaimer { margin-top: 2rem; color: #666; }

/* === MODAL (Winkelwagen) === */
#cart-modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
  box-shadow: var(--shadow-medium);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #ccc; padding-bottom: 10px; margin-bottom: 10px; }
.modal-header h2 { margin: 0; }
.close-button {
  color: #333;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  font-weight: bold;
  cursor: pointer;
  padding: 0 0.5rem;
}
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee; }
.cart-item:last-child { border-bottom: none; }
.cart-item .remove-from-cart { background-color: #dc3545; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; }
.cart-item .remove-from-cart:hover { background-color: #c82333; }
.empty-cart-message { text-align: center; color: #757575; padding: 20px 0; }
.cart-summary { padding-top: 20px; border-top: 1px solid #eee; text-align: right; margin-top: 20px; }

/* === CHECKOUT & CONTACT FORMS === */
.checkout-container, .contact-container { max-width: 1100px; margin: 2rem auto; background-color: #fff; padding: 2rem; border-radius: 8px; box-shadow: var(--shadow-light); display: flex; gap: 2rem; flex-wrap: wrap; /* Allow columns to wrap */ }
.contact-info { flex: 1; min-width: 280px; } /* Ensure it doesn't get too narrow */
.contact-form { flex: 1.5; min-width: 280px; } /* Ensure it doesn't get too narrow */
.contact-item { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.contact-item svg { width: 24px; height: 24px; flex-shrink: 0; }

.checkout-form .checkout-step { display: none; }
.checkout-form .checkout-step.active-step { display: block; }
.checkout-form h2, .contact-form h2 { color: var(--green); border-bottom: 1px solid #eee; padding-bottom: 10px; }
label, .checkout-form label { display: block; margin-bottom: 0.5rem; font-weight: bold; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea { /* Added number type */
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  margin-bottom: 1rem; /* Added margin for spacing */
}
input[type="checkbox"] { /* Basic style for checkboxes */
    margin-right: 0.5rem;
}
.form-group {
    margin-bottom: 1rem; /* Consistent spacing between form groups */
}
.form-group:last-of-type {
    margin-bottom: 0; /* No extra margin on the last group */
}
.payment-options { display: flex; flex-direction: column; gap: 1rem; }
.payment-option { display: flex; align-items: center; background-color: var(--bg-light); padding: 1rem; border-radius: 8px; border: 1px solid #ddd; cursor: pointer; }
.payment-option input[type="radio"] { width: auto; margin-right: 1rem; margin-bottom: 0; } /* Adjusted margin */
.payment-logo { height: 24px; margin-right: 0.75rem; }
.order-summary { background-color: var(--bg-light); padding: 1.5rem; border-radius: 8px; border: 1px solid #eee; margin-bottom: 2rem; } /* Added margin */
.order-summary strong { color: var(--orange); }

/* === CHAT WIDGET === */
#chat-widget { position: fixed; bottom: 20px; right: 20px; z-index: 999; }
#chat-toggle { background-color: var(--green); color: white; border: none; padding: 12px 16px; border-radius: 20px; cursor: pointer; font-weight: bold; box-shadow: var(--shadow-medium); }
#chat-toggle:hover { background-color: var(--dark); }
#chat-window {
  width: 368px;
  height: 480px;
  background: var(--bg-light);
  border-radius: 8px;
  position: absolute;
  bottom: 60px;
  right: 0;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-medium);
}
.chat-hidden {
    display: none !important;
}
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: var(--dark); color: white; border-top-left-radius: 8px; border-top-right-radius: 8px; }
.chat-close-btn { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
#chat-messages { flex-grow: 1; overflow-y: auto; padding: 10px; font-size: 0.9em; }
.chat-message { margin-bottom: 10px; padding: 8px 12px; border-radius: 15px; max-width: 80%; }
.user-message { background-color: #e0e0e0; align-self: flex-end; margin-left: auto; }
.ai-message { background-color: var(--green); color: white; align-self: flex-start; margin-right: auto; }
.message-meta { font-size: 0.75em; color: rgba(255,255,255,0.7); margin-bottom: 5px; }
.user-message .message-meta { color: #666; }
#chat-input, #chat-send { border: 1px solid #ccc; border-radius: 5px; padding: 8px; margin: 10px; box-sizing: border-box; }
#chat-send { background: var(--orange); color: white; cursor: pointer; border: none; }

/* === PARTNERS PAGE STYLES === */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 2rem; }
.partner-card { background-color: white; border-radius: 8px; box-shadow: var(--shadow-light); padding: 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; transition: var(--transition); }
.partner-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-medium); }
.partner-logo { max-width: 150px; height: auto; margin-bottom: 1rem; }
.partner-card h3 { color: var(--dark); }
.partner-card p { flex-grow: 1; }
.cta-button-small { background-color: var(--orange); color: white; padding: 0.5rem 1rem; border: none; font-weight: bold; border-radius: 4px; text-decoration: none; margin-top: auto; display: inline-block; }
.cta-button-small:hover { background-color: var(--dark); }
.partner-category { margin-top: 3rem; }
.partner-category h2 { display: flex; align-items: center; gap: 0.75rem; color: var(--green); }
.partner-category .icon { height: 30px; width: 30px; fill: var(--green); }

/* === TECHNIEK PAGE STYLES === */
.chart-container { position: relative; width: 100%; max-width: 500px; margin: 1rem auto; height: 350px; }
.comparison-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin: 2rem 0;}
.oranje-eco-text {
  color: var(--green);
}

/* === ERROR 404 PAGE STYLES === */
.error-404 {
    max-width: 700px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}
.error-404 h2 {
    color: var(--orange);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.error-404 p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}
.error-404 a {
    color: var(--green);
    text-decoration: underline;
    font-weight: bold;
}

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #333;
  color: white;
  padding: 1rem;
  z-index: 1001;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  transform: translateY(100%); /* Start off-screen */
  transition: transform 0.5s ease-out; /* Slide up animation */
}
.cookie-banner.cookie-visible {
    transform: translateY(0); /* Slide into view */
}
.cookie-banner.cookie-hidden {
    display: none; /* Hide completely after animation */
}
.cookie-banner .cookie-btn { background-color: var(--orange); color: white; padding: 0.5rem 1rem; border: none; border-radius: 6px; cursor: pointer; }
.cookie-banner a { color: #ADD8E6; }

/* === LOADING OVERLAY === */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent dark background */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000; /* Ensure it's on top of everything */
  color: white;
  font-size: 1.2rem;
  text-align: center;
  display: none; /* Hidden by default */
}

.spinner {
  border: 8px solid rgba(255, 255, 255, 0.3);
  border-top: 8px solid var(--orange); /* Use your orange color */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite; /* Spin animation */
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === FORM RESULT MESSAGE STYLES === */
.form-result-message {
    padding: 1rem; /* Adjusted for less vertical space */
    border-radius: 4px; /* Adjusted for consistency with inputs */
    margin-bottom: 1rem; /* Consistent spacing */
    text-align: center;
    box-shadow: var(--shadow-light); /* Lighter shadow */
    font-weight: bold;
}

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

.form-result-message.form-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-result-message .cta-button {
    margin-top: 1rem; /* Adjusted margin */
}

/* --- RESPONSIVE STYLES --- */
@media (min-width: 768px) { /* Adjusted breakpoint for better tablet support */
    .site-header { padding: 0.5rem 2rem; }
    .desktop-nav { display: flex; }
    .hamburger-menu { display: none; }
    .about-section { flex-direction: row; } /* Revert to row on larger screens */
    .contact-container { flex-direction: row; } /* Revert to row on larger screens */
    .comparison-grid { grid-template-columns: 1fr 1fr; }
    .chart-container { height: 400px; }
}

@media (max-width: 767px) { /* Mobile styles */
    .site-header { padding: 0.5rem 1rem; }
    .desktop-nav { display: none; }
    .hamburger-menu { display: flex; } /* Show hamburger menu */
    h1, .h1 { font-size: 2rem; }
    h2, .h2 { font-size: 1.75rem; }
    h3, .h3 { font-size: 1.25rem; }
    .hero { padding: 2rem 1rem; }
    .product-listing-section { padding: 2rem 1rem; }
    .product-grid { grid-template-columns: 1fr; }
    .product-card img { max-width: 80%; } /* Smaller images on mobile */
    .about-section, .contact-container { flex-direction: column; gap: 1rem; }
    .about-image { max-width: 100%; margin-bottom: 1rem; }
    .about-text { min-width: auto; }
    .contact-info, .contact-form { min-width: auto; }
    .cookie-banner { flex-direction: column; text-align: center; gap: 0.5rem; }
    .cookie-banner p { margin-bottom: 0.5rem; }
    .cookie-banner .cookie-btn { width: 100%; }
    .chat-window { width: 100%; right: 0; bottom: 0; border-radius: 0; } /* Full screen on mobile */
}
