/* ==========================================================================
   Base & Reset (News Portal Style)
   ========================================================================== */
:root {
	--primary-color: #0056b3; /* News-like authoritative blue */
	--primary-hover: #003d82;
	--accent-color: #e30000; /* Red for hot/urgent news */
	--text-main: #333333;
	--text-muted: #666666;
	--text-light: #999999;
	--bg-main: #ffffff;
	--bg-body: #f5f5f5;
	--bg-light: #fafafa;
	--border-color: #e0e0e0;
	--border-light: #eeeeee;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body {
	font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif;
	color: var(--text-main);
	background-color: var(--bg-body);
	line-height: 1.5;
	font-size: 14px;
}
a {
	text-decoration: none;
	color: var(--text-main);
	transition: color 0.2s;
}
a:hover {
	color: var(--primary-color);
}
ul {
	list-style: none;
}
img {
	max-width: 100%;
	height: auto;
}
.container {
	width: 1200px;
	margin: 0 auto;
}
.section-padding {
	padding: 30px 0;
}
.mt-40 {
	margin-top: 30px;
}
.text-primary {
	color: var(--primary-color);
}
.text-danger {
	color: var(--accent-color);
}
.text-success {
	color: #28a745;
}

/* Placeholder blocks */
.bg-placeholder {
	background: #e9ecef;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #adb5bd;
	font-weight: bold;
	font-size: 18px;
}

/* Buttons */
.btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 2px;
	text-align: center;
	cursor: pointer;
	font-size: 14px;
	border: none;
}
.btn-primary {
	background: var(--primary-color);
	color: #fff;
}
.btn-primary:hover {
	background: var(--primary-hover);
	color: #fff;
}

/* Top Bar */
.top-bar {
	background: #f8f8f8;
	border-bottom: 1px solid #ddd;
	height: 35px;
	line-height: 35px;
	color: #666;
	font-size: 12px;
}
.top-bar-inner {
	display: flex;
	justify-content: space-between;
}
.top-right a {
	margin-left: 10px;
}

/* Header */
.main-header {
	background: #fff;
}
.header-inner {
	height: 100px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.logo-text {
	font-size: 32px;
	font-weight: bold;
	letter-spacing: -1px;
}

/* Search Box */
.header-search {
	flex: 1;
	max-width: 500px;
	margin: 0 40px;
}
.search-form {
	display: flex;
	border: 2px solid var(--primary-color);
	height: 40px;
}
.search-type {
	width: 70px;
	border: none;
	border-right: 1px solid #ddd;
	background: #f9f9f9;
	padding-left: 10px;
	outline: none;
}
.search-input {
	flex: 1;
	border: none;
	padding: 0 15px;
	outline: none;
}
.search-btn {
	width: 90px;
	background: var(--primary-color);
	color: #fff;
	border: none;
	font-size: 16px;
	cursor: pointer;
}
.hot-searches {
	font-size: 12px;
	color: #999;
	margin-top: 8px;
}
.hot-searches a {
	color: #666;
	margin-right: 10px;
}
.hot-searches a:hover {
	color: var(--accent-color);
}

/* Navigation */
.main-nav-wrapper {
	background: var(--primary-color);
	height: 45px;
}
.main-nav {
	display: flex;
}
.main-nav li a {
	display: block;
	padding: 0 30px;
	line-height: 45px;
	color: #fff;
	font-size: 16px;
	font-weight: bold;
}
.main-nav li a:hover,
.main-nav li a.active {
	background: var(--primary-hover);
}

/* News Top Section */
.news-top-section {
	background: #fff;
	border-bottom: 1px solid var(--border-color);
}
.news-layout {
	display: grid;
	grid-template-columns: 350px 1fr 300px;
	gap: 25px;
}

.slider-item {
	position: relative;
	height: 280px;
}
.slider-img {
	width: 100%;
	height: 100%;
}
.slider-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	padding: 10px;
	font-size: 14px;
}

.news-headlines {
	padding: 10px 0;
}
.headline-title {
	font-size: 24px;
	font-weight: bold;
	margin-bottom: 10px;
	line-height: 1.3;
}
.headline-title a {
	color: var(--primary-color);
}
.headline-desc {
	color: #666;
	font-size: 14px;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px dashed #eee;
}

.headline-list li {
	margin-bottom: 12px;
	font-size: 16px;
	display: flex;
	align-items: center;
}
.headline-list li a {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	margin-left: 10px;
}
.tag {
	font-size: 12px;
	padding: 2px 6px;
	border-radius: 2px;
	color: #fff;
}
.tag-news {
	background: #17a2b8;
}
.tag-supply {
	background: #28a745;
}
.tag-buy {
	background: var(--accent-color);
}

.news-hot-sidebar {
	border: 1px solid var(--border-color);
	background: #fafafa;
}
.sidebar-title {
	background: #f1f1f1;
	padding: 10px 15px;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.sidebar-title h3 {
	font-size: 16px;
}
.sidebar-title a {
	font-size: 12px;
	color: #666;
}
.hot-buy-list {
	padding: 15px;
}
.hot-buy-list li {
	margin-bottom: 15px;
	border-bottom: 1px dotted #ccc;
	padding-bottom: 15px;
}
.hot-buy-list li:last-child {
	margin-bottom: 0;
	border-bottom: none;
	padding-bottom: 0;
}
.buy-title {
	font-size: 14px;
	font-weight: bold;
	margin-bottom: 5px;
}
.buy-title a {
	color: var(--text-main);
}
.buy-title a:hover {
	color: var(--accent-color);
	text-decoration: underline;
}
.buy-meta {
	font-size: 12px;
	color: #888;
}

/* Ad Banner */
.ad-banner {
	height: 90px;
	margin: 20px auto;
	border: 1px solid #ddd;
}

/* Category Blocks */
.cat-block {
	background: #fff;
	border: 1px solid var(--border-color);
}
.cat-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 50px;
	background: #f8f8f8;
	border-bottom: 2px solid var(--primary-color);
	padding: 0 20px;
}
.cat-header h2 {
	font-size: 18px;
	color: var(--primary-color);
}
.cat-links a {
	margin-left: 15px;
	font-size: 14px;
	color: #666;
}
.cat-links a.more {
	color: #999;
}
.cat-content {
	padding: 20px;
}

/* Grid for Cards */
.info-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}
.info-card {
	border: 1px solid #eee;
	transition: box-shadow 0.2s;
}
.info-card:hover {
	border-color: var(--primary-color);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.card-image-wrapper {
	height: 180px;
	position: relative;
}
.placeholder-img {
	width: 100%;
	height: 100%;
	background: #f1f1f1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #aaa;
}
.badge {
	position: absolute;
	top: 0;
	right: 0;
	padding: 4px 8px;
	font-size: 12px;
	color: #fff;
}
.badge-hot {
	background: var(--accent-color);
}
.card-content {
	padding: 15px;
}
.card-title {
	font-size: 14px;
	line-height: 1.4;
	height: 40px;
	overflow: hidden;
	margin-bottom: 10px;
}
.card-meta {
	font-size: 12px;
	color: #999;
	margin-bottom: 10px;
}
.card-price {
	color: var(--accent-color);
	font-size: 18px;
	font-weight: bold;
	margin-bottom: 10px;
}
.card-price span {
	font-size: 12px;
	font-weight: normal;
	color: #999;
}
.supplier {
	font-size: 12px;
	color: #666;
	border-top: 1px dashed #eee;
	padding-top: 10px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Text List Style for Categories */
.info-list-style {
	padding: 15px 20px;
}
.text-news-list li {
	display: flex;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px dashed #eee;
	font-size: 14px;
}
.text-news-list li .loc {
	width: 80px;
	color: #999;
	font-size: 12px;
}
.text-news-list li a {
	flex: 1;
	padding: 0 10px;
}
.text-news-list li a:hover {
	text-decoration: underline;
	color: var(--primary-color);
}
.text-news-list li .price-text {
	width: 100px;
	color: var(--accent-color);
	font-weight: bold;
	text-align: right;
}
.text-news-list li .date {
	width: 80px;
	text-align: right;
	color: #999;
	font-size: 12px;
}

/* Footer */
.main-footer {
	background: #333;
	color: #ccc;
	margin-top: 40px;
	padding: 30px 0;
	text-align: center;
}
.footer-links-row {
	margin-bottom: 20px;
	font-size: 14px;
}
.footer-links-row a {
	color: #ccc;
	margin: 0 10px;
}
.footer-links-row a:hover {
	color: #fff;
}
.footer-info p {
	margin-bottom: 10px;
	font-size: 12px;
	color: #888;
}
.footer-info a {
	color: #888;
}
.footer-info a:hover {
	color: #fff;
}

/* ==========================================================================
   List Page
   ========================================================================== */
.breadcrumb { font-size: 12px; color: #666; padding: 15px 0; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.breadcrumb a { color: #333; }
.breadcrumb a:hover { color: var(--primary-color); }

.layout-main-sidebar { display: flex; gap: 20px; }
.layout-main { flex: 1; }
.layout-sidebar { width: 280px; }

.filter-box { border: 1px solid var(--border-color); background: #fff; margin-bottom: 20px; font-size: 13px; }
.filter-row { display: flex; border-bottom: 1px dashed #eee; padding: 10px 15px; }
.filter-row:last-child { border-bottom: none; }
.filter-label { width: 80px; color: #999; font-weight: bold; }
.filter-items { flex: 1; display: flex; gap: 15px; flex-wrap: wrap; }
.filter-items a { color: #333; }
.filter-items a.active, .filter-items a:hover { color: var(--primary-color); font-weight: bold; }

.list-toolbar { background: #f8f8f8; border: 1px solid var(--border-color); padding: 8px 15px; display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 20px; }
.sort-options a { margin-right: 15px; color: #666; }
.sort-options a.active { color: var(--primary-color); font-weight: bold; }

.list-item { display: flex; padding: 15px; border: 1px solid #eee; margin-bottom: 15px; transition: 0.2s; background: #fff; }
.list-item:hover { border-color: var(--primary-color); background: #fdfdfd; }
.item-img { width: 160px; height: 120px; background: #f1f1f1; margin-right: 20px; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 14px; }
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.item-title { font-size: 16px; font-weight: bold; margin-bottom: 10px; }
.item-title a:hover { color: var(--accent-color); text-decoration: underline; }
.item-desc { font-size: 13px; color: #666; line-height: 1.6; max-height: 40px; overflow: hidden; }
.item-meta { font-size: 12px; color: #999; display: flex; gap: 20px; }
.item-meta span i { margin-right: 5px; }

.item-action { width: 180px; text-align: right; border-left: 1px dashed #eee; padding-left: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.item-price { font-size: 22px; font-weight: bold; color: var(--accent-color); }
.item-price span { font-size: 12px; font-weight: normal; color: #999; }
.item-company { font-size: 12px; color: #666; margin-bottom: 10px; }

.pagination { display: flex; justify-content: center; margin: 30px 0; gap: 5px; }
.pagination a, .pagination span { display: inline-block; padding: 6px 12px; border: 1px solid #ddd; background: #fff; font-size: 13px; color: #333; }
.pagination a:hover, .pagination span.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.sidebar-widget { border: 1px solid var(--border-color); background: #fff; margin-bottom: 20px; }
.widget-header { background: #f8f8f8; padding: 10px 15px; border-bottom: 1px solid var(--border-color); font-weight: bold; font-size: 14px; border-top: 2px solid var(--primary-color); }
.widget-content { padding: 15px; }

/* ==========================================================================
   Detail Page
   ========================================================================== */
.detail-header { border-bottom: 2px solid var(--primary-color); padding-bottom: 15px; margin-bottom: 20px; }
.detail-title { font-size: 24px; font-weight: bold; line-height: 1.4; margin-bottom: 10px; }
.detail-meta { font-size: 12px; color: #999; display: flex; gap: 20px; background: #f8f8f8; padding: 8px 15px; }

.detail-summary { display: flex; gap: 30px; margin-bottom: 30px; }
.summary-gallery { width: 400px; }
.gallery-main { height: 300px; border: 1px solid #eee; background: #f1f1f1; display: flex; align-items: center; justify-content: center; color: #999; margin-bottom: 10px; }
.gallery-thumbs { display: flex; gap: 10px; }
.thumb-item { width: 72px; height: 72px; border: 1px solid #eee; background: #f1f1f1; cursor: pointer; }
.thumb-item:hover, .thumb-item.active { border-color: var(--primary-color); }

.summary-info { flex: 1; }
.price-panel { background: #fff8f8; border: 1px solid #ffdcdc; padding: 15px 20px; margin-bottom: 20px; }
.price-row { display: flex; align-items: baseline; margin-bottom: 10px; }
.price-row .label { width: 70px; color: #666; font-size: 13px; }
.price-row .val { font-size: 28px; font-weight: bold; color: var(--accent-color); }
.price-row .unit { font-size: 14px; color: #666; margin-left: 5px; }

.attr-list { font-size: 13px; margin-bottom: 20px; }
.attr-list li { display: flex; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #eee; }
.attr-list .label { width: 80px; color: #999; }
.attr-list .val { flex: 1; color: #333; }

.action-row { display: flex; gap: 15px; margin-top: 20px; }
.btn-large { padding: 12px 30px; font-size: 16px; font-weight: bold; }
.btn-danger { background: var(--accent-color); color: #fff; }
.btn-danger:hover { background: #c00; }

.detail-content-area { border: 1px solid var(--border-color); background: #fff; }
.content-tabs { display: flex; background: #f8f8f8; border-bottom: 1px solid var(--border-color); }
.content-tabs span { padding: 12px 25px; font-size: 15px; font-weight: bold; cursor: pointer; border-top: 2px solid transparent; }
.content-tabs span.active { background: #fff; border-top-color: var(--primary-color); border-right: 1px solid var(--border-color); border-left: 1px solid var(--border-color); margin-left: -1px; color: var(--primary-color); }
.content-body { padding: 30px; font-size: 15px; line-height: 1.8; color: #444; }
.content-body img { max-width: 100%; margin: 15px 0; }

/* ==========================================================================
   Auth Pages (ICP Portal Style)
   ========================================================================== */
.auth-header { height: 80px; background: #fff; border-bottom: 2px solid var(--primary-color); display: flex; align-items: center; }
.auth-header .container { display: flex; justify-content: space-between; align-items: center; }
.auth-title { font-size: 24px; font-weight: bold; color: var(--text-main); display: flex; align-items: center; gap: 15px; }
.auth-title span { font-size: 16px; font-weight: normal; color: #666; border-left: 1px solid #ccc; padding-left: 15px; }

.auth-body { padding: 50px 0 100px; background: #f5f5f5 url('../images/login-bg.png') no-repeat center top; }
.auth-box { width: 400px; background: #fff; border: 1px solid var(--border-color); border-top: 3px solid var(--primary-color); box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin: 0 auto; padding: 30px 40px; }
.auth-box-title { font-size: 18px; font-weight: bold; margin-bottom: 25px; text-align: center; color: var(--primary-color); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 8px; }
.form-control { width: 100%; height: 40px; border: 1px solid #ccc; padding: 0 10px; font-size: 14px; outline: none; }
.form-control:focus { border-color: var(--primary-color); box-shadow: 0 0 3px rgba(0,86,179,0.2); }

.auth-options { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 20px; }
.auth-options a { color: var(--primary-color); }
.btn-full { width: 100%; display: block; padding: 12px 0; font-size: 16px; font-weight: bold; text-align: center; border: none; }

.auth-footer-links { text-align: center; margin-top: 20px; font-size: 13px; }
.auth-footer-links a { color: var(--accent-color); font-weight: bold; }
