/* ==========================================================================
   Admitech — catalogus: kop, Assortiment-overzicht, tegels, familietabel
   ========================================================================== */

/* --- Paginakop ---------------------------------------------------------- */
.adm-cathead { display: flex; flex-direction: column; gap: 8px; margin: 0 0 24px; }
.adm-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: var(--adm-fs-sm); color: var(--steel-gray); }
.adm-crumbs a { color: var(--steel-gray); text-decoration: none; }
.adm-crumbs a:hover { color: var(--red); }
.adm-crumbs__sep { display: inline-flex; }
.adm-cathead__title { margin: 6px 0 0; font: 900 var(--adm-fs-4xl)/1.05 var(--adm-font-head); color: var(--black); }
.adm-cathead__meta { margin: 0; font-size: 15px; color: var(--steel-gray); }
.adm-cathead__desc { max-width: 760px; color: var(--steel-gray); }
.adm-cathead__desc p { margin: 0 0 8px; }

.adm-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: thin; }
.adm-chip {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--silver);
	border-radius: var(--adm-radius);
	background: var(--white);
	color: var(--black);
	font-size: var(--adm-fs-sm);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.adm-chip:hover { border-color: var(--black); color: var(--black); }
.adm-chip__count { font-weight: 500; color: var(--steel-gray); }
.adm-chip.is-current { background: var(--black); border-color: var(--black); color: var(--white); }
.adm-chip.is-current .adm-chip__count { color: #C9CFD5; }

/* --- Assortiment-overzicht ---------------------------------------------- */
.adm-overview { display: flex; flex-direction: column; gap: 40px; margin-bottom: 40px; }
.adm-overview__title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	font: 700 var(--adm-fs-xl)/1.2 var(--adm-font-head);
}
.adm-overview__title a { color: var(--black); text-decoration: none; }
.adm-overview__title a:hover { color: var(--red); }
.adm-overview__title .adm-group-icon { width: 28px; height: 28px; }

/* --- Tegels (overzicht en subcategorieën) ------------------------------- */
.adm-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.adm-tile {
	height: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 20px;
	background: var(--white);
	border: 1px solid var(--light-gray);
	border-radius: var(--adm-radius);
	color: var(--black);
	text-decoration: none;
}
.adm-tile:hover { border-color: var(--black); color: var(--black); }
.adm-tile:hover .adm-tile__name { color: var(--red); }
.adm-tile__img { display: block; margin: -18px -20px 6px; border-bottom: 1px solid var(--light-gray); background: var(--off-white); }
.adm-tile__img img { display: block; width: 100%; height: 140px; object-fit: contain; border-radius: var(--adm-radius) var(--adm-radius) 0 0; }
.adm-tile__name { font: 700 16px/1.3 var(--adm-font-head); }
.adm-tile__count { margin-top: auto; font-size: var(--adm-fs-sm); color: var(--steel-gray); }

/* --- Productlijst: tegels en families in één lijst ----------------------- */
.woocommerce ul.products.adm-loop,
.woocommerce-page ul.products.adm-loop {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin: 0 0 32px !important;
	padding: 0;
	list-style: none;
}
.woocommerce ul.products.adm-loop::before,
.woocommerce ul.products.adm-loop::after { display: none !important; }
.woocommerce ul.products.adm-loop:empty { display: none !important; }
.woocommerce ul.products.adm-loop li.product,
.woocommerce ul.products.adm-loop li.product-category {
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	text-align: left;
}
.woocommerce ul.products.adm-loop li.adm-family { grid-column: 1 / -1; }

/* --- Familiekaart ------------------------------------------------------- */
.adm-family {
	background: var(--white);
	border: 1px solid var(--light-gray);
	border-radius: var(--adm-radius);
	overflow: hidden;
}
.adm-family__head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 20px; }
.adm-family__img {
	flex: none;
	width: 72px;
	height: 72px;
	border-radius: var(--adm-radius);
	background: var(--off-white);
	color: #8A939C;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.adm-family__img img { width: 100%; height: 100%; object-fit: contain; }
.adm-family__info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.adm-family__name { margin: 0; font: 700 19px/1.3 var(--adm-font-head); }
.adm-family__name a { color: var(--black); text-decoration: none; }
.adm-family__name a:hover { color: var(--red); }
.adm-family__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: var(--adm-fs-sm); color: var(--steel-gray); }
.adm-family__meta .adm-sku { color: var(--black); }
.adm-family__meta .price { color: var(--steel-gray); font-size: inherit; }

.adm-family__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 40px;
	padding: 0 14px;
	border: 1px solid var(--silver);
	border-radius: var(--adm-radius);
	background: var(--white);
	color: var(--black);
	font: 600 14px var(--adm-font-body);
	cursor: pointer;
}
.adm-family__toggle:hover { border-color: var(--black); }
.adm-family__toggle .adm-icon { transition: transform .15s; transform: rotate(180deg); }
.adm-family__toggle-closed { display: none; }
.adm-family.is-collapsed .adm-family__toggle-open { display: none; }
.adm-family.is-collapsed .adm-family__toggle-closed { display: inline; }
.adm-family.is-collapsed .adm-family__toggle .adm-icon { transform: none; }
.adm-family.is-collapsed .adm-family__body { display: none; }

.adm-family__more {
	display: block;
	width: 100%;
	padding: 12px 20px;
	border: 0;
	border-top: 1px solid #E8EBEE;
	background: var(--off-white);
	color: var(--black);
	font: 600 14px var(--adm-font-body);
	text-align: left;
	cursor: pointer;
}
.adm-family__more:hover { color: var(--red); }

/* --- Variantentabel ----------------------------------------------------- */
.adm-vtable-wrap { overflow-x: auto; border-top: 1px solid var(--light-gray); }
.adm-vtable {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: var(--adm-fs-sm);
}
.adm-vtable th,
.adm-vtable td { padding: 8px 12px; border: 0; text-align: left; vertical-align: middle; }
.adm-vtable th:first-child,
.adm-vtable td:first-child { padding-left: 20px; }
.adm-vtable th:last-child,
.adm-vtable td:last-child { padding-right: 20px; }
.adm-vtable thead th {
	padding-top: 10px;
	padding-bottom: 10px;
	background: var(--black);
	color: var(--white);
	font: 600 13px/1.2 var(--adm-font-head);
	white-space: nowrap;
}
.adm-vtable tbody tr + tr td { border-top: 1px solid #E8EBEE; }
.adm-vtable tbody tr:hover td { background: #FAFBFB; }
.adm-vtable td { font-variant-numeric: tabular-nums; }
.adm-vtable .adm-sku { white-space: nowrap; }
.adm-vtable__ean { color: var(--steel-gray); }
.adm-vtable__price { text-align: right !important; font-weight: 600; white-space: nowrap; }
.adm-vtable__order { width: 1%; white-space: nowrap; }
.adm-vtable__more[hidden] { display: none; }

.adm-order { display: flex; align-items: center; gap: 8px; margin: 0; }
.adm-order__qty[type="number"] {
	width: 64px;
	height: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0 8px;
	border: 1px solid var(--silver);
	border-radius: var(--adm-radius);
	font-size: 14px;
	text-align: center;
}
.adm-order__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 40px;
	min-width: 96px;
	padding: 0 14px;
	border: 0;
	border-radius: var(--adm-radius);
	background: var(--black);
	color: var(--white);
	font: 600 14px var(--adm-font-body);
	cursor: pointer;
	transition: background-color .15s;
}
.adm-order__btn:hover { background: var(--steel-gray); }
.adm-order__icon { display: flex; }
.adm-order__icon--done { display: none; }
.adm-order__btn.is-loading { opacity: .6; pointer-events: none; }
.adm-order__btn.is-added { background: var(--green); }
.adm-order__btn.is-added .adm-order__icon--cart { display: none; }
.adm-order__btn.is-added .adm-order__icon--done { display: flex; }
.adm-order__na { color: var(--slate); font-size: 13px; }
/* WooCommerce-extra's na toevoegen nooit in de tabel tonen. */
.adm-order .added_to_cart { display: none !important; }
.adm-order__btn.added::after,
.adm-order__btn.loading::after { display: none !important; content: none !important; }

/* --- Prijs met actie (tabel en productpagina) --------------------------- */
.adm-price { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.adm-price ins { text-decoration: none; background: none; }
.adm-price.is-sale .adm-price__now { color: var(--red); }
.adm-price__was { display: inline-flex; align-items: center; gap: 6px; font-size: var(--adm-fs-xs); font-weight: 500; color: var(--steel-gray); }
.adm-price__was del { color: var(--steel-gray); }
.adm-price__advice { font-size: var(--adm-fs-xs); font-weight: 400; color: var(--steel-gray); white-space: nowrap; }
.adm-price__advice .amount { font-weight: inherit; }
.adm-price__tag {
	padding: 1px 6px;
	border-radius: 4px;
	background: var(--red-light);
	color: var(--red-dark);
	font-weight: 600;
	line-height: 1.5;
}

/* --- Melding na bestellen (toast) --------------------------------------- */
.adm-toast {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 1100;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 460px;
	padding: 12px 12px 12px 16px;
	border-radius: var(--adm-radius);
	background: var(--black);
	color: var(--white);
	box-shadow: 0 8px 24px rgba(17, 20, 24, .25);
	font: 500 14px/1.4 var(--adm-font-body);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .2s, transform .2s;
}
.adm-toast.is-visible { opacity: 1; transform: none; }
.adm-toast[hidden] { display: none; }
.adm-toast__icon {
	flex: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--green);
	display: flex;
	align-items: center;
	justify-content: center;
}
.adm-toast__icon[hidden] { display: none; }
.adm-toast__text { flex: 1; min-width: 0; }
.adm-toast__link {
	flex: none;
	display: inline-flex;
	align-items: center;
	height: 36px;
	padding: 0 12px;
	border-radius: var(--adm-radius);
	background: var(--white);
	color: var(--black);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.adm-toast__link:hover { background: var(--off-white); color: var(--black); }
.adm-toast__close {
	flex: none;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: var(--adm-radius);
	background: transparent;
	color: #C9CFD5;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.adm-toast__close:hover { color: var(--white); background: rgba(255, 255, 255, .08); }
.adm-toast.is-error { background: var(--brick); }
.adm-toast :focus-visible { outline-color: var(--white); }

/* --- Paginering --------------------------------------------------------- */
.woocommerce nav.woocommerce-pagination ul { border: 0; display: flex; justify-content: center; gap: 6px; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	min-width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--silver);
	border-radius: var(--adm-radius);
	background: var(--white);
	color: var(--black);
	font-weight: 600;
}
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--black); border-color: var(--black); color: var(--white); }

/* --- Mobiel: elke variant als compacte kaart ----------------------------- */
@media (max-width: 719px) {
	.adm-family__head { padding: 14px 16px; gap: 12px; }
	.adm-family__img { width: 56px; height: 56px; }
	.adm-family__info { flex: 1 1 0; }
	.adm-family__name { font-size: 17px; }
	.adm-family__toggle { width: 100%; justify-content: center; }
	.adm-vtable thead { display: none; }
	.adm-vtable,
	.adm-vtable tbody { display: block; }
	.adm-vtable tr {
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 4px 12px;
		padding: 12px 16px;
	}
	.adm-vtable tr[hidden] { display: none; }
	.adm-vtable tbody tr + tr { border-top: 1px solid #E8EBEE; }
	.adm-vtable tbody tr + tr td { border-top: 0; }
	.adm-vtable tbody tr:hover td { background: transparent; }
	.adm-vtable td,
	.adm-vtable td:first-child,
	.adm-vtable td:last-child { display: block; padding: 0; }
	.adm-vtable td.adm-sku:first-child { font-weight: 600; }
	.adm-vtable__attr::before { content: attr(data-label) ": "; color: var(--steel-gray); }
	.adm-vtable__ean { display: none !important; }
	.adm-vtable__price { grid-column: 2; grid-row: 1; text-align: right; }
	.adm-vtable__order { grid-column: 1 / -1; width: auto; margin-top: 6px; }
	.adm-order__btn { flex: 1; }
	.adm-toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
	.adm-toast { transition: none; }
}
