/* Westside eBay Listings – styled to match the Avada portfolio grid on /inventory/ */
.hwtc-ebay {
	--hwtc-ebay-gap: var(--portfolio_archive_column_spacing, 20px);
	--hwtc-ebay-title-font: var(--post_title_typography-font-family, Oswald), sans-serif;
	--hwtc-ebay-title-color: var(--post_title_typography-color, #333);
	--hwtc-ebay-text: var(--body_typography-color, #747474);
	--hwtc-ebay-link: var(--link_color, #363882);
	--hwtc-ebay-accent: var(--awb-color5, #e83630);
	--hwtc-ebay-img-bg: var(--awb-color2, #f6f6f6);
	margin: 0 0 2em;
}

/* Toolbar */
.hwtc-ebay__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 10px;
	margin: 0 0 30px;
}
.hwtc-ebay .hwtc-ebay__search {
	flex: 1 1 260px;
	min-width: 0;
	height: auto;
	min-height: 46px;
	padding: 0 15px;
	border: 1px solid var(--form_border_color, #d2d2d2);
	border-radius: var(--form_border_radius, 0);
	background: var(--form_bg_color, #fff);
	color: var(--form_text_color, #333);
	font-family: inherit;
	font-size: 16px;
}
.hwtc-ebay__count {
	flex: 1 1 100%;
	font-size: 14px;
	color: var(--hwtc-ebay-text);
}

/* Grid */
.hwtc-ebay__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(var(--hwtc-ebay-cols, 3), minmax(0, 1fr));
	gap: 30px;
}
@media (max-width: 1024px) {
	.hwtc-ebay__grid { grid-template-columns: repeat(min(var(--hwtc-ebay-cols, 3), 2), minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.hwtc-ebay__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Card – mirrors .fusion-portfolio-boxed (no border, transparent box) */
.hwtc-ebay__card {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid #e9eaee;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
	overflow: hidden;
	transition: box-shadow .25s ease, transform .25s ease;
}
.hwtc-ebay__card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	transform: translateY(-2px);
}
.hwtc-ebay__card::before { display: none !important; }

.hwtc-ebay__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--hwtc-ebay-img-bg);
}
.hwtc-ebay__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease-in-out;
}
.hwtc-ebay__card:hover .hwtc-ebay__media img { transform: scale(1.04); }
.hwtc-ebay__noimg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--hwtc-ebay-text);
	font-size: 14px;
}
.hwtc-ebay__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 8px;
	background: var(--hwtc-ebay-accent);
	color: #fff;
	font-family: var(--hwtc-ebay-title-font);
	font-size: 12px;
	letter-spacing: .05em;
	text-transform: uppercase;
}

/* Body carries Avada's .fusion-portfolio-content class so the title gets the
   exact same theme rule as /inventory/ (#wrapper #main .fusion-portfolio-content > h2.fusion-post-title). */
.hwtc-ebay .hwtc-ebay__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	margin: 0;
	padding: 20px 20px 22px;
	text-align: left;
}

.hwtc-ebay__info { margin-top: auto; padding-top: 10px; }
.hwtc-ebay .hwtc-ebay__info p {
	margin: 0;
	color: var(--hwtc-ebay-text);
	font-size: var(--body_typography-font-size, 16px);
	line-height: var(--body_typography-line-height, 1.5);
}
.hwtc-ebay .hwtc-ebay__price strong {
	color: var(--hwtc-ebay-text);
	font-weight: 700;
}
.hwtc-ebay .hwtc-ebay__price small {
	margin-left: 6px;
	font-size: 13px;
}
.hwtc-ebay .hwtc-ebay__ship { font-size: 14px; }

/* Buttons use Avada's .fusion-button styles; only layout tweaks here. */
.hwtc-ebay .hwtc-ebay__btn { justify-content: center; }
.hwtc-ebay__card .hwtc-ebay__btn {
	width: 100%;
	margin-top: 20px;
}

/* Pagination – matches Avada's square pagination boxes */
.hwtc-ebay__pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding-top: 40px;
}
.hwtc-ebay__pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--sep_color, #dddbdb);
	border-radius: var(--pagination_border_radius, 0);
	color: var(--hwtc-ebay-title-color);
	text-decoration: none;
}
.hwtc-ebay__pager .page-numbers.current,
.hwtc-ebay__pager a.page-numbers:hover {
	background: var(--hwtc-ebay-link);
	border-color: var(--hwtc-ebay-link);
	color: #fff;
}
.hwtc-ebay__pager .page-numbers.dots { border-color: transparent; }

/* Padding (not margin) so theme paragraph-margin resets can't collapse it. */
.hwtc-ebay .hwtc-ebay__all {
	margin: 0 !important;
	padding-top: 50px;
	text-align: center;
}
.hwtc-ebay__empty {
	padding: 40px 20px;
	text-align: center;
	color: var(--hwtc-ebay-text);
	background: var(--hwtc-ebay-img-bg);
}
.hwtc-ebay__admin-note {
	margin-top: 12px;
	padding: 10px 14px;
	border-left: 4px solid #e8d13b;
	background: #fffbe6;
	font-size: 14px;
	color: #333;
}
