.nasm {
	--nasm-accent: #1f1f1f;
	--nasm-accent-ink: #fff;
	--nasm-line: #e2ddd5;
	--nasm-muted: #6b665e;
	--nasm-bg: #fff;
	--nasm-radius: 6px;
	color: inherit;
	font: inherit;
}
.nasm *, .nasm *::before, .nasm *::after { box-sizing: border-box; }

/* Elementor's global button style (.elementor-kit-N button) is more specific than a single class,
   so reset it here and scope every button rule below with the wrapper class. */
.nasm button { white-space: normal; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; text-transform: none; letter-spacing: normal; box-shadow: none; }

/* ---------- Filters ---------- */
.nasm-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
	padding: 16px 0 20px;
	margin: 0 0 8px;
	border-bottom: 1px solid var(--nasm-line);
}
.nasm-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--nasm-muted); min-width: 150px; }
.nasm-filters .nasm-search { flex: 1 1 200px; }
.nasm-filters select,
.nasm-filters input {
	font: inherit; font-size: 15px; color: #222;
	height: 42px; padding: 0 10px;
	border: 1px solid #cfc9bf; border-radius: var(--nasm-radius); background: #fff;
}
.nasm-filters button.nasm-reset {
	height: 42px; padding: 0 14px; font: inherit; font-size: 14px;
	background: none; border: 1px solid transparent; color: var(--nasm-muted); text-decoration: underline; cursor: pointer;
}
.nasm-count { margin: 0 0 10px auto; font-size: 14px; color: var(--nasm-muted); }

/* ---------- Groups & grid ---------- */
.nasm-group { margin: 28px 0 8px; }
.nasm-group[hidden], .nasm-card[hidden] { display: none !important; }
.nasm-group-title { margin: 0 0 4px; }
.nasm-group-desc { margin: 0 0 12px; color: var(--nasm-muted); }
.nasm-grid {
	list-style: none; margin: 12px 0 0; padding: 0;
	display: grid; gap: 20px 16px;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.nasm-card { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nasm .nasm-open {
	position: relative; display: block; width: 100%; padding: 0; margin: 0;
	border: 1px solid var(--nasm-line); border-radius: var(--nasm-radius); overflow: hidden;
	background: #f4f1ec; cursor: zoom-in; aspect-ratio: 1 / 1;
}
.nasm .nasm-open img, .nasm-noimg { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.nasm .nasm-open:hover img { transform: scale(1.04); }
.nasm .nasm-open:focus-visible { outline: 3px solid var(--nasm-accent); outline-offset: 2px; }
.nasm-card.is-selected .nasm-open { border-color: var(--nasm-accent); box-shadow: 0 0 0 2px var(--nasm-accent); }
.nasm-badge {
	position: absolute; left: 6px; bottom: 6px;
	font-size: 11px; line-height: 1; padding: 4px 6px; border-radius: 3px;
	background: rgba(255,255,255,.9); color: #333;
}
.nasm-meta { display: flex; flex-direction: column; line-height: 1.3; }
.nasm-name { font-weight: 600; font-size: 15px; }
.nasm-sub { font-size: 13px; color: var(--nasm-muted); }
.nasm-req { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; min-height: 32px; }
.nasm-req input { width: 18px; height: 18px; margin: 0; accent-color: var(--nasm-accent); }
.nasm-empty { padding: 32px 0; text-align: center; color: var(--nasm-muted); }
.nasm .nasm-empty button { font: inherit; background: none; border: 0; text-decoration: underline; cursor: pointer; color: inherit; }

/* ---------- Request bar ---------- */
.nasm-bar {
	position: sticky; bottom: 12px; z-index: 50;
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	margin: 24px auto 0; padding: 10px 12px 10px 18px; max-width: 640px;
	background: var(--nasm-accent); color: var(--nasm-accent-ink);
	border-radius: 999px; box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.nasm-bar[hidden] { display: none; }
.nasm-bar-count { font-weight: 600; margin-right: auto; }
.nasm .nasm-bar-clear { font: inherit; font-size: 14px; background: none; border: 0; color: inherit; opacity: .8; text-decoration: underline; cursor: pointer; }
.nasm-bar-go {
	display: inline-block; padding: 9px 18px; border-radius: 999px;
	background: var(--nasm-accent-ink); color: var(--nasm-accent) !important; font-weight: 600; text-decoration: none !important;
}

/* ---------- Lightbox ---------- */
.nasm-lightbox {
	width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
	padding: 0; border: 0; border-radius: 10px; background: var(--nasm-bg); color: #222;
	overflow: auto;
}
.nasm-lightbox::backdrop { background: rgba(0,0,0,.75); }
.nasm-lb-inner { position: relative; padding: 16px 16px 20px; }
.nasm-lightbox figure { margin: 0; }
.nasm-lightbox img {
	display: block; width: 100%; height: min(62vh, 560px);
	object-fit: contain; background: #f4f1ec; border-radius: var(--nasm-radius);
}
.nasm-lightbox figcaption { display: flex; flex-direction: column; padding: 12px 48px 0 0; }
.nasm-lb-name { font-size: 20px; }
.nasm-lb-sub { color: var(--nasm-muted); font-size: 14px; }
.nasm-lb-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.nasm-lb-views { display: inline-flex; border: 1px solid #cfc9bf; border-radius: 999px; overflow: hidden; }
.nasm-lb-views[hidden] { display: none; }
.nasm .nasm-lb-views button { font: inherit; font-size: 14px; padding: 8px 14px; border: 0; background: #fff; color: #333; cursor: pointer; }
.nasm .nasm-lb-views button[aria-pressed="true"] { background: var(--nasm-accent); color: var(--nasm-accent-ink); }
.nasm .nasm-lb-close, .nasm .nasm-lb-prev, .nasm .nasm-lb-next {
	position: absolute; width: 40px; height: 40px; border-radius: 50%;
	border: 0; background: rgba(255,255,255,.92); color: #222; font-size: 26px; line-height: 1; cursor: pointer;
	box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.nasm .nasm-lb-close { top: 22px; right: 22px; }
.nasm .nasm-lb-prev, .nasm .nasm-lb-next { top: 40%; }
.nasm .nasm-lb-prev { left: 22px; }
.nasm .nasm-lb-next { right: 22px; }

@media (max-width: 600px) {
	.nasm-filters label { min-width: calc(50% - 8px); flex: 1 1 calc(50% - 8px); }
	.nasm-filters .nasm-search { flex-basis: 100%; }
	.nasm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
	.nasm-bar { border-radius: 12px; }
	.nasm-bar-go { flex: 1 1 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
	.nasm .nasm-open img { transition: none; }
}
