/**
 * Trinite Agrovet - global product category archive.
 *
 * Styles the category branch of woocommerce/archive-product.php. Loaded only
 * on product category archives, on top of woocommerce.css (shared WooCommerce
 * brand styling: Request Price badge, buttons, result count, ordering select,
 * pagination) and single-product.css, which is where the shared tp-* component
 * system already lives - product cards, pill buttons, the breadcrumb band, the
 * support CTA and the trust strip. The archive wrapper carries the tp-single
 * class for exactly that reason, so a product card renders identically here
 * and on a product page, with no duplicated CSS.
 *
 * Brand: deep green #0B542B / #176B3A, dark green #081C15, amber #F59E0B,
 * ink #17222D, muted #5F676E, border #E6E9E5, tints #F5F6F4 / #FAF8F2.
 * Type: Montserrat (headings, nav, buttons), Inter (body).
 */

.tc-archive {
	background-color: #FFFFFF;
}

.tc-archive .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------
   1. Compact dynamic hero
   --------------------------------------------------------------- */
.tc-hero__inner {
	padding-top: 30px;
	padding-bottom: 38px;
}

.tc-hero__body {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 18px 0 0;
}

.tc-hero__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	flex: 0 0 auto;
	border-radius: 14px;
	background-color: rgba(245, 158, 11, .16);
	border: 1px solid rgba(245, 158, 11, .34);
	color: #F59E0B;
}

.tc-hero__icon svg {
	width: 27px;
	height: 27px;
}

.tc-hero__text {
	min-width: 0;
}

.woocommerce .tc-archive h1.page-title,
.tc-archive .tc-hero__title {
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 38px;
	line-height: 1.16;
	letter-spacing: -.5px;
	color: #FFFFFF;
	margin: 0 0 8px;
	text-align: left;
}

.tc-hero__intro {
	font-size: 16.5px;
	line-height: 1.65;
	color: rgba(255, 255, 255, .85);
	margin: 0;
	max-width: 70ch;
}

/* ---------------------------------------------------------------
   2. Category navigation pills
   --------------------------------------------------------------- */
.tc-nav {
	background-color: #FFFFFF;
	border-bottom: 1px solid #E6E9E5;
	padding: 18px 0;
}

.tc-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tc-nav__list li {
	margin: 0;
	list-style: none;
}

.tc-archive .tc-pill {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	height: 100%;
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 13.5px;
	line-height: 1.25;
	color: #17222D;
	background-color: #F5F6F4;
	border: 1px solid #E6E9E5;
	border-radius: 999px;
	padding: 11px 18px;
	text-decoration: none;
	white-space: nowrap;
	box-sizing: border-box;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.tc-archive .tc-pill svg {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	color: #176B3A;
	transition: color .2s ease;
}

.tc-archive .tc-pill:hover {
	background-color: #ECF4EE;
	border-color: #CBE0D2;
	color: #0B542B;
}

.tc-archive .tc-pill.is-active {
	background-color: #0B542B;
	border-color: #0B542B;
	color: #FFFFFF;
}

.tc-archive .tc-pill.is-active svg {
	color: #F59E0B;
}

/* ---------------------------------------------------------------
   3. Main catalogue area: sidebar + product grid
   --------------------------------------------------------------- */
.tc-main {
	padding: 40px 0 56px;
}

.tc-main__inner {
	display: grid;
	grid-template-columns: minmax(0, 268px) minmax(0, 1fr);
	gap: 34px;
	align-items: start;
}

/* Mobile "Filter Products" toggle - hidden on desktop, where the panel is
   always visible. Same pattern and class names as the Shop page. */
.tc-filter-toggle-wrap {
	display: none;
	grid-column: 1 / -1;
	margin: 0 0 4px;
}

#trinite-filter-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 14px;
	color: #0B542B;
	background: #FFFFFF;
	border: 1px solid #CBD8CC;
	border-radius: 999px;
	padding: 13px 20px;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease;
}

#trinite-filter-toggle:hover {
	background: #F3F8F3;
	border-color: #0B542B;
}

#trinite-filter-toggle svg {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
}

#trinite-filter-toggle .trinite-ft-caret {
	width: 7px;
	height: 7px;
	border-right: 1.8px solid currentColor;
	border-bottom: 1.8px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .2s ease;
}

#trinite-filter-toggle[aria-expanded="true"] .trinite-ft-caret {
	transform: translateY(1px) rotate(-135deg);
}

/* Sidebar */
.tc-sidebar {
	background-color: #FAF8F2;
	border: 1px solid #E6E9E5;
	border-radius: 12px;
	padding: 22px;
	box-sizing: border-box;
	position: sticky;
	top: 24px;
}

.tc-archive .tc-sidebar__title {
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 17px;
	line-height: 1.3;
	color: #17222D;
	margin: 0 0 16px;
	padding: 0 0 14px;
	border-bottom: 1px solid #E6E9E5;
}

.tc-sidebar__note {
	font-size: 13.5px;
	line-height: 1.7;
	color: #5F676E;
	margin: 0 0 16px;
}

.tc-sidebar__stock {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13.5px;
	line-height: 1.6;
	color: #0B542B;
	background-color: #ECF4EE;
	border: 1px solid #CBE0D2;
	border-radius: 10px;
	padding: 12px 14px;
	margin: 0 0 18px;
}

.tc-sidebar__stock svg {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	margin-top: 1px;
}

.tc-group {
	margin: 0 0 20px;
	padding: 0;
	border: 0;
}

.tc-group:last-child {
	margin-bottom: 0;
}

.tc-archive .tc-group__title {
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 12.5px;
	line-height: 1.4;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: #176B3A;
	margin: 0 0 10px;
	padding: 0;
}

.tc-group__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tc-group__list li {
	margin: 0;
	list-style: none;
}

/* Filter choices: real links in WooCommerce's layered-nav format, styled as
   checkboxes so they read as filters. */
.tc-archive .tc-check {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	font-size: 14.5px;
	line-height: 1.5;
	color: #17222D;
	text-decoration: none;
	transition: color .18s ease;
}

.tc-archive .tc-check:hover {
	color: #0B542B;
}

.tc-check__box {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	border: 1px solid #C6CFC6;
	border-radius: 5px;
	background-color: #FFFFFF;
	position: relative;
	transition: background-color .18s ease, border-color .18s ease;
}

.tc-archive .tc-check.is-on .tc-check__box {
	background-color: #0B542B;
	border-color: #0B542B;
}

.tc-archive .tc-check.is-on .tc-check__box::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 1px;
	width: 5px;
	height: 9px;
	border-right: 2px solid #FFFFFF;
	border-bottom: 2px solid #FFFFFF;
	transform: rotate(40deg);
}

.tc-check__label {
	flex: 1 1 auto;
	min-width: 0;
}

.tc-archive .tc-check.is-on .tc-check__label {
	font-weight: 600;
	color: #0B542B;
}

.tc-check__count {
	font-size: 12.5px;
	color: #5F676E;
	flex: 0 0 auto;
}

.tc-price {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
}

.tc-price input {
	width: 100%;
	min-width: 0;
	height: 40px;
	font-family: "Inter", system-ui, sans-serif;
	font-size: 14px;
	color: #17222D;
	background-color: #FFFFFF;
	border: 1px solid #E6E9E5;
	border-radius: 8px;
	padding: 0 10px;
	box-sizing: border-box;
}

.tc-price input:focus {
	outline: none;
	border-color: #176B3A;
}

.tc-price__dash {
	color: #5F676E;
	flex: 0 0 auto;
}

.tc-archive .tc-filters__apply {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 13.5px;
	line-height: 1.2;
	color: #FFFFFF;
	background-color: #0B542B;
	border: 1px solid #0B542B;
	border-radius: 999px;
	padding: 11px 22px;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease;
}

.tc-archive .tc-filters__apply:hover {
	background-color: #176B3A;
	border-color: #176B3A;
}

.tc-filters__actions {
	margin: 18px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid #E6E9E5;
}

.tc-archive .tc-filters__reset {
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 13.5px;
	color: #176B3A;
	text-decoration: none;
}

.tc-archive .tc-filters__reset:hover {
	color: #F59E0B;
	text-decoration: underline;
}

/* Sidebar category list */
.tc-group--cats {
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid #E6E9E5;
}

.tc-catlist {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14.5px;
}

.tc-catlist li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #EEF1ED;
	list-style: none;
}

.tc-catlist li:last-child {
	border-bottom: 0;
}

.tc-archive .tc-catlist a {
	display: block;
	padding: 10px 0;
	color: #17222D;
	text-decoration: none;
	transition: color .18s ease;
}

.tc-archive .tc-catlist a:hover {
	color: #0B542B;
}

.tc-archive .tc-catlist li.is-current a {
	color: #0B542B;
	font-weight: 600;
}

.tc-catlist__count {
	font-size: 12.5px;
	color: #5F676E;
	flex: 0 0 auto;
}

.tc-archive .tc-catlist__all a {
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 13.5px;
	color: #176B3A;
}

/* Results column */
.tc-results {
	min-width: 0;
}

.tc-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin: 0 0 22px;
	padding: 0 0 16px;
	border-bottom: 1px solid #E6E9E5;
}

.woocommerce .tc-archive .tc-count,
.tc-archive .tc-count {
	font-size: 14.5px;
	line-height: 1.6;
	color: #5F676E;
	margin: 0;
	float: none;
}

.tc-sort {
	display: flex;
	align-items: center;
}

.woocommerce .tc-archive .tc-sort form.woocommerce-ordering {
	margin: 0;
	float: none;
}

.woocommerce .tc-archive .tc-sort select.orderby {
	font-family: "Inter", system-ui, sans-serif;
	font-size: 14px;
	color: #17222D;
	background-color: #FFFFFF;
	border: 1px solid #E6E9E5;
	border-radius: 8px;
	padding: 10px 14px;
	cursor: pointer;
	max-width: 100%;
}

.woocommerce .tc-archive .tc-sort select.orderby:focus {
	outline: none;
	border-color: #176B3A;
}

/* The product grid reuses the shared tp-grid / tp-card system; only the
   column count differs, because the sidebar takes a slice of the row. */
.tc-archive .tc-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 0 0 8px;
}

.woocommerce .tc-archive nav.woocommerce-pagination {
	margin: 30px 0 0;
	text-align: left;
}

/* ---------------------------------------------------------------
   4. Empty states
   --------------------------------------------------------------- */
.tc-empty {
	background-color: #FAF8F2;
	border: 1px solid #E6E9E5;
	border-radius: 12px;
	padding: 48px 28px;
	text-align: center;
}

.tc-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 999px;
	background-color: #ECF4EE;
	color: #0B542B;
	margin: 0 0 18px;
}

.tc-empty__icon svg {
	width: 25px;
	height: 25px;
}

.tc-archive .tc-empty__title {
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 22px;
	line-height: 1.32;
	color: #17222D;
	margin: 0 0 10px;
}

.tc-empty__text {
	font-size: 15.5px;
	line-height: 1.7;
	color: #5F676E;
	margin: 0 auto 24px;
	max-width: 52ch;
}

.tc-empty__btns {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 14px;
}

/* ---------------------------------------------------------------
   5. More Farm Solutions
   --------------------------------------------------------------- */
.tc-more {
	background-color: #F5F6F4;
	border-top: 1px solid #E6E9E5;
	padding: 58px 0 62px;
}

.tc-archive .tc-more__title {
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 34px;
	line-height: 1.2;
	letter-spacing: -.4px;
	color: #17222D;
	margin: 0 0 12px;
}

.tc-archive .tc-more__title span {
	color: #F59E0B;
}

.tc-more__text {
	font-size: 16.5px;
	line-height: 1.7;
	color: #5F676E;
	margin: 0 0 30px;
	max-width: 62ch;
}

.tc-more__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.tc-archive .tc-more__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	background-color: #FFFFFF;
	border: 1px solid #E6E9E5;
	border-radius: 12px;
	box-shadow: 0 5px 18px rgba(0, 0, 0, .05);
	padding: 22px 20px;
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.tc-archive .tc-more__card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, .11);
	border-color: #CBE0D2;
}

.tc-more__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background-color: #ECF4EE;
	color: #0B542B;
	margin: 0 0 12px;
	transition: background-color .2s ease, color .2s ease;
}

.tc-archive .tc-more__card:hover .tc-more__icon {
	background-color: #0B542B;
	color: #FFFFFF;
}

.tc-more__icon svg {
	width: 20px;
	height: 20px;
}

.tc-more__name {
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 1.35;
	color: #17222D;
}

.tc-archive .tc-more__card:hover .tc-more__name {
	color: #0B542B;
}

.tc-more__count {
	font-size: 13.5px;
	line-height: 1.6;
	color: #5F676E;
}

.tc-archive .tc-more__card--all .tc-more__icon {
	background-color: rgba(245, 158, 11, .16);
	color: #C77F06;
}

/* ---------------------------------------------------------------
   6. Support CTA (shared tp-cta component, archive tweaks only)
   --------------------------------------------------------------- */
.tc-archive .tp-cta__panel ul {
	gap: 16px;
}

/* ---------------------------------------------------------------
   7. Responsive
   --------------------------------------------------------------- */
@media (max-width: 1180px) {
	.tc-main__inner {
		grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
		gap: 26px;
	}

	.tc-archive .tc-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.woocommerce .tc-archive h1.page-title,
	.tc-archive .tc-hero__title {
		font-size: 33px;
	}

	.tc-archive .tc-more__title {
		font-size: 29px;
	}

	.tc-more__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 1024px) {
	/* The sidebar collapses behind the Filter Products toggle, exactly as on
	   the Shop page. */
	.tc-main__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.tc-filter-toggle-wrap {
		display: block;
	}

	.tc-sidebar {
		display: none;
		position: static;
		top: auto;
	}

	.tc-sidebar.tag-open {
		display: block;
	}

	.tc-archive .tc-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.tc-nav {
		padding: 14px 0;
	}

	/* Category pills scroll sideways rather than being squeezed. */
	.tc-nav__list {
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		padding-bottom: 6px;
	}

	.tc-more__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.tc-archive .tc-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.tc-hero__inner {
		padding-top: 24px;
		padding-bottom: 30px;
	}

	.tc-hero__body {
		gap: 14px;
		margin-top: 14px;
	}

	.tc-hero__icon {
		width: 46px;
		height: 46px;
		border-radius: 12px;
	}

	.tc-hero__icon svg {
		width: 22px;
		height: 22px;
	}

	.woocommerce .tc-archive h1.page-title,
	.tc-archive .tc-hero__title {
		font-size: 26px;
	}

	.tc-hero__intro {
		font-size: 15px;
	}

	.tc-main {
		padding: 28px 0 44px;
	}

	.tc-toolbar {
		gap: 12px;
	}

	.tc-sort,
	.woocommerce .tc-archive .tc-sort form.woocommerce-ordering,
	.woocommerce .tc-archive .tc-sort select.orderby {
		width: 100%;
	}

	.tc-archive .tc-more__title {
		font-size: 24px;
	}

	.tc-more__text {
		font-size: 15px;
		margin-bottom: 24px;
	}

	.tc-more {
		padding: 44px 0 48px;
	}

	.tc-empty {
		padding: 36px 20px;
	}

	.tc-archive .tc-empty__title {
		font-size: 19px;
	}

	.tc-empty__btns {
		width: 100%;
	}
}

@media (max-width: 560px) {
	.tc-archive .tc-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.tc-more__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.tc-sidebar {
		padding: 18px;
	}
}
