/* ==========================================================================
   Inventory browser — homepage, /equipment, /equipment/<category>
   (includes/inc-browse.php + assets/js/browse.js)
   ========================================================================== */

.browse {
	padding-block: 20px 64px;
}

/* ---- Heading ---- */
.browse-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 32px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--color-divider);
}
.browse-head h1 {
	margin: 0 0 0 -0.04em;
	font-size: clamp(30px, 3.4vw, 44px);
	line-height: 1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}
.browse-intro {
	max-width: 80ch;
	padding-top: 16px;
	font-size: 15px;
	color: var(--color-neutral-700);
}
.browse > .notice {
	margin-top: 24px;
}

.browse-layout {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 36px;
	padding-top: 24px;
}

/* ---- Filter sidebar ---- */
.filters {
	flex: 0 0 232px;
	position: sticky;
	top: var(--head-offset);
	display: flex;
	flex-direction: column;
	gap: 26px;
	/* taller than the screen once every category is listed: the rail scrolls
       on its own, with room on the right so the counts clear the scrollbar */
	max-height: calc(100vh - var(--head-offset) - 16px);
	padding-right: 12px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--color-neutral-300) transparent;
}
.filter-search .input {
	min-height: 40px;
}
.filters-toggle {
	display: none;
}
.filter-groups {
	display: flex;
	flex-direction: column;
	gap: 26px;
}
.filter-title {
	display: flex;
	justify-content: space-between;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--color-divider);
	margin-bottom: 6px;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--color-accent-700);
}
.filter-title.is-spaced {
	margin-bottom: 12px;
}
.filter-title .count,
.facet .count {
	color: var(--color-neutral-600);
	font-feature-settings: "tnum" 1;
}

/* category + location rows */
.facet-list {
	display: flex;
	flex-direction: column;
}
.facet {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 5px 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 14px;
	text-align: left;
	text-decoration: none;
	color: var(--color-text);
	cursor: pointer;
}
.facet:hover {
	color: var(--color-accent-700);
}
.facet.is-active {
	color: var(--color-accent-700);
	font-weight: 600;
}
.cat-toggle {
	margin-top: 6px;
	padding-inline: 0;
}
.cat-toggle:hover {
	background: none;
	color: var(--color-accent-700);
}

/* condition chips */
.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.chip {
	padding: 6px 12px;
	border: 1px solid var(--color-divider);
	background: transparent;
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-text);
	cursor: pointer;
}
.chip:hover {
	border-color: var(--color-accent-600);
}
.chip.is-on {
	border-color: var(--color-accent);
	background: var(--color-accent);
	color: var(--color-bg);
}

/* ---- Results column ---- */
.results {
	flex: 1 1 400px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 32px;
	container-type: inline-size;
}

/* featured listing (homepage) */
.featured {
	display: flex;
	flex-wrap: wrap;
	color: var(--color-text);
	text-decoration: none;
	transition: border-color 0.15s;
}
.featured:hover {
	border-color: var(--color-accent-600);
	color: var(--color-text);
}
.featured-photo {
	flex: 1 1 260px;
	min-height: 240px;
	max-height: 300px;
	overflow: hidden;
}
.featured-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.featured-info {
	flex: 1 1 240px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px 24px 18px;
	border-left: 1px solid var(--color-divider);
}
.featured-meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--color-accent-700);
}
.featured h2 {
	margin: 0;
	font-size: clamp(30px, 3vw, 42px);
	line-height: 1.02;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}
.featured dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 8px 20px;
	margin: 0;
	font-size: 14px;
}
.featured dt {
	color: var(--color-neutral-600);
}
.featured dd {
	margin: 0;
}
.featured-foot {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--color-divider);
}
.featured-price {
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 36px;
	line-height: 1;
	font-feature-settings: "tnum" 1;
}
/* photo above the details once they no longer fit side by side */
@container (max-width: 500px) {
	.featured-info {
		border-left: 0;
		border-top: 1px solid var(--color-divider);
	}
}

/* result count + sort */
.results-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px 24px;
}
.sort {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--color-neutral-700);
}
.sort .input {
	width: auto;
	min-height: 34px;
	font-size: 13px;
}

.more {
	display: flex;
	justify-content: center;
	padding-top: 8px;
}
.more .btn {
	min-width: 220px;
	min-height: 44px;
}

/* ---- Small screens: filters stack above the listings and fold away ---- */
@media (max-width: 720px) {
	.filters {
		flex: 1 1 100%;
		position: static;
		max-height: none;
		padding-right: 0;
		overflow: visible;
		gap: 12px;
	}
	.filters-toggle {
		display: inline-flex;
		min-height: 40px;
	}
	.filter-groups {
		display: none;
		padding-top: 12px;
	}
	.filter-groups.is-open {
		display: flex;
	}
}
