/* ==========================================================================
   CAT Equipment Plugin — Kadence Theme Integration
   ========================================================================== */

/* Grid layout for family/product listings */
.cat-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-bottom: 2rem;
}

@media (max-width: 768px) {
	.cat-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.cat-grid {
		grid-template-columns: 1fr;
	}
}

/* Family item cards (used in content-family loop partials) */
.product-item-block {
	list-style: none;
	padding: 0;
	width: 100%;
}

.product-item-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	height: 100%;
}

.product-item-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

.product-item-card__thumb {
	aspect-ratio: 1;
	overflow: hidden;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-item-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-item-card__info {
	padding: 0.75rem 1rem;
}

.product-item-card__title h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
}

.product-item-card__title .machine-count {
	font-weight: 400;
	color: #666;
	font-size: 0.875rem;
}

.product-item-card__list .row,
.product-item-card__list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

@media (max-width: 768px) {
	.product-item-card__list .row,
	.product-item-card__list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.product-item-card__list .row,
	.product-item-card__list {
		grid-template-columns: 1fr;
	}
}

/* Constrain images within cards */
.product-item-card__list img,
.cat-card img {
	max-width: 100%;
	height: auto;
}

.cat-card {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.cat-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

.cat-card a {
	text-decoration: none;
	color: inherit;
	display: block;
}

.cat-card .cat-card__thumb {
	aspect-ratio: 4/3;
	overflow: hidden;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cat-card .cat-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.cat-card .cat-card__body {
	padding: 1rem;
}

.cat-card .cat-card__body h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
}

/* Product cards (used in content-single loop partials) */
.product-card-details-block {
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.product-card-details-block:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.product-card-details-block a {
	display: block;
	text-decoration: none;
	color: inherit;
}

.product-card {
	padding: 1rem;
}

.product-card__title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.75rem;
}

.product-card__thumb {
	margin: 0 0 1rem;
}

.product-card__thumb img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

.product-card__stats {
	margin: 0;
	padding: 0;
}

.product-card__stat-row {
	display: flex;
	justify-content: space-between;
	padding: 0.25rem 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 0.875rem;
}

.product-card__stat-row dt {
	font-weight: 600;
	color: #333;
}

.product-card__stat-row dd {
	margin: 0;
	color: #666;
}

/* Product detail page layout */
.cat-product-detail {
	padding-bottom: 2rem;
}

.cat-product-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	margin-bottom: 2rem;
}

@media (max-width: 768px) {
	.cat-product-columns {
		grid-template-columns: 1fr;
	}
}

.cat-product-media img {
	max-width: 100%;
	height: auto;
}

.product__overview h1 {
	margin-top: 0;
}

.product__actions {
	margin-top: 1.5rem;
}

.product__brochure {
	display: inline-block;
	margin: 0.75rem 0;
	color: var(--global-palette-btn-bg, #0073aa);
}

.cat-product-share {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

/* Detail list (used equipment) */
.cat-detail-list {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.25rem 1rem;
	margin: 1rem 0;
}

.cat-detail-list dt {
	font-weight: 600;
}

.cat-detail-list dd {
	margin: 0;
}

.used-price {
	color: #c00;
	font-weight: 700;
}

/* Specs table */
.cat-specs-table,
.product__specs {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

.cat-specs-table tr,
.product__specs tr {
	border-bottom: 1px solid #eee;
}

.cat-specs-table td,
.product__specs td {
	padding: 0.5rem 0;
}

.cat-specs-table dt,
.product__specs dt,
.cat-specs-table dd,
.product__specs dd {
	display: inline;
	margin: 0;
}

.cat-specs-table dt,
.product__specs dt {
	font-weight: 600;
	margin-right: 0.5rem;
}

.cat-specs-table dt::after,
.product__specs dt::after {
	content: ": ";
}

/* Specs list */
.cat-specs-list {
	list-style: disc;
	padding-left: 1.5rem;
	margin: 1rem 0;
}

.cat-specs-list li {
	padding: 0.25rem 0;
}

/* Link bar */
.cat-link-bar {
	margin: 1.5rem 0;
	border-top: 1px solid #eee;
	border-bottom: 1px solid #eee;
	padding: 0.75rem 0;
}

.cat-link-bar ul {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cat-link-bar a {
	font-weight: 600;
	text-decoration: none;
	color: var(--global-palette-btn-bg, #0073aa);
}

.cat-link-bar a:hover {
	text-decoration: underline;
}

/* Tabs */
.cat-tabs {
	margin: 2rem 0;
}

.cat-tabs__nav ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	border-bottom: 2px solid #e0e0e0;
}

.cat-tabs__nav .tab-link a {
	display: block;
	padding: 0.75rem 1.25rem;
	text-decoration: none;
	color: #666;
	font-weight: 600;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color 0.2s, border-color 0.2s;
}

.cat-tabs__nav .tab-link.active a,
.cat-tabs__nav .tab-link a:hover {
	color: #333;
	border-bottom-color: var(--global-palette-btn-bg, #0073aa);
}

.cat-tabs__content .tab-item {
	display: none;
	padding: 1.5rem 0;
}

.cat-tabs__content .tab-item.active {
	display: block;
}

/* Buttons */
.cat-equipment .button,
.cat-equipment input[type="submit"] {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	transition: background-color 0.2s;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.button--primary {
	background: var(--global-palette-btn-bg, #0073aa);
	color: #fff;
}

.button--primary:hover {
	background: var(--global-palette-btn-bg-hover, #005f8c);
	color: #fff;
}

.button--secondary {
	background: #ffc220;
	color: #333;
}

.button--secondary:hover {
	background: #e5ad00;
}

.button--block {
	display: block;
	width: 100%;
}

/* Text utilities */
.text--center {
	text-align: center;
}

.flush {
	margin: 0;
}

.unavailable {
	color: #999;
	font-style: italic;
}

/* Legacy grid classes used in sub-templates */
.col-xs-6 { width: 100%; }
.col-sm-4 { width: 100%; }
.col-md-6 { width: 100%; }
.col-md-12 { width: 100%; }
.col-xxs-12 { width: 100%; }

/* Image browser */
.cat-product-media .image-browser__main img,
.cat-product-media .product-image img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.cat-product-media .image-browser__thumbs {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.5rem;
	flex-wrap: wrap;
}

.cat-product-media .image-browser__thumbs img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border: 2px solid transparent;
	border-radius: 3px;
	cursor: pointer;
}

.cat-product-media .image-browser__thumbs img:hover,
.cat-product-media .image-browser__thumbs img.active {
	border-color: var(--global-palette-btn-bg, #0073aa);
}

/* Clearfix utility */
.clearfix::after {
	content: "";
	display: table;
	clear: both;
}
