/* =========================================================
   Gladful Tech — Main stylesheet
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .4em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1200px, 92vw); margin: 0 auto; }
.section { padding: 84px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section__head h2 { font-size: clamp(28px, 4vw, 40px); }
.section__head p { color: var(--text-soft); font-size: 17px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: .2s; white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--brand-dark); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand); color: #fff; }
.btn--block { width: 100%; }

/* ---------- Announcement bar ---------- */
.announce { background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #fff; font-size: 14px; }
.announce__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.announce__text { font-weight: 600; }
.theme-pick { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.theme-pick select {
  background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px; padding: 4px 10px; font-size: 13px; cursor: pointer;
}
.theme-pick select option { color: #111; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; }
.logo__mark { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 20px; font-weight: 900; }
.logo__text { font-size: 20px; letter-spacing: -.02em; }
.logo__sub { color: var(--brand); }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--text); font-weight: 600; font-size: 15px; position: relative; }
.nav a:hover { color: var(--brand); }
.header__tools { display: flex; align-items: center; gap: 12px; }
.lang { background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-weight: 700; cursor: pointer; font-size: 14px; }
.lang:hover { border-color: var(--brand); color: var(--brand); }
.cart-btn { position: relative; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.cart-btn:hover { border-color: var(--brand); color: var(--brand); }
.cart-count { position: absolute; top: -6px; right: -6px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 40px; background:
  radial-gradient(1200px 500px at 80% -10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent),
  var(--bg); }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; color: var(--brand); font-weight: 700; font-size: 14px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); }
.hero__lead { color: var(--text-soft); font-size: 18px; max-width: 540px; }
.hero__cta { display: flex; gap: 14px; margin: 28px 0 30px; flex-wrap: wrap; }
.hero__badges { display: flex; gap: 26px; flex-wrap: wrap; }
.hero__badges li { display: flex; flex-direction: column; }
.hero__badges strong { font-size: 22px; color: var(--brand); }
.hero__badges span { font-size: 13px; color: var(--text-soft); }

.hero__media { position: relative; }
.hero__card { position: relative; aspect-ratio: 4/3.4; border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, var(--brand), var(--brand-2)); box-shadow: var(--shadow); }
.hero__machine { position: absolute; inset: 14% 18%; border-radius: 18px;
  background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.4); backdrop-filter: blur(4px); }
.hero__chip { position: absolute; background: #fff; color: var(--text); font-weight: 700; font-size: 13px;
  padding: 7px 13px; border-radius: 999px; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.hero__chip--1 { top: 12%; left: -6%; }
.hero__chip--2 { bottom: 22%; right: -8%; }
.hero__chip--3 { bottom: 6%; left: 8%; }

/* ---------- Stats ---------- */
.stats { background: var(--brand); color: #fff; }
.stats__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; padding: 34px 0; text-align: center; }
.stat { display: flex; flex-direction: column; }
.stat__num { font-size: clamp(28px, 3.4vw, 40px); font-weight: 900; }
.stat__label { font-size: 14px; opacity: .9; }

/* ---------- Categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; text-align: center; transition: .2s; cursor: pointer; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand); }
.cat-card__icon { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); display: grid; place-items: center; color: var(--brand); }
.cat-card h3 { font-size: 18px; margin-bottom: 6px; }
.cat-card p { color: var(--text-soft); font-size: 14px; margin: 0; }

/* ---------- Products ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 34px; }
.filter { border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 9px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; }
.filter.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .2s; }
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product__media { aspect-ratio: 1/1; background: linear-gradient(160deg, var(--bg-alt), color-mix(in srgb, var(--brand) 10%, var(--bg-alt)));
  display: grid; place-items: center; position: relative; }
.product__media .ph { font-size: 13px; color: var(--text-soft); font-weight: 600; letter-spacing: .04em; }
.product__tag { position: absolute; top: 10px; left: 10px; background: var(--brand); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.product__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product__title { font-size: 15px; font-weight: 700; line-height: 1.35; }
.product__desc { font-size: 13px; color: var(--text-soft); flex: 1; }
.product__meta { display: flex; align-items: baseline; justify-content: space-between; }
.product__price { color: var(--brand); font-weight: 800; font-size: 16px; }
.product__moq { font-size: 12px; color: var(--text-soft); }
.product__actions { display: flex; gap: 8px; }
.product__actions .btn { flex: 1; padding: 10px; font-size: 13px; }
.btn--soft { background: var(--bg-alt); color: var(--brand); border-color: var(--border); }
.btn--soft:hover { background: var(--brand); color: #fff; }

/* ---------- Markets ---------- */
.market-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.market { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.market h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.market__flag { font-size: 22px; }
.market p { color: var(--text-soft); font-size: 14px; }
.market ul { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.market li { font-size: 13px; color: var(--text); padding-left: 18px; position: relative; }
.market li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }

/* ---------- Certifications ---------- */
.cert { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.cert__media { position: relative; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--brand), var(--brand-2)); box-shadow: var(--shadow); }
.cert__factory { position: absolute; inset: 16%; border: 2px dashed rgba(255,255,255,.5); border-radius: 14px; }
.cert__tag { position: absolute; bottom: 14px; left: 14px; background: #fff; color: var(--text);
  font-weight: 700; font-size: 13px; padding: 7px 13px; border-radius: 999px; }
.cert__copy h2 { font-size: clamp(26px, 3.4vw, 36px); }
.cert__copy p { color: var(--text-soft); }
.cert__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0 24px; }
.cert__list li { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
  font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.cert__list .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.about__copy p { color: var(--text-soft); }
.about__points { display: grid; gap: 14px; margin-top: 18px; }
.about__points div { display: flex; flex-direction: column; padding: 14px 16px; background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 12px; }
.about__points strong { color: var(--brand); }
.about__points span { font-size: 14px; color: var(--text-soft); }
.about__panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); }
.about__row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.about__row:last-child { border-bottom: 0; }
.about__row span { color: var(--text-soft); }
.about__row b { color: var(--brand); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact__intro h2 { font-size: clamp(26px, 3.4vw, 36px); }
.contact__intro p { color: var(--text-soft); }
.contact__info { margin-top: 18px; display: grid; gap: 10px; }
.contact__info li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.contact__info span { color: var(--text-soft); }
.contact__form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field textarea { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px;
  font: inherit; background: var(--bg); color: var(--text); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.form-note { grid-column: 1 / -1; color: var(--brand); font-weight: 700; margin: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--brand-dark); color: #fff; padding: 56px 0 24px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer__col h4 { font-size: 15px; margin-bottom: 14px; }
.footer__col a, .footer__col span { display: block; color: rgba(255,255,255,.82); font-size: 14px; margin-bottom: 9px; }
.footer__col a:hover { color: #fff; }
.footer__brand .logo { color: #fff; margin-bottom: 12px; }
.footer__brand p { color: rgba(255,255,255,.72); font-size: 14px; max-width: 320px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.18); margin-top: 36px; padding-top: 18px; font-size: 13px; color: rgba(255,255,255,.7); }

/* ---------- Cart drawer ---------- */
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90; }
.cart { position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 92vw); background: var(--surface);
  z-index: 100; box-shadow: -10px 0 40px rgba(0,0,0,.25); display: flex; flex-direction: column;
  transform: translateX(0); transition: transform .25s; }
.cart[hidden] { display: flex; transform: translateX(105%); }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px;
  border-bottom: 1px solid var(--border); }
.cart__head h3 { margin: 0; }
.cart__close { background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--text); line-height: 1; }
.cart__mode { padding: 16px 20px 4px; }
.cart__mode label { font-size: 13px; font-weight: 700; display: block; margin-bottom: 8px; }
.seg { display: flex; background: var(--bg-alt); border-radius: 999px; padding: 4px; }
.seg__btn { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 999px; font-weight: 700;
  cursor: pointer; color: var(--text-soft); font-size: 14px; }
.seg__btn.is-active { background: var(--brand); color: #fff; }
.cart__items { flex: 1; overflow-y: auto; padding: 8px 20px; display: flex; flex-direction: column; gap: 12px; }
.cart__empty { padding: 40px 20px; text-align: center; color: var(--text-soft); }
.cart-item { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.cart-item__media { width: 54px; height: 54px; border-radius: 8px; background: var(--bg-alt); display: grid; place-items: center; font-size: 11px; color: var(--text-soft); }
.cart-item__title { font-size: 13px; font-weight: 700; line-height: 1.3; }
.cart-item__price { font-size: 12px; color: var(--text-soft); }
.qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; color: var(--text); font-weight: 800; }
.qty span { min-width: 18px; text-align: center; font-weight: 700; }
.cart-item__del { background: none; border: 0; color: var(--text-soft); cursor: pointer; font-size: 18px; }
.cart__foot { border-top: 1px solid var(--border); padding: 16px 20px; }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cart__total b { font-size: 22px; color: var(--brand); }
.cart__hint { font-size: 12px; color: var(--text-soft); margin: 0 0 12px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--text);
  color: #fff; padding: 13px 22px; border-radius: 999px; font-weight: 700; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.toast[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .product-grid, .cat-grid, .market-grid { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .hero__inner, .cert, .about, .contact { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
}
@media (max-width: 720px) {
  .nav { position: fixed; top: 68px; left: 0; right: 0; background: var(--surface); flex-direction: column;
    gap: 0; border-bottom: 1px solid var(--border); padding: 8px 0; transform: translateY(-130%); transition: .25s; }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 12px 6vw; }
  .burger { display: flex; }
  .product-grid, .cat-grid, .market-grid, .cert__list, .contact__form { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .announce__text { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Product detail modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(8,15,30,.55); backdrop-filter: blur(3px); z-index: 150; }
.modal-overlay[hidden] { display: none; }
.modal { position: fixed; inset: 0; margin: auto; width: min(920px, 94vw); max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: 18px; z-index: 160; padding: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal[hidden] { display: none; }
.modal__close { position: absolute; top: 14px; right: 14px; }
.modal__body { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; }
.modal__media img { width: 100%; border-radius: 14px; border: 1px solid var(--border); object-fit: contain; background: #fff; }
.modal__info h3 { font-size: 22px; margin: 8px 0 10px; }
.modal__desc { color: var(--text-soft); font-size: 14px; line-height: 1.7; }
.modal__info h4 { margin: 18px 0 8px; font-size: 15px; color: var(--brand); }
.modal__feats { margin: 0; padding-left: 18px; color: var(--text-soft); font-size: 13.5px; line-height: 1.8; }
.modal__specs { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.modal__specs th { display: none; }
.modal__specs td { border-bottom: 1px solid var(--border); padding: 7px 8px 7px 0; color: var(--text-soft); }
.modal__specs td:last-child { color: var(--text); text-align: right; font-weight: 600; }
.modal__specs td:nth-child(2) { color: var(--text-soft); }

/* ---------- About gallery & cert images ---------- */
.about__gallery { display: grid; grid-template-columns: 1fr; gap: 14px; }
.about__gallery img { width: 100%; border-radius: 16px; border: 1px solid var(--border); object-fit: cover; aspect-ratio: 16/9; }
.cert__media { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: center; }
.cert__img { width: 100%; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.cert__media .cert__tag { position: absolute; bottom: -12px; left: 20px; }

@media (max-width: 800px) {
  .modal__body { grid-template-columns: 1fr; }
  .cert__media { grid-template-columns: 1fr 1fr; }
}

/* ---------- Brand logo image ---------- */
.logo__img { height: 46px; width: auto; display: block; }
.footer .logo__img { height: 52px; }
@media (max-width: 720px) { .logo__img { height: 38px; } }

/* ---------- Hero image & header theme picker ---------- */
.hero__img { width: 100%; border-radius: 24px; display: block; box-shadow: 0 24px 60px rgba(245, 15, 80, .16); }
.hero__chip--1 { top: 5%; left: -4%; }
.hero__chip--2 { bottom: 26%; right: -5%; }
.hero__chip--3 { bottom: 8%; left: -4%; }
.header__tools .theme-pick { display: flex; align-items: center; }
.header__tools .theme-pick select {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 7px 10px; font-size: 13px; font-weight: 600; cursor: pointer; outline: none;
}
