/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "SimHei", sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.6;
  font-size: 14px;
}
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; border: 0; }
.clearfix::after { content: ''; display: table; clear: both; }

/* ===== Color Vars ===== */
:root {
  --red: #cf0000;
  --dark-red: #a80000;
  --gold: #d4a824;
  --dark: #222;
  --gray-bg: #f5f5f5;
  --border: #e5e5e5;
  --text: #333;
  --text-sec: #666;
  --text-light: #999;
  --white: #fff;
  --wrap: 1200px;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 15px; }

/* ===== Top Bar ===== */
.top-bar {
  background: #333;
  height: 36px;
  line-height: 36px;
  color: #aaa;
  font-size: 12px;
  overflow: hidden;
}
.top-bar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar .welcome { color: #aaa; }
.top-bar .phone-top { color: #fff; font-weight: bold; }

/* ===== Header ===== */
.header {
  background: #fff;
  border-bottom: 2px solid var(--red);
}
.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
}
.logo { display: flex; align-items: center; }
.logo img { height: 60px; }
.logo-placeholder {
  display: flex; align-items: center; gap: 10px;
}
.logo-icon {
  width: 60px; height: 60px;
  background: var(--red);
  color: #fff; font-weight: 900; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; letter-spacing: -1px;
}
.logo-text .cn { font-size: 26px; font-weight: bold; color: var(--red); letter-spacing: 6px; }
.logo-text .en { font-size: 11px; color: var(--text-light); letter-spacing: 2px; text-transform: uppercase; }
.header-phone { text-align: right; }
.header-phone .label { font-size: 12px; color: var(--text-light); }
.header-phone .num { font-size: 22px; color: var(--red); font-weight: bold; letter-spacing: 1px; }

/* ===== Main Nav ===== */
.main-nav {
  background: var(--red);
}
.main-nav ul {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
}
.main-nav > ul > li {
  position: relative;
  flex: 1;
  text-align: center;
}
.main-nav > ul > li > a {
  display: block;
  color: #fff;
  line-height: 50px;
  font-size: 15px;
  letter-spacing: 2px;
  transition: background 0.2s;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a {
  background: var(--dark-red);
}
/* Dropdown */
.main-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all 0.2s;
}
.main-nav > ul > li:hover .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.sub-menu a {
  display: block;
  padding: 10px 16px;
  color: #555;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
  text-align: center;
}
.sub-menu a:hover {
  background: #fef0f0;
  color: var(--red);
}

/* ===== Banner / Slider ===== */
.banner {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.banner img { width: 100%; display: block; }
.banner-slider {
  display: flex;
  transition: transform 0.5s ease;
}
.banner-slide {
  min-width: 100%;
}
.banner-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.banner-dots .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.3s;
}
.banner-dots .dot.active { background: #fff; }

/* ===== Section Titles ===== */
.section-header {
  text-align: center;
  padding: 40px 0 24px;
  position: relative;
}
.section-header img { margin: 0 auto; }
.section-header h2 {
  font-size: 24px; color: var(--text); letter-spacing: 4px;
  position: relative; display: inline-block;
}
.section-header h2::after {
  content: ''; display: block;
  width: 40px; height: 2px;
  background: var(--red);
  margin: 10px auto 0;
}

/* ===== Homepage News ===== */
.home-news { padding: 0 0 40px; background: #fff; }
.home-news .wrap { display: flex; gap: 30px; }
.news-left { flex: 0 0 48%; }
.news-left .featured-img {
  width: 100%; height: 240px;
  overflow: hidden; border-radius: 4px;
  background: #f0f0f0;
}
.news-left .featured-img img { width: 100%; height: 100%; object-fit: cover; }
.news-left h3 { font-size: 16px; margin: 14px 0 8px; color: var(--text); }
.news-left h3:hover { color: var(--red); }
.news-left p { font-size: 13px; color: var(--text-sec); line-height: 1.8; }
.news-left .more { display: inline-block; margin-top: 12px; color: var(--red); font-size: 13px; }
.news-right { flex: 1; }
.news-right .news-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
  display: flex; align-items: center; gap: 10px;
  transition: padding-left 0.2s;
}
.news-right .news-item:hover { padding-left: 6px; }
.news-right .news-item::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--red);
  flex-shrink: 0;
}
.news-right .news-item a { font-size: 14px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-right .news-item:hover a { color: var(--red); }

/* ===== Homepage Products ===== */
.home-products { background: var(--gray-bg); padding: 0 0 50px; }
.products-tabs {
  display: flex; justify-content: center; gap: 0; margin-bottom: 30px;
}
.products-tabs a {
  padding: 8px 24px; font-size: 14px; color: #666;
  border-bottom: 2px solid transparent;
}
.products-tabs a:hover,
.products-tabs a.active { color: var(--red); border-bottom-color: var(--red); }
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.product-card .img-wrap {
  height: 200px;
  display: flex; align-items: center; justify-content: center;
  background: #fafafa;
  padding: 10px;
  overflow: hidden;
}
.product-card .img-wrap img { max-height: 100%; width: auto; object-fit: contain; }
.product-card .info {
  padding: 14px; text-align: center;
  border-top: 1px solid #f0f0f0;
}
.product-card .info h4 { font-size: 14px; color: var(--text); }

/* ===== Category Boxes (Homepage) ===== */
.home-categories { background: #fff; padding: 0 0 50px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-box {
  position: relative;
  height: 160px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}
.cat-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.cat-box:hover img { transform: scale(1.06); }
.cat-box .mask {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s;
}
.cat-box:hover .mask { background: rgba(207,0,0,0.55); }
.cat-box .mask span { color: #fff; font-size: 18px; font-weight: bold; letter-spacing: 3px; }

/* ===== Footer Contact Bar ===== */
.footer-cta {
  background: var(--red);
  padding: 24px 0;
}
.footer-cta .wrap {
  display: flex; align-items: center; justify-content: space-between;
}
.footer-cta .text { color: #fff; }
.footer-cta .text h3 { font-size: 18px; letter-spacing: 2px; }
.footer-cta .text p { font-size: 13px; opacity: 0.85; }
.footer-cta .phone { color: #fff; font-size: 26px; font-weight: bold; letter-spacing: 1px; }

/* ===== Footer ===== */
.footer {
  background: #2a2a2a;
  padding: 40px 0 0;
  color: rgba(255,255,255,0.5);
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 24px;
  padding-bottom: 30px;
}
.footer-col h4 {
  color: #fff; font-size: 15px; margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
  letter-spacing: 2px;
}
.footer-col p, .footer-col li { font-size: 13px; line-height: 2; }
.footer-col li a { color: rgba(255,255,255,0.5); }
.footer-col li a:hover { color: #fff; }
.footer-col .contact-line { margin-bottom: 6px; }
.footer-qr {
  width: 90px; height: 90px;
  background: #fff; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #999; margin-top: 10px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 14px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* ===== Sub Page Layout ===== */
.page-banner {
  height: 200px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1010 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-banner h1 {
  color: #fff;
  font-size: 32px;
  letter-spacing: 6px;
}
.page-banner h1::after {
  content: ''; display: block;
  width: 50px; height: 3px;
  background: var(--red);
  margin: 12px auto 0;
}
.breadcrumb {
  background: #f8f8f8;
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--text-sec); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { margin: 0 6px; }

.sub-page {
  padding: 30px 0 50px;
}
.sub-page .wrap {
  display: flex; gap: 30px;
}
.sidebar {
  flex: 0 0 220px;
}
.sidebar-title {
  background: var(--red);
  color: #fff;
  padding: 14px 18px;
  font-size: 16px;
  letter-spacing: 2px;
  font-weight: bold;
}
.sidebar-menu { border: 1px solid var(--border); border-top: none; }
.sidebar-menu a {
  display: block;
  padding: 12px 18px;
  font-size: 14px;
  color: #555;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: #fef0f0;
  color: var(--red);
  padding-left: 24px;
}
.content-area {
  flex: 1;
  min-width: 0;
}
.content-area h2 {
  font-size: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--red);
  margin-bottom: 20px;
  letter-spacing: 2px;
}

/* ===== About Page ===== */
.about-content { line-height: 2; color: var(--text-sec); font-size: 14px; }
.about-content p { margin-bottom: 16px; text-indent: 2em; }

/* ===== Products List Page ===== */
.products-filter {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px;
}
.products-filter a {
  padding: 6px 18px; border: 1px solid var(--border);
  border-radius: 3px; font-size: 13px; color: #666;
}
.products-filter a:hover,
.products-filter a.active {
  background: var(--red); color: #fff; border-color: var(--red);
}
.products-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.prod-item {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.prod-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.prod-item .img {
  height: 200px;
  display: flex; align-items: center; justify-content: center;
  background: #fafafa; padding: 10px;
}
.prod-item .img img { max-height: 100%; object-fit: contain; }
.prod-item .name {
  padding: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--text);
  border-top: 1px solid #f0f0f0;
}

/* ===== News List Page ===== */
.news-list-page .news-entry {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 20px;
}
.news-list-page .news-entry .thumb {
  flex: 0 0 180px;
  height: 120px;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
}
.news-list-page .news-entry .thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.news-list-page .news-entry .info { flex: 1; }
.news-list-page .news-entry .info h3 { font-size: 16px; margin-bottom: 8px; }
.news-list-page .news-entry .info h3 a:hover { color: var(--red); }
.news-list-page .news-entry .info p {
  font-size: 13px; color: var(--text-sec); line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== Contact Page ===== */
.contact-info { line-height: 2.2; }
.contact-info .company { font-size: 20px; font-weight: bold; color: var(--text); margin-bottom: 16px; }
.contact-info .item { display: flex; gap: 10px; font-size: 14px; color: var(--text-sec); margin-bottom: 8px; }
.contact-info .item .label { color: var(--text); font-weight: 500; flex-shrink: 0; }
.contact-map {
  margin-top: 24px;
  height: 300px;
  background: #eee;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 14px;
}

/* ===== Message / Guestbook Page ===== */
.guestbook-form { max-width: 600px; }
.guestbook-form .form-group { margin-bottom: 16px; }
.guestbook-form label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.guestbook-form input,
.guestbook-form textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 3px;
  font-size: 14px; font-family: inherit;
  transition: border-color 0.2s;
}
.guestbook-form input:focus,
.guestbook-form textarea:focus { border-color: var(--red); outline: none; }
.guestbook-form textarea { height: 120px; resize: vertical; }
.guestbook-form .btn-submit {
  display: inline-block;
  background: var(--red); color: #fff;
  padding: 10px 36px; border: none;
  border-radius: 3px; font-size: 14px;
  cursor: pointer; letter-spacing: 2px;
  transition: background 0.2s;
}
.guestbook-form .btn-submit:hover { background: var(--dark-red); }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .header .wrap { flex-direction: column; height: auto; padding: 12px 15px; }
  .main-nav > ul { flex-wrap: wrap; }
  .main-nav > ul > li { flex: auto; }
  .home-news .wrap { flex-direction: column; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .sub-page .wrap { flex-direction: column; }
  .sidebar { flex: none; }
  .products-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .products-grid, .category-grid { grid-template-columns: 1fr; }
  .products-list { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-cta .wrap { flex-direction: column; text-align: center; gap: 10px; }
  .news-list-page .news-entry { flex-direction: column; }
  .news-list-page .news-entry .thumb { flex: none; height: 180px; }
}
