/* =========================================================
   ONEI / Anhui Yijiayi Technology — Global site stylesheet
   3M-inspired: clean white canvas, bold type, red accent,
   generous whitespace, strong product-card grids.
   Brand gradient (magenta → orange → violet) from logo.
   ========================================================= */

:root {
  --brand-red: #e2231a;         /* 3M-style primary red */
  --brand-red-dark: #b81810;
  --magenta: #d6266e;
  --orange: #f08a24;
  --violet: #7b4f9e;
  --brand-gradient: linear-gradient(120deg, #d6266e 0%, #f08a24 50%, #7b4f9e 100%);
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-dark: #111418;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 8px 28px rgba(0,0,0,.10);
  --maxw: 1240px;
  --font: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 700; color: var(--brand-red); margin-bottom: 12px; display: block;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 760px; }
[dir="rtl"] { direction: rtl; text-align: right; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 40px; font-weight: 700; font-size: .98rem;
  border: 2px solid transparent; cursor: pointer; transition: .18s ease; text-decoration: none;
}
.btn--primary { background: var(--brand-red); color: #fff; }
.btn--primary:hover { background: var(--brand-red-dark); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; text-decoration: none; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #f0f0f0; text-decoration: none; }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Top utility + header ---------- */
.topbar {
  background: var(--ink); color: #cfd3d8; font-size: .82rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 16px; }
.topbar a { color: #cfd3d8; }
.topbar a:hover { color: #fff; }
.topbar__links { display: flex; gap: 18px; align-items: center; }

header.site {
  position: sticky; top: 0; z-index: 50; background: #fff;
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand svg { height: 42px; width: auto; }
.brand__name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; line-height: 1; }
.brand__sub { font-size: .66rem; letter-spacing: .18em; color: var(--muted); text-transform: uppercase; }
.nav__links { display: flex; gap: 26px; align-items: center; margin-left: auto; }
.nav__links a { color: var(--ink); font-weight: 600; font-size: .96rem; }
.nav__links a:hover { color: var(--brand-red); text-decoration: none; }
.nav__cta { display: flex; align-items: center; gap: 14px; }

/* language switcher */
.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 30px; padding: 8px 14px;
  font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--ink);
}
.lang__btn svg { width: 16px; height: 16px; }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md);
  min-width: 210px; padding: 8px; display: none; max-height: 360px; overflow: auto; z-index: 60;
}
.lang__menu.open { display: block; }
.lang__menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; background: none; border: 0;
  padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: .92rem; color: var(--ink); text-align: left;
}
.lang__menu button:hover { background: var(--bg-soft); }
.lang__menu button.active { color: var(--brand-red); font-weight: 700; }
.lang__flag { font-size: 1.1rem; line-height: 1; }

/* mobile nav toggle */
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition:.2s; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--bg-dark); color: #fff; overflow: hidden; }
.hero__grad { position: absolute; inset: 0; background: var(--brand-gradient); opacity: .16; }
.hero::after {
  content:""; position:absolute; right:-10%; top:-30%; width: 60%; height: 160%;
  background: radial-gradient(circle at center, rgba(240,138,36,.35), transparent 60%); pointer-events:none;
}
.hero .container { position: relative; padding-top: 96px; padding-bottom: 96px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { color: #d7dbe0; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero__stats { display: flex; gap: 40px; margin-top: 48px; flex-wrap: wrap; }
.hero__stat .n { font-size: 2.1rem; font-weight: 800; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__stat .l { font-size: .85rem; color: #b8bec6; }

/* ---------- Trust bar ---------- */
.trust { border-bottom: 1px solid var(--line); background:#fff; }
.trust .container { display: flex; flex-wrap: wrap; gap: 12px 40px; padding: 20px 24px; align-items: center; justify-content: center; }
.trust span { font-size: .86rem; color: var(--muted); font-weight: 600; display:flex; align-items:center; gap:8px; }
.trust b { color: var(--ink); }

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

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .2s ease; display: flex; flex-direction: column; height: 100%;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card__media { aspect-ratio: 16/10; position: relative; overflow: hidden; }
.card__media .ph { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card__tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-red); font-weight: 700; margin-bottom: 8px; }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { font-size: .92rem; color: var(--ink-soft); margin-bottom: 16px; }
.card__link { margin-top: auto; font-weight: 700; font-size: .9rem; color: var(--brand-red); display: inline-flex; align-items: center; gap: 6px; }
.card__link::after { content: "→"; transition: .2s; }
.card:hover .card__link::after { transform: translateX(4px); }

/* certifications */
.cert-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cert-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 40px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: .95rem;
}
.cert-chip::before { content: "✔"; color: #1aa251; font-weight: 800; }
.cert-chip b { font-weight: 700; color: var(--ink); }
.cert-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.cert-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: flex; flex-direction: column; }
.cert-card__badge { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-gradient); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.cert-card__badge svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; }
.cert-card h4 { font-size: 1.02rem; margin: 0 0 6px; }
.cert-card p { font-size: .88rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 860px){ .cert-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .cert-grid { grid-template-columns: 1fr; } }

/* scenario / solution cards */
.scard .card__body { padding-top: 24px; }
.scard__ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-gradient); display:flex; align-items:center; justify-content:center; margin-bottom: 14px; }
.scard__ic svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; }
a.chip { text-decoration: none; transition: .15s; }
a.chip:hover { background: var(--brand-red); color: #fff; border-color: var(--brand-red); text-decoration: none; }

/* keyword chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: .8rem; padding: 6px 12px; border-radius: 30px; background: var(--bg-soft);
  border: 1px solid var(--line); color: var(--ink-soft); font-weight: 600;
}
.chip--accent { background: rgba(226,35,26,.08); border-color: rgba(226,35,26,.2); color: var(--brand-red-dark); }

/* ---------- Feature rows ---------- */
.features { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.feature .ic { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-gradient); display:flex; align-items:center; justify-content:center; margin-bottom: 14px; }
.feature .ic svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Split / about ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.stat-grid .n { font-size: 2.2rem; font-weight: 800; color: var(--brand-red); }
.stat-grid .l { color: var(--muted); font-size: .9rem; }

/* ---------- Process / timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; counter-reset: step; }
.step { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.step .num { font-weight: 800; color: #fff; background: var(--brand-red); width: 34px; height: 34px; border-radius: 50%; display:flex; align-items:center; justify-content:center; font-size:.9rem; margin-bottom: 12px; }
.step h4 { font-size: 1rem; margin-bottom: 4px; }
.step p { font-size: .84rem; color: var(--muted); margin: 0; }

/* ---------- Spec table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.spec { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
table.spec th, table.spec td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
table.spec thead th { background: var(--ink); color: #fff; font-weight: 700; }
table.spec tbody tr:nth-child(even) { background: var(--bg-soft); }
table.spec td:first-child { font-weight: 700; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; font-size: 1.05rem; display:flex; justify-content:space-between; gap:16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-red); font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 14px 0 0; color: var(--ink-soft); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; border-radius: 16px; padding: 56px; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content:""; position:absolute; inset:0; background: var(--brand-gradient); opacity:.18; }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band .lead { color: #d7dbe0; margin: 0 auto 26px; }

/* ---------- Product detail ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); padding: 18px 0; }
.breadcrumb a { color: var(--muted); }
.prod-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start; }
.prod-hero__media { border-radius: var(--radius); background: var(--bg-soft); border:1px solid var(--line); aspect-ratio: 4/3; overflow:hidden; }
.prod-list { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.prod-list li { padding-left: 30px; position: relative; color: var(--ink-soft); }
.prod-list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-red); font-weight: 800; }
[dir="rtl"] .prod-list li { padding-left:0; padding-right:30px; }
[dir="rtl"] .prod-list li::before { left:auto; right:0; }

.side-nav { position: sticky; top: 96px; }
.side-nav h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.side-nav a { display:block; padding: 8px 0; color: var(--ink-soft); font-weight:600; font-size:.92rem; border-bottom: 1px solid var(--line); }
.side-nav a:hover, .side-nav a.active { color: var(--brand-red); text-decoration: none; }

/* ---------- Footer ---------- */
footer.site { background: var(--bg-dark); color: #b8bec6; padding: 64px 0 28px; font-size: .92rem; }
footer.site a { color: #b8bec6; }
footer.site a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot-brand svg { height: 40px; margin-bottom: 16px; }
.foot-contact li { display:flex; gap:10px; }
.foot-social { display:flex; gap:12px; margin-top:16px; }
.foot-social a { width:38px; height:38px; border-radius:50%; background: rgba(255,255,255,.08); display:flex; align-items:center; justify-content:center; }
.foot-social svg { width:18px; height:18px; fill:#fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 22px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:.82rem; color:#8b9199; }
.related-sites { display:flex; gap:16px; flex-wrap:wrap; }

/* ---------- Utility ---------- */
/* ---------- Real images ---------- */
.brand__img { height: 40px; width: auto; display: block; }
.brand__img--foot { height: 42px; margin-bottom: 14px; }
.card__media { background: #fff; }
.card__media .pimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-hero__media { display: flex; align-items: center; justify-content: center; }
.prod-hero__media .pimg { width: 100%; height: 100%; object-fit: cover; }
.fimg { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.fimg--hero { aspect-ratio: 4/3; object-fit: cover; }
.facility-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.facility-grid figure { margin: 0; }
.facility-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.facility-grid figcaption { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 10px; }
@media (max-width: 860px){ .facility-grid { grid-template-columns: repeat(2,1fr); } }

/* workshop photo gallery */
.photo-gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.photo-gallery figure { margin: 0; }
.photo-gallery img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.photo-gallery figcaption { font-size: .9rem; color: var(--ink-soft); font-weight: 600; margin-top: 10px; }
@media (max-width: 860px){ .photo-gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .photo-gallery { grid-template-columns: 1fr; } }

.center { text-align: center; }
.mx-auto { margin-left:auto; margin-right:auto; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.sec-head { max-width: 720px; margin-bottom: 44px; }
.sec-head.center { margin-left:auto; margin-right:auto; }
.pill-gradient { background: var(--brand-gradient); }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(3,1fr); }
  .timeline { grid-template-columns: repeat(2,1fr); }
  .prod-hero { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav.open .nav__links {
    display: flex; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column;
    background: #fff; padding: 18px 24px; gap: 6px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .nav.open .nav__links a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .grid--3, .grid--4 { grid-template-columns: repeat(2,1fr); }
  .features { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .topbar__links .hide-sm { display: none; }
  .section { padding: 52px 0; }
  .cta-band { padding: 40px 24px; }
}
@media (max-width: 560px) {
  .grid--3, .grid--4, .grid--2, .stat-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 24px; }
}
