/* ============ medgmp.cn 全站样式（1:1 还原原站 Astra + WooCommerce + Beaver Builder） ============ */
:root {
  --green: #8bc34a;
  --green-hover: #67c100;
  --price: #282828;
  --text: #3a3a3a;
  --text-light: #6b6b6b;
  --bg: #fff;
  --bg-soft: #f9f9f9;
  --border: #e5e5e5;
  --heading: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  --body: 'Open Sans', 'Segoe UI', Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); color: var(--text); line-height: 1.7; background: var(--bg); font-size: 15px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-hover); }
h1, h2, h3, h4, h5, h6 { font-family: var(--heading); color: #1a1a1a; line-height: 1.4; font-weight: 700; }
h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- 头部（还原 Astra Header Builder） ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; min-height: 80px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: #1a1a1a; }
.logo:hover { color: #1a1a1a; }
.logo img { max-height: 60px; width: auto; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.search-toggle { background: none; border: 0; cursor: pointer; font-size: 18px; color: #555; padding: 6px; }
.search-form { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.search-form input { border: 0; padding: 8px 12px; width: 200px; font-size: 14px; outline: none; }
.search-form button { border: 0; background: var(--green); color: #fff; cursor: pointer; padding: 8px 14px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 24px; cursor: pointer; color: #555; }

/* 扁平导航（还原原站：Home / All Products / NEWS / About / Contact） */
.nav { margin-left: 40px; }
.menu { display: flex; list-style: none; gap: 0; }
.menu > li { position: relative; }
.menu > li > a { display: block; padding: 10px 18px; font-weight: 600; font-size: 15px; color: #333; }
.menu > li > a:hover { color: var(--green-hover); }
.menu > li.current > a { color: var(--green); }

/* ---------- 按钮（还原 WooCommerce pill 按钮） ---------- */
.btn { display: inline-block; padding: 15px 30px; border-radius: 60px; font-weight: 700; font-size: 15px; transition: all .2s; cursor: pointer; border: 0; line-height: 1; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-hover); color: #fff; }
.btn-outline { border: 2px solid var(--green); color: var(--green); background: transparent; }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-white { background: #fff; color: var(--green); }
.btn-white:hover { background: var(--green-hover); color: #fff; }

/* ---------- 闪存消息 ---------- */
.flash { margin-top: 14px; padding: 12px 16px; border-radius: 4px; font-size: 14px; }
.flash-error { background: #fdecea; color: #b71c1c; }
.flash-success { background: #edf7e2; color: #33691e; }

/* ---------- Hero（还原 Beaver Builder row：背景图 + 遮罩 + 左右分栏） ---------- */
.hero { position: relative; background: #9ccf7d; background-size: cover; background-position: center; color: #fff; padding: 80px 0; }
.hero::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.hero .container { position: relative; z-index: 2; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-left { text-align: center; }
.hero-left img { max-width: 100%; margin: 0 auto; }
.hero-right { text-align: left; }
.hero-right .hero-leaf { max-width: 80px; margin-bottom: 16px; }
.hero-right h5 { color: #fff; font-size: 16px; font-weight: 600; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.hero-right h1 { color: #fff; font-size: 40px; margin-bottom: 16px; line-height: 1.2; }
.hero-right p { font-size: 16px; margin-bottom: 28px; opacity: .95; line-height: 1.7; }

/* ---------- 通用 section ---------- */
.section { padding: 60px 0; }
.section.alt { background: var(--bg-soft); }
.section-title { text-align: center; font-size: 30px; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--text-light); margin-bottom: 40px; }
.section-leaf { display: block; margin: 0 auto 10px; max-width: 75px; }

/* ---------- 特性（还原 UABB Info List：无卡片，h4 + 描述） ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.feature { text-align: center; padding: 10px; }
.feature h4 { font-size: 15px; margin-bottom: 10px; color: #1a1a1a; text-transform: uppercase; letter-spacing: .5px; }
.feature p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ---------- 产品卡片（还原 WooCommerce product grid） ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s; text-align: left; }
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.product-card .thumb { aspect-ratio: 1; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .cat-label { font-size: 12px; color: var(--green); font-weight: 600; text-transform: capitalize; }
.product-card h3 { font-size: 15px; font-family: var(--body); font-weight: 600; line-height: 1.45; }
.product-card h3 a { color: #333; }
.product-card h3 a:hover { color: var(--green-hover); }
.product-card .price { color: var(--price); font-weight: 700; font-size: 16px; }

/* ---------- 分类卡片 ---------- */
.category-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.category-card { position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 4/3; background: #35623a; display: flex; align-items: flex-end; }
.category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: transform .3s; }
.category-card:hover img { transform: scale(1.05); }
.category-card .cap { position: relative; z-index: 2; width: 100%; padding: 18px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; }
.category-card .cap strong { font-size: 17px; display: block; }
.category-card .cap span { font-size: 12.5px; opacity: .9; }

/* ---------- 文章卡片 ---------- */
.post-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.post-card { background: #fff; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; transition: box-shadow .2s; }
.post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.post-card .thumb { aspect-ratio: 16/10; background: var(--bg-soft); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 14px 16px; }
.post-card .meta { font-size: 12px; color: #999; margin-bottom: 6px; }
.post-card h3 { font-size: 15px; font-family: var(--body); font-weight: 600; line-height: 1.5; }
.post-card h3 a { color: #333; }
.post-card p { font-size: 13px; color: var(--text-light); margin-top: 8px; }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 18px 0; font-size: 13px; color: #999; }
.breadcrumb a { color: #999; }
.breadcrumb a:hover { color: var(--green-hover); }

/* ---------- 产品详情 ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 30px 0; }
.product-detail .main-image { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; aspect-ratio: 1; background: var(--bg-soft); }
.product-detail .main-image img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery-thumbs img { width: 72px; height: 72px; object-fit: cover; border: 2px solid transparent; border-radius: 4px; cursor: pointer; }
.gallery-thumbs img.active { border-color: var(--green); }
.pd-info h1 { font-size: 26px; margin-bottom: 12px; }
.pd-price { font-size: 26px; color: var(--price); font-weight: 700; margin-bottom: 16px; }
.pd-short { color: var(--text-light); margin-bottom: 20px; }
.pd-form { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.pd-form input[type=number] { width: 80px; padding: 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 15px; }
.pd-meta { font-size: 13px; color: #888; border-top: 1px dashed var(--border); padding-top: 14px; }
.pd-meta span { display: inline-block; margin-right: 18px; }
.product-tabs { margin: 40px 0; }
.tab-content { border: 1px solid var(--border); border-radius: 0 0 4px 4px; padding: 28px; border-top: 0; }
.tab-content h2 { font-size: 20px; margin-bottom: 14px; }
.tab-content p, .tab-content li { color: #444; }
.tab-content img { margin: 12px 0; border-radius: 4px; }
.related h2 { text-align: center; font-size: 24px; margin-bottom: 28px; }

/* ---------- 新闻列表 / 详情 ---------- */
.news-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; padding-bottom: 60px; }
.article-list { display: flex; flex-direction: column; gap: 26px; }
.article-item { display: grid; grid-template-columns: 260px 1fr; gap: 22px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.article-item .thumb { background: var(--bg-soft); min-height: 170px; }
.article-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-item .body { padding: 18px 20px 18px 0; }
.article-item .meta { font-size: 12px; color: #999; margin-bottom: 6px; }
.article-item h2 { font-size: 19px; margin-bottom: 8px; }
.article-item h2 a { color: #333; }
.article-item h2 a:hover { color: var(--green-hover); }
.article-item p { font-size: 13.5px; color: var(--text-light); }

.article-full { max-width: 800px; margin: 0 auto; }
.article-full .head { text-align: center; margin: 30px 0; }
.article-full h1 { font-size: 30px; margin-bottom: 12px; }
.article-full .meta { color: #999; font-size: 13px; }
.article-full .cover { border-radius: 4px; margin-bottom: 28px; }
.article-content { font-size: 15.5px; }
.article-content p { margin-bottom: 16px; }
.article-content h2, .article-content h3 { margin: 28px 0 12px; }
.article-content ul, .article-content ol { margin: 0 0 16px 24px; }
.article-content img { border-radius: 4px; margin: 16px 0; }
.article-content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.article-content td, .article-content th { border: 1px solid var(--border); padding: 8px 12px; }

/* ---------- 侧栏 ---------- */
.sidebar .widget { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 20px; margin-bottom: 22px; }
.sidebar .widget h3 { font-size: 16px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--green); }
.sidebar ul { list-style: none; }
.sidebar li { padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar .rc .rc-content { color: #777; font-size: 12.5px; }

/* ---------- 评论 ---------- */
.comments { max-width: 800px; margin: 40px auto; }
.comment { border: 1px solid var(--border); border-radius: 4px; padding: 14px 18px; margin-bottom: 14px; }
.comment.reply { margin-left: 42px; }
.comment .who { font-weight: 700; font-size: 13.5px; }
.comment .when { color: #999; font-size: 12px; margin-left: 8px; }
.comment .body { font-size: 14px; margin-top: 6px; }
.comment-form textarea { width: 100%; min-height: 110px; padding: 12px; border: 1px solid var(--border); border-radius: 4px; font-family: var(--body); font-size: 14px; margin: 12px 0; }

/* ---------- 询盘表单 ---------- */
.inquiry-wrap { max-width: 760px; margin: 0 auto; padding: 40px 0 70px; }
.inquiry-wrap h1 { text-align: center; font-size: 28px; margin-bottom: 8px; }
.inquiry-wrap .lead { text-align: center; color: var(--text-light); margin-bottom: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: #444; }
.form-field input, .form-field select, .form-field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; font-family: var(--body); }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--green); border-color: transparent; }
.form-field .error-msg { color: #b71c1c; font-size: 12px; margin-top: 4px; }
.form-field.full { grid-column: 1 / -1; }
.hp-field { position: absolute; left: -9999px; }
.contact-block { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px 0 40px; text-align: center; }
.contact-block .item { background: var(--bg-soft); border-radius: 4px; padding: 22px 14px; }
.contact-block .item .ico { font-size: 26px; margin-bottom: 6px; }
.contact-block .item a { color: #333; font-weight: 600; }

/* ---------- 搜索页 ---------- */
.search-head { padding: 40px 0 10px; }
.search-head h1 { font-size: 26px; }
.result-item { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.result-item .thumb { width: 120px; height: 90px; flex: none; border-radius: 4px; overflow: hidden; background: var(--bg-soft); }
.result-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-item h3 { font-size: 17px; margin-bottom: 6px; }
.result-item .type { font-size: 11px; background: var(--green); color: #fff; border-radius: 4px; padding: 2px 8px; vertical-align: middle; margin-right: 8px; }

/* ---------- 分页（还原 WooCommerce pagination） ---------- */
.page-numbers { display: flex; gap: 6px; list-style: none; justify-content: center; margin: 40px 0; flex-wrap: wrap; }
.page-numbers a, .page-numbers .current { min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--green); border-radius: 4px; font-size: 14px; color: #555; background: #fff; }
.page-numbers .current { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.page-numbers a:hover { background: var(--green); color: #fff; }
.page-numbers .dots { border: 0; }

/* ---------- 合作伙伴（还原原站 Partners and brands 行） ---------- */
.partners-row { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; padding: 30px 0; }
.partners-row h6 { font-size: 14px; color: #555; white-space: nowrap; }
.partners-row .partner-logos { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.partners-row .partner-logos img { max-height: 60px; width: auto; opacity: .8; transition: opacity .2s; }
.partners-row .partner-logos img:hover { opacity: 1; }

/* ---------- 页脚（还原原站 Astra footer：简洁版权 + 社交图标） ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 24px 20px; gap: 20px; flex-wrap: wrap; }
.footer-copyright { font-size: 14px; color: #555; }
.footer-copyright a { color: #555; }
.social { display: flex; gap: 12px; }
.social a { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #555; transition: color .2s; }
.social a:hover { color: var(--green); }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 90px 0; }
.nf h1 { font-size: 72px; color: var(--green); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .features, .product-grid, .category-cards, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail, .news-layout { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-left { display: none; }
  .nav { position: fixed; top: 80px; left: 0; right: 0; background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.12); display: none; max-height: calc(100vh - 80px); overflow: auto; margin-left: 0; }
  .nav.open { display: block; }
  .menu { flex-direction: column; padding: 10px 0; }
  .menu > li > a { padding: 12px 20px; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
  .search-form input { width: 140px; }
  .contact-block { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 560px) {
  .features, .product-grid, .category-cards, .post-grid { grid-template-columns: 1fr; }
  .article-item { grid-template-columns: 1fr; }
  .article-item .body { padding: 0 18px 18px; }
  .hero-right h1 { font-size: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .search-form { display: none; }
}
