/* ============================================================
   方大远成钢板 — 汽车板簧制造商
   广州市铭宇汽车配件有限公司
   B2B 外贸独立站
   ============================================================ */

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

:root {
  --red:       #c41230;
  --red-dark:  #a00e28;
  --blue:      #1a3a5c;
  --gold:      #d4a017;
  --white:     #ffffff;
  --bg:        #f2f2f2;
  --gray:      #666;
  --light:     #999;
  --border:    #e0e0e0;
  --dark:      #222;
  --radius:    6px;
  --shadow:    0 2px 8px rgba(0,0,0,.06);
  --max-w:     1200px;
  --font:      'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }

/* ========== TOP BAR ========== */
.top-bar {
  background: #f7f7f7; border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--light); line-height: 36px;
}
.top-bar .container { display: flex; justify-content: space-between; }
.top-bar .lang-switch a { margin-left: 10px; color: var(--gray); }
.top-bar .lang-switch a.active { color: var(--red); font-weight: 600; }

/* ========== HEADER ========== */
.site-header {
  background: var(--white); border-bottom: 2px solid var(--red);
  position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; height: 80px;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.logo-img { width: 60px; height: 60px; border-radius: 8px; background: var(--red); display: flex; align-items: center; justify-content: center; color: var(--white); font-size: 24px; font-weight: 700; flex-shrink: 0; }
.header-info h1 { font-size: 20px; color: var(--red); font-weight: 700; line-height: 1.2; }
.header-info .sub { font-size: 12px; color: var(--gray); }
.header-info .brand { font-size: 13px; color: var(--blue); font-weight: 600; }

.nav-links { display: flex; list-style: none; gap: 4px; }
.nav-links a {
  display: block; padding: 10px 20px; font-size: 15px; font-weight: 600;
  color: var(--dark); border-radius: 4px; transition: all .2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--red); color: var(--white); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 26px; height: 2px; background: var(--dark); border-radius: 2px; }

@media (max-width: 860px) {
  .hamburger { display: flex; }
  .nav-links { display: none; position: absolute; top: 80px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 12px 16px; box-shadow: 0 8px 16px rgba(0,0,0,.1); border-top: 2px solid var(--red); }
  .nav-links.open { display: flex; }
  .header-info h1 { font-size: 16px; }
}

/* ========== BANNER ========== */
.banner {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, var(--red-dark) 100%);
  color: var(--white); padding: 80px 0; position: relative; overflow: hidden; text-align: center;
}
.banner::after { content: ''; position: absolute; top: -100px; right: -100px; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,.03); pointer-events: none; }
.banner .container { position: relative; z-index: 1; }
.banner h2 { font-size: 38px; font-weight: 700; margin-bottom: 12px; }
.banner h2 span { color: #ff6b6b; }
.banner .en { font-size: 14px; color: #aaa; margin-bottom: 20px; letter-spacing: 1px; }
.banner p  { font-size: 16px; color: #ccc; max-width: 700px; margin: 0 auto 32px; }
.banner .btn-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .banner h2 { font-size: 26px; }
  .banner p  { font-size: 14px; }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block; padding: 12px 30px; border-radius: var(--radius);
  font-weight: 600; font-size: 14px; cursor: pointer; border: none;
  transition: all .25s; text-align: center; line-height: 1.4;
}
.btn-red    { background: var(--red); color: var(--white); }
.btn-red:hover    { background: var(--red-dark); color: var(--white); }
.btn-outline { border: 2px solid var(--white); color: var(--white); background: transparent; }
.btn-outline:hover { background: var(--white); color: var(--red); }
.btn-border { border: 1px solid var(--red); color: var(--red); background: var(--white); }
.btn-border:hover { background: var(--red); color: var(--white); }

/* ========== SECTION COMMON ========== */
.section { padding: 50px 0; }
.section-white { background: var(--white); }

.section-title {
  margin-bottom: 36px; padding-bottom: 16px;
  border-bottom: 2px solid var(--border); position: relative;
}
.section-title::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 80px; height: 2px; background: var(--red);
}
.section-title h2 { font-size: 22px; color: var(--dark); }
.section-title .en { font-size: 12px; color: var(--light); margin-left: 10px; font-weight: 400; }

/* ========== 3-COLUMN INTRO ========== */
.intro-grid {
  display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 20px;
}
.intro-card {
  background: var(--white); padding: 24px; border-radius: var(--radius);
  box-shadow: var(--shadow); border-top: 3px solid var(--red);
}
.intro-card h3 { font-size: 16px; color: var(--red); margin-bottom: 12px; }
.intro-card p { font-size: 13px; color: var(--gray); line-height: 1.8; }
.intro-card .contact-line { font-size: 13px; color: var(--dark); margin-bottom: 6px; }
.intro-card .contact-line strong { color: var(--red); }

.intro-slider {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); position: relative; min-height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.intro-slider img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.intro-slider .placeholder {
  color: var(--light); font-size: 14px; text-align: center; padding: 20px;
}

@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; }
}

/* ========== PRODUCT GRID (HOME) ========== */
.prod-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 16px;
}
.prod-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all .25s; text-align: center;
}
.prod-card:hover { border-color: var(--red); box-shadow: 0 4px 16px rgba(196,18,48,.1); transform: translateY(-2px); }
.prod-card .img-box {
  height: 180px; background: #fafafa; display: flex; align-items: center;
  justify-content: center; border-bottom: 1px solid var(--border); overflow: hidden;
}
.prod-card .img-box img { width: 100%; height: 100%; object-fit: cover; }
.prod-card .img-box .no-img {
  color: var(--light); font-size: 13px;
}
.prod-card .info { padding: 14px; }
.prod-card .info h4 { font-size: 14px; color: var(--dark); margin-bottom: 4px; }
.prod-card .info .cate { font-size: 12px; color: var(--red); }

/* ========== PRODUCT LIST PAGE ========== */
.prod-list { display: flex; flex-direction: column; gap: 16px; }
.prod-row {
  display: flex; gap: 20px; background: var(--white); padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: all .2s; align-items: center;
}
.prod-row:hover { border-color: var(--red); }
.prod-row .thumb { width: 160px; height: 120px; flex-shrink: 0; background: #fafafa; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.prod-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-row .detail { flex: 1; }
.prod-row .detail h4 { font-size: 16px; color: var(--dark); margin-bottom: 6px; }
.prod-row .detail p  { font-size: 13px; color: var(--gray); line-height: 1.7; }
.prod-row .detail .tags { margin-top: 8px; }
.prod-row .detail .tags span {
  display: inline-block; padding: 2px 10px; background: #fff0f0;
  color: var(--red); font-size: 12px; border-radius: 20px; margin-right: 6px;
}

/* ========== SIDEBAR LAYOUT ========== */
.page-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; margin-top: 24px; }
.sidebar { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sidebar .side-title {
  background: var(--red); color: var(--white); padding: 14px 18px; font-size: 16px; font-weight: 600;
}
.sidebar .side-menu { list-style: none; padding: 8px 0; }
.sidebar .side-menu li { }
.sidebar .side-menu a {
  display: block; padding: 10px 18px; font-size: 14px; color: var(--dark);
  border-left: 3px solid transparent; transition: .15s;
}
.sidebar .side-menu a:hover, .sidebar .side-menu a.active {
  background: #fff5f5; color: var(--red); border-left-color: var(--red);
}

@media (max-width: 768px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ========== PRODUCT DETAIL ========== */
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.detail-gallery { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.detail-gallery img { width: 100%; min-height: 350px; object-fit: cover; }
.detail-info { }
.detail-info h2 { font-size: 22px; color: var(--dark); margin-bottom: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--red); }
.detail-info .price { font-size: 24px; color: var(--red); font-weight: 700; margin-bottom: 16px; }
.detail-info .desc { font-size: 14px; color: var(--gray); line-height: 1.8; margin-bottom: 16px; }

.info-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.info-table th, .info-table td { padding: 10px 14px; font-size: 13px; border: 1px solid var(--border); }
.info-table th { background: #fafafa; color: var(--dark); width: 110px; text-align: right; font-weight: 600; }
.info-table td { color: var(--gray); }

@media (max-width: 768px) {
  .detail-layout { grid-template-columns: 1fr; }
}

/* ========== ABOUT PAGE ========== */
.about-content { background: var(--white); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.about-content h3 { font-size: 18px; color: var(--red); margin-bottom: 10px; padding-left: 12px; border-left: 3px solid var(--red); }
.about-content p { font-size: 14px; color: var(--gray); line-height: 1.9; margin-bottom: 16px; text-indent: 2em; }
.about-content img { border-radius: var(--radius); margin: 16px 0; }

/* ========== FACTORY GALLERY ========== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px;
}
.gallery-grid .item {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); cursor: pointer; transition: .2s;
}
.gallery-grid .item:hover { border-color: var(--red); }
.gallery-grid .item img { width: 100%; height: 180px; object-fit: cover; }
.gallery-grid .item p { padding: 8px 12px; font-size: 13px; color: var(--gray); text-align: center; }

/* ========== CONTACT PAGE ========== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-box {
  background: var(--white); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow);
}
.contact-box h3 { font-size: 18px; color: var(--red); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--red); }
.contact-box .info-line { font-size: 14px; color: var(--dark); margin-bottom: 12px; display: flex; gap: 10px; }
.contact-box .info-line strong { color: var(--red); min-width: 60px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--dark); font-weight: 600; margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 13px; font-family: var(--font); transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(196,18,48,.08); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-status { margin-top: 10px; padding: 10px; border-radius: 4px; font-size: 13px; display: none; }
.form-status.success { display: block; background: #e8f5e9; color: #2e7d32; }
.form-status.error   { display: block; background: #ffebee; color: #c62828; }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ========== CTA BAR ========== */
.cta-bar {
  background: var(--red); color: var(--white); padding: 30px 0; text-align: center;
}
.cta-bar h3 { font-size: 20px; margin-bottom: 6px; }
.cta-bar p  { font-size: 13px; opacity: .85; margin-bottom: 16px; }
.cta-bar .btn-white {
  background: var(--white); color: var(--red); padding: 12px 36px;
  border-radius: 30px; font-weight: 700; font-size: 15px;
  display: inline-block;
}
.cta-bar .btn-white:hover { background: #ffe0e0; }

/* ========== FOOTER ========== */
.site-footer {
  background: #1a1a1a; color: #999; padding: 40px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 30px; margin-bottom: 28px; }
.footer-grid h4 { color: var(--white); font-size: 15px; margin-bottom: 10px; }
.footer-grid p, .footer-grid a { font-size: 13px; color: #999; line-height: 2; }
.footer-grid a:hover { color: var(--red); }
.footer-bottom { border-top: 1px solid #333; padding-top: 16px; text-align: center; font-size: 12px; color: #666; }

/* ========== WHATSAPP FLOAT ========== */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  width: 52px; height: 52px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.4); transition: transform .25s;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* ========== LIGHTBOX ========== */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 300; align-items: center; justify-content: center; cursor: pointer; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 4px; }
.lightbox .close-btn { position: absolute; top: 20px; right: 30px; font-size: 40px; color: #fff; cursor: pointer; background: none; border: none; line-height: 1; }

/* ========== BREADCRUMB ========== */
.breadcrumb { font-size: 13px; color: var(--light); padding: 16px 0; }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--red); }

/* ========== STATS ========== */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.stat-box { background: var(--white); padding: 24px 16px; text-align: center; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 3px solid var(--red); }
.stat-box .num { font-size: 32px; color: var(--red); font-weight: 800; }
.stat-box .label { font-size: 13px; color: var(--gray); margin-top: 6px; }

@media (max-width: 640px) {
  .stats-row { grid-template-columns: repeat(2,1fr); }
}

/* ========== PAGE BANNER ========== */
.page-banner { background: linear-gradient(135deg, var(--red-dark), var(--red)); color: var(--white); padding: 40px 0; }
.page-banner h2 { font-size: 24px; }
