/* 产品服务页 - 两行两列协调版 */ .product-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; } /* Banner 区域保持不变 */ .product-banner { height: 280px; position: relative; overflow: hidden; margin-bottom: 60px; background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(images/product-banner.jpg) center/cover no-repeat; } body.night-mode .product-banner { background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url(images/product-banner-night.jpg) center/cover no-repeat; } .product-banner-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #fff; } .product-banner-text h1 { font-size: 36px; margin-bottom: 16px; letter-spacing: 3px; font-weight: 700; } .product-banner-text p { font-size: 20px; opacity: 0.9; } /* 核心:两行两列网格布局,整体居中、间距优雅 */ .product-card-wrapper { display: grid; grid-template-columns: repeat(2, 1fr); /* 固定两列 */ gap: 40px 30px; /* 上下间距 40px,左右间距 30px */ margin-bottom: 50px; max-width: 1100px; /* 限制最大宽度,避免过宽 */ margin-left: auto; margin-right: auto; } /* 卡片整体:圆角更大、阴影柔和、hover 提升层次感 */ .product-card-item { background: #ffffff; border-radius: 20px; /* 更大的圆角,更现代 */ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); /* 柔和阴影 */ overflow: hidden; transition: all 0.3s ease; } body.night-mode .product-card-item { background-color: #2C3036; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); } /* hover 效果:轻微上浮 + 阴影加深 */ .product-card-item:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(22, 93, 255, 0.1); } body.night-mode .product-card-item:hover { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); } /* 图片容器:固定高度、图片覆盖更饱满 */ .product-card-img-box { height: 220px; /* 固定图片高度,更统一 */ overflow: hidden; } .product-card-img-box img { width: 100%; height: 100%; object-fit: cover; /* 保证图片不拉伸 */ transition: transform 0.5s ease; } .product-card-item:hover .product-card-img-box img { transform: scale(1.05); /* 轻微缩放,增强动感 */ } /* 内容区域:文字排版更舒适、间距合理 */ .product-card-content { padding: 24px 20px; /* 上下内边距 24px,左右 20px */ text-align: center; } /* 标题:加粗、间距适中 */ .product-card-title { font-size: 20px; color: #1d2129; margin-bottom: 8px; font-weight: 600; letter-spacing: 0.5px; } body.night-mode .product-card-title { color: #ffffff; } /* 描述:灰色、行高舒适 */ .product-card-desc { font-size: 14px; color: #6e7681; /* 更柔和的灰色 */ margin-bottom: 20px; line-height: 1.6; } body.night-mode .product-card-desc { color: #b0b8c1; } /* 标签:如果保留,浅蓝背景更柔和 */ .product-card-tag { display: inline-block; padding: 5px 14px; background-color: #e8f0ff; color: #165dff; border-radius: 20px; font-size: 12px; margin-bottom: 18px; } body.night-mode .product-card-tag { background-color: #1e293b; color: #60a5fa; } /* 按钮:圆角更大、 padding 舒适、 hover 颜色更协调 */ .product-card-link { display: inline-block; padding: 10px 22px; background-color: #165dff; color: #ffffff; border-radius: 10px; /* 大圆角,更现代 */ font-size: 14px; text-decoration: none; transition: all 0.3s ease; border: none; cursor: pointer; } .product-card-link:hover { background-color: #0d47a1; /* 更深的蓝色 */ transform: translateY(-2px); } /* 分页导航:居中、间距舒适 */ .product-page-nav { text-align: center; padding: 20px 0 40px; } /* 分页按钮:圆角、 padding 协调 */ .kun-page-link { display: inline-block; padding: 10px 18px; margin: 0 6px; border-radius: 8px; background: #ffffff; color: #4e5969; border: none; cursor: pointer; transition: all 0.2s ease; font-size: 14px; text-decoration: none; } body.night-mode .kun-page-link { background-color: #2C3036; color: #E5E6EB; } .kun-page-link.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; } .kun-page-link.active { background-color: #165dff; color: #ffffff; } .kun-page-link:hover:not(.disabled):not(.active) { background-color: #f0f7ff; color: #165dff; } .product-page-nav span { display: inline-block; padding: 10px 10px; margin: 0 6px; color: #4e5969; font-size: 14px; } body.night-mode .product-page-nav span { color: #E5E6EB; } /* 移动端适配:单列、间距缩小 */ @media (max-width: 768px) { .product-banner { height: 200px; margin-bottom: 40px; } .product-banner-text h1 { font-size: 28px; } .product-banner-text p { font-size: 16px; } .product-card-wrapper { grid-template-columns: 1fr; /* 移动端单列 */ gap: 25px; /* 缩小间距 */ margin-bottom: 30px; } .product-card-img-box { height: 180px; } .product-card-content { padding: 20px 16px; } .kun-page-link { padding: 8px 14px; margin: 0 4px; } }