/* ============================================
   日用百货 B2B 独立站 - 样式文件
   Modern B2B Household Goods Website
   ============================================ */

/* --- 变量定义 --- */
:root {
  --primary: #004B8D;
  --primary-dark: #003366;
  --primary-light: #0078D4;
  --secondary: #0078D4;
  --secondary-light: #4AA3E0;
  --white: #ffffff;
  --gray-50: #fafaf8;
  --gray-100: #f5f5f2;
  --gray-200: #e8e8e4;
  --gray-300: #d1d1cb;
  --gray-500: #6b6b63;
  --gray-700: #3d3d36;
  --gray-900: #1a1a16;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-lg: 16px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --container: 1200px;
}

/* --- 基础样式 --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  color: var(--gray-700); background: var(--white); line-height: 1.6; overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1,h2,h3,h4,h5,h6 { color: var(--gray-900); font-weight: 700; line-height: 1.3; }

/* --- 容器 --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* --- 通用区块 --- */
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.bg-light { background: var(--gray-50); }
.bg-white { background: var(--white); }
.bg-dark { background: linear-gradient(135deg, #1a1a16 0%, #2d2d24 100%); color: var(--white); }
.text-center { text-align: center; }
.section-label {
  font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  color: var(--primary); margin-bottom: 10px;
}
.section-title {
  font-size: clamp(26px, 4vw, 38px); font-weight: 800;
  color: var(--gray-900); margin-bottom: 14px;
}
.section-subtitle {
  font-size: 16px; color: var(--gray-500); max-width: 600px; margin: 0 auto;
}

/* --- 网格布局 --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* --- 按钮 --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; border-radius: 50px; font-size: 14px;
  font-weight: 600; cursor: pointer; border: none; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,93,4,.35); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { background: var(--secondary-light); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { background: var(--white); color: var(--primary); border-color: var(--white); }
.btn-outline-dark { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline-dark:hover { background: var(--primary); color: var(--white); }

/* --- 头部导航 --- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200); transition: all var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 800; color: var(--gray-900);
}
.logo-icon {
  width: 42px; height: 42px; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 18px; font-weight: 900;
}
.logo span { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 16px; border-radius: var(--radius); font-size: 14px;
  font-weight: 600; color: var(--gray-700); transition: all var(--transition);
}
.nav a:hover, .nav a.active { background: var(--gray-100); color: var(--primary); }
.nav-cta {
  margin-left: 12px; padding: 10px 24px !important;
  background: var(--primary) !important; color: var(--white) !important;
  border-radius: 50px !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; }
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--gray-900); border-radius: 2px; }

/* --- 移动端导航 --- */
.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: var(--white); padding: 100px 24px 40px;
  flex-direction: column; gap: 4px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 14px 0; font-size: 17px; font-weight: 600; color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
}
.mobile-nav a:hover { color: var(--primary); }
.mobile-nav-close {
  position: absolute; top: 20px; right: 20px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gray-100); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 20px;
}

/* --- 轮播图 --- */
.hero-slider {
  position: relative; height: 100vh; min-height: 600px; overflow: hidden; margin-top: 72px;
}
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease;
  display: flex; align-items: center; justify-content: center;
  padding-top: 200px;
}
.hero-slide.active { opacity: 1; }
.hero-slide-1 { background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/banner1.jpg') center/cover no-repeat; }
.hero-slide-2 { background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/banner2.jpg') center/cover no-repeat; }
.hero-slide-3 { background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/banner3.jpg') center/cover no-repeat; }
.hero-content {
  position: relative; z-index: 2; color: var(--white); max-width: 650px;
  padding: 0 40px; text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.2); padding: 6px 16px; border-radius: 50px;
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); margin-bottom: 20px;
}
.hero h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 900; line-height: 1.15; margin-bottom: 18px; color: var(--white); }
.hero p { font-size: 17px; color: var(--white); line-height: 1.8; margin-bottom: 30px; max-width: 500px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-stats {
  display: flex; gap: 40px; margin-top: 50px; padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.2);
}
.hero-stat-number { font-size: 32px; font-weight: 900; color: var(--white); }
.hero-stat-label { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 4px; }

/* 轮播指示器 */
.slider-dots {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 10;
}
.slider-dot {
  width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.4);
  cursor: pointer; transition: all var(--transition);
}
.slider-dot.active { background: var(--white); width: 36px; border-radius: 6px; }

/* 轮播箭头 */
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition); z-index: 10;
  color: white; font-size: 20px;
}
.slider-arrow:hover { background: rgba(255,255,255,.3); }
.slider-arrow.prev { left: 30px; }
.slider-arrow.next { right: 30px; }

/* --- 产品分类 --- */
.category-strip {
  background: var(--white); padding: 0; border-bottom: 1px solid var(--gray-200);
}
.category-strip-wrapper {
  display: flex; align-items: center; position: relative;
}
.category-strip-inner {
  display: flex; overflow-x: auto; scrollbar-width: none; flex: 1;
}
.category-strip-inner::-webkit-scrollbar { display: none; }
.category-item {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 24px; border-right: 1px solid var(--gray-200);
  white-space: nowrap; transition: all var(--transition); cursor: pointer;
  flex-shrink: 0;
}
.category-item:hover { background: var(--gray-50); color: var(--primary); }
.category-item:last-child { border-right: none; }
.category-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(0,75,141,.1), rgba(0,75,141,.05));
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.category-item h4 { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.category-item:hover h4 { color: var(--primary); }
.category-item p { font-size: 12px; color: var(--gray-500); }
.category-arrow {
  width: 40px; height: 40px; border: none; background: var(--gray-100);
  border-radius: 50%; cursor: pointer; font-size: 20px; color: var(--gray-700);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0; margin: 0 8px;
}
.category-arrow:hover { background: var(--primary); color: var(--white); }

/* --- 产品卡片 --- */
.product-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--gray-200); transition: all var(--transition);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-image {
  height: 200px; background: linear-gradient(135deg, #fef6f0 0%, #fef3e8 100%);
  display: flex; align-items: center; justify-content: center; font-size: 60px; opacity: .7;
}
.product-body { padding: 20px; }
.product-category {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  color: var(--primary); margin-bottom: 6px;
}
.product-body h3 { font-size: 17px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
.product-body p { font-size: 13px; color: var(--gray-500); line-height: 1.6; margin-bottom: 14px; }
.product-link { font-size: 13px; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }
.product-link:hover { gap: 10px; }

/* --- 特色卡片 --- */
.feature-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 32px 26px; border: 1px solid var(--gray-200); transition: all var(--transition);
  text-align: center;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.feature-icon {
  width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.feature-card h3 { font-size: 18px; font-weight: 700; color: var(--gray-900); margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

/* --- 统计数据 --- */
.stats-bar { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item { text-align: center; padding: 40px 20px; border-right: 1px solid rgba(255,255,255,.2); }
.stat-item:last-child { border-right: none; }
.stat-number { font-size: 40px; font-weight: 900; color: var(--white); line-height: 1; }
.stat-label { font-size: 14px; color: rgba(255,255,255,.8); margin-top: 8px; }

/* --- 关于我们 --- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
}
.about-image-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: rgba(255,255,255,.4); gap: 12px;
}
.about-image-placeholder .big { font-size: 80px; }
.about-image-placeholder p { font-size: 16px; opacity: .8; }
.about-badge {
  position: absolute; bottom: 20px; left: 20px;
  background: var(--white); color: var(--primary); padding: 12px 20px;
  border-radius: var(--radius); font-size: 14px; font-weight: 700;
}
.about-list { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.about-list-item { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--gray-700); }
.about-list-item .check {
  width: 22px; height: 22px; border-radius: 50%; background: rgba(232,93,4,.12);
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  color: var(--primary); flex-shrink: 0; margin-top: 2px;
}

/* --- 新闻卡片 --- */
.news-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--gray-200); transition: all var(--transition);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-image {
  height: 180px; background: linear-gradient(135deg, #fef6f0, #fef3e8);
  display: flex; align-items: center; justify-content: center; font-size: 48px; opacity: .5;
}
.news-body { padding: 20px; }
.news-date { font-size: 12px; color: var(--gray-500); margin-bottom: 8px; }
.news-body h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; line-height: 1.4; }
.news-body h3:hover { color: var(--primary); }
.news-body p { font-size: 13px; color: var(--gray-500); line-height: 1.6; }

/* --- 客户见证 --- */
.testimonial-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 30px;
  border: 1px solid var(--gray-200); transition: all var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.testimonial-stars { color: #ffc940; font-size: 14px; margin-bottom: 14px; letter-spacing: 2px; }
.testimonial-text { font-size: 14px; color: var(--gray-700); line-height: 1.8; margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center; color: var(--white);
  font-size: 16px; font-weight: 700;
}
.testimonial-name { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.testimonial-role { font-size: 12px; color: var(--gray-500); }

/* --- 合作伙伴 --- */
.partner-logos {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
}
.partner-item {
  display: flex; align-items: center; justify-content: center;
  padding: 28px 16px; border: 1px solid var(--gray-200); margin: -0.5px;
  background: var(--white); transition: all var(--transition);
}
.partner-item:hover { background: var(--gray-50); transform: scale(1.03); z-index: 1; position: relative; }
.partner-name {
  font-size: 15px; font-weight: 700; color: var(--gray-300); transition: color var(--transition);
}
.partner-item:hover .partner-name { color: var(--primary); }

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--gray-200); padding: 20px 0;
}
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 700; color: var(--gray-900); cursor: pointer;
  gap: 16px;
}
.faq-question:hover { color: var(--primary); }
.faq-toggle { font-size: 18px; color: var(--primary); transition: transform var(--transition); }
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .4s ease;
  font-size: 14px; color: var(--gray-500); line-height: 1.8; margin-top: 0;
}
.faq-item.open .faq-answer { max-height: 500px; margin-top: 12px; }

/* --- 联系表单 --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; }
.contact-info h3 { font-size: 20px; font-weight: 800; color: var(--gray-900); margin-bottom: 20px; }
.contact-detail {
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px;
  padding-bottom: 22px; border-bottom: 1px solid var(--gray-200);
}
.contact-detail:last-of-type { border-bottom: none; }
.contact-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(232,93,4,.1); display: flex;
  align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.contact-detail h4 { font-size: 14px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.contact-detail p { font-size: 14px; color: var(--gray-500); }
.contact-form { background: var(--gray-50); padding: 36px; border-radius: var(--radius-lg); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--gray-300);
  border-radius: var(--radius); font-size: 14px; transition: border-color var(--transition); background: var(--white);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,93,4,.1);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* --- 页面头部 --- */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 140px 0 70px; text-align: center; color: var(--white); margin-top: 72px; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}
.page-hero h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 900; margin-bottom: 12px; position: relative; }
.page-hero p { font-size: 16px; color: rgba(255,255,255,.8); max-width: 500px; margin: 0 auto; position: relative; }

/* --- CTA区块 --- */
.cta { background: linear-gradient(135deg, var(--primary) 0%, #f4845f 100%); }
.cta-inner { text-align: center; max-width: 600px; margin: 0 auto; }
.cta-inner h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 900; color: var(--white); margin-bottom: 14px; }
.cta-inner p { font-size: 16px; color: rgba(255,255,255,.9); margin-bottom: 28px; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --- 页脚 --- */
.footer { background: var(--gray-900); color: rgba(255,255,255,.6); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 60px 0 40px; }
.footer-logo { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 800; color: var(--white); margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.8; max-width: 280px; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all var(--transition);
}
.footer-social a:hover { background: var(--primary); }
.footer-col h4 { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 18px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; transition: all var(--transition); }
.footer-col a:hover { color: var(--white); padding-left: 4px; }
.footer-bottom { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a:hover { color: var(--white); }

/* --- 动画 --- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity .7s ease, transform .7s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity .7s ease, transform .7s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* --- 响应式 --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-logos { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.2); }
  .partner-logos { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .slider-arrow { display: none; }
}
