/* ===== 渝悦乳业集团官网 - 样式表 ===== */
/* Design: 1440px canvas, 1200px content grid, dairy fresh green theme */

:root {
  --primary: #3D8B5A;
  --primary-dark: #2E6B45;
  --primary-light: #5BA878;
  --primary-rgb: 61, 139, 90;
  --footer-bg: #22312C;
  --bg-light: #F7F5EE;
  --white: #FFFFFF;
  --divider: #E8E4DA;
  --border: #D5CFC2;
  --text-main: #2C332E;
  --text-body: #5D665F;
  --text-gray: #A8A292;
  --text-muted: #8A8478;
  --container: 1200px;
  --gutter: 120px;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
.container { width: var(--container); margin: 0 auto; padding: 0; }

/* ===== 1. 顶部导航栏 ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: 80px; background: var(--white);
  border-bottom: 1px solid var(--divider); z-index: 1000;
  transition: height .3s ease, box-shadow .3s ease;
}
.header.scrolled { height: 64px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { height: 40px; width: auto; max-width: 160px; cursor: pointer; }
.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu a { font-size: 16px; font-weight: 400; color: var(--text-main); position: relative; padding: 6px 0; transition: color .2s; }
.nav-menu a:hover { color: var(--primary); }
.nav-menu a.active { font-weight: 600; color: var(--primary); }
.nav-menu a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--primary); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.search-box { position: relative; width: 190px; height: 36px; border: 1px solid var(--border); border-radius: 18px; display: flex; align-items: center; padding: 0 14px; transition: border-color .2s; }
.search-box:focus-within { border-color: var(--primary); }
.search-box input { border: none; outline: none; flex: 1; min-width: 0; font-size: 13px; background: transparent; color: var(--text-main); }
.search-box input::placeholder { color: var(--text-gray); }
.search-box svg { width: 16px; height: 16px; color: var(--text-gray); flex-shrink: 0; }
.search-submit { border: 0; background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.search-submit:hover svg { color: var(--primary); }
.search-results { position: absolute; top: calc(100% + 10px); right: 0; width: 360px; max-height: 420px; overflow-y: auto; padding: 6px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.14); z-index: 1200; }
.search-results[hidden] { display: none; }
.search-result { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; padding: 12px; border: 0; border-radius: 5px; background: transparent; color: var(--text-main); font-family: inherit; text-align: left; cursor: pointer; }
.search-result:hover, .search-result:focus-visible { background: var(--bg-light); outline: none; }
.search-result-category { grid-row: 1 / 3; padding-top: 3px; color: var(--primary); font-size: 11px; white-space: nowrap; }
.search-result strong { font-size: 14px; line-height: 1.5; font-weight: 600; }
.search-result-excerpt { overflow: hidden; color: var(--text-body); font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.search-empty { padding: 22px 16px; color: var(--text-body); font-size: 13px; text-align: center; }
.search-highlight { animation: search-highlight 1.8s ease-out; }
@keyframes search-highlight { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); } 25%, 70% { box-shadow: 0 0 0 5px rgba(var(--primary-rgb), .35); } }
.fav-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s; }
.fav-btn:hover { border-color: var(--primary); color: var(--primary); }
.fav-btn svg { width: 16px; height: 16px; color: var(--text-body); }
.fav-btn:hover svg { color: var(--primary); }

/* ===== 2. 首屏 Banner ===== */
.hero { position: relative; margin-top: 80px; height: 680px; overflow: hidden; background: #000; }
.hero video { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 100%; min-height: 100%; width: auto; height: auto; object-fit: cover; }

/* ===== Section Common ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-light); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-tag { display: inline-block; font-size: 12px; letter-spacing: 3px; color: var(--primary); text-transform: uppercase; margin-bottom: 14px; }
.section-title { font-size: 32px; font-weight: 700; color: var(--text-main); margin-bottom: 12px; }
.section-subtitle { font-size: 15px; color: var(--text-body); line-height: 1.8; }

/* ===== 3. 品牌溯源 ===== */
.trace { padding: 80px 0; }
.trace-wrap { display: flex; align-items: center; gap: 64px; }
.trace-img { flex: 0 0 640px; width: 640px; height: auto; aspect-ratio: 16 / 9; background: var(--bg-light); border-radius: 4px; overflow: hidden; }
.trace-img img { width: 100%; height: 100%; object-fit: contain; }
.trace-text { flex: 1; }
.trace-text h2 { font-size: 32px; font-weight: 700; margin: 12px 0 20px; color: var(--text-main); }
.trace-text p { font-size: 15px; line-height: 1.9; color: var(--text-body); margin-bottom: 16px; }
.logo-meaning { border-left: 2px solid var(--primary); padding: 6px 0 6px 18px; margin: 24px 0; }
.logo-meaning p { font-size: 14px; line-height: 1.9; color: var(--text-body); margin: 0; }
.trace-pills { display: flex; gap: 16px; margin-top: 28px; }
.pill { height: 40px; padding: 9px 20px; border: 1px solid var(--border); border-radius: 20px; font-size: 14px; letter-spacing: 2px; color: var(--text-main); display: inline-flex; align-items: center; background: var(--white); }

/* ===== 4. 产品中心 ===== */
.products { padding: 80px 0; }
.product-tabs { display: flex; justify-content: center; gap: 40px; margin-bottom: 40px; }
.product-tab { font-size: 15px; color: var(--text-body); cursor: pointer; padding: 8px 0; border-bottom: 2px solid transparent; transition: all .2s; }
.product-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.product-grid { display: flex; gap: 20px; }
.product-collection { display: none; background: var(--bg-light); border: 1px solid var(--border); border-radius: 4px; padding: 28px; }
.product-collection.is-active { display: flex; justify-content: center; }
.product-collection img { display: block; width: auto; height: auto; max-width: 100%; max-height: 620px; }
.product-grid[hidden] { display: none; }
.product-card { flex: 0 0 224px; background: var(--white); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; transition: box-shadow .3s, transform .3s; }
.product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-4px); }
.product-card .thumb { width: 224px; height: 280px; background: var(--bg-light); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-info { padding: 16px; }
.product-info h4 { font-size: 16px; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
.product-info .spec { font-size: 12px; color: var(--text-gray); margin-bottom: 12px; }
.product-info .detail { font-size: 12px; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.product-info .detail svg { width: 12px; height: 12px; }
.products-footer { text-align: center; margin-top: 48px; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 32px; border: 1px solid var(--primary); border-radius: 22px; color: var(--primary); font-size: 14px; background: transparent; cursor: pointer; transition: all .2s; }
.btn-outline:hover { background: var(--primary); color: var(--white); }

/* ===== 5. 品质管控 ===== */
.quality { padding: 80px 0; background: var(--bg-light); }
.quality-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 64px; }
.q-step { min-width: 0; position: relative; }
.q-step .num { font-size: 12px; letter-spacing: 2px; color: var(--primary); margin-bottom: 10px; font-weight: 600; }
.q-step .step-thumb { width: 100%; aspect-ratio: 16 / 9; margin: 12px 0 18px; background: var(--white); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.q-step .step-thumb img { width: 100%; height: 100%; object-fit: contain; }
.q-step h4 { font-size: 20px; font-weight: 700; color: var(--text-main); margin-bottom: 10px; }
.q-step p { font-size: 13px; line-height: 1.7; color: var(--text-body); }
.q-step:not(:last-child)::after { content: ""; position: absolute; top: 8px; right: -24px; width: 24px; height: 2px; background: rgba(var(--primary-rgb), .45); }
.quality-certs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cert-card { min-width: 0; background: var(--white); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.cert-card .thumb { width: calc(100% - 32px); height: auto; aspect-ratio: 16 / 9; margin: 16px; background: var(--bg-light); border-radius: 2px; overflow: hidden; }
.cert-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.cert-body { padding: 0 16px 16px; }
.cert-body h5 { font-size: 15px; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
.cert-body p { font-size: 12px; color: var(--text-gray); line-height: 1.6; }

/* ===== 6. 品牌动态 ===== */
.news { padding: 80px 0; }
.news-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.news-card { flex: 0 0 384px; background: var(--white); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; transition: box-shadow .3s, transform .3s; cursor: pointer; }
.news-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-4px); }
.news-card .thumb { width: 384px; height: auto; aspect-ratio: 4 / 3; overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s; }
.news-card:hover .thumb img { transform: scale(1.05); }
.news-body { padding: 20px; }
.news-tag { display: inline-block; font-size: 11px; color: var(--primary); margin-bottom: 10px; font-weight: 600; }
.news-body h4 { font-size: 16px; line-height: 1.6; color: var(--text-main); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-date { font-size: 12px; color: var(--text-gray); }
.news-more { text-align: center; margin-top: 48px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.news-more .more-text { font-size: 18px; color: var(--text-main); font-weight: 500; }
.news-more .more-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
.news-more .more-btn:hover { background: var(--primary-dark); }
.news-more .more-btn svg { width: 16px; height: 16px; }

/* ===== 7. 合作联系 ===== */
.contact { padding: 80px 0; background: var(--bg-light); }
.contact-wrap { display: flex; gap: 56px; align-items: flex-start; }
.contact-left { flex: 0 0 720px; }
.contact-map { display: block; position: relative; width: 720px; height: 360px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 28px; background: #F2EFE8; cursor: pointer; }
.contact-map svg.map-svg { display: block; width: 100%; height: 100%; }
.contact-map .map-hint { position: absolute; right: 12px; bottom: 12px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.94); font-size: 12px; color: var(--text-body); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.contact-map:hover .map-hint { color: var(--primary); border-color: var(--primary); }
.contact-info { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: 28px; }
.contact-row { display: flex; align-items: flex-start; margin-bottom: 16px; font-size: 14px; }
.contact-row:last-child { margin-bottom: 0; }
.contact-row .label { flex: 0 0 44px; color: var(--text-muted); line-height: 1.5; }
.contact-row .value { color: var(--text-main); line-height: 1.5; }
.contact-qrcodes { display: flex; gap: 18px; margin-top: 20px; }
.qr-item { text-align: center; }
.qr-item .qr { width: 104px; height: 104px; background: var(--white); border: 1px solid var(--border); border-radius: 3px; display: flex; align-items: center; justify-content: center; padding: 5px; margin-bottom: 8px; }
.qr-item .qr canvas { display: block; width: 100%; height: 100%; }
.qr-item span { font-size: 11px; color: var(--text-body); }
.contact-right { flex: 0 0 380px; }
.contact-form { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: 28px; }
.contact-form h3 { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--text-main); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-body); margin-bottom: 6px; }
.form-group input, .form-group textarea { width: 100%; height: 44px; border: 1px solid var(--border); border-radius: 4px; padding: 13px 16px; font-size: 13px; color: var(--text-main); font-family: inherit; outline: none; transition: border-color .2s; }
.form-group textarea { height: 104px; resize: none; line-height: 1.6; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-radio { display: flex; gap: 24px; margin-bottom: 20px; }
.form-radio label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-main); cursor: pointer; }
.form-radio input[type="radio"] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.btn-submit { width: 100%; height: 44px; padding: 0 40px; background: var(--primary); color: var(--white); border: none; border-radius: 22px; font-size: 15px; cursor: pointer; transition: background .2s; }
.btn-submit:hover { background: var(--primary-dark); }

/* ===== 8. 页脚 ===== */
.footer { background: var(--footer-bg); padding: 56px 0 28px; color: #B8C4BE; }
.footer-grid { display: flex; gap: 40px; margin-bottom: 40px; }
.footer-col { flex: 1; }
.footer-col.brand { flex: 1.5; }
.footer-col h5 { font-size: 15px; color: var(--white); margin-bottom: 18px; font-weight: 600; }
.footer-col ul li { font-size: 13px; line-height: 2; color: #B8C4BE; transition: color .2s; cursor: pointer; }
.footer-col ul li:hover { color: var(--white); }
.footer-brand p { font-size: 13px; line-height: 1.9; margin-bottom: 16px; color: #B8C4BE; }
.footer-certs { display: flex; gap: 12px; }
.footer-certs .cert { width: 74px; height: 40px; border: 1px solid rgba(255,255,255,.2); border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: rgba(255,255,255,.7); text-align: center; line-height: 1.3; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; text-align: center; font-size: 12px; color: #8A9690; }
.footer-bottom a { color: #8A9690; margin: 0 8px; }
.footer-bottom a:hover { color: var(--white); }

/* ===== Responsive ===== */
@media (max-width: 1280px) {
  .container { width: 96%; padding: 0 2%; }
  .trace-img { flex: 0 0 520px; width: 520px; }
  .product-grid { flex-wrap: wrap; justify-content: center; }
  .news-grid { flex-wrap: wrap; justify-content: center; }
  .quality-steps, .quality-certs { gap: 20px; }
  .contact-left { flex: 0 0 60%; }
  .contact-map { width: 100%; }
}
@media (max-width: 1024px) {
  .hero { height: 540px; }
  .trace-wrap { flex-direction: column; }
  .trace-img { width: 100%; height: auto; flex: none; }
  .quality-steps { gap: 20px; }
  .contact-wrap { flex-direction: column; }
  .contact-left, .contact-right { flex: none; width: 100%; }
  .footer-grid { flex-wrap: wrap; }
  .footer-col { flex: 0 0 45%; }
}
@media (max-width: 768px) {
  .header { height: 64px; }
  .header .container { flex-wrap: wrap; }
  .nav-menu { display: none; }
  .search-box { width: 140px; }
  .search-results { width: 300px; max-width: calc(100vw - 32px); }
  .hero { height: 420px; margin-top: 64px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 26px; }
  .product-card { flex: 0 0 calc(50% - 10px); }
  .product-card .thumb { width: 100%; height: auto; aspect-ratio: 4/5; }
  .product-collection { padding: 12px; }
  .product-collection img { width: 100%; max-height: none; }
  .news-card { flex: 0 0 100%; }
  .news-card .thumb { width: 100%; height: auto; aspect-ratio: 16/9; }
  .quality-steps, .quality-certs { grid-template-columns: 1fr; }
  .q-step:not(:last-child)::after { display: none; }
  .footer-col { flex: 0 0 100%; }
  .trace-pills { flex-wrap: wrap; }
}
