/*
Theme Name: CXMET Theme
Theme URI: https://cxmet.net
Description: Custom industrial theme for CXMET — product system, inquiry, responsive. Global skin via WordPress Customizer (CSS variables).
Version: 1.0.7
Author: WorkBuddy
Text Domain: cxmet-theme
Template: 
*/

:root {
	--cx-primary: #16385f;
	--cx-primary-dark: #0f2742;
	--cx-accent: #c8742e;
	--cx-accent-dark: #b3651f;
	--cx-bg: #f5f7fa;
	--cx-surface: #ffffff;
	--cx-text: #2a2f36;
	--cx-muted: #6b7682;
	--cx-border: #e3e8ee;
	--cx-radius: 10px;
	--cx-shadow: 0 8px 28px rgba(20, 40, 70, .08);
	--cx-maxw: 1200px;
	--cx-font: "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--cx-font);
	color: var(--cx-text);
	background: var(--cx-bg);
	line-height: 1.7;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}
a { color: var(--cx-primary); text-decoration: none; }
a:hover { color: var(--cx-accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--cx-primary); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }

.container { max-width: var(--cx-maxw); margin: 0 auto; padding: 0 20px; }

/* ===== Buttons ===== */
.btn, .cxmet-btn {
	display: inline-block;
	background: var(--cx-accent);
	color: #fff;
	padding: 13px 30px;
	border-radius: 7px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	font-size: 14px;
	border: none;
	cursor: pointer;
	transition: background .15s, transform .1s;
}
.btn:hover, .cxmet-btn:hover { background: var(--cx-accent-dark); color: #fff; transform: translateY(-1px); }
.btn-outline {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255,255,255,.7);
}
.btn-outline:hover { background: #fff; color: var(--cx-primary); border-color: #fff; }
.btn-ghost {
	background: transparent;
	color: var(--cx-primary);
	border: 2px solid var(--cx-primary);
}
.btn-ghost:hover { background: var(--cx-primary); color: #fff; }

/* ===== Header ===== */
.site-header {
	background: var(--cx-surface);
	box-shadow: 0 2px 14px rgba(20,40,70,.06);
	position: sticky;
	top: 0;
	z-index: 50;
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 14px 20px;
	max-width: var(--cx-maxw);
	margin: 0 auto;
}
.site-logo { display: flex; align-items: center; gap: 12px; }
.site-logo img { height: 42px; width: auto; }
.site-logo .logo-text { font-size: 22px; font-weight: 800; color: var(--cx-primary); letter-spacing: .02em; }
.site-logo .logo-text span { color: var(--cx-accent); }

.main-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
	display: block;
	padding: 10px 14px;
	color: var(--cx-text);
	font-weight: 600;
	font-size: 15px;
	border-radius: 6px;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--cx-accent); background: rgba(200,116,46,.08); }
.main-nav li.menu-item-has-children { position: relative; }
.main-nav li.menu-item-has-children > a::after { content: "▾"; margin-left: 6px; font-size: 11px; }
.main-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 230px;
	background: #fff;
	border: 1px solid var(--cx-border);
	border-radius: 8px;
	box-shadow: var(--cx-shadow);
	padding: 8px;
	display: none;
	flex-direction: column;
	gap: 2px;
	z-index: 60;
}
.main-nav li.menu-item-has-children:hover > .sub-menu { display: flex; }
.main-nav .sub-menu a { padding: 9px 12px; border-radius: 6px; font-weight: 500; }

.nav-toggle { display: none; background: none; border: none; font-size: 26px; color: var(--cx-primary); cursor: pointer; }

/* ===== Hero ===== */
.hero {
	background: linear-gradient(135deg, var(--cx-primary) 0%, var(--cx-primary-dark) 100%);
	color: #fff;
	padding: 90px 0;
	position: relative;
	overflow: hidden;
}
.hero::after {
	content: "";
	position: absolute;
	right: -120px; top: -80px;
	width: 420px; height: 420px;
	background: radial-gradient(circle, rgba(200,116,46,.35), transparent 70%);
	border-radius: 50%;
}
.hero-content { position: relative; z-index: 2; max-width: 680px; }
.hero h1 { color: #fff; margin-top: 0; }
.hero p { font-size: 18px; color: rgba(255,255,255,.88); }
.hero .hero-actions { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Section ===== */
.section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--cx-muted); margin-bottom: 40px; max-width: 720px; margin-left: auto; margin-right: auto; }
.bg-surface { background: var(--cx-surface); }
.bg-alt { background: #eef2f7; }

/* ===== Category grid (four-column image + text) ===== */
.cat-grid-four {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
}
.cat-card {
	background: var(--cx-surface);
	border: 1px solid var(--cx-border);
	border-radius: var(--cx-radius);
	overflow: hidden;
	box-shadow: var(--cx-shadow);
	display: flex;
	flex-direction: column;
	transition: transform .15s, box-shadow .15s, border-color .15s;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--cx-accent); box-shadow: 0 14px 36px rgba(20,40,70,.14); }
.cat-card .cat-media {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	padding: 22px;
	background: #eef2f7;
}
.cat-card .cat-media img {
	max-width: 100%;
	max-height: 200px;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform .3s;
}
.cat-card:hover .cat-media img { transform: scale(1.05); }
.cat-card .cat-media-fallback {
	background: linear-gradient(135deg, var(--cx-primary), var(--cx-accent));
}
.cat-card .cat-media-fallback .cat-icon { margin: 0; background: transparent; width: auto; height: auto; font-size: 42px; }
.cat-card .cat-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.cat-card h3 { margin: 0 0 8px; font-size: 17px; }
.cat-card h3 a { color: inherit; }
.cat-card h3 a:hover { color: var(--cx-accent); }
.cat-card p { color: var(--cx-muted); font-size: 13px; margin: 0 0 12px; line-height: 1.5; }
.cat-card a.more { font-weight: 700; color: var(--cx-accent); font-size: 13px; margin-top: auto; }

@media (max-width: 980px) {
	.cat-grid-four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.cat-grid-four { grid-template-columns: 1fr; }
}

/* ===== Product grid ===== */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}
.product-card {
	background: var(--cx-surface);
	border: 1px solid var(--cx-border);
	border-radius: var(--cx-radius);
	overflow: hidden;
	box-shadow: var(--cx-shadow);
	display: flex;
	flex-direction: column;
	transition: transform .15s, box-shadow .15s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(20,40,70,.14); }
.product-card .pc-thumb { aspect-ratio: 4/3; background: #eef2f7; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .pc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .pc-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.product-card h3 { font-size: 17px; margin: 0 0 8px; }
.product-card .pc-cat { color: var(--cx-accent); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.product-card p { color: var(--cx-muted); font-size: 14px; flex: 1; }
.product-card .pc-link { margin-top: 14px; font-weight: 700; color: var(--cx-primary); }

/* ===== Advantages ===== */
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 22px; }
.adv-item { text-align: center; padding: 20px; }
.adv-item .adv-num { font-size: 40px; font-weight: 800; color: var(--cx-accent); }
.adv-item h3 { margin: 8px 0; font-size: 18px; }
.adv-item p { color: var(--cx-muted); font-size: 14px; }

/* ===== Content layout ===== */
.page-wrap, .single-wrap { padding: 56px 0; }
.content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.content-main { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius); padding: 36px; box-shadow: var(--cx-shadow); }
.entry-meta { color: var(--cx-muted); font-size: 13px; margin-bottom: 14px; }
.entry-meta a { color: var(--cx-accent); }

/* product single */
.product-detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 36px; align-items: start; }
.product-main { min-width: 0; }
.product-top-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	align-items: start;
}
.product-media .pc-thumb {
	aspect-ratio: 4/3;
	border-radius: var(--cx-radius);
	overflow: hidden;
	background: #eef2f7;
	margin-bottom: 18px;
}
.product-media .pc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-summary h1 { margin-top: 0; }
.product-summary .pc-cat { color: var(--cx-accent); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.product-price-note { background: #fef3e9; border: 1px solid #f5d4b3; color: #8a4a16; padding: 12px 16px; border-radius: 8px; margin: 16px 0; font-size: 14px; }
.product-overview p { color: var(--cx-text); }
.product-bottom-row { margin-top: 36px; }
.product-rich-section { margin-bottom: 28px; }
.product-rich-section h2 { margin-top: 0; }

/* product sidebar navigation */
.product-sidebar { display: flex; flex-direction: column; gap: 24px; }
.product-nav-widget { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius); padding: 22px; box-shadow: var(--cx-shadow); }
.product-nav-widget h3 { margin-top: 0; font-size: 17px; border-bottom: 2px solid var(--cx-accent); padding-bottom: 10px; display: inline-block; }
.product-cat-nav { list-style: none; padding: 0; margin: 0; }
.product-cat-nav li { padding: 0; }
.product-cat-nav li + li { border-top: 1px solid var(--cx-border); }
.product-cat-nav a {
	display: block;
	padding: 10px 0;
	color: var(--cx-text);
	font-weight: 500;
	font-size: 14px;
}
.product-cat-nav a:hover { color: var(--cx-accent); }
.product-cat-nav .current > a { color: var(--cx-accent); font-weight: 700; }
.product-cat-nav ul { list-style: none; padding: 0 0 0 16px; margin: 0; border-left: 2px solid var(--cx-border); }
.product-cat-nav ul li + li { border-top: none; }
.product-cat-nav ul a { font-size: 13px; color: var(--cx-muted); padding: 7px 0; }
.product-cat-nav .has-children > a { position: relative; }

.product-sidebar .inquiry-box { background: var(--cx-primary); color: #fff; padding: 26px; border-radius: var(--cx-radius); box-shadow: var(--cx-shadow); }
.product-sidebar .inquiry-box h3 { color: #fff; margin-top: 0; }
.product-sidebar .inquiry-box .cxmet-submit { background: var(--cx-accent); width: 100%; }
.product-meta-list { list-style: none; padding: 0; margin: 16px 0; }
.product-meta-list li { padding: 8px 0; border-bottom: 1px solid var(--cx-border); display: flex; justify-content: space-between; }
.product-meta-list li span:first-child { color: var(--cx-muted); }

/* spec table */
.cxmet-spec-table { width: 100%; border-collapse: collapse; margin: 18px 0 28px; background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius); overflow: hidden; }
.cxmet-spec-table th, .cxmet-spec-table td { padding: 12px 16px; border-bottom: 1px solid var(--cx-border); text-align: left; font-size: 14px; }
.cxmet-spec-table th { background: var(--cx-primary); color: #fff; font-weight: 600; }
.cxmet-spec-table tr:last-child td { border-bottom: none; }
.cxmet-spec-table tr:nth-child(even) td { background: #f8fafc; }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius); padding: 22px; box-shadow: var(--cx-shadow); }
.widget h3 { margin-top: 0; font-size: 17px; border-bottom: 2px solid var(--cx-accent); padding-bottom: 10px; display: inline-block; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--cx-border); }
.widget li:last-child { border-bottom: none; }

/* ===== Footer ===== */
.site-footer { background: var(--cx-primary-dark); color: rgba(255,255,255,.82); padding: 50px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 30px; }
.site-footer h4 { color: #fff; margin-top: 0; font-size: 16px; }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: var(--cx-accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 6px 0; }
.footer-contact p { margin: 6px 0; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 18px; text-align: center; font-size: 13px; color: rgba(255,255,255,.6); }

/* ===== Breadcrumb ===== */
.breadcrumb { font-size: 13px; color: var(--cx-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--cx-muted); }
.breadcrumb a:hover { color: var(--cx-accent); }

/* ===== Pagination ===== */
.pagination { text-align: center; margin: 40px 0; }
.pagination a, .pagination span { display: inline-block; padding: 9px 14px; margin: 0 3px; border: 1px solid var(--cx-border); border-radius: 6px; color: var(--cx-primary); }
.pagination .current { background: var(--cx-primary); color: #fff; border-color: var(--cx-primary); }

/* ===== 404 / search ===== */
.notfound { text-align: center; padding: 80px 0; }

/* ===== Responsive ===== */
@media (max-width: 980px) {
	.content-grid { grid-template-columns: 1fr; }
	.product-detail-layout { grid-template-columns: 1fr; }
	.product-top-row { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
	.nav-toggle { display: block; }
	.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: var(--cx-shadow); padding: 12px; }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; }
	.main-nav .sub-menu { position: static; box-shadow: none; display: none; padding-left: 14px; }
	.main-nav li.menu-item-has-children.open > .sub-menu { display: flex; }
	.footer-grid { grid-template-columns: 1fr; }
	.hero { padding: 60px 0; }
}

/* ===== Topbar ===== */
.topbar { background: var(--cx-primary-dark); color: rgba(255,255,255,.9); font-size: 13px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 20px; max-width: var(--cx-maxw); margin: 0 auto; }
.topbar-contact { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-contact b { color: #fff; font-weight: 700; }
.topbar-cta { color: #fff; background: var(--cx-accent); padding: 5px 16px; border-radius: 20px; font-weight: 700; }
.topbar-cta:hover { background: var(--cx-accent-dark); color: #fff; }

/* ===== Hero (upgraded, two-column) ===== */
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-badge { display: inline-block; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 18px; letter-spacing: .02em; }
.hero-text h1 { color: #fff; margin: 0 0 16px; }
.hero-text p { font-size: 18px; color: rgba(255,255,255,.88); max-width: 600px; }
.hero-trust { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 26px; flex-wrap: wrap; }
.hero-trust li { color: rgba(255,255,255,.9); font-size: 14px; }
.hero-trust .ht-k { color: var(--cx-accent); font-weight: 800; margin-right: 6px; text-transform: uppercase; font-size: 12px; }
.hero-visual { position: relative; }
.hero-visual img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); display: block; }
.hero-badge-float { position: absolute; left: -14px; bottom: 22px; background: var(--cx-accent); color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 700; font-size: 14px; box-shadow: var(--cx-shadow); }

/* ===== Category icon (overrides emoji style) ===== */
.cat-icon { width: 50px; height: 50px; border-radius: 12px; background: linear-gradient(135deg, var(--cx-primary), var(--cx-accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.subcats { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.subcats li a { color: var(--cx-muted); font-size: 13px; }
.subcats li a:hover { color: var(--cx-accent); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.section-title.left { text-align: left; }
.about-text p { color: var(--cx-text); font-size: 16px; }
.about-points { list-style: none; padding: 0; margin: 18px 0 24px; }
.about-points li { position: relative; padding-left: 26px; margin-bottom: 12px; color: var(--cx-text); }
.about-points li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--cx-accent); font-weight: 800; }
.about-visual img { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--cx-shadow); display: block; }

/* ===== Latest Insights ===== */
.insights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.insight-card { background: var(--cx-surface); border: 1px solid var(--cx-border); border-radius: var(--cx-radius); overflow: hidden; box-shadow: var(--cx-shadow); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.insight-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(20,40,70,.14); }
.insight-thumb { aspect-ratio: 16/9; background: #eef2f7; overflow: hidden; display: block; }
.insight-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.insight-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.insight-cat { color: var(--cx-accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.insight-body h3 { font-size: 18px; margin: 0 0 8px; }
.insight-body p { color: var(--cx-muted); font-size: 14px; flex: 1; }

/* ===== CTA band ===== */
.cta-band { background: linear-gradient(135deg, var(--cx-primary) 0%, var(--cx-primary-dark) 100%); }

/* ===== Responsive (homepage additions) ===== */
@media (max-width: 980px) {
	.hero-grid { grid-template-columns: 1fr; gap: 32px; }
	.about-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
	.topbar-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
	.hero-trust { gap: 16px; }
}
