/* Yuxin Microelectronics — B2B site styles */
:root {
  --ink: #17233b;
  --ink-2: #44506b;
  --ink-3: #7a869f;
  --brand: #0f4c81;
  --brand-2: #1663a8;
  --accent: #e8f1f9;
  --line: #e3e8f0;
  --bg: #f7f9fc;
  --white: #ffffff;
  --ok: #1a7f4b;
  --radius: 10px;
  --maxw: 1160px;
  font-size: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--white); line-height: 1.65;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-size: .8rem; letter-spacing: .5px;
}
.logo small { display: block; font-weight: 400; font-size: .68rem; color: var(--ink-3); letter-spacing: .4px; }
.main-nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.main-nav a { color: var(--ink-2); font-size: .95rem; font-weight: 500; }
.main-nav a.active, .main-nav a:hover { color: var(--brand); }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  border: 0; background: transparent; padding: 5px 12px; cursor: pointer;
  font-size: .8rem; color: var(--ink-2); font-weight: 600;
}
.lang-switch button.active { background: var(--brand); color: #fff; }
.nav-cta {
  background: var(--brand); color: #fff !important; padding: 8px 18px;
  border-radius: 999px; font-weight: 600;
}
.nav-cta:hover { background: var(--brand-2); }
.menu-toggle { display: none; }

/* Hero */
.hero { background: linear-gradient(160deg, #0f4c81 0%, #123a63 55%, #0d2c4d 100%); color: #fff; }
.hero-inner { padding: 84px 20px 76px; max-width: var(--maxw); margin: 0 auto; }
.hero .eyebrow { font-size: .85rem; letter-spacing: 2px; text-transform: uppercase; color: #9fc3e4; font-weight: 600; }
.hero h1 { font-size: 2.5rem; line-height: 1.25; margin: 14px 0 16px; max-width: 720px; font-weight: 700; }
.hero p { font-size: 1.08rem; color: #cfdff0; max-width: 640px; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 8px; font-weight: 600;
  font-size: .98rem; border: 1px solid transparent; cursor: pointer; transition: .15s;
}
.btn-primary { background: #fff; color: var(--brand); }
.btn-primary:hover { background: #e8f1f9; color: var(--brand); }
.btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; background: transparent; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.hero-stats { display: flex; gap: 44px; margin-top: 48px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 1.5rem; }
.hero-stats .stat span { font-size: .85rem; color: #9fc3e4; }

/* Sections */
.section { padding: 72px 0; }
.section.alt { background: var(--bg); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .eyebrow { color: var(--brand); font-size: .8rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }
.section-head h2 { font-size: 1.9rem; margin: 10px 0 12px; }
.section-head p { color: var(--ink-2); }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 22px; }
.product-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .18s;
}
.product-card:hover { box-shadow: 0 8px 26px rgba(15,76,129,.12); transform: translateY(-3px); }
.product-card .thumb { height: 230px; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--line); overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .tag { font-size: .72rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 1px; }
.product-card h3 { font-size: 1.02rem; line-height: 1.4; color: var(--ink); }
.product-card .blurb { font-size: .86rem; color: var(--ink-3); flex: 1; }
.product-card .more { font-size: .88rem; font-weight: 600; }

/* Filters */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 18px;
  font-size: .88rem; font-weight: 600; color: var(--ink-2); background: #fff;
}
.filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Feature blocks */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.feature-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature-item h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature-item p { font-size: .9rem; color: var(--ink-2); }
.feature-item .num { font-size: .8rem; font-weight: 700; color: var(--brand); letter-spacing: 1px; display: block; margin-bottom: 10px; }

/* Product detail */
.pd-layout { display: grid; grid-template-columns: 460px 1fr; gap: 44px; align-items: start; }
.pd-gallery .main-img { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; height: 420px; display: grid; place-items: center; overflow: hidden; }
.pd-gallery .main-img img { width: 100%; height: 100%; object-fit: contain; }
.pd-gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pd-gallery .thumbs button {
  width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; cursor: pointer; overflow: hidden; padding: 0;
}
.pd-gallery .thumbs button.active { border-color: var(--brand); }
.pd-gallery .thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-info .tag { font-size: .75rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 1px; }
.pd-info h1 { font-size: 1.7rem; line-height: 1.35; margin: 8px 0 14px; }
.pd-info .lead { color: var(--ink-2); margin-bottom: 22px; }
.pd-info .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-2); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--ink-2); background: #fff; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.spec-table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: .92rem; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 200px; color: var(--ink-3); font-weight: 600; background: var(--bg); }
.spec-table tr:first-child th { border-top-left-radius: 8px; }
.spec-table tr:first-child td { border-top-right-radius: 8px; }
.feat-list { list-style: none; margin-bottom: 24px; }
.feat-list li { padding: 7px 0 7px 24px; position: relative; color: var(--ink-2); font-size: .95rem; }
.feat-list li::before { content: ""; position: absolute; left: 0; top: 14px; width: 12px; height: 3px; background: var(--brand); border-radius: 2px; }
.pd-section-title { font-size: 1.15rem; margin: 30px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.app-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.app-chips span { background: var(--accent); color: var(--brand); font-size: .85rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; }

/* Contact / form */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact-card h3 { margin-bottom: 14px; font-size: 1.05rem; }
.contact-card p { font-size: .92rem; color: var(--ink-2); margin-bottom: 10px; word-break: break-word; }
.contact-card .label { color: var(--ink-3); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; display: block; margin-top: 16px; }
.inquiry-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.form-field label .req { color: #c0392b; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px;
  font-size: .93rem; font-family: inherit; color: var(--ink); background: #fff;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid rgba(15,76,129,.25); border-color: var(--brand);
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-check { display: flex; align-items: center; gap: 9px; font-size: .9rem; color: var(--ink-2); margin-bottom: 18px; }
.form-check input { width: 16px; height: 16px; }
.form-msg { border-radius: 8px; padding: 13px 16px; font-size: .92rem; margin-bottom: 16px; display: none; }
.form-msg.ok { display: block; background: #e7f6ee; color: var(--ok); border: 1px solid #bfe6cf; }
.form-msg.err { display: block; background: #fdecea; color: #a93a2c; border: 1px solid #f3c5bd; }
.form-note { font-size: .8rem; color: var(--ink-3); margin-top: 12px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 44px; align-items: start; }
.about-facts { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.about-facts dl div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.about-facts dl div:last-child { border-bottom: 0; }
.about-facts dt { color: var(--ink-3); font-weight: 600; }
.about-facts dd { text-align: right; font-weight: 600; }
.prose p { margin-bottom: 14px; color: var(--ink-2); }

/* Trade terms strip */
.terms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.term-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: #fff; }
.term-item b { display: block; margin-bottom: 6px; color: var(--brand); font-size: .95rem; }
.term-item p { font-size: .88rem; color: var(--ink-2); }

/* CTA band */
.cta-band { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 44px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: 1.5rem; margin-bottom: 6px; }
.cta-band p { color: #cfdff0; font-size: .95rem; }

/* Footer */
.site-footer { background: #0d1f33; color: #9fb2c8; padding: 52px 0 26px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; margin-bottom: 36px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer a { color: #9fb2c8; font-size: .88rem; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.site-footer p { font-size: .88rem; padding: 3px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: .8rem; color: #6c7f96; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; margin-bottom: 12px; }

/* Breadcrumb */
.breadcrumb { font-size: .84rem; color: var(--ink-3); padding: 18px 0 0; }
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--brand); }

/* Page hero (sub pages) */
.page-hero { background: var(--bg); border-bottom: 1px solid var(--line); padding: 46px 0 40px; }
.page-hero h1 { font-size: 2rem; margin-bottom: 8px; }
.page-hero p { color: var(--ink-2); max-width: 640px; }

@media (max-width: 920px) {
  .pd-layout, .contact-layout, .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: flex-start;
    padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 12px;
  }
  .main-nav.open { display: flex; }
  .menu-toggle {
    display: block; margin-left: auto; background: none; border: 1px solid var(--line);
    border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 1rem; color: var(--ink-2);
  }
  .hero h1 { font-size: 1.8rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
