/*
Theme Name: Moonseek
Theme URI: https://pump.moonseeks.com
Author: Moonseek
Author URI: https://pump.moonseeks.com
Description: WooCommerce 主题，WooCommerce 询盘型企业主题。支持 Contact Form 7、Elementor（免费版）、全设备响应式（手机/平板/PC）、WooCommerce 产品展示。兼容 PHP 7.2 - 8.3。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: moonseek
Tags: e-commerce, responsive-layout, custom-menu, custom-logo, translation-ready
*/

/* =====================================================
   变量与基础
===================================================== */
:root {
	--nm-blue: #004e98;
	--nm-blue-dark: #003a73;
	--nm-blue-light: #eaf2fa;
	--nm-red: #e03e2d;
	--nm-text: #333;
	--nm-text-light: #666;
	--nm-gray: #f7f7f7;
	--nm-border: #e5e5e5;
	--nm-container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
	font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
	font-size: 15px;
	line-height: 1.7;
	color: var(--nm-text);
	background: #fff;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--nm-blue); text-decoration: none; transition: color .25s; }
a:hover { color: var(--nm-red); }

ul, ol { list-style: none; }

.container {
	max-width: var(--nm-container);
	margin: 0 auto;
	padding: 0 15px;
	width: 100%;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px,1px,1px,1px);
}

/* 通用标题 */
.sec-title { text-align: center; margin-bottom: 40px; }
.sec-title h2 {
	font-size: 32px;
	color: var(--nm-blue);
	text-transform: uppercase;
	letter-spacing: 1px;
}
.sec-title .sub { color: var(--nm-text-light); max-width: 760px; margin: 10px auto 0; }

.btn-nm {
	display: inline-block;
	padding: 10px 30px;
	background: var(--nm-blue);
	color: #fff !important;
	border-radius: 3px;
	font-size: 14px;
	text-transform: uppercase;
	transition: background .25s;
	border: 0; cursor: pointer;
}
.btn-nm:hover { background: var(--nm-blue-dark); }
.btn-nm.btn-red { background: var(--nm-red); }
.btn-nm.btn-red:hover { background: #c22e1f; }

/* =====================================================
   顶部通栏
===================================================== */
.top-bar {
	background: var(--nm-blue-dark);
	color: #fff;
	font-size: 13px;
}
.top-bar .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 38px;
}
.top-bar a { color: #fff; }
.top-bar .top-right a.quote-btn {
	background: var(--nm-red);
	padding: 4px 16px;
	border-radius: 3px;
	margin-left: 15px;
}

/* =====================================================
   头部导航
===================================================== */
.site-header {
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,.08);
	position: sticky;
	top: 0;
	z-index: 999;
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 80px;
}
.custom-logo-link img { max-height: 60px; width: auto; }
.site-title a { font-size: 26px; font-weight: 700; color: var(--nm-blue); }

.main-navigation ul { display: flex; }
.main-navigation li { position: relative; }
.main-navigation a {
	display: block;
	padding: 28px 16px;
	color: var(--nm-text);
	font-size: 15px;
	font-weight: 500;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { color: var(--nm-blue); }

/* 下拉菜单 */
.main-navigation ul ul {
	display: none;
	position: absolute;
	left: 0; top: 100%;
	background: #fff;
	min-width: 210px;
	box-shadow: 0 4px 12px rgba(0,0,0,.12);
	z-index: 1000;
}
.main-navigation ul ul ul { left: 100%; top: 0; }
.main-navigation ul ul a { padding: 10px 16px; border-bottom: 1px solid var(--nm-border); }
.main-navigation li:hover > ul { display: block; }

/* 移动端菜单按钮 */
.menu-toggle {
	display: none;
	background: none;
	border: 2px solid var(--nm-blue);
	color: var(--nm-blue);
	font-size: 22px;
	padding: 4px 12px;
	cursor: pointer;
	border-radius: 3px;
}

/* =====================================================
   Banner
===================================================== */
.home-banner {
	position: relative;
	min-height: 420px;
	background: url('assets/img/banner.jpg') center/cover no-repeat;
	display: flex;
	align-items: center;
}
.home-banner .banner-search {
	background: rgba(255,255,255,.95);
	padding: 30px;
	max-width: 480px;
	border-radius: 4px;
}
.home-banner h2 { color: var(--nm-blue); font-size: 28px; margin-bottom: 18px; }
.banner-tags { margin-top: 14px; }
.banner-tags a {
	display: inline-block;
	background: var(--nm-blue-light);
	color: var(--nm-blue);
	padding: 3px 12px;
	border-radius: 20px;
	font-size: 12px;
	margin: 3px 4px 3px 0;
}

/* =====================================================
   首页分类区
===================================================== */
.home-cats { padding: 60px 0; background: var(--nm-gray); }
.cat-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.cat-col { background: #fff; border: 1px solid var(--nm-border); border-radius: 4px; overflow: hidden; }
.cat-col .cat-head {
	background: var(--nm-blue);
	color: #fff;
	padding: 14px 20px;
	font-size: 17px;
	font-weight: 600;
}
.cat-col ul { padding: 14px 20px; }
.cat-col li a {
	display: block;
	padding: 7px 0;
	border-bottom: 1px dashed var(--nm-border);
	color: var(--nm-text-light);
}
.cat-col li:last-child a { border-bottom: 0; }

/* =====================================================
   数字统计条
===================================================== */
.num-section {
	background: var(--nm-blue) url('assets/img/banner.jpg') center/cover no-repeat;
	background-blend-mode: multiply;
	color: #fff;
	padding: 45px 0;
}
.num-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.num-item .num { font-size: 40px; font-weight: 700; line-height: 1.2; }
.num-item .num-label { font-size: 13px; opacity: .85; text-transform: uppercase; }

/* =====================================================
   About 区
===================================================== */
.home-about { padding: 70px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 45px; align-items: center; }
.about-text h2 { color: var(--nm-blue); font-size: 30px; margin-bottom: 18px; }
.about-text p { color: var(--nm-text-light); margin-bottom: 12px; text-align: justify; }
.about-text .btn-nm { margin-top: 12px; }

/* =====================================================
   产品卡（首页 Hot Product / 相关产品 / 列表通用）
===================================================== */
.home-products { padding: 70px 0; background: var(--nm-gray); }
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.prod-card {
	background: #fff;
	border: 1px solid var(--nm-border);
	border-radius: 4px;
	overflow: hidden;
	transition: transform .25s, box-shadow .25s;
	display: flex; flex-direction: column;
}
.prod-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.prod-card .thumb {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #fff;
	display: flex; align-items: center; justify-content: center;
}
.prod-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.prod-card .info { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.prod-card .info h3 {
	font-size: 15px;
	line-height: 1.45;
	color: var(--nm-text);
	margin-bottom: 8px;
	flex: 1;
}
.prod-card .info h3 a { color: inherit; }
.prod-card .info p {
	font-size: 13px;
	color: var(--nm-text-light);
	max-height: 60px;
	overflow: hidden;
}
.prod-card .info .more {
	margin-top: 12px;
	font-size: 13px;
	color: var(--nm-blue);
	font-weight: 600;
}

/* =====================================================
   应用领域
===================================================== */
.home-apps { padding: 70px 0; }
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.app-card { border: 1px solid var(--nm-border); border-radius: 4px; overflow: hidden; background: #fff; }
.app-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.app-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.app-card:hover .thumb img { transform: scale(1.06); }
.app-card .info { padding: 18px; }
.app-card .info h3 { font-size: 16px; margin-bottom: 8px; color: var(--nm-blue); }
.app-card .info p { font-size: 13px; color: var(--nm-text-light); }

/* =====================================================
   证书区
===================================================== */
.home-certs { padding: 70px 0; background: var(--nm-gray); }
.cert-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.cert-grid img {
	border: 1px solid var(--nm-border);
	background: #fff;
	border-radius: 4px;
	aspect-ratio: 3/4;
	object-fit: cover;
	width: 100%;
}

/* =====================================================
   最新新闻
===================================================== */
.home-news { padding: 70px 0; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.news-card { border: 1px solid var(--nm-border); border-radius: 4px; overflow: hidden; }
.news-card .info { padding: 20px; }
.news-card .date { font-size: 12px; color: #999; }
.news-card h3 { font-size: 16px; margin: 8px 0; line-height: 1.5; }
.news-card h3 a { color: var(--nm-text); }
.news-card p { font-size: 13px; color: var(--nm-text-light); }

/* =====================================================
   留言表单（Contact Form 7 通用样式）
===================================================== */
.home-contact { padding: 70px 0; background: var(--nm-blue); color: #fff; }
.home-contact .sec-title h2 { color: #fff; }
.cf7-wrap { max-width: 860px; margin: 0 auto; }
.wpcf7 form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.wpcf7 .cf7-full { grid-column: 1 / -1; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid transparent;
	border-radius: 3px;
	font-size: 14px;
	background: #fff;
	color: var(--nm-text);
}
.wpcf7 textarea { min-height: 120px; }
.wpcf7 input[type="submit"] {
	grid-column: 1 / -1;
	justify-self: center;
	background: var(--nm-red);
	color: #fff;
	border: 0;
	padding: 12px 50px;
	border-radius: 3px;
	font-size: 15px;
	cursor: pointer;
	text-transform: uppercase;
}
.wpcf7 input[type="submit"]:hover { background: #c22e1f; }

/* =====================================================
   页脚
===================================================== */
.site-footer {
	background: #0a0a0a url('assets/img/banner.jpg') center/cover no-repeat;
	background-blend-mode: multiply;
	color: #ccc;
	font-size: 14px;
}
.footer-top { padding: 55px 0 35px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 35px; }
.footer-grid h4 { color: #fff; font-size: 16px; margin-bottom: 16px; text-transform: uppercase; }
.footer-grid a { color: #bbb; }
.footer-grid li { margin-bottom: 8px; }
.footer-logo img { max-height: 50px; margin-bottom: 15px; }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.12);
	padding: 18px 0;
	font-size: 12px;
	color: #999;
	text-align: center;
}
.footer-bottom a { color: #bbb; }

/* WhatsApp/留言浮动按钮 */
.float-contact {
	position: fixed;
	right: 16px; bottom: 90px;
	z-index: 998;
	display: flex; flex-direction: column; gap: 10px;
}
.float-contact a {
	width: 48px; height: 48px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	color: #fff; font-size: 12px; font-weight: 600;
	box-shadow: 0 3px 10px rgba(0,0,0,.25);
}
.float-contact .f-msg { background: var(--nm-blue); }
.float-contact .f-tel { background: var(--nm-red); }

/* 回到顶部 */
#back-top {
	position: fixed; right: 20px; bottom: 30px;
	width: 42px; height: 42px;
	background: var(--nm-blue);
	color: #fff;
	border-radius: 4px;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer; opacity: 0; visibility: hidden;
	transition: all .3s; z-index: 998; border: 0;
}
#back-top.show { opacity: 1; visibility: visible; }

/* =====================================================
   内页通用
===================================================== */
.page-banner {
	background: var(--nm-blue) url('assets/img/banner.jpg') center/cover no-repeat;
	background-blend-mode: multiply;
	color: #fff;
	padding: 45px 0;
}
.page-banner h1 { font-size: 28px; }
.breadcrumb { font-size: 13px; margin-top: 6px; opacity: .85; }
.breadcrumb a { color: #fff; }

.content-area { padding: 50px 0; }
.entry-content p { margin-bottom: 14px; }
.entry-content h2, .entry-content h3 { color: var(--nm-blue); margin: 22px 0 10px; }
.entry-content img { border-radius: 3px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.entry-content table td, .entry-content table th {
	border: 1px solid var(--nm-border);
	padding: 10px 12px;
	font-size: 14px;
}

/* 文章列表 */
.post-list .post-item {
	border: 1px solid var(--nm-border);
	border-radius: 4px;
	margin-bottom: 25px;
	overflow: hidden;
	display: flex;
}
.post-list .post-item .thumb { width: 280px; flex-shrink: 0; }
.post-list .post-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list .post-item .info { padding: 22px; }
.post-list .post-item .date { font-size: 12px; color: #999; }
.post-list .post-item h2 { font-size: 18px; margin: 6px 0 10px; }
.post-list .post-item h2 a { color: var(--nm-text); }

/* 分页 */
.nm-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 35px; }
.nm-pagination .page-numbers {
	padding: 8px 14px;
	border: 1px solid var(--nm-border);
	border-radius: 3px;
	color: var(--nm-text);
	font-size: 14px;
}
.nm-pagination .current,
.nm-pagination .page-numbers:hover { background: var(--nm-blue); color: #fff; border-color: var(--nm-blue); }

/* =====================================================
   WooCommerce
===================================================== */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 25px; margin: 0 !important; }
.woocommerce ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	background: #fff;
	border: 1px solid var(--nm-border);
	border-radius: 4px;
	overflow: hidden;
	transition: transform .25s, box-shadow .25s;
	display: flex; flex-direction: column;
}
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.woocommerce ul.products li.product img { width: 100% !important; aspect-ratio: 1/1; object-fit: contain; background: #fff; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 15px !important;
	padding: 14px 16px 4px;
	color: var(--nm-text);
	line-height: 1.45;
}
.woocommerce ul.products li.product .price { padding: 0 16px 16px; color: var(--nm-red); }

/* 单产品页：还原原站版式 */
.single-product .product-main { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; margin-bottom: 45px; }
.single-product .woocommerce-product-gallery img { border: 1px solid var(--nm-border); border-radius: 4px; }
.single-product .product-title-wrap h1 { font-size: 26px; color: var(--nm-text); margin-bottom: 16px; }
.single-product .product-short-desc { color: var(--nm-text-light); margin-bottom: 20px; }
.product-attrs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.product-attrs .attr {
	background: var(--nm-gray);
	border-radius: 3px;
	padding: 10px 14px;
	font-size: 13px;
}
.product-attrs .attr b { color: var(--nm-blue); display: block; font-size: 12px; text-transform: uppercase; }
.single-product .cart .button, .single-product a.single_add_to_cart_button {
	background: var(--nm-red) !important;
	color: #fff !important;
	padding: 12px 40px !important;
	border-radius: 3px !important;
	font-size: 15px !important;
}

/* 隐藏 WooCommerce 默认购物车元素（询盘型网站） */
.single-product .cart, .woocommerce-Price-amount { display: none !important; }

/* ============ 平板端（≤1024px） ============ */
@media (max-width: 1024px) {
	.prod-grid { grid-template-columns: repeat(3, 1fr); }
	.woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
	.cert-grid { grid-template-columns: repeat(3, 1fr); }
	.footer-grid { grid-template-columns: repeat(2, 1fr); }
	.about-grid { grid-template-columns: 1fr; }
	.single-product .product-main { grid-template-columns: 1fr; }
	.num-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

/* ============ 平板/手机分界（≤860px）：移动菜单 ============ */
@media (max-width: 860px) {
	.menu-toggle { display: block; }
	.main-navigation { display: none; width: 100%; }
	.main-navigation.toggled { display: block; }
	.main-navigation ul { flex-direction: column; padding: 10px 0; }
	.main-navigation a { padding: 12px 16px; border-bottom: 1px solid var(--nm-border); }
	.main-navigation ul ul {
		display: block; position: static;
		box-shadow: none; min-width: 0;
		border-left: 2px solid var(--nm-blue-light);
		margin-left: 14px;
	}
	.main-navigation li:hover > ul { display: block; }
	.apps-grid, .news-grid { grid-template-columns: 1fr 1fr; }
	.cat-cols { grid-template-columns: 1fr; }
	.home-banner { min-height: 320px; }
	.post-list .post-item { flex-direction: column; }
	.post-list .post-item .thumb { width: 100%; }
}

/* ============ 手机端（≤600px） ============ */
@media (max-width: 600px) {
	.sec-title h2 { font-size: 24px; }
	.prod-grid, .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 13px !important; }
	.apps-grid, .news-grid { grid-template-columns: 1fr; }
	.cert-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr; }
	.wpcf7 form { grid-template-columns: 1fr; }
	.num-item .num { font-size: 30px; }
	.about-text h2 { font-size: 24px; }
	.top-bar .top-right .quote-btn { margin-left: 8px; padding: 3px 10px; }
	.home-banner .banner-search { padding: 20px; margin: 0 15px; }
	.home-banner h2 { font-size: 20px; }
	.product-attrs { grid-template-columns: 1fr; }
}

/* Elementor 兼容：给内容区足够宽度 */
body.elementor-page .content-area { padding: 0; }
.elementor-kit-container { max-width: var(--nm-container); }

/* 块编辑器对齐 */
.alignwide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100vw; margin-left: calc(50% - 50vw); width: 100vw; }
