/* Natural — product listing (/products, /category/:slug) */

/* ── Header ── */
.nt-listing-head { padding-bottom: clamp(8px, 1.5vw, 16px); }

.nt-listing-hero {
    display: grid; grid-template-columns: minmax(0, 1fr);
    padding: clamp(4px, 1vw, 8px) 0 clamp(16px, 2.5vw, 28px);
}
.nt-listing-hero.has-img {
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    background: var(--nt-paper-3);
    border: 1px solid var(--nt-line); border-radius: var(--nt-r-panel);
    overflow: hidden; padding: 0;
    margin-bottom: clamp(16px, 2.5vw, 24px);
}
.nt-listing-hero-copy {
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px;
}
.nt-listing-hero.has-img .nt-listing-hero-copy { padding: clamp(24px, 4vw, 48px); }
.nt-listing-title {
    font-family: var(--nt-font-display); font-weight: 400;
    font-size: clamp(36px, 4.6vw, 56px); line-height: 1.02; letter-spacing: -0.02em;
    margin: 0; text-wrap: pretty; overflow-wrap: anywhere;
}
.nt-listing-hero-media { position: relative; min-height: 220px; }
.nt-listing-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.nt-cat-chips {
    display: flex; gap: 8px;
    overflow-x: auto; scrollbar-width: none;
    padding-bottom: 4px;
}
.nt-cat-chips::-webkit-scrollbar { display: none; }
.nt-cat-chips .nt-chip { flex: none; white-space: nowrap; }
.nt-cat-chips .nt-chip.is-selected:hover { color: var(--nt-paper) !important; }

/* ── Body: sidebar + results ── */
.nt-listing-body {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: clamp(24px, 3.5vw, 48px);
    align-items: start;
    padding-top: clamp(16px, 2.5vw, 28px);
    padding-bottom: clamp(48px, 6vw, 80px);
}
.nt-listing-body.no-facets { grid-template-columns: minmax(0, 1fr); }

/* Filters: sticky sidebar on desktop */
.nt-filter-scrim { display: none; }
.nt-filters { position: sticky; top: 128px; display: flex; flex-direction: column; gap: 0; }
.nt-filters-head { display: none; }
.nt-filters-body { display: flex; flex-direction: column; gap: 22px; }
.nt-facet { display: flex; flex-direction: column; gap: 10px; }
.nt-facet-values { display: flex; flex-direction: column; gap: 2px; }
.nt-check {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 0; font-size: 14.5px;
}
.nt-check-box {
    width: 16px; height: 16px; flex: none;
    border: 1px solid var(--nt-line-2); border-radius: 5px;
    background: var(--nt-surface);
    display: grid; place-items: center;
    transition: background 160ms ease, border-color 160ms ease;
}
.nt-check:hover .nt-check-box { border-color: var(--nt-ink); }
.nt-check.on .nt-check-box { background: var(--nt-ink); border-color: var(--nt-ink); }
.nt-check.on .nt-check-box::after {
    content: ""; width: 8px; height: 4px;
    border-left: 1.6px solid var(--nt-paper); border-bottom: 1.6px solid var(--nt-paper);
    transform: translateY(-1px) rotate(-45deg);
}
.nt-filters-foot { padding-top: 22px; }
.nt-filter-toggle { display: none; }

@media (max-width: 899px) {
    .nt-listing-body { grid-template-columns: minmax(0, 1fr); }
    .nt-filter-scrim { display: block; }
    .nt-filters {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 90;
        width: min(360px, 88vw);
        background: var(--nt-paper);
        border-right: 1px solid var(--nt-line);
        transform: translateX(-100%);
        transition: transform 320ms var(--nt-ease-out);
        visibility: hidden;
    }
    .nt-filters.open { transform: none; visibility: visible; }
    .nt-filters-head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 18px 22px; border-bottom: 1px solid var(--nt-line);
    }
    .nt-filters-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
    .nt-filters-foot { padding: 16px 22px 22px; border-top: 1px solid var(--nt-line); }
    .nt-filter-toggle { display: inline-flex; }
}

/* ── Toolbar ── */
.nt-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; margin-bottom: 18px;
}
.nt-toolbar-left { display: flex; align-items: center; gap: 14px; }
.nt-count { font-size: 14px; }
.nt-sort { display: flex; align-items: center; gap: 8px; }
.nt-sort select {
    appearance: none; -webkit-appearance: none;
    background: var(--nt-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E685C' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
    border: 1px solid var(--nt-line); border-radius: var(--nt-r-pill);
    padding: 9px 36px 9px 16px; font: inherit; font-size: 14px; color: var(--nt-ink);
    cursor: pointer;
}
.nt-sort select:hover { border-color: var(--nt-line-2); }

.nt-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 18px; }
.nt-active-chip { padding: 6px 12px; font-size: 13px; }
.nt-active-chip span[aria-hidden] { color: var(--nt-ink-3); margin-left: 2px; }

/* Grid: 3-up beside the sidebar (phones keep base.css's 2-up grid) */
@media (min-width: 540px) {
    .nt-listing-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* ── Pagination ── */
.nt-pager {
    display: flex; justify-content: center; align-items: center; gap: 6px;
    margin-top: clamp(32px, 4vw, 48px);
}
.nt-pager-num {
    min-width: 40px; height: 40px; padding: 0 10px;
    display: grid; place-items: center;
    border-radius: var(--nt-r-pill); font-size: 14.5px;
}
a.nt-pager-num:hover { background: var(--nt-surface); color: var(--nt-ink) !important; }
.nt-pager-num.current { background: var(--nt-ink); color: var(--nt-paper); }
.nt-pager-gap { color: var(--nt-ink-muted); padding: 0 4px; }

.nt-results .nt-empty .nt-actions { justify-content: center; }

/* Phones: Filters + Sort share one row, the count sits underneath. */
@media (max-width: 539px) {
    .nt-toolbar { row-gap: 10px; }
    .nt-toolbar-left { display: contents; }
    .nt-count { order: 3; flex-basis: 100%; font-size: 13px; }
    .nt-sort label { display: none; }
    .nt-sort { margin-left: auto; }
}
