/* ---------- Archive header ---------- */

.cp-archive {
	padding-top: 12px;
	padding-bottom: 100px;
}

.cp-archive__header {
	margin-bottom: 44px;
}

.cp-archive__heading {
	font-family: var(--cp-font-heading);
	font-weight: 600;
	font-size: clamp(30px, 3vw, 44px);
	margin: 10px 0 0;
	letter-spacing: -0.02em;
}

.cp-archive__header .term-description {
	color: var(--cp-text-muted);
	font-size: 15px;
	line-height: 1.7;
	max-width: 620px;
	margin-top: 16px;
}

/* ---------- Toolbar (result count + sort) ---------- */

.cp-archive__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding-bottom: 24px;
	margin-bottom: 30px;
	border-bottom: 1px solid var(--cp-border);
}

.cp-archive__toolbar .woocommerce-result-count {
	margin: 0;
	font-size: 13px;
	color: var(--cp-text-dim);
}

.cp-archive__toolbar .woocommerce-ordering {
	margin: 0;
}

.cp-archive__toolbar .woocommerce-ordering select.orderby {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--cp-border);
	border-radius: var(--cp-radius-pill);
	color: var(--cp-text);
	font-family: var(--cp-font-body);
	font-size: 13px;
	padding: 9px 30px 9px 16px;
	cursor: pointer;
	outline: none;
}

.cp-archive__toolbar .woocommerce-ordering select.orderby:hover,
.cp-archive__toolbar .woocommerce-ordering select.orderby:focus-visible {
	border-color: var(--cp-accent-border);
}

/* The open dropdown list itself is rendered by the browser/OS and can't be
   fully restyled (no control over its box, border, or shadow), but
   background-color/color on the individual <option> elements is respected
   in Chrome, Firefox and Edge — enough to keep it from flashing bright
   white against this dark theme. */
.cp-archive__toolbar .woocommerce-ordering select.orderby option {
	background-color: #111111;
	color: var(--cp-text);
}

.cp-archive__toolbar .woocommerce-ordering select.orderby option:checked {
	background-color: var(--cp-accent);
	color: var(--cp-accent-ink);
}

/* ---------- Pagination ---------- */

.woocommerce-pagination {
	margin-top: 56px;
}

.woocommerce-pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
	/* WC's own woocommerce.css sets a border here (and border-right on each
	   li below) to draw the classic joined-box pagination strip — our rules
	   win the specificity fight for every OTHER property, but since neither
	   of these had a competing `border` declaration of their own, WC's
	   border went completely unchallenged and still rendered. */
	border: none;
}

.woocommerce-pagination .page-numbers li {
	display: flex;
	border: none;
}

.woocommerce-pagination .page-numbers a.page-numbers,
.woocommerce-pagination .page-numbers span.page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	border-radius: var(--cp-radius-pill);
	border: 1px solid transparent;
	color: var(--cp-text-muted);
	font-size: 13.5px;
	font-weight: 600;
	box-sizing: border-box;
}

.woocommerce-pagination .page-numbers a.page-numbers:hover,
.woocommerce-pagination .page-numbers a.page-numbers:focus-visible {
	border-color: var(--cp-accent-border);
	color: var(--cp-accent);
}

.woocommerce-pagination .page-numbers span.page-numbers.current {
	background: var(--cp-accent);
	color: var(--cp-accent-ink);
}

/* "No products found" reuses the global .woocommerce-info styling in
   custom.css (icon, border, colors) — nothing archive-specific needed here. */

@media (max-width: 700px) {
	.cp-archive__toolbar {
		flex-direction: column;
		align-items: flex-start;
	}
}
