/* ============================================
   CATEGORY PAGE STYLES
   ============================================ */

/* Page Header */
.page-header {
  background-color: var(--color-gray-100);
  padding: var(--space-8) 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-gray-500);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: var(--color-primary);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.page-title {
  margin-bottom: var(--space-2);
}

.page-subtitle {
  color: var(--color-white);
  margin: 0;
}

/* Category Layout */
.category-section {
  padding-top: var(--space-8);
}

.category-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-8);
}

@media (max-width: 1024px) {
  .category-layout {
    grid-template-columns: 1fr;
  }
}

/* Filters Sidebar */
.filters-sidebar {
  align-self: start;
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

/* Mobile Filter Overlay */
.filters-overlay {
  display: none;
}

@media (max-width: 1024px) {
  .filters-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  
  .filters-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }
  
  .filters-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    max-width: 100%;
    max-height: 85vh;
    z-index: 1000;
    transform: translateY(100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px 20px 0 0;
    padding: var(--space-6) var(--space-4);
    touch-action: pan-y;
  }
  
  .filters-sidebar.is-open {
    transform: translateY(0);
  }
  
  /* Add handle indicator */
  .filters-sidebar::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    cursor: grab;
  }
  
  .filters-sidebar.dragging::before {
    cursor: grabbing;
  }
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-gray-200);
}

.mobile-close-btn {
  display: none;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
  padding: 0;
}

.mobile-close-btn:hover {
  background: var(--color-gray-200);
}

.mobile-close-btn svg {
  width: 20px;
  height: 20px;
  color: var(--color-gray-600);
}

@media (max-width: 1024px) {
  .mobile-close-btn {
    display: flex;
  }
}

.filters-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0;
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.btn-text:hover {
  color: var(--color-primary-dark);
}

/* Filter Groups */
.filter-group {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-gray-100);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-group-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0 0 var(--space-3) 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-loading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-gray-500);
  font-size: var(--text-sm);
  padding: var(--space-2) 0;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-gray-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.filter-empty {
  color: var(--color-gray-500);
  font-size: var(--text-sm);
  font-style: italic;
}

/* Checkbox Styling */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--color-gray-700);
  transition: color 0.2s ease;
}

.checkbox-label:hover {
  color: var(--color-primary);
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-gray-300);
  border-radius: 4px;
  background-color: var(--color-white);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
}

.checkbox-label input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.filter-count {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-gray-400);
  font-weight: 500;
}

/* Range Slider Dual */
.range-slider {
  position: relative;
  padding: var(--space-4) 0;
  height: 40px;
}

.range-slider input[type="range"] {
  position: absolute;
  width: 100%;
  height: 6px;
  background: var(--color-gray-200);
  border-radius: var(--radius-full);
  -webkit-appearance: none;
  appearance: none;
  pointer-events: none; /* Let clicks pass through to track */
  z-index: 2;
}

/* Base track style */
.range-slider input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: transparent; /* Use background of container */
  border-radius: var(--radius-full);
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--color-white);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  margin-top: -7px; /* Center thumb on track */
  pointer-events: auto; /* Re-enable pointer events for thumb */
  z-index: 3;
  transition: transform 0.1s ease;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range-values {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-gray-600);
}

.btn-block {
  width: 100%;
  margin-top: var(--space-6);
}

/* Products Container */
.products-container {
  min-height: 600px;
}

/* Products Toolbar */
.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-gray-200);
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.products-count-text {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
}

.products-count-text strong {
  font-weight: var(--font-bold);
  color: var(--color-gray-900);
}

.products-sort {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sort-label {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
  white-space: nowrap;
}

.sort-select {
  width: auto;
  min-width: 180px;
  padding: 10px 16px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: white;
  background-color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 40px;
}

/* Mobile Toolbar Styling */
@media (max-width: 768px) {
  .products-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 24px;
  }

  .toolbar-left,
  .toolbar-right {
    display: contents; /* Unwrap containers so children participate in grid */
  }

  /* Filters Button Mobile - Eerste (volle breedte) */
  #toggle-filters {
    order: 1;
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px; /* Taller touch target */
    background: white;
    color: var(--color-gray-900);
    border: 1px solid var(--color-gray-300);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }

  #toggle-filters svg {
    display: none; /* Hide icon on mobile */
  }

  /* Sort Select Mobile - Tweede (volle breedte) */
  .sort-label {
    display: none; /* Hide label on mobile */
  }

  .sort-select {
    order: 2;
    grid-column: 1;
    width: 100%;
    min-width: 0;
    height: 48px; /* Match button height */
    background-color: white;
    color: var(--color-gray-900);
    border: 1px solid var(--color-gray-300);
    border-radius: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    padding: 0 32px 0 16px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
  
  .sort-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(35, 103, 115, 0.1);
  }

  /* Product Count Mobile - Onderaan */
  .products-count-text {
    order: 3;
    grid-column: 1;
    text-align: center;
    font-size: 13px;
    margin-top: 4px;
    color: var(--color-gray-500);
    width: 100%;
  }
}

.products-sort select:hover,
.products-cta:hover {
  background-color: #1a4f59;
  border-color: #1a4f59;
  transform: translateY(-2px);
}

.products-sort select:focus,
.sort-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(35, 103, 115, 0.2);
}

/* Products Grid */
.products-grid {
  margin-bottom: var(--space-8);
}

.products-grid .loading {
  grid-column: 1 / -1;
}

/* No Results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--color-gray-500);
}

.no-results h3 {
  margin-bottom: var(--space-4);
  color: var(--color-gray-700);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
}

.pagination-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-gray-700);
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

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

.pagination-ellipsis {
  padding: 0 var(--space-2);
  color: var(--color-gray-400);
}

/* Mobile Filter Toggle - Modern Dropdown Style */
#toggle-filters {
  display: none;
}

@media (max-width: 1024px) {
  #toggle-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #236773;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(35, 103, 115, 0.2);
  }
  
  #toggle-filters:hover {
    background: #2d7f8d;
    box-shadow: 0 4px 12px rgba(35, 103, 115, 0.3);
  }
  
  #toggle-filters:active {
    transform: scale(0.98);
  }
  
  #toggle-filters svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
  }
}

/* Filter Close Button (Mobile) */
.filters-close {
  display: none;
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 10;
}

.filters-close:hover {
  background: #e5e7eb;
}

.filters-close svg {
  width: 20px;
  height: 20px;
  color: #6b7280;
}

@media (max-width: 1024px) {
  .filters-close {
    display: flex;
  }
}

/* ============================================
   SEO CONTENT SECTION
   ============================================ */

/* Page USPs */
.page-usps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
}

.page-usps li {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 500;
}

/* Industry Product Grid & Cards */
.industry-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
  max-width: 100%;
}

/* Force max 4 columns on desktop */
@media (min-width: 1201px) {
  .industry-products-grid {
    grid-template-columns: repeat(4, minmax(280px, 1fr));
  }
}

@media (max-width: 1200px) {
  .industry-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .industry-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

@media (max-width: 480px) {
  .industry-products-grid {
    grid-template-columns: 1fr;
  }
}

.industry-product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.industry-product-card:hover {
  transform: translateY(-2px);
}

.industry-product-image {
  aspect-ratio: 4/3;
  background: var(--color-gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  position: relative;
}

.industry-product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.industry-product-content {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.industry-product-category {
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.industry-product-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-gray-900);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.industry-product-description {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
  margin-bottom: var(--space-4);
  flex: 1;
}

.industry-product-actions {
  margin-top: auto;
  display: flex;
  gap: var(--space-3);
}
.seo-content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

@media (max-width: 1024px) {
  .seo-content-grid {
    grid-template-columns: 1fr;
  }
}

.seo-article {
  background: white;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.seo-article h2 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
  color: var(--color-gray-900);
}

.seo-article p {
  color: var(--color-gray-600);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.seo-article ul {
  color: var(--color-gray-600);
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}

.seo-article li {
  margin-bottom: var(--space-2);
}

.seo-article a {
  color: var(--color-primary);
  font-weight: 500;
}

.seo-article a:hover {
  text-decoration: underline;
}

/* SEO Table */
.seo-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
}

.seo-table th,
.seo-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--color-gray-200);
}

.seo-table th {
  background: var(--color-gray-100);
  font-weight: 600;
  color: var(--color-gray-700);
}

.seo-table td {
  color: var(--color-gray-600);
}

/* Machine Brands Section */
.machine-brands {
  background: white;
}

.brands-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.brand-link {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.2s ease;
}

.brand-link:hover {
  background: var(--color-primary);
  color: white;
}

/* CTA Section */
.cta-section {
  background: var(--color-primary);
  color: white;
  padding: var(--space-16) 0;
}

.cta-title {
  color: white;
  margin-bottom: var(--space-4);
}

.cta-text {
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto var(--space-6);
}

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

.btn-white:hover {
  background: var(--color-gray-100);
}

/* Coming Soon Notice - Empty categories/subcategories */
.coming-soon-notice {
  text-align: center;
  padding: 60px 24px;
  background: var(--color-gray-50, #f9fafb);
  border: 2px dashed var(--color-gray-200, #e5e7eb);
  border-radius: 16px;
  max-width: 560px;
  margin: 24px auto;
}

.coming-soon-icon {
  margin-bottom: 20px;
  color: var(--color-primary, #236773);
  opacity: 0.7;
}

.coming-soon-icon svg {
  width: 48px;
  height: 48px;
}

.coming-soon-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-gray-900, #111827);
  margin-bottom: 12px;
}

.coming-soon-desc {
  font-size: 1rem;
  color: var(--color-gray-500, #6b7280);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.coming-soon-notice .btn {
  display: inline-block;
}
