/* China Supplier Directory - front styles */

.csd-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px 48px;
	box-sizing: border-box;
}

.csd-page-head { margin-bottom: 24px; }
.csd-page-title { font-size: 30px; margin: 0 0 8px; line-height: 1.3; }
.csd-page-sub { color: #666; margin: 0; }

/* ---------------- 筛选栏 ---------------- */
.csd-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	background: #f7f8fa;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 14px;
	margin-bottom: 18px;
}

.csd-filter-field { flex: 0 0 auto; }
.csd-filter-keyword { flex: 1 1 240px; min-width: 200px; }

.csd-filter-bar input[type="text"],
.csd-filter-bar select {
	width: 100%;
	height: 42px;
	padding: 0 12px;
	border: 1px solid #d5d7de;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	color: #1f2328;
	box-sizing: border-box;
}

.csd-filter-bar select { min-width: 180px; }

.csd-filter-actions { display: flex; gap: 8px; }

.csd-btn {
	display: inline-block;
	height: 42px;
	line-height: 42px;
	padding: 0 20px;
	border: 1px solid #d5d7de;
	border-radius: 6px;
	background: #fff;
	color: #1f2328;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
	transition: all .15s;
	box-sizing: border-box;
}

.csd-btn:hover { border-color: #b9bdc7; }
.csd-btn:disabled { opacity: .6; cursor: default; }

.csd-btn-primary {
	background: #1a6b4a;
	border-color: #1a6b4a;
	color: #fff;
}

.csd-btn-primary:hover { background: #15583d; border-color: #15583d; color: #fff; }

.csd-result-info { color: #666; font-size: 13px; margin-bottom: 12px; }

/* ---------------- 结果列表 ---------------- */
.csd-results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
	gap: 16px;
}

.csd-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow .2s, transform .2s;
}

.csd-card:hover {
	box-shadow: 0 8px 24px rgba(17, 24, 39, .08);
	transform: translateY(-2px);
}

.csd-card-featured { border-color: #e0b400; }

.csd-card-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 150px;
	background: #f2f4f7;
	overflow: hidden;
	text-decoration: none;
}

.csd-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.csd-no-logo {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 34px;
	font-weight: 700;
	color: #1a6b4a;
	background: #eef5f0;
}

.csd-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.csd-card-title { font-size: 17px; line-height: 1.35; margin: 0; }

.csd-card-title a { color: #1f2328; text-decoration: none; }
.csd-card-title a:hover { color: #1a6b4a; }

.csd-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	font-size: 11px;
	font-weight: 500;
	color: #7a5b00;
	background: #fff4cc;
	border-radius: 10px;
	vertical-align: middle;
}

.csd-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }

.csd-pill {
	display: inline-block;
	padding: 2px 9px;
	font-size: 12px;
	color: #1a6b4a;
	background: #eef5f0;
	border-radius: 12px;
}

.csd-pill-light { color: #555; background: #f2f4f7; }

.csd-card-desc { margin: 0; font-size: 13px; color: #555; line-height: 1.6; }

.csd-card-more { margin: 0; font-size: 12px; color: #6b7280; display: flex; gap: 12px; flex-wrap: wrap; }

.csd-card-btn {
	margin-top: auto;
	display: inline-block;
	text-align: center;
	padding: 10px 0;
	border-radius: 6px;
	background: #1a6b4a;
	color: #fff;
	font-size: 14px;
	text-decoration: none;
}

.csd-card-btn:hover { background: #15583d; color: #fff; }

.csd-loading, .csd-empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: #6b7280; }

/* ---------------- 分页 ---------------- */
.csd-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 28px;
	flex-wrap: wrap;
}

.csd-page-btn {
	min-width: 38px;
	height: 38px;
	line-height: 36px;
	padding: 0 12px;
	border: 1px solid #d5d7de;
	border-radius: 6px;
	background: #fff;
	color: #1f2328;
	font-size: 14px;
	cursor: pointer;
}

.csd-page-btn:hover { border-color: #1a6b4a; color: #1a6b4a; }

.csd-page-btn.is-active {
	background: #1a6b4a;
	border-color: #1a6b4a;
	color: #fff;
}

.csd-page-btn:disabled { opacity: .45; cursor: default; }

/* ---------------- 详情页 ---------------- */
.csd-breadcrumb {
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 18px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.csd-breadcrumb a { color: #6b7280; text-decoration: none; }
.csd-breadcrumb a:hover { color: #1a6b4a; }

.csd-single-head {
	display: flex;
	gap: 20px;
	align-items: center;
	padding-bottom: 22px;
	border-bottom: 1px solid #e5e7eb;
	margin-bottom: 24px;
}

.csd-single-logo {
	width: 110px;
	height: 110px;
	flex: 0 0 110px;
	border-radius: 10px;
	overflow: hidden;
	background: #f2f4f7;
}

.csd-single-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.csd-single-title h1 { font-size: 28px; margin: 0 0 10px; line-height: 1.3; }

.csd-single-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 32px;
	align-items: start;
}

.csd-block-title {
	font-size: 19px;
	margin: 28px 0 12px;
	padding-left: 10px;
	border-left: 3px solid #1a6b4a;
	line-height: 1.2;
}

.csd-content { font-size: 15px; line-height: 1.8; color: #333; }
.csd-content p { margin: 0 0 12px; }

.csd-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 10px;
}

.csd-gallery-item {
	display: block;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
	background: #f7f8fa;
	aspect-ratio: 1 / 1;
}

.csd-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* 侧栏 */
.csd-single-side { position: sticky; top: 20px; }

.csd-side-box {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 18px;
	background: #fff;
}

.csd-side-box h3 { margin: 0 0 14px; font-size: 16px; }

.csd-info-list { list-style: none; margin: 0; padding: 0; }

.csd-info-list li {
	display: flex;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px dashed #eee;
	font-size: 14px;
	color: #333;
	word-break: break-word;
}

.csd-info-list li:last-child { border-bottom: 0; }

.csd-info-list li span {
	flex: 0 0 84px;
	color: #8a8f99;
	font-size: 13px;
}

.csd-info-list li a { color: #1a6b4a; text-decoration: none; }

.csd-side-cta {
	display: block;
	margin-top: 16px;
	text-align: center;
	line-height: 42px;
}

/* ---------------- 询盘表单 ---------------- */
.csd-inquiry-form {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 20px;
	background: #fbfcfd;
	display: flex;
	flex-wrap: wrap;
	gap: 14px 16px;
}

.csd-form-row { flex: 1 1 100%; display: flex; flex-direction: column; gap: 6px; }

.csd-form-half { flex: 1 1 calc(50% - 8px); }

.csd-form-row label { font-size: 13px; color: #4b5563; }

.csd-form-row input,
.csd-form-row textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d5d7de;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
	background: #fff;
}

.csd-form-row input:focus,
.csd-form-row textarea:focus {
	outline: none;
	border-color: #1a6b4a;
	box-shadow: 0 0 0 3px rgba(26, 107, 74, .1);
}

.csd-form-actions { flex: 1 1 100%; }

.csd-form-msg { flex: 1 1 100%; font-size: 14px; min-height: 0; }
.csd-form-msg.is-success { color: #1a6b4a; }
.csd-form-msg.is-error { color: #c02626; }

@media (max-width: 900px) {
	.csd-single-grid { grid-template-columns: 1fr; gap: 20px; }
	.csd-single-side { position: static; }
	.csd-single-head { flex-direction: column; align-items: flex-start; }
	.csd-form-half { flex: 1 1 100%; }
}

@media (max-width: 600px) {
	.csd-results { grid-template-columns: 1fr; }
	.csd-filter-field, .csd-filter-keyword { flex: 1 1 100%; }
	.csd-filter-bar select { min-width: 0; }
	.csd-filter-actions { width: 100%; }
	.csd-filter-actions .csd-btn { flex: 1; }
}
