.hp-listings.hp-grid {
	row-gap: 28px;
}

.hp-listing--view-block {
	height: 100%;
	overflow: hidden;
	background: var(--gaitway-card);
	border: 1px solid rgba(213, 163, 72, .18);
	border-radius: var(--gaitway-radius);
	box-shadow: var(--gaitway-shadow);
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.hp-listing--view-block:hover {
	transform: translateY(-5px);
	border-color: var(--gaitway-gold);
	box-shadow: 0 24px 55px rgba(0, 0, 0, .3);
}

.hp-listing--view-block .hp-listing__image,
.hp-listing--view-block .hp-listing__image a {
	position: relative;
	display: block;
	overflow: hidden;
	background: #1a1917;
}

.hp-listing--view-block .hp-listing__image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .45s ease;
}

.hp-listing--view-block:hover .hp-listing__image img {
	transform: scale(1.045);
}

.hp-listing--view-block .hp-listing__content {
	padding: 18px 18px 15px;
	background: var(--gaitway-card);
	color: #fff;
}

.hp-listing--view-block .hp-listing__title {
	margin: 0 0 7px;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 25px;
	line-height: 1.12;
	font-weight: 700;
}

.hp-listing--view-block .hp-listing__title a {
	color: #fff;
	text-decoration: none;
}

.hp-listing--view-block .hp-listing__title a:hover {
	color: var(--gaitway-gold-light);
}

.hp-listing--view-block .hp-listing__attributes--primary,
.hp-listing--view-block .hp-listing__attributes--secondary {
	display: none;
}

.gaitway-card-data__meta {
	color: #d9d5ce;
	font-size: 13px;
	line-height: 1.5;
}

.gaitway-card-data__location {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 8px;
	color: var(--gaitway-muted);
	font-size: 13px;
}

.gaitway-card-data__location svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: var(--gaitway-gold);
	stroke-width: 1.8;
}

.gaitway-card-data__bottom {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 12px;
	margin-top: 13px;
	padding-top: 13px;
	border-top: 1px solid rgba(255,255,255,.1);
}

.gaitway-card-data__price {
	color: var(--gaitway-gold-light);
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 26px;
	line-height: 1;
}

.gaitway-card-data__number {
	color: #858078;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.hp-listing--view-block .hp-listing__footer {
	padding: 10px 18px;
	background: #0d0d0c;
	border-top: 1px solid rgba(255,255,255,.07);
	color: var(--gaitway-muted);
}

.hp-listing--featured .hp-listing__image::before {
	content: "FEATURED";
	position: absolute;
	z-index: 4;
	top: 13px;
	left: 13px;
	padding: 6px 10px;
	background: var(--gaitway-gold-light);
	border-radius: 5px;
	color: #17120a;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .05em;
}


.post-type-archive-hp_listing,
.tax-hp_listing_category,
.hp-template--listings-view-page,
.hp-template--listing-search-page,
.post-type-archive-hp_listing #main-content,
.tax-hp_listing_category #main-content,
.hp-template--listings-view-page #main-content,
.hp-template--listing-search-page #main-content {
	background: var(--gaitway-black);
	color: #f3eee6;
}

.hp-listings + .hp-pagination,
.hp-pagination {
	color: #d8d2c9;
}

.hp-pagination a,
.hp-pagination span {
	border-color: var(--gaitway-border);
	background: var(--gaitway-black-soft);
	color: #f3eee6;
}

.hp-pagination .current {
	background: var(--gaitway-gold);
	color: #171109;
}


.gaitway-card-data__bottom-location {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	max-width: 58%;
	color: #aaa49a;
	font-size: 12px;
	line-height: 1.3;
	text-align: right;
}

.gaitway-card-data__bottom-location svg {
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	fill: none;
	stroke: var(--gaitway-gold);
	stroke-width: 1.8;
}


/* ---------- Listing rows: safe responsive widths ---------- */
.post-type-archive-hp_listing .hp-listings.hp-row,
.tax-hp_listing_category .hp-listings.hp-row,
.hp-template--listings-view-page .hp-listings.hp-row,
.hp-template--listing-search-page .hp-listings.hp-row {display:flex;flex-wrap:wrap;align-items:stretch;margin-right:-12px;margin-left:-12px;width:auto;}
.post-type-archive-hp_listing .hp-listings.hp-row > [class*="hp-col-"],
.tax-hp_listing_category .hp-listings.hp-row > [class*="hp-col-"],
.hp-template--listings-view-page .hp-listings.hp-row > [class*="hp-col-"],
.hp-template--listing-search-page .hp-listings.hp-row > [class*="hp-col-"] {box-sizing:border-box;flex:0 0 33.333333%;width:33.333333%;max-width:33.333333%;padding:12px;}
.single-hp_listing .gaitway-related-fullwidth {clear:both;display:block;width:min(92%,1280px);max-width:1280px;margin:54px auto 0;padding:0;}
.single-hp_listing .gaitway-related-fullwidth > h2,
.single-hp_listing .gaitway-related-fullwidth > h3 {margin-bottom:26px;font-family:"Cormorant Garamond",Georgia,serif;font-size:clamp(30px,3vw,40px);line-height:1.15;color:#fff;}
.single-hp_listing .gaitway-related-fullwidth .hp-listings.hp-row {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;width:100%!important;margin:0!important;}
.single-hp_listing .gaitway-related-fullwidth .hp-listings.hp-row > [class*="hp-col-"],
.single-hp_listing .gaitway-related-fullwidth .hp-listings.hp-row > * {width:auto!important;max-width:none!important;min-width:0;margin:0!important;padding:0!important;}
.single-hp_listing .gaitway-related-fullwidth .hp-listing--view-block {width:100%;min-width:0;height:100%;}
@media(max-width:1100px){
.post-type-archive-hp_listing .hp-listings.hp-row > [class*="hp-col-"],.tax-hp_listing_category .hp-listings.hp-row > [class*="hp-col-"],.hp-template--listings-view-page .hp-listings.hp-row > [class*="hp-col-"],.hp-template--listing-search-page .hp-listings.hp-row > [class*="hp-col-"]{flex-basis:50%;width:50%;max-width:50%;}
.single-hp_listing .gaitway-related-fullwidth .hp-listings.hp-row{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:680px){
.post-type-archive-hp_listing .hp-listings.hp-row,.tax-hp_listing_category .hp-listings.hp-row,.hp-template--listings-view-page .hp-listings.hp-row,.hp-template--listing-search-page .hp-listings.hp-row{margin-right:0;margin-left:0;}
.post-type-archive-hp_listing .hp-listings.hp-row > [class*="hp-col-"],.tax-hp_listing_category .hp-listings.hp-row > [class*="hp-col-"],.hp-template--listings-view-page .hp-listings.hp-row > [class*="hp-col-"],.hp-template--listing-search-page .hp-listings.hp-row > [class*="hp-col-"]{flex-basis:100%;width:100%;max-width:100%;padding:10px 0;}
.single-hp_listing .gaitway-related-fullwidth{width:calc(100% - 28px);margin-top:38px;}
.single-hp_listing .gaitway-related-fullwidth .hp-listings.hp-row{grid-template-columns:1fr;gap:20px;}}


/* ---------- Listings page with sidebar search and filters ---------- */
@media (min-width: 981px) {
	.post-type-archive-hp_listing .hp-page,
	.tax-hp_listing_category .hp-page,
	.hp-template--listings-view-page .hp-page,
	.hp-template--listing-search-page .hp-page {
		display: grid;
		grid-template-columns: minmax(260px, 315px) minmax(0, 1fr);
		gap: clamp(28px, 4vw, 48px);
		align-items: start;
	}

	.post-type-archive-hp_listing .hp-page__sidebar,
	.tax-hp_listing_category .hp-page__sidebar,
	.hp-template--listings-view-page .hp-page__sidebar,
	.hp-template--listing-search-page .hp-page__sidebar {
		position: sticky;
		top: 105px;
		min-width: 0;
	}

	.post-type-archive-hp_listing .hp-page__content,
	.tax-hp_listing_category .hp-page__content,
	.hp-template--listings-view-page .hp-page__content,
	.hp-template--listing-search-page .hp-page__content {
		min-width: 0;
	}

	/* Search is moved into the sidebar by theme.js. */
	.gaitway-filter-toggle {
		display: none !important;
	}
}

.gaitway-filter-panel {
	overflow: hidden;
	background:
		linear-gradient(145deg, rgba(213,163,72,.08), transparent 38%),
		#11110f;
	border: 1px solid rgba(213,163,72,.32);
	border-radius: 16px;
	box-shadow: 0 20px 50px rgba(0,0,0,.32);
	color: #fff;
}

.gaitway-filter-panel__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 24px 22px 19px;
	border-bottom: 1px solid rgba(213,163,72,.2);
}

.gaitway-filter-panel__eyebrow {
	display: block;
	margin-bottom: 5px;
	color: var(--gaitway-gold);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.gaitway-filter-panel__header h2 {
	margin: 0;
	color: #fff;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 30px;
	line-height: 1;
}

.gaitway-filter-panel__close {
	display: none;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid rgba(213,163,72,.28);
	border-radius: 50%;
	background: rgba(255,255,255,.03);
	color: #fff;
	font-size: 25px;
	line-height: 30px;
	cursor: pointer;
}

.gaitway-filter-panel__body {
	padding: 20px 20px 22px;
}

.gaitway-filter-panel form {
	margin: 0;
}

.gaitway-filter-panel .hp-form__fields {
	display: block;
	margin: 0;
}

.gaitway-filter-panel .hp-form__field,
.gaitway-filter-panel .hp-field,
.gaitway-filter-panel [class*="hp-form__field"] {
	width: 100%;
	margin: 0 0 17px;
	padding: 0;
}

.gaitway-filter-panel label,
.gaitway-filter-panel .hp-field__label,
.gaitway-filter-panel .hp-form__label {
	display: block;
	margin: 0 0 7px;
	color: #e8e2d9;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .035em;
}

.gaitway-filter-panel input[type="text"],
.gaitway-filter-panel input[type="search"],
.gaitway-filter-panel input[type="number"],
.gaitway-filter-panel input[type="email"],
.gaitway-filter-panel input[type="tel"],
.gaitway-filter-panel select,
.gaitway-filter-panel textarea,
.gaitway-filter-panel .select2-selection,
.gaitway-filter-panel .select2-container--default .select2-selection--single,
.gaitway-filter-panel .select2-container--default .select2-selection--multiple {
	box-sizing: border-box;
	width: 100% !important;
	min-height: 48px;
	margin: 0;
	padding: 11px 13px;
	border: 1px solid rgba(255,255,255,.14) !important;
	border-radius: 8px !important;
	outline: none;
	background: #0a0a09 !important;
	color: #f6f1e8 !important;
	font-size: 14px;
	line-height: 1.4;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
	transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.gaitway-filter-panel input::placeholder,
.gaitway-filter-panel textarea::placeholder {
	color: #777269;
	opacity: 1;
}

.gaitway-filter-panel input:focus,
.gaitway-filter-panel select:focus,
.gaitway-filter-panel textarea:focus,
.gaitway-filter-panel .select2-container--focus .select2-selection {
	border-color: var(--gaitway-gold) !important;
	background: #0d0d0b !important;
	box-shadow: 0 0 0 3px rgba(213,163,72,.12) !important;
}

.gaitway-filter-panel select {
	padding-right: 38px;
	background-image:
		linear-gradient(45deg, transparent 50%, var(--gaitway-gold) 50%),
		linear-gradient(135deg, var(--gaitway-gold) 50%, transparent 50%) !important;
	background-position:
		calc(100% - 17px) 21px,
		calc(100% - 12px) 21px !important;
	background-size: 5px 5px, 5px 5px !important;
	background-repeat: no-repeat !important;
	appearance: none;
}

.gaitway-filter-panel select option {
	background: #11110f;
	color: #fff;
}

.gaitway-filter-panel .hp-form__field--checkbox,
.gaitway-filter-panel .hp-form__field--radio {
	display: flex;
	align-items: center;
	gap: 9px;
}

.gaitway-filter-panel input[type="checkbox"],
.gaitway-filter-panel input[type="radio"] {
	width: 17px;
	height: 17px;
	accent-color: var(--gaitway-gold);
}

.gaitway-filter-panel .ui-slider,
.gaitway-filter-panel .noUi-target {
	border: 0;
	background: #292722;
	box-shadow: none;
}

.gaitway-filter-panel .ui-slider-range,
.gaitway-filter-panel .noUi-connect {
	background: var(--gaitway-gold);
}

.gaitway-filter-panel button[type="submit"],
.gaitway-filter-panel input[type="submit"],
.gaitway-filter-panel .hp-form__button,
.gaitway-filter-panel .button {
	width: 100%;
	min-height: 49px;
	margin-top: 3px;
	padding: 12px 16px !important;
	border: 1px solid var(--gaitway-gold) !important;
	border-radius: 8px !important;
	background: linear-gradient(180deg, var(--gaitway-gold-light), var(--gaitway-gold)) !important;
	color: #171109 !important;
	font-size: 13px;
	font-weight: 800 !important;
	letter-spacing: .025em;
	text-align: center;
	box-shadow: 0 10px 24px rgba(213,163,72,.14) !important;
	cursor: pointer;
}

.gaitway-filter-panel button[type="submit"]:hover,
.gaitway-filter-panel input[type="submit"]:hover,
.gaitway-filter-panel .hp-form__button:hover {
	filter: brightness(1.07);
	transform: translateY(-1px);
}

.gaitway-sidebar-search {
	margin-bottom: 20px !important;
	padding-bottom: 20px;
	border-bottom: 1px solid rgba(255,255,255,.09);
}

.gaitway-filter-panel__clear {
	margin-top: 14px;
	text-align: center;
}

.gaitway-filter-panel__clear a {
	color: #aaa49a;
	font-size: 12px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.gaitway-filter-panel__clear a:hover {
	color: var(--gaitway-gold-light);
}

.gaitway-filter-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	min-height: 48px;
	margin: 0 0 18px;
	border: 1px solid var(--gaitway-gold);
	border-radius: 8px;
	background: #11110f;
	color: #fff;
	font-weight: 800;
	cursor: pointer;
}

@media (max-width: 980px) {
	.gaitway-filter-panel {
		display: none;
		margin: 0 0 24px;
	}

	.gaitway-filter-panel.is-open {
		display: block;
	}

	.gaitway-filter-panel__close {
		display: block;
	}

	.gaitway-filter-panel__body {
		padding: 19px 18px 21px;
	}
}

@media (max-width: 600px) {
	.gaitway-filter-panel__header {
		padding: 21px 18px 17px;
	}

	.gaitway-filter-panel__header h2 {
		font-size: 28px;
	}

	.gaitway-filter-panel input[type="text"],
	.gaitway-filter-panel input[type="search"],
	.gaitway-filter-panel input[type="number"],
	.gaitway-filter-panel select,
	.gaitway-filter-panel .select2-selection {
		min-height: 46px;
		font-size: 16px; /* Prevents iOS zoom on focus. */
	}
}


/* ---------- Desktop listings layout correction ---------- */
@media (min-width: 981px) {
	.post-type-archive-hp_listing .hp-page,
	.tax-hp_listing_category .hp-page,
	.hp-template--listings-view-page .hp-page,
	.hp-template--listing-search-page .hp-page {
		display: grid;
		grid-template-columns: 280px minmax(0, 1fr);
		column-gap: 34px;
		row-gap: 24px;
		align-items: start;
	}

	/*
	 * HivePress page headers, notices, breadcrumbs and result headings are
	 * direct children of .hp-page. Make them span both columns so they do not
	 * become an accidental third column.
	 */
	.post-type-archive-hp_listing .hp-page > :not(.hp-page__sidebar):not(.hp-page__content),
	.tax-hp_listing_category .hp-page > :not(.hp-page__sidebar):not(.hp-page__content),
	.hp-template--listings-view-page .hp-page > :not(.hp-page__sidebar):not(.hp-page__content),
	.hp-template--listing-search-page .hp-page > :not(.hp-page__sidebar):not(.hp-page__content) {
		grid-column: 1 / -1;
		width: 100%;
		min-width: 0;
	}

	.post-type-archive-hp_listing .hp-page__sidebar,
	.tax-hp_listing_category .hp-page__sidebar,
	.hp-template--listings-view-page .hp-page__sidebar,
	.hp-template--listing-search-page .hp-page__sidebar {
		grid-column: 1;
		width: 100%;
		max-width: 280px;
	}

	.post-type-archive-hp_listing .hp-page__content,
	.tax-hp_listing_category .hp-page__content,
	.hp-template--listings-view-page .hp-page__content,
	.hp-template--listing-search-page .hp-page__content {
		grid-column: 2;
		width: 100%;
		min-width: 0;
	}

	/* Compact the archive heading area. */
	.post-type-archive-hp_listing .hp-page__header,
	.tax-hp_listing_category .hp-page__header,
	.hp-template--listings-view-page .hp-page__header,
	.hp-template--listing-search-page .hp-page__header {
		margin: 0 0 8px;
		padding: 0;
	}

	.post-type-archive-hp_listing .hp-page__title,
	.tax-hp_listing_category .hp-page__title,
	.hp-template--listings-view-page .hp-page__title,
	.hp-template--listing-search-page .hp-page__title {
		margin: 0;
		font-size: clamp(34px, 3vw, 48px);
		line-height: 1.05;
	}

	/* Make the filter panel visually lighter and more compact. */
	.gaitway-filter-panel__header {
		padding: 19px 18px 15px;
	}

	.gaitway-filter-panel__header h2 {
		font-size: 27px;
	}

	.gaitway-filter-panel__body {
		padding: 17px 16px 19px;
	}

	.gaitway-filter-panel .hp-form__field,
	.gaitway-filter-panel .hp-field,
	.gaitway-filter-panel [class*="hp-form__field"] {
		margin-bottom: 14px;
	}

	.gaitway-filter-panel input[type="text"],
	.gaitway-filter-panel input[type="search"],
	.gaitway-filter-panel input[type="number"],
	.gaitway-filter-panel select,
	.gaitway-filter-panel textarea,
	.gaitway-filter-panel .select2-selection {
		min-height: 44px;
		padding-top: 9px;
		padding-bottom: 9px;
	}

	.gaitway-filter-panel button[type="submit"],
	.gaitway-filter-panel input[type="submit"],
	.gaitway-filter-panel .hp-form__button,
	.gaitway-filter-panel .button {
		min-height: 45px;
	}
}

@media (min-width: 1280px) {
	.post-type-archive-hp_listing .hp-page,
	.tax-hp_listing_category .hp-page,
	.hp-template--listings-view-page .hp-page,
	.hp-template--listing-search-page .hp-page {
		grid-template-columns: 290px minmax(0, 1fr);
		column-gap: 40px;
	}

	.post-type-archive-hp_listing .hp-page__sidebar,
	.tax-hp_listing_category .hp-page__sidebar,
	.hp-template--listings-view-page .hp-page__sidebar,
	.hp-template--listing-search-page .hp-page__sidebar {
		max-width: 290px;
	}
}


/* ---------- Requested horse filters ---------- */
.gaitway-custom-filters {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid rgba(255,255,255,.09);
}

.gaitway-custom-filter {
	margin-bottom: 15px;
}

.gaitway-custom-filter > label {
	display: block;
	margin-bottom: 7px;
	color: #e8e2d9;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .035em;
}

.gaitway-range-pair {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 9px;
	width: 100%;
}

.gaitway-range-pair input,
.gaitway-range-pair select {
	min-width: 0;
	width: 100% !important;
}

.gaitway-filter-price .gaitway-range-pair {
	position: relative;
}

.gaitway-filter-price .gaitway-range-pair::after {
	content: "–";
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	padding: 0 2px;
	background: #11110f;
	color: var(--gaitway-gold);
	transform: translate(-50%, -50%);
	pointer-events: none;
}

@media (max-width: 390px) {
	.gaitway-range-pair {
		grid-template-columns: 1fr;
	}
}
