/* ============================================================
   Suzhou Maili Electrical Appliance Co., Ltd.
   Global stylesheet — responsive, mobile-first
   ============================================================ */
:root {
  --primary: #0b3c6e;
  --primary-dark: #082c52;
  --accent: #f39c12;
  --text: #333;
  --text-light: #666;
  --bg-light: #f5f7fa;
  --white: #fff;
  --border: #e2e6ea;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
  --max-width: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

ul, ol { padding-left: 1.4em; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: 8px 16px; z-index: 999;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .1);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo img { height: 52px; width: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 10px 16px;
  font-weight: 600; font-size: 15px; color: var(--text);
  border-radius: 6px; transition: all .2s;
}
.main-nav a:hover,
.main-nav a.active { color: var(--primary); background: var(--bg-light); }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; width: 26px; height: 3px; margin: 5px 0;
  background: var(--primary); border-radius: 2px; transition: .3s;
}

/* ---------- Hero / banner ---------- */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff;
}
.hero img.hero-bg {
  width: 100%; height: 420px; object-fit: cover; opacity: .55;
}
.hero-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 20px;
}
.hero-content h1 {
  font-size: clamp(28px, 5vw, 46px); margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.hero-content p { font-size: clamp(15px, 2vw, 20px); max-width: 760px; }

.page-banner {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff; text-align: center; padding: 48px 20px;
}
.page-banner h1 { font-size: clamp(26px, 4vw, 38px); }
.page-banner p { color: #cfe0f2; max-width: 720px; margin: 8px auto 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 30px; border-radius: 40px;
  font-weight: 700; font-size: 15px; transition: all .25s; border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #d68910; color: #fff; }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); }

/* ---------- Sections ---------- */
section { padding: 60px 0; }
.section-alt { background: var(--bg-light); }
.section-title {
  text-align: center; font-size: clamp(24px, 3.4vw, 34px);
  color: var(--primary); margin-bottom: 10px;
}
.section-sub {
  text-align: center; color: var(--text-light); max-width: 760px;
  margin: 0 auto 40px;
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .25s, box-shadow .25s; display: block; color: inherit;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 20px; }
.card-body h3 { font-size: 18px; color: var(--primary); margin-bottom: 8px; }
.card-body p { font-size: 14px; color: var(--text-light); }

.feature-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.feature-item h3 { color: var(--primary); font-size: 17px; margin-bottom: 8px; }
.feature-item p, .feature-item li { font-size: 14px; color: var(--text-light); }
.feature-item ul { margin-top: 8px; }

.about-flex { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat { background: var(--white); border-radius: var(--radius); padding: 26px 12px; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 34px; color: var(--accent); }
.stat span { font-size: 14px; color: var(--text-light); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin: 20px 0; }
table.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.spec-table th, .spec-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.spec-table thead th { background: var(--primary); color: #fff; }
.spec-table tbody tr:nth-child(even) { background: var(--bg-light); }
.spec-table tbody th { background: #eaf1f8; color: var(--primary); width: 220px; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 460px 1fr; gap: 40px; align-items: start; }
.product-detail img.product-photo {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-light);
}
.product-detail h1 { color: var(--primary); font-size: clamp(22px, 3vw, 30px); margin-bottom: 14px; }
.product-detail .lead { color: var(--text-light); margin-bottom: 16px; }
.content-block h2 { color: var(--primary); font-size: 22px; margin: 34px 0 12px; padding-left: 12px; border-left: 4px solid var(--accent); }
.content-block h3 { color: var(--primary); font-size: 17px; margin: 22px 0 8px; }
.content-block p { margin-bottom: 12px; }
.content-block ul, .content-block ol { margin-bottom: 14px; }
.content-block li { margin-bottom: 6px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 14px 0 0; font-size: 13.5px; color: var(--text-light); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #aaa; }

/* ---------- FAQ accordion ---------- */
.faq-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
}
.faq-item h2 { margin: 0; }
.faq-item h2 button {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 18px 20px; font-size: 16.5px; font-weight: 700; color: var(--primary);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item h2 button::after { content: "+"; font-size: 22px; color: var(--accent); flex-shrink: 0; }
.faq-item.open h2 button::after { content: "−"; }
.faq-item .faq-answer { display: none; padding: 0 20px 18px; color: var(--text); }
.faq-item.open .faq-answer { display: block; }

/* ---------- Certificates ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.cert-grid figure {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center;
}
.cert-grid img { margin: 0 auto; border: 1px solid var(--border); }
.cert-grid figcaption { margin-top: 12px; font-weight: 700; color: var(--primary); font-size: 15px; }

/* ---------- Contact ---------- */
.contact-flex { display: grid; grid-template-columns: 1fr 1.3fr; gap: 44px; }
.contact-info h3 { color: var(--primary); margin: 18px 0 6px; font-size: 16px; }
.contact-info p { color: var(--text-light); font-size: 15px; }
.contact-form {
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-field label .req { color: #c0392b; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 15px; font-family: inherit; background: var(--white);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 2px solid var(--primary); border-color: var(--primary);
}
.form-status { display: none; padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14.5px; }
.form-status.success { display: block; background: #e8f8ef; color: #1e7e46; border: 1px solid #b7e4c7; }
.form-status.error { display: block; background: #fdecea; color: #b03a2e; border: 1px solid #f5b7b1; }
.hp-field { position: absolute; left: -9999px; } /* honeypot */

/* ---------- CTA strip ---------- */
.cta-strip { background: var(--primary); color: #fff; text-align: center; padding: 48px 20px; }
.cta-strip h2 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 10px; }
.cta-strip p { color: #cfe0f2; margin-bottom: 22px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #b8c9da; padding: 50px 0 0; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; padding-bottom: 36px; }
.footer-grid h3 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #b8c9da; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 18px 0; text-align: center; font-size: 13px; color: #8fa4b8;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; }
  .about-flex, .contact-flex { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--white); box-shadow: 0 8px 16px rgba(0,0,0,.12);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 420px; }
  .main-nav ul { flex-direction: column; padding: 10px 20px 16px; }
  .main-nav a { padding: 12px 8px; border-bottom: 1px solid var(--border); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero img.hero-bg { height: 320px; }
  section { padding: 44px 0; }
}
