/* Shop and category archive pages (#218739 primary green, matching the finder's own tokens) */

.mo-shop-archive {
	max-width: 1280px;
	margin: 0 auto;
	padding: 1.5rem 1rem 3rem;
}

.mo-shop-archive__breadcrumbs {
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.mo-shop-archive__title {
	margin: 0 0 0.5rem;
}

.mo-shop-archive__intro {
	margin: 0 0 1.25rem;
	color: #4a4a4a;
	max-width: 70ch;
}

.mo-shop-archive__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.mo-shop-archive__chip {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	border: 1px solid #c3e4cb;
	border-radius: 999px;
	color: #1c5028;
	font-size: 0.9rem;
	text-decoration: none;
}

.mo-shop-archive__chip:hover {
	background: #218739;
	border-color: #218739;
	color: #ffffff;
}

/* The current page's chip: green tint, 2 px green border, bold, as on the canvas */
.mo-shop-archive__chip.is-active {
	background: #e9f3eb;
	border: 2px solid #1c5028;
	color: #1c5028;
	font-weight: 700;
}

.mo-shop-archive__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e2e2e2;
}

.mo-shop-archive__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.mo-filter-dropdown {
	position: relative;
}

.mo-filter-dropdown__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.9rem;
	border: 1px solid #c3e4cb;
	border-radius: 6px;
	background: #ffffff;
	font-size: 0.9rem;
	color: #1c5028;
	cursor: pointer;
}

.mo-filter-dropdown__chevron {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid #1c5028;
}

.mo-filter-dropdown.is-open .mo-filter-dropdown__toggle {
	border-color: #218739;
	background: #f2f8f3;
}

.mo-filter-dropdown__panel {
	display: none;
	position: absolute;
	top: calc(100% + 0.4rem);
	left: 0;
	z-index: 20;
	min-width: 220px;
	max-height: 320px;
	overflow-y: auto;
	padding: 0.75rem 1rem;
	background: #ffffff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.mo-filter-dropdown.is-open .mo-filter-dropdown__panel {
	display: block;
}

.mo-filter-dropdown__panel .facetwp-facet {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.mo-shop-archive__help-choosing {
	margin-top: 2.5rem;
}

.mo-shop-sort__select {
	padding: 0.5rem 0.75rem;
	border: 1px solid #c3e4cb;
	border-radius: 6px;
	background: #ffffff;
	font-size: 0.9rem;
}

.mo-shop-view-toggle {
	display: inline-flex;
	border: 1px solid #c3e4cb;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 1rem;
}

.mo-shop-view-toggle__btn {
	padding: 0.6rem 1rem;
	background: #ffffff;
	border: none;
	font-size: 0.9rem;
	font-weight: 600;
	color: #1c5028;
	cursor: pointer;
}

.mo-shop-view-toggle__btn.is-active {
	background: #1c5028;
	color: #ffffff;
}

.mo-shop-archive__count {
	margin: 0 0 1rem;
	color: #6b6b6b;
	font-size: 0.9rem;
}

.mo-shop-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.25rem;
}

.mo-shop-grid[hidden] {
	display: none;
}

.mo-shop-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	background: #ffffff;
}

.mo-shop-card__media {
	position: relative;
	padding: 1rem;
	text-align: center;
	background: #f9faf9;
}

.mo-shop-card__badge {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	padding: 0.2rem 0.6rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 700;
	color: #ffffff;
}

.mo-shop-card__badge--sale {
	background: #c0282d;
}

.mo-shop-card__image-link img {
	max-width: 100%;
	height: auto;
}

.mo-shop-card__body {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex-grow: 1;
}

.mo-shop-card__name {
	font-weight: 700;
	color: #1a1a1a;
	text-decoration: none;
}

.mo-shop-card__versions {
	margin: 0;
	color: #6b6b6b;
	font-size: 0.85rem;
}

.mo-shop-card__price {
	margin: 0.25rem 0;
	font-weight: 700;
}

.mo-shop-card__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: auto;
	padding-top: 0.5rem;
}

.mo-shop-card__compare {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	color: #6b6b6b;
}

.mo-shop-card__cta {
	display: inline-block;
	text-align: center;
	text-decoration: none;
	flex-shrink: 0;
}

@media (max-width: 600px) {
	.mo-shop-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
}

/* Green Add to cart on purchasable cards, View engine stays beneath */
.mo-shop-card__add.mo-btn-primary {
	display: block;
	text-align: center;
	width: 100%;
	margin-top: 8px;
	min-height: 44px;
}
.mo-shop-card__add.added {
	display: none; /* WooCommerce appends its own View cart link after adding; the mini cart opens instead */
}
.mo-shop-card .added_to_cart.wc-forward {
	display: none; /* the mini cart drawer is the confirmation */
}


/* Help choosing cards and Other horsepower ranges */
.mo-shop-archive__section-title {
	margin: 40px 0 16px;
	padding-left: 12px;
	border-left: 4px solid var(--mo-red, #b41b1e);
}
.mo-help-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}
.mo-help-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 20px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	color: #1a1a1a;
	text-decoration: none;
	min-height: 44px;
}
.mo-help-card:hover,
.mo-help-card:focus {
	border-color: var(--mo-primary, #218739);
}
.mo-help-card__title {
	font-weight: 700;
}
.mo-help-card__text {
	font-size: 14px;
	color: #4a4a4a;
}


/* Listing red band: the home page trust strip's look, four linked cards (Website Settings >
   Trust Strip > Listing pages), two by two as one joined block on phones */
.mo-trust-band {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	background: var(--mo-red, #ad1b1e);
	border-radius: 6px;
	overflow: hidden;
}
.mo-trust-band li {
	border-left: 1px solid #c9474a;
	margin: 0;
}
.mo-trust-band li:first-child {
	border-left: 0;
}
.mo-trust-band li > a,
.mo-trust-band li > div {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 64px;
	height: 100%;
	box-sizing: border-box;
	padding: 12px 16px;
	color: #fff;
	text-decoration: none;
}
.mo-trust-band__icon {
	flex: 0 0 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mo-trust-band__icon img {
	width: 28px;
	height: 28px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}
.mo-trust-band__text {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.mo-trust-band__text strong {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}
.mo-trust-band__text span {
	font-size: 13px;
	line-height: 1.35;
	color: #ededed;
}
.mo-trust-band__arrow {
	flex: 0 0 18px;
	color: #fff;
}
@media (max-width: 767px) {
	.mo-trust-band {
		grid-template-columns: 1fr 1fr;
	}
	.mo-trust-band li {
		border-left: 0;
		border-top: 0;
	}
	.mo-trust-band li:nth-child(even) {
		border-left: 1px solid #c9474a;
	}
	.mo-trust-band li:nth-child(n+3) {
		border-top: 1px solid #c9474a;
	}
	.mo-trust-band li > a,
	.mo-trust-band li > div {
		padding: 12px;
		gap: 8px;
	}
	.mo-trust-band__icon,
	.mo-trust-band__icon img {
		width: 24px;
		height: 24px;
		flex-basis: 24px;
	}
}

/* Avator card: the three versions as a list, one shaft length per line */
.mo-shop-card__versions--list {
	list-style: none;
	padding: 0;
}

.mo-shop-card__versions--list li {
	margin: 0 0 0.15rem;
}

/* Phones: a Filter button opens the filters in a panel titled "Filter" */
.mo-shop-archive__filter-toggle,
.mo-shop-archive__filters-head {
	display: none;
}

@media ( max-width: 768px ) {
	.mo-shop-archive__filter-toggle {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 0.4rem 1.1rem;
		border: 1px solid #c8c8c8;
		border-radius: 4px;
		background: #ffffff;
		color: #1a1a1a;
		font-size: 0.95rem;
		font-weight: 600;
		cursor: pointer;
	}

	.mo-shop-archive__filters {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 100000;
		width: min( 86vw, 360px );
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		padding: 1rem 1.25rem 2rem;
		background: #ffffff;
		overflow-y: auto;
		box-shadow: none;
		transform: translateX( -105% );
		transition: transform 0.25s ease;
	}

	.mo-shop-archive__filters.is-open {
		transform: none;
		box-shadow: 0 0 0 100vmax rgba( 0, 0, 0, 0.45 ), 0 8px 30px rgba( 0, 0, 0, 0.35 );
	}

	.mo-shop-archive__filters-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-bottom: 0.5rem;
		border-bottom: 1px solid #e2e2e2;
	}

	.mo-shop-archive__filters-title {
		font-size: 1.1rem;
		font-weight: 700;
	}

	.mo-shop-archive__filters-close {
		min-width: 44px;
		min-height: 44px;
		border: 0;
		background: none;
		font-size: 1.6rem;
		line-height: 1;
		cursor: pointer;
	}

	body.mo-filters-open {
		overflow: hidden;
	}
}

/* Astra hides WooCommerce's page numbers when its own shop pagination is set to "load more".
   The All engines view uses numbered pages, so they stay visible here. */
.mo-shop-archive .mo-shop-archive__pagination .woocommerce-pagination {
	display: block;
}

/* Links inside a listing's written section read as links: bold and underlined */
.mo-shop-archive__written a {
	font-weight: 700;
	text-decoration: underline;
}

/* Filter row: the word Filter leads the row on desktop, Sort by stays on the same row at the end */
.mo-shop-archive__filters-label {
	font-weight: 700;
	margin-right: 0.25rem;
}

.mo-shop-archive__controls {
	flex-wrap: nowrap;
}

.mo-shop-archive__controls .mo-shop-archive__filters {
	flex: 1 1 auto;
}

.mo-shop-archive__controls .mo-shop-archive__sort-wrap {
	margin-left: auto;
	flex: 0 0 auto;
}

@media ( max-width: 768px ) {
	.mo-shop-archive__filters-label {
		display: none;
	}

	.mo-shop-archive__controls {
		flex-wrap: wrap;
	}
}

/* Facts panel inside a listing's written section, e.g. Battery, Range, Charging on Electric */
.mo-shop-archive__written .mo-facts {
	margin: 24px 0;
	padding: 20px 24px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #f7f7f7;
}

.mo-shop-archive__written .mo-facts__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px 24px;
	margin: 0;
}

.mo-shop-archive__written .mo-facts__item dt {
	font-weight: 700;
	margin-bottom: 4px;
}

.mo-shop-archive__written .mo-facts__item dd {
	margin: 0;
}

.mo-shop-archive__written .mo-facts__note {
	margin: 16px 0 0 !important;
	font-size: 0.875rem;
	color: #555;
}

@media (max-width: 767px) {
	.mo-shop-archive__written .mo-facts {
		padding: 16px;
	}

	.mo-shop-archive__written .mo-facts__list {
		grid-template-columns: 1fr;
	}
}

/* Applied filters: chips row with Clear all */
.mo-shop-archive__selections {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 16px;
}
.mo-shop-archive__selections[hidden] {
	display: none;
}
.mo-shop-archive__selections .facetwp-selections ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mo-shop-archive__selections .facetwp-selections li {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
}
.mo-shop-archive__selections .facetwp-selection-label {
	display: none;
}
.mo-shop-archive__selections .facetwp-selection-value {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	margin: 0;
	padding: 6px 12px;
	border: 1px solid #1c5028;
	border-radius: 18px;
	background: #eef5ef !important;
	color: #1c5028;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.mo-shop-archive__selections .facetwp-selection-value::after {
	content: "\00d7";
	font-size: 18px;
	line-height: 1;
}
.mo-shop-archive__clear-all {
	min-height: 44px;
	padding: 0 4px;
	border: 0;
	background: none;
	color: #1c5028;
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

/* No matches */
.mo-shop-archive__no-results {
	max-width: 560px;
	margin: 24px auto 40px;
	padding: 32px 24px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	text-align: center;
}
.mo-shop-archive__no-results-title {
	margin: 0 0 8px;
	font-size: 22px;
}
.mo-shop-archive__no-results p {
	margin: 0 0 20px;
	color: #555;
}
.mo-shop-archive__no-results .mo-btn-primary {
	min-height: 48px;
	padding: 0 24px;
}

/* Filter panel footer: phones only */
.mo-shop-archive__filters-foot {
	display: none;
}

@media ( max-width: 768px ) {
	/* Filter and Sort stay pinned under the header */
	.mo-shop-archive__controls {
		position: sticky;
		top: 65px;
		z-index: 20;
		margin-left: -16px;
		margin-right: -16px;
		padding: 8px 16px;
		background: #fff;
		box-shadow: 0 1px 0 #e0e0e0;
	}
	.mo-filters-open .mo-shop-archive__controls {
		z-index: 1000;
	}
	.mo-shop-archive__filters.is-open .mo-shop-archive__filters-foot {
		position: sticky;
		bottom: 0;
		display: flex;
		gap: 12px;
		margin: 16px -16px -16px;
		padding: 12px 16px;
		border-top: 1px solid #e0e0e0;
		background: #fff;
	}
	.mo-shop-archive__filters-clear {
		flex: 0 0 auto;
		min-height: 48px;
		padding: 0 12px;
		border: 1px solid #1c5028;
		border-radius: 4px;
		background: #fff;
		color: #1c5028;
		font-weight: 700;
	}
	.mo-shop-archive__filters-clear:disabled {
		opacity: 0.5;
	}
	.mo-shop-archive__filters-show {
		flex: 1 1 auto;
		min-height: 48px;
	}
}

.mo-shop-archive .mo-shop-archive__selections .facetwp-selection-value {
	display: inline-flex !important;
	padding-right: 12px !important;
	background-image: none !important;
}
.mo-shop-archive .mo-shop-archive__clear-all,
.mo-shop-archive .mo-shop-archive__clear-all:hover,
.mo-shop-archive .mo-shop-archive__clear-all:focus {
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: #1c5028 !important;
	text-decoration: underline;
}

@media ( max-width: 768px ) {
	.mo-shop-archive__filters.is-open .mo-shop-archive__filters-foot {
		margin: 16px -18px -29px;
		padding: 12px 18px;
	}
	.mo-shop-archive .mo-shop-archive__filters-clear,
	.mo-shop-archive .mo-shop-archive__filters-clear:hover,
	.mo-shop-archive .mo-shop-archive__filters-clear:focus {
		border: 1px solid #1c5028 !important;
		background: #fff !important;
		color: #1c5028 !important;
	}
	/* The chat button stays out of the way while the filters are open */
	.mo-filters-open .mo-chat-button,
	.mo-filters-open #ast-scroll-top {
		display: none !important;
	}
}
