/**
 * Catalog Search page (template-catalog-search.php).
 * Brand blue: #0057B8.
 */

.npt-catalog { --npt-blue: #0057B8; --npt-lime: #DFFF00; --npt-ink: #111111; --npt-line: #e2e5ea; --npt-muted: #6b7280; font-family: "Source Sans Pro", system-ui, -apple-system, sans-serif; }
/* Fill the Astra container regardless of result count. <main id="result"> was
   shrink-wrapping to its widest child (the grid), so 0-result pages rendered as
   a narrow box. Force full width across block / inline-block / flex-item cases. */
main#result.npt-catalog { display: block; width: 100%; max-width: 100%; flex: 1 1 100%; box-sizing: border-box; margin: 0 auto; }
.npt-catalog__inner { width: 100%; max-width: 1200px; margin: 0 auto; padding: 2rem 1.25rem 4rem; box-sizing: border-box; }

/* ---- Page hero (title + breadcrumb) ---- */
.npt-catalog-hero { background: #0057B8; color: #fff; }
.npt-catalog-hero__inner { max-width: 1200px; margin: 0 auto; padding: 2.5rem 1.25rem; text-align: center; }
.npt-catalog-hero__overline { margin: 0 0 .25rem; font-family: "Source Sans Pro", system-ui, sans-serif; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #DFFF00; }
.npt-catalog-hero__title { margin: 0 0 1rem; font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; color: #fff; }
.npt-catalog-hero__crumbs { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem; font-size: .9rem; }
.npt-catalog-hero__crumbs a { color: #fff; text-decoration: none; opacity: .85; }
.npt-catalog-hero__crumbs a:hover { opacity: 1; text-decoration: underline; }
.npt-catalog-hero__sep { width: 14px; height: 13px; flex: 0 0 auto; opacity: .8; }
.npt-catalog-hero__crumb-industry { font-weight: 700; }

/* ---- Filters ---- */
.npt-catalog__filters { margin-bottom: 2.5rem; padding: 20px; background: #f3f4f6; border-radius: 12px; }
.npt-catalog__algolia input { width: 100%; padding: .85rem 1rem; font-size: 1rem; border: 1px solid var(--npt-line); border-radius: 10px; }
.npt-catalog__heading { font-family: "Archivo", system-ui, sans-serif; font-size: .9rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin: 1.5rem 0 .7rem; color: var(--npt-ink); }

.npt-catalog__industries { display: flex; flex-wrap: wrap; gap: .5rem; }
.npt-catalog__industry { position: relative; }
.npt-catalog__industry input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.npt-catalog__industry span {
	display: inline-block; padding: .5rem 1.1rem; border: 1.5px solid var(--npt-line);
	border-radius: 999px; font-weight: 600; color: var(--npt-ink); transition: .15s;
}
.npt-catalog__industry input:checked + span { background: var(--npt-blue); border-color: var(--npt-blue); color: #fff; }
.npt-catalog__industry input:focus-visible + span { outline: 2px solid var(--npt-blue); outline-offset: 2px; }

.npt-catalog__facets { display: flex; flex-wrap: wrap; gap: .75rem; }
.npt-catalog__facet { flex: 1 1 180px; min-width: 160px; }
.npt-catalog__facet select {
	width: 100%; padding: .7rem .9rem; font-size: .95rem; background: #fff;
	border: 1px solid var(--npt-line); border-radius: 8px; color: var(--npt-ink); cursor: pointer;
	appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath d='M5.5 7.5l4.5 4.5 4.5-4.5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right .6rem center; background-size: 1.25rem;
}
.npt-catalog__facet select:disabled { opacity: .5; cursor: not-allowed; }

.npt-catalog__actions { display: flex; align-items: center; gap: .8rem; margin-top: 1.25rem; }
.npt-catalog__search,
.npt-catalog__reset {
	font-family: "Source Sans Pro", system-ui, -apple-system, sans-serif; font-weight: 800; letter-spacing: .04em;
	border-radius: 999px; cursor: pointer; transition: filter .15s, background .15s, color .15s; text-decoration: none;
	/* identical box for both buttons: same padding + min-width + a (transparent) border so heights match */
	display: inline-flex; align-items: center; justify-content: center;
	box-sizing: border-box; min-width: 150px; padding: .8rem 2rem; border: 1.5px solid transparent;
}
.npt-catalog__search { background: var(--npt-lime); color: var(--npt-ink); }
.npt-catalog__search:hover { filter: brightness(1.06); }
.npt-catalog__reset { background: #fff; color: var(--npt-ink); border-color: var(--npt-line); }
.npt-catalog__reset:hover { border-color: var(--npt-ink); }
/* Live empty-state notice — shown only when a selection yields zero products.
   Selections stay intact; this just tells the user to back a filter out. */
.npt-catalog__live-note {
	display: none; margin-top: 1rem; padding: .8rem 1rem; border-radius: 8px;
	background: #fff7e6; border: 1px solid #f0d99b; color: #7a5b00; font-weight: 600;
}
.npt-catalog__filters.is-empty .npt-catalog__live-note { display: block; }
/* Loading — dim the facet selects, keep the brand spinner crisp (keyframe npt-spin
 * comes from catalog-menu.css, which loads globally). */
.npt-catalog__filters.is-loading { position: relative; pointer-events: none; }
.npt-catalog__filters.is-loading .npt-catalog__facets { opacity: .4; transition: opacity .15s; }
.npt-catalog__filters.is-loading::after {
	content: ''; position: absolute; z-index: 20; left: 50%; top: 50%;
	width: 42px; height: 42px; border-radius: 50%;
	background: var(--npt-blue);
	border: 4px solid rgba(255,255,255,.35); border-top-color: var(--npt-lime);
	box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 6px 18px rgba(0,0,0,.28);
	transform: translate(-50%,-50%); animation: npt-spin .7s linear infinite;
}

/* ---- Results ---- */
/* "Filtered by" chips — what the shown results are filtered by (applied state). */
.npt-catalog__active { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.npt-catalog__active-label { font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--npt-muted); }
.npt-catalog__chip {
	display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
	background: #fff; border: 1px solid var(--npt-line); border-radius: 999px;
	padding: .35rem .8rem; font-size: .85rem; color: var(--npt-ink); transition: border-color .15s, background .15s;
}
.npt-catalog__chip:hover { border-color: var(--npt-blue); background: #eef3fb; }
.npt-catalog__chip-facet { font-weight: 700; color: var(--npt-muted); }
.npt-catalog__chip-x { font-weight: 700; color: var(--npt-muted); font-size: 1rem; line-height: 1; }
.npt-catalog__chip:hover .npt-catalog__chip-x { color: var(--npt-blue); }
.npt-catalog__clear-all { font-size: .85rem; font-weight: 700; color: var(--npt-blue); text-decoration: none; margin-left: .25rem; }
.npt-catalog__clear-all:hover { text-decoration: underline; }

.npt-catalog__count { font-family: "Archivo", system-ui, sans-serif; font-weight: 800; color: var(--npt-ink); margin-bottom: 1rem; }
.npt-catalog__count-cat { color: var(--npt-blue); }

/* SEARCH is disabled until a filter changes (JS only — no-JS keeps it active),
   so it's obvious the complex filters are built BEFORE results update. */
.npt-catalog__search:disabled { opacity: .45; cursor: not-allowed; filter: none; box-shadow: none; }
.npt-catalog__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

/* [npt_products] feature grid — configurable columns via --npt-cols (default 4). */
.npt-products { display: grid; grid-template-columns: repeat(var(--npt-cols, 4), 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .npt-products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .npt-products { grid-template-columns: 1fr; } }

.npt-card {
	position: relative; display: flex; flex-direction: column; background: #fff;
	border: 1px solid transparent; border-top: 3px solid transparent; border-radius: 12px;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.npt-card:hover {
	border-color: var(--npt-line); border-top-color: var(--npt-lime);
	box-shadow: 0 12px 30px rgba(0,0,0,.10); transform: translateY(-2px);
}
/* lime industry badge, top-left */
.npt-card__badge {
	position: absolute; top: 12px; left: 12px; z-index: 2;
	background: var(--npt-lime); color: var(--npt-ink);
	font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-size: .68rem;
	text-transform: uppercase; letter-spacing: .06em; padding: .3rem .7rem; border-radius: 999px;
}
.npt-card__media { display: block; height: 210px; background: #f4f5f7; border-radius: 12px 12px 0 0; }
.npt-card__media img { width: 100%; height: 100%; max-height: 210px; object-fit: contain; object-position: bottom center; }
/* Performance Lab's Dominant Color module paints each card image's background
   its own dominant color (img[data-dominant-color] rule) — per-card mismatched
   boxes against the shared #f4f5f7 media background. Keep cards uniform. */
.npt-card__media img[data-dominant-color]:not(.has-transparency) { background-color: transparent; }
.npt-card__body {
	padding: 1.1rem 1.25rem 1.5rem; display: flex; flex-direction: column; align-items: center;
	gap: .5rem; flex: 1; text-align: center;
}
/* blue subcategory pill */
.npt-card__subcat {
	background: var(--npt-blue); color: #fff; font-family: "Archivo", sans-serif;
	font-weight: 800; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em;
	padding: .3rem .8rem; border-radius: 999px;
}
.npt-card__title {
	font-family: "Archivo", system-ui, sans-serif; font-weight: 800; font-size: 1.25rem;
	line-height: 1.2; text-transform: uppercase; letter-spacing: .01em; margin: .1rem 0 0;
}
.npt-card__title a { color: var(--npt-ink); text-decoration: none; }
.npt-card__title a:hover { color: var(--npt-blue); }
.npt-card__spec { color: #555; font-size: 1rem; }
.npt-card__spec2 { color: var(--npt-muted); font-size: .85rem; }
.npt-card__mspn { color: var(--npt-muted); font-size: .9rem; letter-spacing: .03em; }
.npt-card__actions { display: flex; align-items: center; gap: 1rem; margin-top: .6rem; }
.npt-card__price {
	display: inline-flex; align-items: center; gap: .4rem; background: var(--npt-ink); color: #fff;
	text-decoration: none; font-family: "Archivo", sans-serif; font-weight: 800; font-size: .82rem;
	letter-spacing: .03em; padding: .6rem 1.5rem; border-radius: 999px; transition: background .15s;
}
.npt-card__price:hover { background: var(--npt-lime); color: var(--npt-ink); }
.npt-card__details {
	display: inline-flex; align-items: center; gap: .35rem; color: var(--npt-ink); text-decoration: none;
	font-family: "Archivo", sans-serif; font-weight: 800; font-size: .82rem; letter-spacing: .03em;
}
.npt-card__details:hover { color: var(--npt-blue); }

/* ---------------------------------------------------------------------------
 * [npt_products] shortcode cards ONLY (scoped to .npt-products) — the blue-body
 * feature-card treatment. Catalog-page cards (.npt-catalog__grid .npt-card) keep
 * the default white style above.
 * ------------------------------------------------------------------------ */
.npt-products .npt-card { background: var(--npt-blue); border-radius: 0; }      /* container: square */
.npt-products .npt-card a { text-decoration: none !important; }                 /* no underlines */
.npt-products .npt-card__media { border-radius: 0; }                            /* image: square */
/* Blue content area; title/MSPN/buttons spaced evenly, buttons pinned to bottom. */
.npt-products .npt-card__body { justify-content: space-between; gap: .6rem; background: var(--npt-blue); }
/* subcategory tag — white on blue so it stays legible (keeps its rounded pill) */
.npt-products .npt-card__subcat { background: #fff; color: var(--npt-blue); }
.npt-products .npt-card__title a { color: #fff; }
.npt-products .npt-card__title a:hover { color: var(--npt-lime); }
.npt-products .npt-card__spec { color: rgba(255,255,255,.85); }
.npt-products .npt-card__spec2 { color: rgba(255,255,255,.7); }
.npt-products .npt-card__mspn { color: #fff; }
.npt-products .npt-card__actions { margin-top: 0; }
/* Get a Price: lime with black text; hover inverts to black/white (keeps rounded pill). */
.npt-products .npt-card__price { background: var(--npt-lime); color: var(--npt-ink); }
.npt-products .npt-card__price:hover { background: var(--npt-ink); color: #fff; }
/* Details: white with a lime hover. */
.npt-products .npt-card__details { color: #fff; }
.npt-products .npt-card__details:hover { color: var(--npt-lime); }

.npt-catalog__empty { padding: 3rem 0 1.5rem; text-align: center; color: var(--npt-muted); font-size: 1.05rem; }

/* ---- Cross-industry search fallback ---- */
.npt-catalog__suggest { text-align: center; padding: 0 0 3rem; }
.npt-catalog__suggest-label { display: block; margin-bottom: .9rem; color: var(--npt-muted); font-size: .95rem; }
.npt-catalog__suggest-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.npt-catalog__suggest-list a {
	display: inline-flex; align-items: center; gap: .35rem; padding: .55rem 1rem;
	border: 1px solid var(--npt-line); border-radius: 999px; background: #fff;
	color: var(--npt-blue); font-weight: 700; text-decoration: none; font-size: .95rem;
}
.npt-catalog__suggest-list a:hover { border-color: var(--npt-blue); background: #eef3fb; }

/* ---- Pagination ---- */
.npt-catalog__pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.npt-catalog__pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; height: 2.4rem;
	padding: 0 .5rem; border: 1px solid var(--npt-line); border-radius: 8px; color: var(--npt-ink); text-decoration: none; font-weight: 600;
}
.npt-catalog__pagination .page-numbers.current { background: var(--npt-blue); border-color: var(--npt-blue); color: #fff; }
.npt-catalog__pagination .page-numbers:hover:not(.current) { border-color: var(--npt-blue); color: var(--npt-blue); }

@media (max-width: 600px) {
	.npt-catalog__facet { flex-basis: 100%; }
	.npt-catalog__grid { grid-template-columns: 1fr; gap: 1rem; }
	.npt-card__title { font-size: 1.1rem; }
}
