/* ============ Dongguan Meiyi Plastic Product Co., Ltd. ============ */
:root {
  --primary: #e75845;
  --primary-dark: #d14433;
  --primary-light: #fff1f1;
  --accent: #ffa8a8;
  --text: #333333;
  --text-light: #989898;
  --text-dark: #2e2e2e;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --border: #f0e8e8;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Source Han Sans", "Microsoft YaHei", Geneva, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============ 顶部栏 ============ */
.topbar {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
}
.topbar a { color: #fff; }
.topbar a:hover { opacity: 0.85; }
.topbar .sep { margin: 0 10px; opacity: 0.5; }

/* ============ 头部 ============ */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo img { height: 58px; width: auto; }
.logo .company-name { font-size: 19px; font-weight: 700; color: var(--text-dark); line-height: 1.25; }
.logo .company-name small { display: block; font-size: 12px; font-weight: 400; color: var(--text-light); }

.nav ul { display: flex; gap: 6px; }
.nav a {
  display: block;
  padding: 10px 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: 4px;
  transition: all 0.2s;
}
.nav a:hover,
.nav a.active {
  background: var(--primary);
  color: #fff;
}

/* ============ Banner ============ */
.banner { position: relative; overflow: hidden; }
.banner img { width: 100%; height: 460px; object-fit: cover; display: block; }
.banner .slide { display: none; }
.banner .slide.active { display: block; }
.banner .dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.banner .dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.2s;
}
.banner .dots span.active { background: var(--primary); width: 28px; border-radius: 6px; }

/* ============ 板块标题 ============ */
.section { padding: 60px 0; }
.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.section-title h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--primary);
}
.section-title p { color: var(--text-light); margin-top: 8px; font-size: 15px; }

/* ============ 分类标签 ============ */
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.tabs button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 9px 24px;
  font-size: 15px;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.2s;
}
.tabs button:hover { border-color: var(--primary); color: var(--primary); }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============ 产品网格 ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.25s;
}
.product-card:hover {
  box-shadow: 0 8px 24px rgba(231,88,69,0.15);
  transform: translateY(-4px);
  border-color: var(--accent);
}
.product-card .thumb {
  height: 220px;
  overflow: hidden;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .info { padding: 16px 18px; }
.product-card .info h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-card .info .cat {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 12px;
  border-radius: 20px;
}
.product-card .info .date {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-light);
}

/* ============ 产品详情 ============ */
.product-detail { padding: 50px 0; }
.product-detail .wrap { display: flex; gap: 40px; }
.product-detail .pic { flex: 0 0 420px; }
.product-detail .pic img { width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.product-detail .meta { flex: 1; }
.product-detail .meta h1 { font-size: 26px; color: var(--text-dark); line-height: 1.4; }
.product-detail .meta .cat { display: inline-block; margin: 14px 0; color: var(--primary); background: var(--primary-light); padding: 4px 14px; border-radius: 20px; font-size: 13px; }
.product-detail .meta .desc { color: var(--text); white-space: pre-line; margin-top: 10px; }
.product-detail .meta .date { color: var(--text-light); font-size: 13px; margin-top: 20px; }

/* ============ 关于我们 / 新闻 ============ */
.content-page { padding: 50px 0; }
.content-page h1 { font-size: 30px; color: var(--text-dark); margin-bottom: 30px; text-align: center; }
.about-text { max-width: 860px; margin: 0 auto; font-size: 16px; color: var(--text); }
.about-text p { margin-bottom: 18px; }
.about-text h3 { color: var(--primary); margin: 24px 0 12px; font-size: 20px; }

.news-list { max-width: 860px; margin: 0 auto; }
.news-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.news-item .date-box {
  flex: 0 0 70px;
  text-align: center;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  padding: 8px 0;
  height: fit-content;
}
.news-item .date-box .d { font-size: 22px; font-weight: 700; line-height: 1; }
.news-item .date-box .m { font-size: 12px; }
.news-item .body h3 { font-size: 17px; color: var(--text-dark); margin-bottom: 6px; }
.news-item .body h3:hover { color: var(--primary); }
.news-item .body p { color: var(--text-light); font-size: 14px; }

/* ============ 联系我们 ============ */
.contact-grid { display: flex; gap: 40px; }
.contact-info { flex: 0 0 380px; }
.contact-info .item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
}
.contact-info .item .ico {
  width: 42px; height: 42px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.contact-info .item .label { font-size: 13px; color: var(--text-light); }
.contact-info .item .val { font-size: 15px; color: var(--text-dark); font-weight: 500; word-break: break-all; }
.contact-info .qr { text-align: center; margin-top: 20px; }
.contact-info .qr img { width: 160px; margin: 0 auto 8px; border: 1px solid var(--border); border-radius: 8px; }
.contact-info .qr p { color: var(--text-light); font-size: 13px; }

.contact-form { flex: 1; }
.contact-form h3 { font-size: 22px; color: var(--text-dark); margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-dark); }
.form-group label .req { color: var(--primary); }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { min-height: 140px; resize: vertical; }
.btn-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 13px 44px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--primary-dark); }
.form-msg { margin-top: 14px; font-size: 14px; display: none; }
.form-msg.success { color: #2e8b57; display: block; }
.form-msg.error { color: #d14433; display: block; }

/* ============ 工厂视频占位 ============ */
.video-block { background: var(--bg-soft); }
.video-placeholder {
  max-width: 860px;
  margin: 0 auto;
  height: 420px;
  background: #f3f0f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 16px;
}

/* ============ 页脚 ============ */
.footer {
  background: #2e2e2e;
  color: #bbb;
  padding: 50px 0 30px;
  font-size: 14px;
}
.footer-inner { display: flex; gap: 40px; flex-wrap: wrap; }
.footer .col { flex: 1; min-width: 220px; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer .col p, .footer .col a { display: block; margin-bottom: 8px; color: #bbb; line-height: 1.6; }
.footer .col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid #444;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: #888;
  font-size: 13px;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; }
  .nav ul { flex-wrap: wrap; justify-content: center; }
  .contact-grid, .product-detail .wrap { flex-direction: column; }
  .contact-info { flex: 1; }
  .banner img { height: 240px; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}
