/**
 * Listing / category archive — Shunqi-style B2B cards, orange theme.
 */

body.usfp-listings-archive,
body.usfp-vendors-archive {
	--usfp-orange: #f57c00;
	--usfp-orange-dark: #e65100;
	--usfp-orange-light: #fff3e0;
	--usfp-border: #e5e5e5;
	--usfp-bg: #f5f5f5;
	--usfp-text: #333;
}

body.usfp-listings-archive .site-content {
	background: var(--usfp-bg);
}

body.usfp-listings-archive .hp-page {
	background: transparent;
}

body.usfp-listings-archive .page__title,
body.usfp-listings-archive .hp-page__title {
	display: none;
}

/* Hero hidden on categories — cancel theme negative margin on search bar */
body.usfp-listings-archive .hp-form--listing-search,
body.usfp-listings-archive .hp-form--vendor-search,
body.usfp-listings-archive.tax-hp_listing_category .hp-form--listing-search,
body.usfp-listings-archive.tax-hp_listing_category .hp-form--vendor-search {
	margin-top: 0 !important;
}

body.usfp-listings-archive .hp-page__header {
	margin: 0 0 12px;
	padding: 0;
	background: transparent;
	border: none;
}

body.usfp-listings-archive .hp-page__header .hp-form--listing-search {
	max-width: 100%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

body.usfp-listings-archive .site-content {
	padding-top: 0;
}

/* Toolbar */
.usfp-archive-toolbar {
	background: var(--usfp-white, #fff);
	border: 1px solid var(--usfp-border);
	padding: 10px 14px;
	margin-bottom: 12px;
}

.usfp-breadcrumb {
	font-size: 13px;
	color: #666;
	margin-bottom: 8px;
}

.usfp-breadcrumb a {
	color: #666;
	text-decoration: none;
}

.usfp-breadcrumb a:hover {
	color: var(--usfp-orange);
}

.usfp-breadcrumb strong {
	color: var(--usfp-orange-dark);
}

.usfp-breadcrumb span {
	margin: 0 6px;
	color: #ccc;
}

.usfp-archive-toolbar__regions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	font-size: 13px;
}

.usfp-archive-toolbar__label {
	color: #666;
	font-weight: 600;
}

.usfp-archive-toolbar__regions a {
	color: var(--usfp-orange);
	text-decoration: none;
	padding: 2px 8px;
	background: var(--usfp-orange-light);
	border: 1px solid #ffcc80;
}

.usfp-archive-toolbar__regions a:hover {
	background: var(--usfp-orange);
	color: #fff;
	border-color: var(--usfp-orange);
}

/* Sidebar */
.usfp-archive-sidebar,
.usfp-archive-notices {
	background: #fff;
	border: 1px solid var(--usfp-border);
	margin-bottom: 12px;
}

.usfp-archive-sidebar__title,
.usfp-archive-notices__title {
	margin: 0;
	padding: 8px 12px;
	font-size: 14px;
	font-weight: 700;
	color: var(--usfp-orange-dark);
	background: var(--usfp-orange-light);
	border-bottom: 1px solid var(--usfp-border);
}

.usfp-archive-sidebar__group {
	border-bottom: 1px solid #f0f0f0;
}

.usfp-archive-sidebar__parent {
	margin: 0;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 700;
}

.usfp-archive-sidebar__parent a {
	color: var(--usfp-text);
	text-decoration: none;
}

.usfp-archive-sidebar__parent.is-active a,
.usfp-archive-sidebar__parent a:hover {
	color: var(--usfp-orange);
}

.usfp-archive-sidebar__children {
	list-style: none;
	margin: 0;
	padding: 0 12px 10px;
}

.usfp-archive-sidebar__children li {
	margin: 0;
}

.usfp-archive-sidebar__children a {
	display: block;
	font-size: 12px;
	color: #666;
	text-decoration: none;
	padding: 3px 0;
}

.usfp-archive-sidebar__children li.is-active a,
.usfp-archive-sidebar__children a:hover {
	color: var(--usfp-orange);
}

.usfp-archive-notices ul {
	list-style: none;
	margin: 0;
	padding: 10px 12px;
}

.usfp-archive-notices li {
	margin: 0 0 8px;
	padding-left: 10px;
	position: relative;
}

.usfp-archive-notices li::before {
	content: "•";
	position: absolute;
	left: 0;
	color: var(--usfp-orange);
}

.usfp-archive-notices a {
	font-size: 12px;
	color: var(--usfp-text);
	text-decoration: none;
	line-height: 1.5;
}

.usfp-archive-notices a:hover {
	color: var(--usfp-orange);
}

.usfp-archive-notices__cta {
	display: block;
	margin: 0 12px 12px;
	text-align: center;
	padding: 10px;
	background: var(--usfp-orange);
	color: #fff !important;
	font-weight: 700;
	font-size: 13px;
	text-decoration: none;
}

.usfp-archive-notices__cta:hover {
	background: var(--usfp-orange-dark);
}

/* Listings grid → vertical list */
body.usfp-listings-archive .hp-listings.hp-grid {
	display: block;
}

body.usfp-listings-archive .hp-listings .hp-row {
	display: block;
	margin: 0;
}

body.usfp-listings-archive .hp-listings .hp-grid__item {
	width: 100% !important;
	max-width: 100% !important;
	flex: none;
	padding: 0 !important;
	margin: 0 0 12px;
}

body.usfp-vendors-archive .hp-vendors.hp-grid {
	display: block;
}

body.usfp-vendors-archive .hp-vendors .hp-row {
	display: block;
	margin: 0;
}

body.usfp-vendors-archive .hp-vendors .hp-grid__item {
	width: 100% !important;
	max-width: 100% !important;
	flex: none;
	padding: 0 !important;
	margin: 0 0 12px;
}

body.usfp-vendors-archive .site-content,
body.usfp-vendors-archive .hp-page {
	background: transparent;
}

body.usfp-vendors-archive .site-content {
	background: var(--usfp-bg, #f5f5f5);
	padding-top: 0;
}

/* B2B card */
.usfp-b2b-card {
	display: flex;
	gap: 16px;
	background: #fff;
	border: 1px solid var(--usfp-border);
	padding: 14px 16px;
	position: relative;
	align-items: flex-start;
}

.usfp-b2b-card:hover {
	border-color: #ffcc80;
	box-shadow: 0 2px 8px rgba(245, 124, 0, 0.12);
}

.usfp-b2b-card__rank {
	position: absolute;
	top: 0;
	right: 12px;
	background: var(--usfp-orange);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	padding: 4px 10px;
	line-height: 1;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
}

.usfp-b2b-card__thumb {
	flex-shrink: 0;
	width: 160px;
	height: 120px;
	display: block;
	border: 1px solid #eee;
	overflow: hidden;
	background: #fafafa;
}

.usfp-b2b-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.usfp-b2b-card__body {
	flex: 1;
	min-width: 0;
	padding-right: 48px;
}

.usfp-b2b-card__title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
}

.usfp-b2b-card__title a {
	color: var(--usfp-text);
	text-decoration: none;
}

.usfp-b2b-card__title a:hover {
	color: var(--usfp-orange);
	text-decoration: underline;
}

.usfp-b2b-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.usfp-b2b-card__tags span {
	font-size: 12px;
	color: #888;
	background: #f5f5f5;
	padding: 2px 8px;
	border: 1px solid #eee;
}

.usfp-b2b-card__tags span:first-child {
	color: var(--usfp-orange-dark);
	background: var(--usfp-orange-light);
	border-color: #ffcc80;
}

.usfp-b2b-card__quote {
	margin: 0 0 10px;
	font-size: 13px;
	color: #666;
}

.usfp-b2b-card__quote strong {
	color: var(--usfp-orange-dark);
}

.usfp-b2b-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.usfp-b2b-card__btn-inquiry {
	display: inline-block;
	background: var(--usfp-orange);
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	padding: 8px 24px;
	text-decoration: none;
	border-radius: 2px;
}

.usfp-b2b-card__btn-inquiry:hover {
	background: var(--usfp-orange-dark);
}

.usfp-b2b-card__btn-contact {
	font-size: 14px;
	font-weight: 700;
	color: var(--usfp-orange) !important;
	text-decoration: none;
}

.usfp-b2b-card__btn-contact:hover {
	text-decoration: underline;
}

.usfp-b2b-card__factory {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	padding-top: 8px;
	border-top: 1px dashed #eee;
}

.usfp-b2b-card__verified {
	color: var(--usfp-orange);
	font-weight: 700;
}

.usfp-b2b-card__factory-name {
	color: var(--usfp-text);
	font-weight: 600;
	text-decoration: none;
}

.usfp-b2b-card__factory-name:hover {
	color: var(--usfp-orange);
}

.usfp-b2b-card__factory-loc {
	color: #999;
	font-size: 12px;
}

.usfp-b2b-card__factory-loc i {
	color: var(--usfp-orange);
	margin-right: 2px;
}

/* Topbar on archive */
body.usfp-listings-archive .hp-page__topbar {
	background: #fff;
	border: 1px solid var(--usfp-border);
	margin-bottom: 12px;
	padding: 8px 12px;
}

@media (max-width: 768px) {
	.usfp-b2b-card {
		flex-direction: column;
	}

	.usfp-b2b-card__thumb {
		width: 100%;
		height: 180px;
	}

	.usfp-b2b-card__body {
		padding-right: 0;
	}

	body.usfp-listings-archive .hp-row {
		flex-wrap: wrap !important;
	}
}
