/* ===== ggmachinery homepage v2 ===== */
:root {
	--navy: #0d1b3e;
	--navy-2: #142b5c;
	--accent: #e02c3f;
	--accent-2: #ff5733;
	--text: #1b2430;
	--muted: #6b7684;
	--line: #e6e9ef;
	--bg: #f5f7fa;
	--radius: 12px;
	--wrap: 1280px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	font-size: 14px;
	line-height: 1.55;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

/* 防止 grid / flex 子项被内容撑破 */
.hm-hero-in > *, .hm-hero-right > *, .hm-cat-body, .hm-cat > *, .hm-prod, .hm-sup, .hm-country,
.hm-mid-in > *, .hm-cta > *, .hm-foot-grid > *, .hm-prod-body { min-width: 0; }

img { display: block; max-width: 100%; border: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.hm-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.hm-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 50; }

.hm-top { background: var(--navy); color: rgba(255, 255, 255, .72); font-size: 13px; }
.hm-top-in { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 16px; }
.hm-top-nav { display: flex; align-items: center; gap: 22px; }
.hm-top-nav a { color: rgba(255, 255, 255, .8); }
.hm-top-nav a:hover { color: #fff; }
.hm-top-hot { font-size: 12px; opacity: .75; }
.hm-top-right { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.hm-top-right a:hover { color: #fff; }
.hm-sep { opacity: .35; }

.hm-dd { position: relative; }
.hm-dd-panel {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 520px;
	max-width: 720px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(13, 27, 62, .16);
	padding: 14px 18px;
	columns: 2;
	column-gap: 26px;
	z-index: 60;
}
.hm-dd-panel a {
	display: block;
	padding: 7px 0;
	font-size: 13px;
	color: #34405a;
	break-inside: avoid;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hm-dd-panel a:hover { color: var(--accent); }
.hm-dd:hover .hm-dd-panel,
.hm-dd:focus-within .hm-dd-panel { display: block; }

.hm-mid { padding: 14px 0 16px; }
.hm-mid-in { display: flex; align-items: center; gap: 30px; }
.hm-logo { flex: 0 0 auto; display: block; }
.hm-logo img { width: 160px; height: auto; }

.hm-search {
	flex: 1 1 auto;
	display: flex;
	align-items: stretch;
	max-width: 640px;
	height: 46px;
	border: 2px solid var(--accent);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}
.hm-search select {
	flex: 0 0 auto;
	height: 100%;
	border: 0;
	border-right: 1px solid var(--line);
	background: #f7f8fa;
	padding: 0 10px;
	font-size: 13px;
	color: #4a5568;
	cursor: pointer;
}
.hm-search input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	border: 0;
	padding: 0 14px;
	font-size: 14px;
	outline: none;
}
.hm-search input::placeholder { color: #9aa3b2; }
.hm-search button {
	flex: 0 0 auto;
	border: 0;
	background: var(--accent);
	color: #fff;
	font-weight: 600;
	font-size: 14px;
	padding: 0 28px;
	cursor: pointer;
	transition: background .2s;
}
.hm-search button:hover { background: #c81f31; }

.hm-hotwords {
	flex: 0 1 auto;
	font-size: 12px;
	color: #8a93a3;
	display: flex;
	align-items: center;
	gap: 12px;
	white-space: nowrap;
	overflow: hidden;
}
.hm-hotwords a { color: #4a5568; }
.hm-hotwords a:hover { color: var(--accent); }

.hm-mobile { display: none; }

/* ---------- hero ---------- */
.hm-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(120deg, #0b1733 0%, #16326b 58%, #1e4a9c 100%);
	color: #fff;
	padding: 56px 0 52px;
}
.hm-hero::before,
.hm-hero::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}
.hm-hero::before {
	width: 520px; height: 520px;
	right: -120px; top: -180px;
	background: radial-gradient(circle, rgba(224, 44, 63, .28), transparent 66%);
}
.hm-hero::after {
	width: 420px; height: 420px;
	left: -160px; bottom: -220px;
	background: radial-gradient(circle, rgba(46, 110, 220, .3), transparent 68%);
}
.hm-hero-in {
	position: relative;
	display: grid;
	grid-template-columns: 1.12fr .88fr;
	gap: 48px;
	align-items: center;
}
.hm-hero-left { position: relative; z-index: 1; }
.hm-eyebrow {
	display: inline-block;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #ffb3bb;
	background: rgba(224, 44, 63, .16);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 999px;
	padding: 5px 14px;
	margin-bottom: 18px;
}
.hm-hero h1 {
	font-size: 40px;
	line-height: 1.16;
	font-weight: 700;
	letter-spacing: -.01em;
	max-width: 640px;
}
.hm-hero-sub {
	margin-top: 16px;
	font-size: 15px;
	line-height: 1.75;
	color: rgba(255, 255, 255, .8);
	max-width: 620px;
}
.hm-hero-search { margin-top: 26px; max-width: 560px; border-color: #fff; background: #fff; }
.hm-hero-search select { background: #f3f5f8; }
.hm-hero-search button { background: var(--accent); }

.hm-stats { display: flex; flex-wrap: wrap; gap: 38px; margin-top: 30px; }
.hm-stat { display: flex; flex-direction: column; gap: 2px; }
.hm-stat strong { font-size: 24px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.hm-stat span { font-size: 12px; color: rgba(255, 255, 255, .66); }

.hm-hero-right {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.hm-hero-tile {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 26px rgba(3, 12, 33, .28);
	transition: transform .25s ease;
}
.hm-hero-tile:hover { transform: translateY(-3px); }
.hm-hero-tile img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 10px;
}
.hm-hero-tile-name {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 22px 10px 9px;
	font-size: 12px;
	line-height: 1.35;
	color: #fff;
	background: linear-gradient(to top, rgba(6, 15, 35, .88), rgba(6, 15, 35, 0));
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

/* ---------- sections ---------- */
.hm-main { padding-bottom: 8px; }
.hm-section { padding: 46px 0; }
.hm-section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.hm-sec-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 24px;
}
.hm-sec-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.hm-sec-sub { margin-top: 6px; font-size: 13px; color: var(--muted); }
.hm-sec-more { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.hm-sec-more:hover { text-decoration: underline; }

/* categories */
.hm-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hm-cat {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
	transition: border-color .2s, transform .2s, box-shadow .2s;
}
.hm-cat:hover {
	border-color: rgba(224, 44, 63, .45);
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(13, 27, 62, .08);
}
.hm-cat-icon {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: rgba(224, 44, 63, .08);
	color: var(--accent);
}
.hm-cat-icon svg { width: 26px; height: 26px; }
.hm-cat-grid .hm-cat:nth-child(2) .hm-cat-icon { background: rgba(30, 90, 200, .08); color: #1e5ac8; }
.hm-cat-grid .hm-cat:nth-child(3) .hm-cat-icon { background: rgba(0, 150, 136, .1); color: #009688; }
.hm-cat-grid .hm-cat:nth-child(4) .hm-cat-icon { background: rgba(255, 87, 51, .1); color: #ff5733; }
.hm-cat-body { min-width: 0; }
.hm-cat-name {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.hm-cat-count { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }

.hm-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.hm-tags-label { font-size: 13px; color: var(--muted); }
.hm-tag {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 13px;
	color: #35415c;
	transition: border-color .2s, color .2s;
}
.hm-tag em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
.hm-tag:hover { border-color: var(--accent); color: var(--accent); }

/* products */
.hm-prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hm-prod {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	transition: box-shadow .2s, transform .2s, border-color .2s;
}
.hm-prod:hover {
	border-color: rgba(224, 44, 63, .35);
	box-shadow: 0 12px 26px rgba(13, 27, 62, .09);
	transform: translateY(-2px);
}
.hm-prod-img { aspect-ratio: 1 / 1; background: #fbfcfd; padding: 12px; }
.hm-prod-img img { width: 100%; height: 100%; object-fit: contain; }
.hm-prod-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; }
.hm-prod-name {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	height: 40px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.hm-prod-price { font-size: 15px; font-weight: 700; color: var(--accent); line-height: 1.3; }
.hm-prod-co {
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* suppliers */
.hm-sup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hm-sup {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px;
	transition: box-shadow .2s, border-color .2s;
}
.hm-sup:hover { border-color: rgba(224, 44, 63, .35); box-shadow: 0 12px 26px rgba(13, 27, 62, .08); }
.hm-sup-head { display: flex; align-items: center; gap: 12px; }
.hm-sup-logo {
	flex: 0 0 auto;
	width: 60px;
	height: 60px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.hm-sup-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.hm-sup-initial {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	font-size: 22px; font-weight: 700; color: #fff;
	background: linear-gradient(135deg, #1e4a9c, #e02c3f);
}
.hm-sup-info { min-width: 0; }
.hm-sup-name {
	display: block;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hm-sup-country {
	display: inline-block;
	margin-top: 5px;
	font-size: 11px;
	color: #1e5ac8;
	background: rgba(30, 90, 200, .08);
	border-radius: 999px;
	padding: 2px 9px;
}
.hm-sup-addr {
	margin-top: 12px;
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hm-sup-prods { display: flex; gap: 8px; margin-top: 14px; }
.hm-sup-prod {
	width: 56px;
	height: 56px;
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
	background: #fbfcfd;
}
.hm-sup-prod img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.hm-sup-link { margin-top: 14px; font-size: 12px; font-weight: 600; color: var(--accent); }
.hm-sup-link:hover { text-decoration: underline; }

/* countries */
.hm-country-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hm-country {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 13px 16px;
	transition: border-color .2s, color .2s;
}
.hm-country:hover { border-color: var(--accent); color: var(--accent); }
.hm-country-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-country-count { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* CTA */
.hm-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	background: linear-gradient(120deg, #0d1b3e, #1e4a9c);
	color: #fff;
	border-radius: 16px;
	padding: 34px 38px;
}
.hm-cta h2 { font-size: 24px; font-weight: 700; }
.hm-cta p { margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, .78); max-width: 680px; }
.hm-cta-actions { display: flex; gap: 12px; flex: 0 0 auto; }
.hm-btn {
	display: inline-block;
	padding: 12px 26px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	transition: background .2s, color .2s, border-color .2s;
}
.hm-btn-accent { background: var(--accent); color: #fff; }
.hm-btn-accent:hover { background: #c81f31; }
.hm-btn-ghost { border: 1px solid rgba(255, 255, 255, .55); color: #fff; }
.hm-btn-ghost:hover { background: #fff; color: var(--navy); }

/* ---------- footer ---------- */
.hm-footer { background: var(--navy); color: rgba(255, 255, 255, .68); padding-top: 46px; font-size: 13px; }
.hm-foot-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: 40px;
	padding-bottom: 34px;
}
.hm-foot-logo { display: inline-block; font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.hm-foot-logo span { color: var(--accent); }
.hm-foot-brand p { margin-top: 14px; line-height: 1.75; max-width: 380px; }
.hm-foot-stats { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: 12px; color: rgba(255, 255, 255, .6); }
.hm-foot-stats b { color: #fff; font-size: 14px; }
.hm-foot-col h4 { margin: 2px 0 14px; font-size: 13px; font-weight: 600; color: #fff; letter-spacing: .06em; text-transform: uppercase; }
.hm-foot-col a { display: block; padding: 6px 0; color: rgba(255, 255, 255, .68); }
.hm-foot-col a:hover { color: #fff; }

.hm-foot-social { display: flex; gap: 12px; padding-bottom: 28px; }
.hm-foot-social a { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center; }
.hm-foot-social img { width: 18px; height: 18px; object-fit: contain; }
.hm-foot-social a:hover { background: var(--accent); }

.hm-foot-bottom { border-top: 1px solid rgba(255, 255, 255, .12); font-size: 12px; color: rgba(255, 255, 255, .55); }
.hm-foot-bottom .hm-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.hm-foot-bottom a { color: rgba(255, 255, 255, .7); }
.hm-foot-bottom a:hover { color: #fff; }
.hm-foot-links { display: flex; gap: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
	.hm-hotwords { display: none; }
	.hm-hero h1 { font-size: 34px; }
	.hm-cat-grid { grid-template-columns: repeat(2, 1fr); }
	.hm-prod-grid { grid-template-columns: repeat(3, 1fr); }
	.hm-sup-grid { grid-template-columns: repeat(2, 1fr); }
	.hm-country-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
	.hm-hero { padding: 40px 0 38px; }
	.hm-hero-in { grid-template-columns: 1fr; gap: 32px; }
	.hm-hero-right { max-width: 560px; }
	.hm-hero h1 { font-size: 30px; }
	.hm-foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
	.hm-top, .hm-mid { display: none; }
	.hm-mobile { display: block; padding: 10px 0 12px; }
	.hm-mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; }
	.hm-mobile .hm-logo img { width: 130px; }
	.hm-menu-btn {
		width: 40px; height: 40px;
		border: 1px solid var(--line);
		border-radius: 8px;
		background: #fff;
		display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
		cursor: pointer;
	}
	.hm-menu-btn span { display: block; width: 18px; height: 2px; background: #2b3550; transition: transform .2s, opacity .2s; }
	.hm-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
	.hm-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
	.hm-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
	.hm-search-mobile { margin: 10px 16px 0; max-width: none; height: 44px; }
	.hm-search-mobile button { padding: 0 18px; }
	.hm-mobile-panel { display: none; padding: 8px 16px 14px; border-top: 1px solid var(--line); margin-top: 10px; max-height: 70vh; overflow-y: auto; }
	.hm-mobile-panel.is-open { display: block; }
	.hm-mobile-panel a { display: block; padding: 11px 2px; border-bottom: 1px solid #f0f2f6; font-size: 14px; }
	.hm-mobile-strong { font-weight: 700; color: var(--accent); }
	.hm-mobile-account { display: flex; gap: 18px; padding-top: 14px; }
	.hm-mobile-account a { border: 0; padding: 4px 0; color: #1e5ac8; }

	.hm-hero { padding: 30px 0 32px; }
	.hm-hero h1 { font-size: 26px; }
	.hm-hero-sub { font-size: 14px; }
	.hm-stats { gap: 22px; margin-top: 22px; }
	.hm-stat strong { font-size: 20px; }
	.hm-hero-right { gap: 10px; }

	.hm-section { padding: 32px 0; }
	.hm-sec-head { align-items: flex-start; flex-direction: column; gap: 8px; }
	.hm-sec-head h2 { font-size: 20px; }
	.hm-cat-grid { grid-template-columns: 1fr; gap: 12px; }
	.hm-prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.hm-prod-body { padding: 11px 12px 13px; }
	.hm-prod-name { font-size: 13px; height: 38px; }
	.hm-sup-grid { grid-template-columns: 1fr; gap: 12px; }
	.hm-country-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.hm-cta { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
	.hm-cta h2 { font-size: 20px; }
	.hm-foot-grid { grid-template-columns: 1fr; gap: 24px; }
	.hm-foot-bottom .hm-wrap { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
	.hm-wrap { padding: 0 14px; }
	.hm-hero h1 { font-size: 23px; }
	.hm-search select { max-width: 96px; font-size: 12px; }
	.hm-hero-search button, .hm-search button { padding: 0 16px; }
	.hm-cat { padding: 16px; }
	.hm-prod-grid { grid-template-columns: repeat(2, 1fr); }
	.hm-cta-actions { width: 100%; }
	.hm-btn { flex: 1; text-align: center; }
}
