:root {
  --green: #14935f;
  --green-dark: #026953;
  --blue: #1d61b8;
  --yellow: #fad551;
  --ink: #17252b;
  --muted: #64767e;
  --line: #dce6ea;
  --paper: #f5f8f9;
  --white: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1200px, calc(100% - 36px)); margin: 0 auto; }

.utility-bar {
  background: linear-gradient(90deg, #114da4, #2476d3);
  color: #e9f6f1;
  font-size: 14px;
}
.utility-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
}
.utility-inner div { display: flex; gap: 10px; }

.main-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 0;
  background: linear-gradient(90deg, #1152ad, #2c7bd4);
  border-bottom: 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  padding: 0 22px;
  border-radius: 0 0 12px 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(10, 45, 86, .16);
}
.brand {
  display: grid;
  grid-template-columns: 160px 1px minmax(150px, 175px);
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.brand::after {
  content: "";
  width: 1px;
  height: 50px;
  background: #cfd8dc;
  grid-column: 2;
  grid-row: 1;
}
.brand img { display: block; width: 150px; grid-column: 1; }
.brand span {
  grid-column: 3;
  color: #2d2d2d;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: #2d2d2d;
  font-weight: 900;
  text-transform: uppercase;
}
.nav-item { position: relative; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 86px;
  padding: 0 clamp(6px, .7vw, 9px);
  border: 0;
  background: transparent;
  color: #2d2d2d;
  font: inherit;
  font-size: clamp(13px, .88vw, 16px);
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active,
.nav-item.is-open > .nav-link { color: #4fa934; }
.has-dropdown > .nav-link::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.nav-dropdown {
  position: absolute;
  top: calc(100% - 8px);
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: 210px minmax(240px, 330px);
  gap: 20px;
  min-width: 590px;
  padding: 18px;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(11, 35, 52, .2);
  border-top: 4px solid #4fa934;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.nav-dropdown.compact {
  grid-template-columns: minmax(260px, 330px);
  min-width: 310px;
  left: 0;
  transform: translate(0, 12px);
}
.nav-item:hover > .nav-dropdown,
.nav-item.is-open > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.nav-item:hover > .nav-dropdown.compact,
.nav-item.is-open > .nav-dropdown.compact { transform: translate(0, 0); }
.dropdown-feature {
  display: grid;
  gap: 8px;
  color: var(--ink);
}
.dropdown-feature img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: var(--paper);
}
.dropdown-feature strong { font-size: 17px; }
.dropdown-feature span {
  color: var(--muted);
  font-size: 13px;
  text-transform: none;
}
.dropdown-links {
  display: grid;
  gap: 2px;
  align-content: start;
}
.dropdown-links a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border-bottom: 1px solid #eef3f4;
  color: #263238;
  font-size: 15px;
  font-weight: 800;
  text-transform: none;
}
.dropdown-links a::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: #4fa934;
}
.dropdown-links a:hover {
  background: #f4faf2;
  color: #4fa934;
}
.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.nav-quote, .primary-btn, .consult-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}
.nav-quote {
  min-height: 52px;
  padding: 0 20px;
  border: 3px solid #7ac36a;
  border-radius: 999px;
  background: #fff;
  color: #4fa934;
  font-size: 17px;
  gap: 12px;
}
.nav-quote span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) center / 11px 8px no-repeat,
    #4fa934;
}
.nav-search {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 0;
  border-radius: 50%;
  background: #4fa934;
  cursor: pointer;
}
.nav-search::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 15px;
  top: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
}
.nav-search::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 3px;
  left: 30px;
  top: 34px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(45deg);
}
.nav-search-panel {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  z-index: 32;
  display: none;
  grid-template-columns: minmax(220px, 320px) 90px;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(11, 35, 52, .2);
}
.nav-search-panel.is-open { display: grid; }
.nav-search-panel input {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.nav-search-panel button {
  border: 0;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 800;
}

.xd-hero {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  background:
    linear-gradient(90deg, rgba(2,105,83,.96) 0%, rgba(2,105,83,.86) 38%, rgba(2,105,83,.16) 68%, rgba(250,213,81,.2) 100%),
    url("assets/huayu-reference/huayu-roof-installation.jpg") center / cover no-repeat;
  color: #fff;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  min-height: 720px;
  padding: 58px 0;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(46px, 6vw, 76px);
  line-height: 1.02;
}
.hero-copy p:not(.eyebrow) {
  max-width: 660px;
  color: #e7f2ef;
  font-size: 19px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 26px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-badges span {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  font-weight: 800;
}
.hero-card {
  padding: 16px;
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.hero-card img { display: block; border-radius: 6px; }

.quick-cats { margin-top: -56px; position: relative; z-index: 3; }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(23,37,43,.16);
}
.quick-grid a {
  display: grid;
  gap: 8px;
  min-height: 156px;
  padding: 26px;
  background: #fff;
  border-right: 1px solid var(--line);
}
.quick-grid a:last-child { border-right: 0; }
.quick-grid strong { font-size: 20px; }
.quick-grid span { color: var(--muted); }

.xd-section { padding: clamp(62px, 7vw, 104px) 0; }
.xd-title { text-align: center; max-width: 820px; margin: 0 auto 38px; }
.xd-title span {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
}
.xd-title h2 { margin-bottom: 10px; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; }
.xd-title p { color: var(--muted); }
.xd-title.light h2, .xd-title.light p { color: #fff; }
.xd-title.light span { color: var(--yellow); }

.product-section {
  overflow: hidden;
  background: #f3faf0;
}
.product-showcase {
  display: grid;
  grid-template-columns: 450px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.product-menu {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 4px 0 0 92px;
}
.product-menu::before {
  content: "";
  position: absolute;
  top: 52px;
  bottom: 52px;
  left: 144px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, #b7dbac 0 4px, transparent 4px 9px);
}
.product-menu button {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  min-height: 96px;
  border: 0;
  background: transparent;
  color: #07151b;
  font: inherit;
  font-size: 24px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}
.product-menu button span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 14px solid #d4edce;
  border-radius: 50%;
  background: #fff;
  transition: border-color .2s ease, transform .2s ease;
}
.product-menu button img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.product-menu button.active {
  color: #49a632;
}
.product-menu button.active span {
  border-color: #49a632;
  transform: scale(1.04);
}
.product-stage {
  position: relative;
  min-width: 0;
}
.product-grid-xd {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.product-grid-xd::-webkit-scrollbar { display: none; }
.product-grid-xd article {
  position: relative;
  flex: 0 0 calc((100% - 36px) / 3);
  min-width: 310px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 48, 44, .06);
}
.product-grid-xd article.is-hidden {
  display: none;
}
.product-photo {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 438px;
  padding: 28px;
  border-bottom: 1px solid #edf1ed;
}
.product-photo::before {
  content: "HUAYU";
  position: absolute;
  top: 54px;
  left: 38px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 4px;
  background: #14935f;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.product-photo img {
  width: 100%;
  max-height: 370px;
  object-fit: contain;
}
.product-info {
  padding: 28px 44px 30px;
}
.product-info h3 {
  min-height: 78px;
  margin-bottom: 18px;
  color: #202426;
  font-size: 24px;
  line-height: 1.55;
}
.product-info p {
  min-height: 96px;
  color: #777;
  font-size: 20px;
  line-height: 1.5;
}
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  color: #49a632;
  font-size: 20px;
}
.product-meta span {
  color: #49a632;
  letter-spacing: 0;
}
.product-meta strong {
  color: #49a632;
  font-weight: 700;
}
.product-grid-xd article { cursor: pointer; }
.read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-top: 24px;
  padding: 0 28px;
  border: 1px solid #49a632;
  border-radius: 999px;
  color: #49a632;
  font-size: 20px;
  font-weight: 700;
}
.read-more:hover {
  background: #49a632;
  color: #fff;
}
.product-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 4px solid rgba(173, 187, 180, .55);
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 8px 18px rgba(23, 48, 44, .12);
  cursor: pointer;
}
.product-arrow::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 15px;
  border-top: 5px solid #aab1ae;
  border-left: 5px solid #aab1ae;
}
.product-prev {
  left: -26px;
  transform: translateY(-50%);
}
.product-prev::before {
  left: 18px;
  transform: rotate(-45deg);
}
.product-next {
  right: -26px;
  transform: translateY(-50%);
}
.product-next::before {
  right: 18px;
  transform: rotate(135deg);
}

.solution-section {
  background:
    linear-gradient(rgba(2,105,83,.9), rgba(2,105,83,.9)),
    url("assets/huayu-reference/huayu-solar-inverter-banner.jpg") center / cover;
}
.solution-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.solution-grid article {
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}
.solution-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.solution-grid div { padding: 24px; }
.solution-grid p { color: var(--muted); }

.about-section { background: var(--paper); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(0, .95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.about-media img { display: block; width: 100%; border-radius: 8px; box-shadow: 0 18px 45px rgba(23,37,43,.12); }
.about-copy h2, .oem-grid h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.12; }
.about-copy p:not(.eyebrow), .oem-grid p { color: var(--muted); font-size: 18px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0 28px;
}
.stat-grid div { padding: 18px; background: #fff; border-radius: 6px; border-left: 5px solid var(--green); }
.stat-grid strong { display: block; font-size: 22px; }
.stat-grid span { color: var(--muted); font-size: 14px; }

.why-section { background: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.why-grid article {
  min-height: 245px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f0f7f5);
}
.why-grid span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}
.why-grid p { color: var(--muted); }

.oem-section { background: var(--ink); color: #fff; }
.oem-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.oem-grid img { display: block; width: 100%; border-radius: 8px; }
.oem-grid ul { display: grid; gap: 10px; margin: 26px 0 0; padding-left: 20px; color: #d7e5e9; }

.cert-section { background: #fff; }
.cert-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.cert-grid div {
  display: grid;
  place-items: center;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--green-dark);
  font-size: 28px;
  font-weight: 900;
}

.news-section { background: var(--paper); }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.news-grid article { overflow: hidden; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.news-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.news-grid div { padding: 22px; }
.news-grid p { color: var(--muted); }

.consult-section { padding: clamp(54px, 7vw, 96px) 0; background: var(--green-dark); color: #fff; }
.consult-grid { display: grid; grid-template-columns: minmax(0, .86fr) minmax(420px, 1.14fr); gap: clamp(28px, 5vw, 72px); }
.consult-grid p:not(.eyebrow) { color: #d7e5e9; font-size: 18px; }
.consult-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
}
.consult-form textarea, .consult-form button { grid-column: 1 / -1; }
.consult-form input, .consult-form select, .consult-form textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  color: var(--ink);
}

.xd-footer { background: #111d22; color: #d7e5e9; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 52px 0;
}
.footer-grid img { width: 220px; background: #fff; padding: 8px; border-radius: 6px; }
.footer-grid p { color: #9eb0b7; }
.footer-grid h3 { color: #fff; }
.footer-grid a { display: block; margin: 8px 0; color: #b9c8cd; }
.footer-bottom { padding: 18px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; color: #8ca0a7; }

.detail-page { background: #fff; }
.product-detail-hero {
  padding: 56px 0 70px;
  background: #fff;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(460px, .95fr) minmax(0, 1.05fr);
  gap: 70px;
  align-items: start;
}
.detail-main-image {
  display: grid;
  place-items: center;
  min-height: 680px;
  border: 1px solid #e5e5e5;
  background: #fff;
}
.detail-main-image img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
}
.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 16px;
}
.detail-thumbs button {
  min-height: 120px;
  border: 1px solid #e5e5e5;
  background: #fff;
  cursor: pointer;
}
.detail-thumbs button.active {
  border-color: #cfe8c7;
  background: #f3faf0;
}
.detail-thumbs img {
  width: 100%;
  height: 104px;
  object-fit: contain;
}
.detail-summary h1 {
  margin-bottom: 18px;
  color: #303030;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.28;
}
.detail-lead {
  padding-bottom: 34px;
  border-bottom: 1px solid #e5e5e5;
  color: #111d22;
  font-size: 26px;
  line-height: 1.45;
}
.detail-rating {
  display: flex;
  align-items: center;
  gap: 58px;
  padding: 30px 0;
  border-bottom: 1px solid #e5e5e5;
  color: #49a632;
  font-size: 42px;
}
.detail-rating strong {
  font-size: 24px;
  font-weight: 500;
}
.detail-points {
  display: grid;
  gap: 20px;
  margin: 32px 0 38px;
  padding: 0;
  list-style: none;
  color: #5c6468;
  font-size: 25px;
  line-height: 1.8;
}
.detail-points strong { color: #555; }
.detail-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.detail-content { background: #f7faf8; }
.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}
.detail-content article,
.detail-content aside {
  padding: 34px;
  border-radius: 8px;
  background: #fff;
}
.detail-content article h2 { font-size: 34px; }
.detail-content article p {
  color: var(--muted);
  font-size: 18px;
}
.detail-content article img {
  width: 100%;
  margin-top: 22px;
  border-radius: 8px;
}
.detail-content dl {
  display: grid;
  margin: 0;
}
.detail-content dt,
.detail-content dd {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid #edf1ed;
}
.detail-content dt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}
.detail-content dd {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .utility-bar, .main-nav, .nav-quote { display: none; }
  .header-inner { min-height: 74px; }
  .hero-grid, .about-grid, .oem-grid, .consult-grid { grid-template-columns: 1fr; }
  .detail-grid, .detail-content-grid { grid-template-columns: 1fr; }
  .xd-hero, .hero-grid { min-height: auto; }
  .quick-grid, .solution-grid, .why-grid, .news-grid, .footer-grid { grid-template-columns: 1fr; }
  .product-showcase { grid-template-columns: 1fr; }
  .product-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding-left: 0;
  }
  .product-menu::before { display: none; }
  .product-menu button {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 78px;
    gap: 12px;
    font-size: 17px;
  }
  .product-menu button span {
    width: 68px;
    height: 68px;
    border-width: 8px;
  }
  .product-grid-xd article { flex-basis: min(86vw, 390px); }
  .cert-grid, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .brand { flex-basis: 205px; }
  .brand img { width: 190px; }
  .hero-copy h1 { font-size: 38px; }
  .hero-card { padding: 8px; }
  .quick-cats { margin-top: 0; }
  .product-menu { grid-template-columns: 1fr; }
  .product-photo { min-height: 300px; }
  .product-info { padding: 22px; }
  .product-info h3 { font-size: 20px; }
  .product-info p { font-size: 16px; }
  .product-arrow { display: none; }
  .detail-main-image { min-height: 360px; }
  .detail-summary h1 { font-size: 32px; }
  .detail-lead, .detail-points { font-size: 18px; }
  .detail-rating { font-size: 28px; }
  .consult-form { grid-template-columns: 1fr; }
}
