/*
 Theme Name:   Backhoe Child
 Description:  Child theme for Backhoe (B&H Industrial customizations)
 Template:     backhoe
 Version:      1.1.3
 Text Domain:  backhoe-child
*/

/* Custom styles go below. */

/* ==========================================================================
   Inventory (shop) list layout — woocommerce/archive-product.php
   ========================================================================== */

.bh-inv {
	--bh-red: #ff0000;
	--bh-red-dark: #d10000;
	--bh-ink: #1a1a1a;
	--bh-text: #44464a;
	--bh-line: #d9d9d9;
	--bh-panel: #e6e6e6;
	--bh-panel-hover: #d4d4d4;
	display: block;
	max-width: 1180px;
	margin: 0 auto;
	padding: 40px 16px 60px;
	color: var(--bh-text);
}

.bh-inv *,
.bh-inv *::before,
.bh-inv *::after {
	box-sizing: border-box;
}

/* Intro */
.bh-inv > div.bh-inv__intro {
	padding: 0;
}

.bh-inv__heading {
	margin: 0 0 14px;
	font-size: 36px;
	line-height: 1.15;
	font-weight: 600;
	color: var(--bh-ink);
}

.bh-inv__text {
	font-size: 15px;
	line-height: 1.55;
}

.bh-inv__text p {
	margin: 0 0 10px;
}

/* Condition buttons */
.bh-inv__cats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 24px 0 32px;
}

.bh-inv__cat {
	flex: 0 1 200px;
	padding: 8px 14px;
	background: var(--bh-red);
	color: #fff !important;
	font-size: 15px;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
	transition: background-color 0.15s;
}

.bh-inv__cat:hover,
.bh-inv__cat:focus-visible {
	background: var(--bh-red-dark);
}

.bh-inv__cat.is-active {
	background: var(--bh-ink);
}

/* Toolbar */
.bh-inv__toolbar {
	margin: 0;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--bh-line);
}

.bh-inv__bar,
.bh-inv__filters {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px 24px;
	align-items: center;
}

.bh-inv__filters {
	margin-top: 10px;
}

.bh-inv__search,
.bh-inv__sort,
.bh-inv__pager {
	display: flex;
	align-items: stretch;
	gap: 6px;
}

.bh-inv__toolbar input[type="search"],
.bh-inv__toolbar select {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 36px;
	margin: 0;
	padding: 4px 10px;
	border: 1px solid #c8c8c8;
	border-radius: 0;
	background-color: #fff;
	color: var(--bh-ink);
	font-size: 14px;
	box-shadow: none;
}

.bh-inv__icon-btn {
	display: inline-flex;
	flex: 0 0 36px;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--bh-red);
	color: #fff !important;
	font-size: 16px;
	text-decoration: none !important;
	cursor: pointer;
}

.bh-inv__icon-btn:hover {
	background: var(--bh-red-dark);
}

.bh-inv__icon-btn.is-disabled {
	opacity: 0.45;
	cursor: default;
}

.bh-inv__sort .bh-inv__icon-btn {
	pointer-events: none;
}

.bh-inv__pager {
	align-items: center;
	justify-content: center;
}

.bh-inv__page-info {
	padding: 0 4px;
	font-size: 14px;
	white-space: nowrap;
}

.bh-inv__reset {
	text-align: right;
}

.bh-inv__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 14px;
	background: var(--bh-red);
	color: #fff !important;
	font-size: 14px;
	text-decoration: none !important;
}

.bh-inv__btn:hover {
	background: var(--bh-red-dark);
}

.bh-inv__btn--dark {
	background: var(--bh-ink);
}

.bh-inv__btn--dark:hover {
	background: #000;
}

/* Unit rows */
.bh-unit {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 12px;
	padding: 20px 0;
	border-bottom: 1px solid var(--bh-line);
}

.bh-unit__media {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bh-unit__media .bh-unit__image {
	flex: 1 1 auto;
}

.bh-unit__image {
	display: block;
	aspect-ratio: 4 / 3;
	background: #f2f2f2;
	overflow: hidden;
}

.bh-unit__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
	transition: transform 0.25s;
}

.bh-unit__image:hover img {
	transform: scale(1.04);
}

.bh-unit__more,
.bh-unit__actions a {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 6px 10px;
	white-space: nowrap;
	background: var(--bh-panel);
	color: var(--bh-ink) !important;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background-color 0.15s;
}

.bh-unit__more {
	color: #666 !important;
}

.bh-unit__more:hover,
.bh-unit__actions a:hover {
	background: var(--bh-panel-hover);
}

.bh-unit__more i,
.bh-unit__actions i {
	font-size: 20px;
}

.bh-unit__body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 12px;
	min-width: 0;
}

.bh-unit__top {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 0 0 0 12px;
}

.bh-unit__title {
	margin: 0 0 18px;
	font-size: 19px;
	line-height: 1.3;
	font-weight: 500;
}

.bh-unit__title a {
	color: var(--bh-ink) !important;
	text-decoration: none !important;
}

.bh-unit__title a:hover {
	color: var(--bh-red) !important;
}

.bh-unit__specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, max-content));
	gap: 2px 48px;
	margin: 0;
	font-size: 13px;
}

.bh-unit__specs div {
	display: flex;
	gap: 8px;
}

.bh-unit__specs dt {
	min-width: 84px;
	margin: 0;
	font-weight: 700;
	color: var(--bh-ink);
}

.bh-unit__specs dd {
	margin: 0;
}

.bh-unit__price {
	flex: 0 0 auto;
	font-size: 17px;
	font-weight: 500;
	text-align: right;
}

.bh-unit__price a,
.bh-unit__price .amount {
	color: var(--bh-ink) !important;
	text-decoration: none !important;
}

.bh-unit__price a:hover {
	color: var(--bh-red) !important;
}

.bh-unit__actions {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2px;
	margin-left: 12px;
}

.bh-unit__actions a.bh-unit__details {
	background: #000;
	color: #fff !important;
}

.bh-unit__actions a.bh-unit__details:hover {
	background: var(--bh-red);
}

/* Empty state + bottom pagination */
.bh-inv__empty {
	padding: 48px 0;
	text-align: center;
	font-size: 16px;
}

.bh-inv__empty .bh-inv__btn {
	margin: 4px;
}

.bh-inv__pagination {
	margin-top: 24px;
}

/* Tablet */
@media (max-width: 900px) {
	.bh-inv__bar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.bh-inv__pager {
		justify-content: flex-start;
	}

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

/* Phone */
@media (max-width: 640px) {
	.bh-inv {
		padding-top: 28px;
	}

	.bh-inv__heading {
		font-size: 26px;
	}

	.bh-inv__cat {
		flex-basis: calc(50% - 4px);
		font-size: 14px;
	}

	.bh-inv__bar {
		grid-template-columns: minmax(0, 1fr);
	}

	.bh-inv__filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.bh-unit__actions a {
		white-space: normal;
		line-height: 1.2;
	}

	.bh-inv__reset {
		text-align: left;
	}

	.bh-unit {
		grid-template-columns: minmax(0, 1fr);
	}

	.bh-unit__top {
		flex-direction: column;
		padding-left: 0;
	}

	.bh-unit__price {
		text-align: left;
	}

	.bh-unit__specs {
		grid-template-columns: minmax(0, 1fr);
	}

	.bh-unit__actions {
		margin-left: 0;
	}
}
