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

html {
-webkit-tap-highlight-color: transparent;
scroll-behavior: smooth;
scroll-padding-top: 85px;
}

body {
font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
background-color: #fafcfb;
color: #1e293b;
line-height: 1.5;
overflow-x: hidden;
}

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

.container {
width: 100%;
max-width: 1280px;
margin-left: auto;
margin-right: auto;
padding-left: clamp(1rem, 5vw, 2rem);
padding-right: clamp(1rem, 5vw, 2rem);
}

/* 导航栏样式 */
.navbar {
background-color: #ffffff;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
position: sticky;
top: 0;
z-index: 1000;
padding: 12px 0;
}
.nav-flex {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
}
.logo h1 {
font-size: clamp(1.4rem, 6vw, 2rem);
font-weight: 800;
letter-spacing: -0.02em;
background: linear-gradient(135deg, #1a4c3b, #c4451c);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
line-height: 1.2;
}
.logo span {
font-size: 0.7rem;
font-weight: 600;
color: #c2410c;
background: #fff1ed;
display: inline-block;
padding: 2px 10px;
border-radius: 40px;
margin-top: 6px;
}
.nav-links {
display: flex;
flex-wrap: wrap;
gap: clamp(0.6rem, 3vw, 1.5rem);
list-style: none;
align-items: center;
}
.nav-links > li {
position: relative;
}

.nav-links a {
text-decoration: none;
font-weight: 600;
font-size: 0.85rem;
white-space: nowrap;
background-color: #2c5f4a;
color: white;
padding: 6px 16px;
border-radius: 40px;
display: inline-flex;
align-items: center;
gap: 6px;
transition: all 0.2s ease;
}
.nav-links a:hover {
background-color: #c2410c;
transform: translateY(-2px);
}
.nav-links .dropdown-trigger {
background:#c2410c;
}
.contact-btn {
background-color: #c2410c;
color: white;
padding: 6px 18px;
border-radius: 40px;
text-decoration: none;
font-weight: 600;
font-size: 0.85rem;
transition: all 0.2s;
display: inline-flex;
align-items: center;
gap: 8px;
white-space: nowrap;
}
.contact-btn:hover {
background-color: #9a3412;
transform: translateY(-2px);
}

/* ========== 下拉菜单【优化版 - 解决鼠标丢失】 ========== */
.nav-item-dropdown {
position: relative;
}
.dropdown-menu {
visibility: hidden;
opacity: 0;
position: absolute;
top: calc(100%);
left: 0;
margin-top: 0;
background: #ffffff;
border-radius: 16px;
box-shadow: 0 8px 24px rgba(0,0,0,0.1);
min-width: 200px;
padding: 10px 0;
transition: visibility 0s linear 0.25s, opacity 0.22s ease;
z-index: 999;
pointer-events: none;
}
/* 透明缓冲区，充当鼠标移动桥梁，消除空隙死区 */
.nav-item-dropdown::after {
content: "";
position: absolute;
width: 100%;
height: 12px;
left: 0;
top: 100%;
z-index: 998;
}
.dropdown-menu.open {
visibility: visible;
opacity: 1;
transition-delay: 0s;
pointer-events: auto;
}
/* PC端hover激活菜单 */
@media (min-width:769px) {
.nav-item-dropdown:hover .dropdown-menu {
visibility: visible;
opacity: 1;
transition-delay: 0s;
pointer-events: auto;
}
}
.dropdown-menu li {
list-style: none;
}
.dropdown-menu a {
background: transparent;
color: #1e293b;
border-radius: 0;
padding: 10px 20px;
width: 100%;
display: flex;
}
.dropdown-menu a:hover {
background-color: #f7ede6;
color: #c2410c;
transform: none;
}

/* 页面头部banner */
.page-banner {
background: linear-gradient(115deg, #ffffff 20%, #f2f4f0 100%);
padding: clamp(2rem, 8vw, 3.5rem) 0;
text-align: center;
}
.page-banner h1 {
font-size: clamp(1.8rem, 6vw, 2.8rem);
color: #1e3a2f;
margin-bottom: 0.8rem;
font-weight: 800;
}
.page-banner p {
max-width: 700px;
margin: 0 auto;
color:#2d3e3a;
font-size: clamp(0.95rem,3vw,1.05rem);
}

/* 产品卡片区域 */
.product-list {
padding: clamp(3rem, 8vw, 5rem) 0;
}
.product-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 2rem;
}
.product-card {
background:#fff;
border-radius:32px;
overflow:hidden;
border:1px solid #e2ede7;
transition:0.25s;
}
.product-card:hover {
transform: translateY(-6px);
box-shadow:0 20px 30px -10px rgba(0,0,0,0.12);
}
.product-img-box {
height:220px;
background:#eef2f5;
display:flex;
align-items:center;
justify-content:center;
cursor: pointer;
padding: 12px;
}
.product-img-box img {
max-width:100%;
max-height:100%;
width:auto;
height:auto;
object-fit:contain;
transition: transform 0.3s;
}
.product-img-box:hover img {
transform: scale(1.03);
}
.product-info {
padding:1.5rem;
}
.product-info h3 {
font-size:1.2rem;
margin-bottom:0.6rem;
font-weight:700;
}
.product-info p {
color:#475569;
font-size:0.9rem;
margin-bottom:1rem;
}
.product-info a {
color:#c2410c;
font-weight:700;
text-decoration:none;
display:inline-flex;
align-items:center;
gap:6px;
}

/* ========== 弹窗样式【重点修改图片左上对齐】 ========== */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.75);
z-index: 9999;
display: none;
align-items: center;
justify-content: center;
padding: 1rem;
}
.modal-overlay.active {
display: flex;
}
.modal-box {
background: #fff;
border-radius: 24px;
max-width: 900px;
width: 100%;
max-height: 90vh;
overflow-y: auto;
display: grid;
grid-template-columns: 1fr 1fr;
position: relative;
}
@media (max-width:768px){
.modal-box {
grid-template-columns: 1fr;
}
}
/* 核心修改：左上对齐，不再居中 */
.modal-img-wrap {
background-color: #f3f4f6;
display: flex;
align-items: flex-start;
justify-content: flex-start;
padding: 1.5rem;
overflow: auto;
}
.modal-img-wrap img {
max-width: 100%;
max-height: 70vh;
width: auto;
height: auto;
object-fit: contain;
cursor: zoom-in;
}
.modal-close {
position: absolute;
top: 1rem;
right: 1rem;
width: 36px;
height:36px;
border-radius:50%;
background:#fff;
border:none;
font-size:18px;
cursor:pointer;
display:flex;
align-items:center;
justify-content:center;
z-index: 2;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
/* 增大弹窗文字区域内边距，解决文字贴边问题 */
.modal-content-wrap {
padding: 2.2rem 2.2rem 2.5rem;
}
.modal-content-wrap h2 {
margin-bottom: 1.2rem;
color:#1e293b;
line-height:1.35;
}
.modal-content-wrap .desc-text {
color:#475569;
line-height:1.8;
margin-bottom:1.8rem;
text-align: justify;
hyphens: auto;
white-space: pre-line; /* 关键：识别换行符号自动换行 */
}
/* 按钮样式 */
.btn-primary {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 12px 28px;
border-radius: 60px;
font-weight: 700;
text-decoration: none;
transition: all 0.2s ease;
font-size: 0.9rem;
cursor: pointer;
background-color: #2c5f4a;
color: white;
border: none;
}
.btn-primary:hover {
background-color: #1a4c3b;
}

/* ========== 图片全屏预览（白色背景） ========== */
.image-preview-overlay {
position: fixed;
inset: 0;
background: rgba(255,255,255,0.98);
z-index: 10000;
display: none;
align-items: center;
justify-content: center;
padding: 20px;
}
.image-preview-overlay.active {
display: flex;
}
.image-preview-overlay img {
max-width:90%;
max-height:90vh;
object-fit:contain;
background:#ffffff;
box-shadow: 0 0 25px rgba(0,0,0,0.08);
cursor: zoom-out;
}
.preview-close {
position:fixed;
top:20px;
right:30px;
color:#1e293b;
font-size:32px;
cursor:pointer;
z-index:10001;
}

/* 页脚样式 */
.footer {
background-color: #0e1f1a;
color: #cbdcd2;
padding: 3rem 0 1.5rem;
}
.footer-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
gap: 2rem;
margin-bottom: 2.5rem;
}
.footer-col h4 {
color: #f7ede4;
margin-bottom: 1.2rem;
font-size: 1.1rem;
}
.footer-col ul {
list-style: none;
}
.footer-col li, .footer-col p {
margin-bottom: 10px;
font-size: 0.85rem;
}
.footer-col a {
color: #cbdcd2;
text-decoration: none;
transition: 0.2s;
}
.footer-col a:hover {
color: #dd884b;
}
.social-icons i {
font-size: 1.3rem;
margin-right: 18px;
transition: 0.2s;
cursor: pointer;
}
.social-icons i:hover {
color: #dd7a3a;
transform: translateY(-2px);
}
.copyright {
text-align: center;
padding-top: 2rem;
border-top: 1px solid #2c463b;
font-size: 0.75rem;
}

/* 移动端基础布局 */
@media (max-width: 768px) {
.nav-flex {
flex-direction: column;
text-align: center;
}
.nav-links {
justify-content: center;
}
.contact-btn {
margin-top: 6px;
}
html {
scroll-padding-top: 130px;
}
/* 移动端弹窗额外加宽内边距 */
.modal-content-wrap {
padding: 1.8rem 1.5rem;
}
}