/* NS Search v2 — bykenneth.nl */

/* ── Trigger ── */
.ns-search-trigger {
    display: flex; align-items: center; gap: 8px;
    background: none; border: none; cursor: pointer;
    padding: 6px 0; color: #111; font-family: inherit;
    transition: opacity 0.15s; flex: 1;
}
.ns-search-trigger:hover { opacity: 0.55; }
.ns-search-trigger svg { width: 20px; height: 20px; flex-shrink: 0; }
.ns-search-trigger__label {
    font-size: 13px; color: #aaa; font-weight: 400;
    letter-spacing: 0.02em; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; border: 1px solid #e8e8e8;
    padding: 8px 14px; flex: 1; text-align: left;
    transition: border-color 0.15s;
}
.ns-search-trigger:hover .ns-search-trigger__label { border-color: #ccc; }

body.ns-search-open { overflow: hidden; }

/* ── Overlay ── */
.ns-search-overlay {
    position: fixed; inset: 0; background: #fff;
    z-index: 999999; display: flex; flex-direction: column;
    opacity: 0; pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.ns-search-overlay--open { opacity: 1; pointer-events: all; transform: translateY(0); }

/* ── Search bar ── */
.ns-search-bar { flex-shrink: 0; border-bottom: 1px solid #f0f0f0; padding: 0 24px; }
.ns-search-bar__inner {
    max-width: 900px; margin: 0 auto;
    display: flex; align-items: center; gap: 12px; height: 72px;
}
.ns-search-bar__icon { width: 20px; height: 20px; color: #bbb; flex-shrink: 0; }
.ns-search-bar__input {
    flex: 1; border: none; outline: none;
    font-size: 20px; font-weight: 400; color: #111;
    font-family: inherit; background: transparent;
    letter-spacing: 0.01em; min-width: 0;
}
.ns-search-bar__input::placeholder { color: #ccc; }

.ns-search-bar__clear, .ns-search-bar__close {
    background: none; border: none; cursor: pointer;
    padding: 6px; color: #999; display: flex; flex-shrink: 0;
    transition: color 0.15s; border-radius: 50%;
    align-items: center; justify-content: center;
}
.ns-search-bar__clear:hover, .ns-search-bar__close:hover { color: #111; background: #f5f5f5; }
.ns-search-bar__close {
    border-radius: 0; background: #f5f5f5; padding: 8px 14px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: #444; gap: 8px;
    display: flex; align-items: center; transition: background 0.15s, color 0.15s;
}
.ns-search-bar__close::before { content: 'Sluiten'; font-size: 10px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; }
.ns-search-bar__close:hover { background: #111; color: #fff; }
@media (max-width: 600px) { .ns-search-bar__close::before { display: none; } .ns-search-bar__close { padding: 8px; } }

/* ── Body ── */
.ns-search-body { flex: 1; overflow-y: auto; padding: 28px 24px 60px; }
.ns-search-body > * { max-width: 900px; margin: 0 auto; }

/* ── Sectie titels ── */
.ns-search-section { margin-bottom: 32px; }
.ns-search-section__title {
    font-size: 9px; font-weight: 800; letter-spacing: 0.35em;
    text-transform: uppercase; color: #bbb; margin: 0 0 14px;
}

/* ── Populaire categorieën ── */
.ns-search-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-search-cat {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px 8px 8px; border: 1px solid #eee;
    text-decoration: none; transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.ns-search-cat:hover { border-color: #111; background: #fafafa; transform: translateY(-1px); }
.ns-search-cat__img {
    width: 34px; height: 34px; overflow: hidden;
    background: #f5f5f5; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.ns-search-cat__img img { width: 100%; height: 100%; object-fit: cover; }
.ns-search-cat__img--empty { color: #ccc; }
.ns-search-cat__name {
    font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: #111;
}

/* ── Recente zoekopdrachten ── */
.ns-search-recent-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-search-recent-chip {
    display: flex; align-items: stretch; border: 1px solid #e8e8e8;
    transition: border-color 0.15s;
}
.ns-search-recent-chip:hover { border-color: #bbb; }
.ns-search-recent-btn {
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 7px;
    padding: 6px 10px; font-size: 12px; font-family: inherit;
    color: #444; transition: background 0.12s;
}
.ns-search-recent-btn:hover { background: #f8f8f8; }
.ns-search-recent-btn svg { color: #bbb; flex-shrink: 0; }
.ns-search-recent-remove {
    background: none; border: none; border-left: 1px solid #e8e8e8;
    cursor: pointer; padding: 6px 9px;
    color: #ccc; display: flex; align-items: center;
    transition: color 0.12s, background 0.12s;
}
.ns-search-recent-remove:hover { color: #111; background: #f5f5f5; }

/* ── Skeleton loader ── */
.ns-skeleton-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px 16px;
    max-width: 900px; margin: 0 auto;
}
@media (max-width: 1100px) { .ns-skeleton-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .ns-skeleton-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px)  { .ns-skeleton-grid { grid-template-columns: repeat(2, 1fr); } }

.ns-skeleton-card { display: flex; flex-direction: column; gap: 8px; }
.ns-skeleton-img {
    aspect-ratio: 3/4; background: #f0f0f0;
    animation: nsSkelPulse 1.4s ease-in-out infinite;
}
.ns-skeleton-line {
    height: 10px; background: #f0f0f0; border-radius: 2px;
    animation: nsSkelPulse 1.4s ease-in-out infinite;
}
.ns-skeleton-line--short { width: 50%; animation-delay: 0.1s; }
.ns-skeleton-line--price { width: 60%; height: 12px; animation-delay: 0.2s; }

@keyframes nsSkelPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.45; }
}

/* ── Suggestie-pills ── */
.ns-search-suggestions {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
    max-width: 900px; margin-left: auto; margin-right: auto;
}
.ns-sug-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px 5px 8px; border: 1px solid #e0e0e0;
    text-decoration: none; font-size: 11px; color: #333;
    transition: border-color 0.15s, background 0.15s;
    background: #fafafa;
}
.ns-sug-pill:hover { border-color: #111; background: #fff; }
.ns-sug-type {
    font-size: 8px; font-weight: 800; letter-spacing: 0.15em;
    text-transform: uppercase; color: #bbb; padding: 2px 5px;
    background: #f0f0f0;
}
.ns-sug-name { font-weight: 600; color: #111; }
.ns-sug-name mark { background: none; font-weight: 800; color: #111; }
.ns-sug-count { font-size: 9px; color: #bbb; margin-left: 2px; }

/* ── Resultaten grid ── */
.ns-search-results { max-width: 100% !important; }
.ns-search-grid {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 20px 16px; margin-bottom: 28px;
}
@media (max-width: 1100px) { .ns-search-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 800px)  { .ns-search-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; } }
@media (max-width: 540px)  { .ns-search-grid { grid-template-columns: repeat(2, 1fr); } }

.ns-search-result {
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
    outline: 2px solid transparent; transition: outline-color 0.12s;
    animation: nsResultIn 0.3s ease both;
}
@keyframes nsResultIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ns-search-result:hover, .ns-search-result--active { outline-color: #111; }

.ns-sr-img {
    position: relative; background: #f6f6f6;
    aspect-ratio: 3/4; overflow: hidden; margin-bottom: 10px;
}
.ns-sr-img img {
    width: 100%; height: 100%; object-fit: cover;
    object-position: top; display: block;
    transition: transform 0.4s ease;
}
.ns-search-result:hover .ns-sr-img img { transform: scale(1.05); }

.ns-sr-badge {
    position: absolute; top: 8px; left: 8px;
    font-size: 7px; font-weight: 800; letter-spacing: 0.2em;
    padding: 3px 6px; text-transform: uppercase;
}
.ns-sr-sale { background: #111; color: #fff; }
.ns-sr-oos  { background: #e0e0e0; color: #666; top: auto; bottom: 8px; left: 8px; }

.ns-sr-info { display: flex; flex-direction: column; gap: 3px; }
.ns-sr-brand {
    font-size: 8px; font-weight: 800; letter-spacing: 0.3em;
    text-transform: uppercase; color: #aaa;
}
.ns-sr-brand mark { background: none; font-weight: 800; color: #888; }
.ns-sr-title {
    font-size: 11px; font-weight: 500; color: #111; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.ns-sr-title mark { background: none; font-weight: 800; color: #111; }
.ns-sr-cats { font-size: 9px; color: #bbb; letter-spacing: 0.03em; }
.ns-sr-price { font-size: 12px; font-weight: 700; color: #111; margin-top: 3px; }
.ns-sr-price del { color: #bbb; font-weight: 400; font-size: 10px; margin-right: 4px; }
.ns-sr-price ins { text-decoration: none; color: #c00; }

/* ── Bekijk alle ── */
.ns-search-viewall { border-top: 1px solid #f0f0f0; padding-top: 20px; max-width: 100% !important; }
.ns-search-viewall__btn {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.15em;
    text-transform: uppercase; color: #111; text-decoration: none;
    padding: 13px 20px; border: 1.5px solid #111;
    transition: background 0.16s, color 0.16s;
}
.ns-search-viewall__btn:hover { background: #111; color: #fff; }
.ns-search-viewall__btn:hover svg { color: #fff; }
.ns-search-viewall__count {
    background: #f0f0f0; padding: 3px 8px; font-size: 9px;
    font-weight: 800; letter-spacing: 0.08em; color: #555;
    transition: background 0.16s, color 0.16s;
}
.ns-search-viewall__btn:hover .ns-search-viewall__count { background: rgba(255,255,255,0.15); color: #fff; }

/* ── Geen resultaten ── */
.ns-search-empty {
    text-align: center; padding: 60px 20px; max-width: 100% !important;
}
.ns-search-empty__icon { width: 48px; height: 48px; color: #d0d0d0; margin-bottom: 18px; }
.ns-search-empty__msg  { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 6px; }
.ns-search-empty__sub  { font-size: 13px; color: #aaa; margin: 0; }

/* ── Mobiel ── */
@media (max-width: 1000px) {
    .ns-search-trigger__label { display: block; }
    .ns-search-trigger {
        flex: 1;
        width: 100%;
        border: 1px solid #e0e0e0;
        padding: 0 12px;
        height: 40px;
        box-sizing: border-box;
        margin-bottom: 10px;
    }
    .ns-search-trigger__label {
        font-size: 12px;
        color: #aaa;
        border: none;
        padding: 0;
        flex: 1;
    }
    .ns-search-bar__inner { height: 60px; }
    .ns-search-bar__input { font-size: 16px; }
    .ns-search-body { padding: 20px 16px 40px; }
}

/* ── Zoekresultaten pagina ── */
.ns-search-results-page { padding: 32px 0 60px; }
.ns-srp-header { margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.ns-srp-breadcrumb { font-size: 11px; color: #aaa; margin: 0 0 10px; display: flex; gap: 6px; align-items: center; }
.ns-srp-breadcrumb a { color: #aaa; text-decoration: none; }
.ns-srp-breadcrumb a:hover { color: #111; }
.ns-srp-title { font-size: clamp(18px, 3vw, 26px); font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #111; margin: 0 0 6px; }
.ns-srp-count { font-size: 12px; color: #999; margin: 0; }
.ns-srp-count strong { color: #111; }
.ns-srp-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
@media (max-width: 1100px) { .ns-srp-layout { grid-template-columns: 220px 1fr; gap: 24px; } }
@media (max-width: 768px)  { .ns-srp-layout { grid-template-columns: 1fr; } .ns-srp-sidebar { order: 2; } .ns-srp-main { order: 1; } }
.ns-srp-sidebar { position: sticky; top: 20px; }
.ns-srp-toolbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 20px; }
.ns-srp-toolbar .woocommerce-ordering select { border: 1px solid #e8e8e8; font-size: 12px; padding: 8px 12px; font-family: inherit; color: #555; cursor: pointer; outline: none; }
.ns-srp-products ul.products { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 20px 16px !important; list-style: none !important; margin: 0 !important; padding: 0 !important; }
@media (max-width: 900px) { .ns-srp-products ul.products { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 480px) { .ns-srp-products ul.products { grid-template-columns: 1fr !important; } }
.page-numbers { display: flex; gap: 6px; list-style: none; padding: 0; margin: 40px 0 0; justify-content: center; }
.page-numbers li .page-numbers { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid #e8e8e8; font-size: 12px; color: #555; text-decoration: none; transition: all 0.15s; }
.page-numbers li .page-numbers:hover, .page-numbers li .current { background: #111; border-color: #111; color: #fff; }
.ns-srp-empty { text-align: center; padding: 80px 20px; color: #999; grid-column: 1 / -1; }
.ns-srp-empty svg { color: #d0d0d0; margin-bottom: 20px; }
.ns-srp-empty h2 { font-size: 18px; color: #333; margin-bottom: 10px; }
.ns-srp-empty .button { display: inline-block; margin-top: 20px; padding: 12px 28px; background: #111; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; transition: opacity 0.15s; }
.ns-srp-empty .button:hover { opacity: 0.7; }
