/* PAGE BACKGROUND */
body {
    background: linear-gradient(180deg, #fff7ed 0%, #e0ecff 100%);
    background-attachment: fixed;
}

/* SEARCH RESULTS */
.search-results {
    padding-top: 24px;
}

/* BROWSE */
.browse-section {
    background: transparent;
    padding: 30px 0 70px;
}

.browse-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 28px;
    align-items: start;
}

.filter-toggle-btn {
    display: none;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    box-shadow: 0 10px 22px rgba(194, 65, 12, 0.18);
}

.filter-badge {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    background: white;
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.filter-overlay {
    display: none;
}

/* FILTER PANEL */
.filter-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
    backdrop-filter: blur(6px);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.filter-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
}

.filter-reset {
    border: none;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.2s ease;
}

.filter-reset:hover {
    transform: translateY(-1px);
}

/* If filter groups render checkboxes/buttons dynamically */
#filterGroups {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#filterGroups h3,
#filterGroups h4 {
    font-size: 0.98rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

#filterGroups label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    cursor: pointer;
}

#filterGroups input[type="checkbox"],
#filterGroups input[type="radio"] {
    accent-color: var(--accent);
}

/* TOOLS AREA */
.tools-section {
    min-width: 0;
}

.tools-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.tools-header h2 {
    font-size: 1.85rem;
    line-height: 1.05;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.tools-subtitle {
    color: var(--text-muted);
    margin-top: 6px;
    max-width: 640px;
}

.tool-count {
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid #c7d7f7;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

/* ACTIVE FILTERS */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.active-filters .filter-chip,
.active-filters button,
.active-filters span {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
}

/* TOOLS GRID */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

/* TOOL CARD */
.tool-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.10);
    border-color: #dbe3ee;
}

.tool-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    background: #f5f5f5;
}

.tool-card-content {
    padding: 20px;
}

.tool-card h3 {
    font-size: 1.12rem;
    margin-bottom: 8px;
    color: var(--text-main);
    line-height: 1.2;
}

.tool-card p {
    font-size: 0.95rem;
    color: #6b7280;
    min-height: 48px;
    overflow: hidden;
    line-height: 1.55;
}

.tool-price {
    margin-top: 14px;
    font-weight: 800;
    font-size: 1rem;
    color: #2e7d32;
}

/* Optional small meta */
.tool-meta {
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* EMPTY STATE */
.tools-grid:empty::before {
    content: "Geen gereedschap gevonden.";
    display: block;
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 32px;
    color: #6b7280;
    text-align: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

/* AD SLIDER */
.ad-slider-section {
    background-color: transparent;
    padding: 55px 0 70px;
    overflow: hidden;
}

.ad-slider-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 10px 0;
}

.ad-slider-track {
    display: flex;
    gap: 22px;
    width: max-content;
    animation: adScroll 40s linear infinite;
}

.ad-slider-track:hover {
    animation-play-state: paused;
}

.ad-card {
    flex-shrink: 0;
    width: 280px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.ad-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.ad-content {
    padding: 18px;
}

.ad-label {
    display: inline-block;
    margin-bottom: 12px;
    background-color: #e0ecff;
    color: #1e3a8a;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
}

.ad-card h3 {
    margin-bottom: 8px;
    color: #1e3a8a;
    font-size: 1.15rem;
}

.ad-card p {
    color: #374151;
    font-size: 0.96rem;
    line-height: 1.5;
}

.ad-card {
    text-decoration: none;
    color: inherit;
}

/* animation */
@keyframes adScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* RESPONSIVE */
@media (max-width: 980px) {
    .browse-layout {
        grid-template-columns: 1fr;
    }

    .filter-toggle-btn {
        display: inline-flex;
    }

    .filter-panel {
        position: fixed;
        left: 16px;
        right: 16px;
        top: auto;
        bottom: 16px;
        z-index: 1002;
        max-height: 75vh;
        overflow-y: auto;
        transform: translateY(110%);
        transition: transform 0.25s ease;
    }

    .filter-panel.open {
        transform: translateY(0);
    }

    .filter-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(31, 41, 55, 0.32);
        z-index: 1001;
    }
}

@media (max-width: 700px) {
    .tools-header h2 {
        font-size: 1.5rem;
    }

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

    .tool-card img {
        height: 220px;
    }
}