/* =============================================
   Shop / Productcatalogus
   ============================================= */

/* Zoekbalk in header */
.header-search {
    flex: 1;
    max-width: 320px;
    position: relative;
}

.header-search-input {
    width: 100%;
    background: var(--color-bg-off);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 0.4rem 2.2rem 0.4rem 0.9rem;
    font-size: 0.88rem;
    font-family: var(--font-main);
    color: var(--color-text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.header-search-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(214,66,24,0.12);
    background: #FFFFFF;
}

.header-search-input::placeholder { color: var(--color-text-muted); }

.header-search-btn {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.55rem;
    min-width: 32px;
    min-height: 32px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
}

.header-search-btn:hover { color: var(--color-accent); }

/* Zoekresultaten dropdown */
.search-results-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-top: 2px solid var(--color-accent);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    z-index: 300;
    max-height: 360px;
    overflow-y: auto;
}

.search-results-dropdown.active { display: block; }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.12s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--color-bg-off); }

.search-result-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: var(--color-bg-off);
    border-radius: var(--radius);
    flex-shrink: 0;
    padding: 3px;
}

.search-result-info { flex: 1; min-width: 0; }

.search-result-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text);
}

.search-result-meta {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.search-result-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text);
    flex-shrink: 0;
}

.search-no-results {
    padding: 1rem 0.9rem;
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.search-all-results {
    display: block;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
    text-align: center;
    border-top: 1px solid var(--color-border);
    text-decoration: none;
    background: var(--color-bg-off);
}

.search-all-results:hover {
    background: var(--color-bg-off);
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* =============================================
   Shop pagina
   ============================================= */

.shop-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
    padding: 2rem 0 4rem;
}

/* Filterkolom */
.shop-filters {
    position: sticky;
    top: 70px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

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

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

.filter-group-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 0.6rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    accent-color: var(--color-accent);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

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

.filter-option .filter-count {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    background: var(--color-bg-off);
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
}

.filter-reset {
    display: block;
    margin-top: 1rem;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.83rem;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    background: none;
    width: 100%;
    font-family: var(--font-main);
    transition: border-color 0.15s, color 0.15s;
}

.filter-reset:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Productgrid */
.shop-main {}

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.shop-count {
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.shop-sort select {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.4rem 0.7rem;
    font-size: 0.88rem;
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg);
    cursor: pointer;
    outline: none;
}

.shop-sort select:focus { border-color: var(--color-accent); }

/* Productgrid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
}

/* Productkaart shop */
.shop-product-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    color: var(--color-text);
}

.shop-product-card:hover {
    border-color: #B8B3AC;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    text-decoration: none;
}

.shop-product-card[data-hidden="true"] { display: none; }

.shop-product-img {
    background: var(--color-bg-off);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

.shop-product-img img {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    transition: transform 0.2s;
}

.shop-product-card:hover .shop-product-img img {
    transform: scale(1.04);
}

.shop-product-body {
    padding: 0.9rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.shop-product-category {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.shop-product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-product-chip {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.shop-product-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 0.2rem;
}

.shop-product-price .per-unit {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

.shop-product-stores {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.store-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    text-decoration: none;
}

.store-badge-bol {
    background: #0000a4;
    color: #fff;
}

.store-badge-amazon {
    background: #ff9900;
    color: #111;
}

/* Geen resultaten */
.shop-no-results {
    grid-column: 1 / -1;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.97rem;
}

/* Active filters bar */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--color-bg-off);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
    color: var(--color-text);
    cursor: pointer;
}

.active-filter-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Responsive shop */
@media (max-width: 860px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-filters {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .filter-reset { grid-column: 1 / -1; }
}

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

    .header-search { max-width: 100%; }
}
