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

/* New / rental product single — two columns only when the media column has content */
.cat-product-detail {
	display: grid;
	gap: 2rem;
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	/* Avoid equal-height stretching when the copy column is short (e.g. minimal intro vs. media + Slick). */
	align-items: start;
}

.cat-product-detail--split {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.cat-product-detail--single {
	grid-template-columns: minmax(0, 1fr);
}

.cat-product-media,
.cat-product-info {
	min-width: 0;
}

/* With sidebar: main column is `1fr`; Slick min-content width must not blow out the grid on wide viewports */
.has-sidebar .content-container.site-container:has(.cat-product-detail--split) > #main.site-main {
	min-width: 0;
}

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

/* 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-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;
}

/* Keep media + Slick thumbnail strip inside the grid track (wide .slick-track must not force the column wider). */
.cat-product-media .media-browser {
	min-width: 0;
	max-width: 100%;
	display: block;
}

.cat-product-media .media-browser__preview img {
	width: 100%;
	height: auto;
	display: block;
}

.cat-product-media .media-browser__tabs--segmented,
.cat-product-media .media-browser .tabs__content,
.cat-product-media .media-browser .tab-item {
	min-width: 0;
	max-width: 100%;
}

.cat-product-media .media-browser .frame {
	min-width: 0;
	overflow: hidden;
}

.cat-product-media .media-browser .slick-slider,
.cat-product-media .media-browser .slick-list {
	min-width: 0;
	max-width: 100%;
}

.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;
}

/* wp-cat product / media browser tabs (template.js + legacy markup) */
.product__details.tabs .tabs__content > .tab-item:not(.active),
.media-browser .tabs__content > .tab-item:not(.active) {
	display: none;
}

/* Specs / details tabs — underline style */
.product__details.tabs .tabs__nav {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	border-bottom: 2px solid #e0e0e0;
	gap: 0;
}

.product__details.tabs .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;
}

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

/* Media browser — Caterpillar-style segmented Photos / Videos (equal tabs, #eee active) */
.media-browser__tabs--segmented > ul.tabs__nav {
	display: flex;
	flex-wrap: nowrap;
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid #ddd;
	border-bottom: none;
	gap: 0;
	width: 100%;
	box-sizing: border-box;
}

.media-browser__tabs--segmented > ul.tabs__nav .tab-link {
	flex: 1 1 0;
	margin: 0;
	text-align: center;
	border-right: 1px solid #ddd;
	box-sizing: border-box;
}

.media-browser__tabs--segmented > ul.tabs__nav .tab-link:last-child {
	border-right: none;
}

.media-browser__tabs--segmented > ul.tabs__nav .tab-link a {
	display: block;
	padding: 0.8rem 0.75rem;
	margin: 0;
	text-decoration: none;
	color: #000;
	font-weight: 700;
	font-size: 0.9375rem;
	letter-spacing: 0.02em;
	font-family: "Helvetica Neue", Helvetica, Arial, "Arial Narrow", sans-serif;
	background: #fff;
	border: none;
	line-height: 1.2;
	transition: background-color 0.15s ease;
}

.media-browser__tabs--segmented > ul.tabs__nav .tab-link.active a {
	background: #eee;
	color: #000;
}

.media-browser__tabs--segmented > ul.tabs__nav .tab-link:not(.active) a:hover {
	background: #f7f7f7;
	color: #000;
}

.media-browser__tabs--segmented .tabs__content {
	margin: 0;
	padding: 1rem 1.25rem 1.25rem;
	border: 1px solid #ddd;
	background: #fff;
	box-sizing: border-box;
}

.media-browser__tabs--segmented .media-browser__empty {
	margin: 0;
	padding: 2rem 1rem;
	text-align: center;
	color: #666;
	font-size: 0.9375rem;
	line-height: 1.5;
}

/* Thumbnail strip: theme/content styles add list markers to ul inside .entry-content */
.media-browser .product__thumbnails,
.product__media .product__thumbnails {
	list-style: none;
	margin: 0;
	padding: 0;
}

.media-browser .product__thumbnails > li,
.product__media .product__thumbnails > li {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Thumbnail strip: horizontal row before Slick initializes (window.load) and as layout hint */
.media-browser .frame {
	width: 100%;
	max-width: 100%;
}

.media-browser .product__thumbnails.js-thumbnails-scroller:not(.slick-initialized) {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.media-browser .product__thumbnails .product__thumbnail,
.media-browser .product__thumbnails .product__video {
	display: block;
	line-height: 0;
}

.media-browser .product__thumbnails .product__thumbnail img,
.media-browser .product__thumbnails .product__video img {
	display: block;
	max-width: 100%;
	height: auto;
}

.media-browser .slick-slider .product__thumbnails > li > a {
	outline-offset: 2px;
}

/* 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;
}

/* --------------------------------------------------------------------------
   Marine Power landing (cat-engines family archive — thompsonmarine.com)
   -------------------------------------------------------------------------- */

.cat-marine-engines-archive .content-container.site-container {
	display: block;
	max-width: 100%;
}

.cat-marine-engines-archive #main {
	width: 100%;
	max-width: 100%;
}

.cat-marine-engines {
	--cat-marine-hero-image: none;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.cat-marine-hero {
	width: 100vw;
	max-width: 100vw;
	position: relative;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: clamp(3rem, 8vw, 5.5rem) clamp(1.25rem, 5vw, 3rem);
	background-color: #0a2540;
	background-size: cover;
	background-position: center;
	background-image: linear-gradient(
		105deg,
		rgba(10, 37, 64, 0.96) 0%,
		rgba(10, 37, 64, 0.72) 50%,
		rgba(10, 37, 64, 0.45) 100%
	);
	color: #fff;
	text-align: center;
	box-sizing: border-box;
}

.cat-marine-engines[style*="--cat-marine-hero-image"] .cat-marine-hero {
	background-image:
		linear-gradient(
			105deg,
			rgba(10, 37, 64, 0.94) 0%,
			rgba(10, 37, 64, 0.65) 55%,
			rgba(10, 37, 64, 0.35) 100%
		),
		var(--cat-marine-hero-image);
}

.cat-marine-hero__inner {
	max-width: 56rem;
	margin: 0 auto;
}

.cat-marine-hero__display {
	margin: 0;
	font-size: clamp(2.75rem, 8vw, 4.75rem);
	font-weight: 800;
	font-style: italic;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.05;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.cat-marine-intro-title {
	text-align: center;
	padding: clamp(1.75rem, 4vw, 2.5rem) 1rem 0;
	font-weight: 700;
	line-height: 1.15;
}

.cat-marine-intro-title__line1 {
	display: block;
	font-size: clamp(1.5rem, 3.2vw, 2.125rem);
	color: #0a2540;
	letter-spacing: 0.06em;
}

.cat-marine-intro-title__line2 {
	display: block;
	margin-top: 0.2rem;
	font-size: clamp(1.65rem, 3.6vw, 2.35rem);
	font-style: italic;
	font-weight: 700;
	color: #2a6cab;
	letter-spacing: 0.02em;
}

.cat-marine-prose {
	font-size: 1.0625rem;
	line-height: 1.65;
	color: #333;
	padding: clamp(1.25rem, 3vw, 2rem) clamp(0.25rem, 2vw, 0.5rem) 0;
}

.cat-marine-panels {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(1rem, 2.5vw, 1.75rem);
	padding: 2rem clamp(0.25rem, 2vw, 0.5rem) 0;
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}

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

.cat-marine-panel {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(220px, 36vw, 340px);
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	background: linear-gradient(155deg, #2a4a62 0%, #0a2540 55%, #061a2e 100%);
	box-shadow: 0 8px 28px rgba(10, 37, 64, 0.18);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-marine-panel:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 36px rgba(10, 37, 64, 0.28);
}

.cat-marine-panel--has-image {
	background-image: linear-gradient(
			180deg,
			rgba(0, 0, 0, 0.05) 35%,
			rgba(0, 0, 0, 0.55) 100%
		),
		var(--cat-marine-panel-bg);
	background-size: cover;
	background-position: center;
}

.cat-marine-panel__bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	margin: 1rem;
	padding: 0.9rem 1.25rem;
	background: rgba(255, 255, 255, 0.92);
	color: #111;
	font-weight: 700;
	font-size: 1.05rem;
	border-radius: 8px;
	width: calc(100% - 2rem);
	box-sizing: border-box;
}

.cat-marine-panel__bar--berg {
	background: #1a6ea8;
	color: #fff;
}

.cat-marine-panel__arrow {
	font-weight: 400;
	opacity: 0.9;
}

.cat-marine-families--embedded {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid #e5e8ec;
}

.cat-marine-prose p {
	margin: 0 0 1.25rem;
}

.cat-marine-prose--narrow {
	max-width: 52rem;
	margin-left: auto;
	margin-right: auto;
	padding-top: 0;
}

.cat-marine-quote {
	margin: 2rem clamp(0.25rem, 2vw, 0.5rem);
	padding: 1.75rem 2rem;
	border-left: 4px solid #ffc220;
	background: #f7f9fc;
	font-size: clamp(1.125rem, 2.5vw, 1.5rem);
	font-weight: 600;
	line-height: 1.45;
	color: #0a2540;
}

.cat-marine-quote p {
	margin: 0;
}

.cat-marine-pillars {
	list-style: none;
	margin: 2.5rem 0 0;
	padding: 0 clamp(0.25rem, 2vw, 0.5rem);
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

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

.cat-marine-pillars__card {
	margin: 0;
	padding: 1.5rem 1.25rem;
	border: 1px solid #e0e5eb;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.cat-marine-pillars__card:hover {
	border-color: #c5ced9;
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.cat-marine-pillars__title {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
	color: #0a2540;
}

.cat-marine-cta {
	margin: 3rem clamp(0.25rem, 2vw, 0.5rem) 2rem;
	padding: 2rem 1.5rem;
	text-align: center;
	background: linear-gradient(180deg, #f0f4f8 0%, #fff 100%);
	border: 1px solid #e5e8ec;
	border-radius: 8px;
}

.cat-marine-cta__title {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: #0a2540;
}

.cat-marine-cta__text {
	margin: 0 0 1.25rem;
	font-size: 1rem;
	line-height: 1.55;
	color: #444;
	max-width: 36rem;
	margin-left: auto;
	margin-right: auto;
}

.cat-marine-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	justify-content: center;
	align-items: center;
	margin: 0;
}

.cat-marine-btn--ghost {
	background: transparent;
	color: #0a2540;
	border: 2px solid #0a2540;
}

.cat-marine-btn--ghost:hover {
	background: #0a2540;
	color: #fff;
}

.cat-marine-btn {
	display: inline-block;
	padding: 0.85rem 1.75rem;
	border-radius: 4px;
	font-weight: 600;
	text-decoration: none;
	font-size: 1rem;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cat-marine-btn--primary {
	background: #ffc220;
	color: #1a1a1a;
	border: 2px solid #e5ad00;
}

.cat-marine-btn--primary:hover {
	background: #e5ad00;
	color: #111;
}

.cat-marine-products {
	margin-top: 2.5rem;
	padding-top: 2.5rem;
	border-top: 2px solid #e5e8ec;
}

.cat-marine-families,
.cat-power-families {
	margin-top: 2.5rem;
	padding-top: 2.5rem;
	border-top: 2px solid #e5e8ec;
}

.cat-marine-products__heading {
	margin: 0 0 1.5rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: #0a2540;
}

.cat-product-grid--marine {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

.cat-marine-after-content {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid #e5e8ec;
	font-size: 1rem;
	line-height: 1.6;
}
