/* =============================================================
   CAMGA ARTIKELEN — front-end styles
   Sluit aan op het thema (variabelen met Camga-fallbacks).
   ============================================================= */

.camga-artikelen {
	--c-blue:      var(--blue, #1d4e9e);
	--c-blue-dark: var(--blue-dark, #163c78);
	--c-red:       var(--red, #db1e26);
	--c-white:     var(--white, #ffffff);
	--c-text:      var(--text, #1f1f1f);
	--c-radius:    var(--radius-lg, 12px);
	--c-shadow:    var(--shadow, 0 2px 16px rgba(0,0,0,0.09));
	font-family: var(--font, 'Inter', system-ui, sans-serif);
}

/* ─── Grid ─────────────────────────────────────────────────── */
.camga-grid,
.camga-menu {
	display: grid;
	gap: 1.5rem;
	margin: 0 0 2rem;
}
.camga-cols-1 { grid-template-columns: 1fr; }
.camga-cols-2 { grid-template-columns: repeat(2, 1fr); }
.camga-cols-3 { grid-template-columns: repeat(3, 1fr); }
.camga-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 782px) {
	.camga-cols-2,
	.camga-cols-3,
	.camga-cols-4 { grid-template-columns: 1fr; }
}
@media (min-width: 783px) and (max-width: 1024px) {
	.camga-cols-3,
	.camga-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Filterbalk ───────────────────────────────────────────── */
.camga-filterbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1rem;
	margin: 0 0 1.75rem;
	padding: 1.1rem 1.25rem;
	background: var(--c-white);
	border-radius: var(--c-radius);
	box-shadow: var(--c-shadow);
}
.camga-filter { display: flex; flex-direction: column; gap: 0.3rem; }
.camga-filter__label { font-size: 0.8rem; font-weight: 600; color: #555; }
.camga-filter select {
	min-width: 165px;
	padding: 0.55rem 0.75rem;
	border: 1px solid #d8dee7;
	border-radius: var(--radius, 6px);
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--c-text);
	background: #fff;
}
.camga-filter select:focus {
	outline: none;
	border-color: var(--c-blue);
	box-shadow: 0 0 0 3px rgba(29, 78, 158, 0.15);
}
.camga-filter-reset {
	margin-left: auto;
	align-self: flex-end;
	padding: 0.6rem 1.2rem;
	border-radius: var(--radius, 6px);
	background: var(--c-blue);
	color: #fff;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.2s ease;
}
.camga-filter-reset:hover { background: var(--c-blue-dark); }

.camga-noresults {
	padding: 1.25rem 1.5rem;
	background: var(--c-white);
	border-radius: var(--c-radius);
	box-shadow: var(--c-shadow);
	color: #555;
}

@media (max-width: 600px) {
	.camga-filter,
	.camga-filter select { width: 100%; min-width: 0; }
	.camga-filter-reset { margin-left: 0; width: 100%; }
}

/* ─── Artikel-cel ──────────────────────────────────────────── */
.camga-card {
	display: flex;
	flex-direction: column;
	background: var(--c-white);
	border: 1px solid rgba(29, 78, 158, 0.18);
	border-radius: var(--c-radius);
	overflow: hidden;
	box-shadow: var(--c-shadow);
	color: var(--c-text);
}
.camga-card__media {
	background: #f3f7fd;
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
}
.camga-card__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 1rem;
}
/* Voorkom dat theme-regels (.entry-content img: marge/afronding) de
   kaartfoto uitlijning breken, m.n. op mobiel. */
.camga-card__media img,
.entry-content .camga-card__media img {
	margin: 0;
	border-radius: 0;
}
/* Zoom-knop: onzichtbare wrapper rond de foto */
.camga-card__zoom {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 0;
	border: none;
	background: none;
	cursor: zoom-in;
}
.camga-card__zoom:focus-visible {
	outline: 2px solid var(--c-blue);
	outline-offset: -2px;
}

/* Downloadknop productblad */
.camga-card__pdf {
	display: inline-block;
	margin-top: 0.5rem;
	padding: 0.5rem 1rem;
	border: 1.5px solid var(--c-blue);
	border-radius: var(--radius, 6px);
	color: var(--c-blue);
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.camga-card__pdf:hover {
	background: var(--c-blue);
	color: #fff;
}

/* ─── Lightbox ─────────────────────────────────────────────── */
.camga-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.82);
	padding: 2rem;
}
.camga-lightbox__img {
	max-width: 92vw;
	max-height: 86vh;
	object-fit: contain;
	border-radius: var(--radius, 6px);
	background: #fff;
}
.camga-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1.25rem;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease;
}
.camga-lightbox__close:hover,
.camga-lightbox__close:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}
.camga-card__body { padding: 1.25rem 1.4rem 1.5rem; }
.camga-card__title {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--c-blue);
	margin: 0 0 0.75rem;
	line-height: 1.25;
}
.camga-card__specs {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.25rem 1rem;
	margin: 0 0 0.75rem;
	font-size: 0.925rem;
}
.camga-card__specs dt { font-weight: 600; color: #555; margin: 0; }
.camga-card__specs dd { margin: 0; }
.camga-card__spec-label {
	display: block;
	font-weight: 600;
	color: #555;
	font-size: 0.9rem;
	margin-bottom: 0.15rem;
}
.camga-card__spec p { margin: 0; font-size: 0.925rem; }

.camga-empty {
	padding: 1.5rem;
	background: var(--c-white);
	border-radius: var(--c-radius);
	box-shadow: var(--c-shadow);
}

/* ─── Hoofd-tegelgrid (de tegels) ──────────────────────────── */
.camga-menu { gap: 1.25rem; }

/* Groepen: eerst materialen, daaronder soorten met eigen kop */
.camga-menu-group + .camga-menu-group { margin-top: 3rem; }

.camga-menu-group__title {
	margin: 0 0 1.25rem;
	font-size: 1.35rem;
	font-weight: 700;
	text-align: center;
	color: var(--c-white, #fff);
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.camga-tile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 96px;
	padding: 1.5rem 1.75rem;
	background: var(--c-white);
	border: none;
	border-left: 5px solid var(--c-blue);
	border-radius: var(--c-radius);
	color: var(--c-blue);
	font-weight: 700;
	font-size: 1.2rem;
	text-decoration: none;
	box-shadow: 0 4px 18px rgba(29, 78, 158, 0.13);
	position: relative;
	overflow: hidden;
	transition: color 0.28s ease, transform 0.28s ease,
	            box-shadow 0.28s ease, border-color 0.28s ease;
}
/* Sliding blue fill behind the content */
.camga-tile::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--c-blue);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 0;
}
.camga-tile__label {
	flex: 1;
	position: relative;
	z-index: 1;
}
.camga-tile::after {
	content: '';
	display: block;
	width: 10px;
	height: 10px;
	border-top: 2.5px solid currentColor;
	border-right: 2.5px solid currentColor;
	border-radius: 1px;
	transform: rotate(45deg);
	flex-shrink: 0;
	opacity: 0.45;
	position: relative;
	z-index: 1;
	transition: opacity 0.28s ease, transform 0.28s ease;
}
/* Higher specificity to beat .entry-content a / .entry-content a:hover overrides */
a.camga-tile,
.entry-content a.camga-tile {
	text-decoration: none;
	color: var(--c-blue);
}
a.camga-tile:hover,
.entry-content a.camga-tile:hover {
	color: var(--c-white);
	border-left-color: var(--c-red, #db1e26);
	transform: translateY(-4px);
	box-shadow: 0 14px 36px rgba(29, 78, 158, 0.3);
}
a.camga-tile:hover::before,
.entry-content a.camga-tile:hover::before {
	transform: scaleX(1);
}
a.camga-tile:hover::after,
.entry-content a.camga-tile:hover::after {
	opacity: 1;
	transform: rotate(45deg) translate(4px, -4px);
}

/* ─── Tegel met achtergrondfoto (term-meta camga_tegel_afbeelding) ─── */
.camga-tile--image { min-height: 130px; }

.camga-tile__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
}
.camga-tile__bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0;
}
/* Donkere scrim zodat het label leesbaar blijft op de foto */
.camga-tile__bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(17, 17, 17, 0.62) 0%, rgba(17, 17, 17, 0.18) 100%);
}
/* Slide-fill moet bóven de foto schuiven; iets transparant zodat de foto doorschemert */
.camga-tile--image::before {
	z-index: 1;
	background: rgba(29, 78, 158, 0.88);
}
.camga-tile--image .camga-tile__label,
.camga-tile--image::after {
	z-index: 2;
}
a.camga-tile--image,
.entry-content a.camga-tile--image {
	color: var(--c-white, #fff);
	border-left-color: var(--c-red, #db1e26);
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
a.camga-tile--image:hover,
.entry-content a.camga-tile--image:hover {
	color: var(--c-white, #fff);
}

/* =============================================================
   MENU-ZOEKER
   ============================================================= */
.camga-search { position: relative; display: flex; align-items: center; }

.camga-search__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: var(--radius, 6px);
	color: var(--white, #fff);
	background: transparent;
	border: none;
	cursor: pointer;
	transition: background 0.2s ease;
}
.camga-search__toggle:hover,
.camga-search.is-open .camga-search__toggle {
	background: rgba(255, 255, 255, 0.14);
}

.camga-search__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: min(360px, 90vw);
	background: var(--white, #fff);
	border-radius: var(--radius-lg, 12px);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
	padding: 1rem;
	z-index: 500;
}
.camga-search__input {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid #d8dee7;
	border-radius: var(--radius, 6px);
	font-size: 1rem;
	font-family: inherit;
	color: var(--text, #1f1f1f);
}
.camga-search__input:focus {
	outline: none;
	border-color: var(--blue, #1d4e9e);
	box-shadow: 0 0 0 3px rgba(29, 78, 158, 0.15);
}

.camga-search__results { margin-top: 0.65rem; max-height: 60vh; overflow-y: auto; }
.camga-search__status,
.camga-search__empty {
	margin: 0;
	padding: 0.6rem 0.2rem;
	color: #777;
	font-size: 0.9rem;
}

.camga-search__item {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	padding: 0.6rem 0.5rem;
	border-radius: var(--radius, 6px);
	text-decoration: none;
	color: var(--text, #1f1f1f);
}
a.camga-search__item:hover { background: #eef4fc; }
.camga-search__thumb {
	width: 46px;
	height: 46px;
	object-fit: contain;
	border-radius: 4px;
	background: #f3f7fd;
	flex-shrink: 0;
}
.camga-search__info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.camga-search__name { font-weight: 600; color: var(--blue, #1d4e9e); }
.camga-search__meta { font-size: 0.82rem; color: #666; }
.camga-search__tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.15rem; }
.camga-search__tag {
	font-size: 0.72rem;
	font-weight: 600;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: rgba(29, 78, 158, 0.1);
	color: var(--blue-dark, #163c78);
}

@media (max-width: 782px) {
	.camga-search__panel { right: auto; left: 0; }
}
