/* ============================================================
   BASE — Tokens · Reset · Nav · Breadcrumb · Shared · Footer
============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --brand:        #32A238;
  --brand-dim:    #2A8A2E;
  --brand-bg:     #EFF8EF;
  --brand-border: #C5E6C6;

  /* Category accent colors */
  --c-sensing:  #32A238;
  --c-trans:    #F0862E;
  --c-control:  #004BA4;
  --c-exec:     #22AFB7;

  /* Neutrals */
  --black:   #0D0D0D;
  --dark:    #1A1A1A;
  --mid:     #4A4A4A;
  --muted:   #767676;
  --light:   #A0A0A0;
  --lighter: #C8C8C8;
  --border:  #E6E6E6;
  --surface: #F4F4F2;
  --white:   #FFFFFF;
  --footer-bg: #1A1A1A;
  --footer-text: #A0A0A0;

  /* Radii */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.14);
  --shadow-dropdown: 0 10px 40px rgba(0,0,0,.15);

  /* Motion */
  --t:    .22s;
  --ease: cubic-bezier(.22,.68,0,1.2);

  /* Typography */
  --font-cn: 'IBM Plex Sans SC', 'PingFang SC', 'Helvetica Neue', sans-serif;
  --font-en: 'Space Grotesk', sans-serif;

  /* Layout */
  --max-w: 1320px;
  --nav-h: 80px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a    { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }
img  { display: block; max-width: 100%; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-cn);
  background: #F9F9F8;
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Container ───────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ── Site Nav ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
}
.site-header .nav {
  height: var(--nav-h);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 0 0 2.5rem;
}
/* Logo */
.site-header .logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.site-header .logo img {
  height: 40px;
  width: auto;
}
/* Nav List */
.nav-list {
  display: flex;
  align-items: stretch;
  flex: 1;
  justify-content: center;
}
.category-item {
  position: relative;
  display: flex;
  align-items: stretch;
}
.category-item .name {
  display: flex;
  align-items: center;
  font-size: .9375rem;
  color: var(--dark);
  padding: 0 1.25rem;
  transition: color .2s;
  white-space: nowrap;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
.category-item .name::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s;
}
.category-item:hover .name,
.category-item .name.active {
  color: var(--brand);
  font-weight: 600;
}
.category-item:hover .name::after,
.category-item .name.active::after {
  transform: scaleX(1);
}
/* Tools */
.tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.lang .now {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .875rem;
  color: var(--muted);
}
.lang .now i {
  font-size: 1rem;
  color: var(--brand);
}
.lang .now a {
  color: var(--muted);
  transition: color var(--t);
}
.lang .now a:hover {
  color: var(--brand);
}
.menu-btn {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--nav-h);
  height: var(--nav-h);
  cursor: pointer;
  background: #1a1a1a;
  flex-shrink: 0;
  z-index: 201;
}
.menu-btn i {
  font-size: 1.5rem;
  color: #fff;
}
/* ── Mega Menu ─────────────────────────────────────────────── */
.mega-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.10);
  border-top: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
  z-index: 199;
}
.site-header:has(.nav-list:hover) .mega-menu,
.site-header:has(.mega-menu:hover) .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mega-inner {
  display: flex;
  align-items: stretch;
}
.mega-col {
  min-width: 0;
  padding: 2rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background .18s;
}
.mega-col:hover,
.mega-col.active {
  background: #F5F5F5;
}
.mega-item {
  margin-bottom: .625rem;
  text-align: center;
}
.mega-item > a {
  display: block;
  font-size: .875rem;
  color: #555;
  line-height: 1.6;
  transition: color .18s;
  white-space: nowrap;
}
.mega-item > a:hover {
  color: var(--brand);
}
.mega-sub {
  margin-top: .25rem;
}
.mega-sub li {
  text-align: center;
}
.mega-sub li a {
  display: block;
  font-size: .8125rem;
  color: #999;
  padding: .2rem 0;
  transition: color .18s;
  white-space: nowrap;
}
.mega-sub li a:hover {
  color: var(--brand);
}
/* Mobile Navigation */
.nav-maps {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 300;
  overflow-y: auto;
}
.site-header.nav-open .nav-maps {
  display: block;
}
.maps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 2.5rem;
  border-bottom: 1px solid var(--border);
}
.maps-header .logo img {
  height: 40px;
}
.maps-header .close {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
}
.maps-content {
  padding: 2rem 0;
}
.maps-content .wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.maps-content .category-item {
  position: static;
}
.maps-content .category-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--brand);
}
.maps-content .list .item {
  margin-bottom: .75rem;
}
.maps-content .item-name a {
  font-size: .875rem;
  color: var(--mid);
  transition: color var(--t);
}
.maps-content .item-name a:hover {
  color: var(--brand);
}
.maps-content .item ul {
  margin-top: .375rem;
  padding-left: 1rem;
}
.maps-content .item ul li a {
  font-size: .8125rem;
  color: var(--light);
  transition: color var(--t);
}
.maps-content .item ul li a:hover {
  color: var(--brand);
}
.m-wrap {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  padding: 0 2.5rem;
}
.lang-item {
  display: flex;
  gap: 1rem;
}
.lang-item a {
  font-size: .875rem;
  color: var(--muted);
  padding: .5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: all var(--t);
}
.lang-item a.active,
.lang-item a:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-bg);
}
@media (max-width: 960px) {
  .nav-list { display: none; }
  .mega-menu { display: none !important; }
  .maps-content .wrap {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 1.25rem;
  }
  .maps-header { padding: 0 1.25rem; }
  .m-wrap { padding: 0 1.25rem; }
}
@media (max-width: 640px) {
  .maps-content .wrap {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  :root { --nav-h: 60px; }
}

/* ── Breadcrumb Bar ──────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.breadcrumb-inner {
  height: 46px;
  display: flex;
  align-items: center;
  gap: .375rem;
}
.bc-back {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .8125rem;
  color: var(--muted);
  padding: .3rem .65rem .3rem .4rem;
  border-radius: var(--r-sm);
  transition: all var(--t);
  flex-shrink: 0;
}
.bc-back:hover { color: var(--brand); background: var(--brand-bg); }
.bc-back i { font-size: .9375rem; }
.bc-divider {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
}
.bc-item {
  font-size: .8125rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--t);
}
.bc-item:hover { color: var(--brand); }
.bc-sep { font-size: .75rem; color: var(--lighter); }
.bc-current {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main Content ────────────────────────────────────────── */
.main-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 2.5rem 7rem;
}

/* ── Page Transition ─────────────────────────────────────── */
.page-view { animation: fadeUp .28s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card with Image Background (shared) ─────────────────── */
.img-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #111;
  cursor: pointer;
}
.img-card .card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .58;
  transition: transform .5s ease, opacity .4s ease;
}
.img-card:hover .card-bg {
  transform: scale(1.05);
  opacity: .45;
}
.img-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.08) 65%);
  transition: background var(--t);
}
.img-card:hover .card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.15) 65%);
}
.img-card .card-body {
  position: relative;
  z-index: 1;
  padding: 1.375rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}
/* Category accent tag on card */
.card-cat-tag {
  display: inline-block;
  font-family: var(--font-en);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: white;
  padding: .2rem .6rem;
  border-radius: 4px;
  margin-bottom: .75rem;
  align-self: flex-start;
}
.card-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: .35rem;
}
.card-meta {
  font-family: var(--font-en);
  font-size: .75rem;
  color: rgba(255,255,255,.55);
}
.card-arrow-wrap {
  position: absolute;
  right: 1.125rem;
  bottom: 1.125rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .9375rem;
  transition: all var(--t) var(--ease);
}
.img-card:hover .card-arrow-wrap {
  background: rgba(255,255,255,.22);
  color: white;
  transform: translateX(2px);
}

/* ── White Product Card (shared by L1 + L2) ─────────────── */
.prd-card {
  --card-accent: var(--brand);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .24s cubic-bezier(.22,.68,0,1.2),
              box-shadow .24s ease,
              border-color .24s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.055);
}
.prd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.10);
  border-color: var(--lighter);
}
.prd-img {
  height: 168px;
  background: #E8E8E8;
  overflow: hidden;
  border-bottom: 2px solid var(--card-accent);
}
.prd-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease;
}
.prd-card:hover .prd-img img { transform: scale(1.05); }
.prd-body {
  padding: 1.125rem 1.375rem 1.375rem;
}
.prd-name {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.45;
  margin-bottom: .5rem;
}
.prd-count {
  font-size: .8125rem;
  color: var(--light);
  margin-bottom: .875rem;
  letter-spacing: .01em;
}
.prd-arrow {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .8125rem;
  font-weight: 500;
  transition: gap .22s ease;
}
.prd-card:hover .prd-arrow { gap: .55rem; }
.prd-arrow i { font-size: .9375rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-size: .875rem;
  font-weight: 500;
  padding: .75rem 1.5rem;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: all var(--t);
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--brand-dim);
}
.btn-secondary {
  background: var(--white);
  color: var(--dark);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-bg);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.btn i {
  font-size: 1rem;
}
.placeholder-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .875rem;
  padding: 5rem 2rem;
  color: var(--lighter);
  text-align: center;
}
.placeholder-state i { font-size: 2.5rem; }
.placeholder-state p { font-size: .9375rem; max-width: 280px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: #2a2a2a;
  padding: 40px 0 50px;
  font-size: 14px;
  color: #999;
}
.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.site-footer .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid #444;
  margin-bottom: 20px;
}
.site-footer .links a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s;
}
.site-footer .links a:hover {
  color: #32A238;
}
.site-footer .address {
  color: #999;
}
.site-footer .address b {
  font-weight: 600;
  color: #ccc;
}
.site-footer .line {
  color: #666;
}
.site-footer .bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer .copy {
  color: #888;
  font-size: 13px;
}
.site-footer .copy a {
  color: #888;
  text-decoration: none;
}
.site-footer .copy a:hover {
  color: #32A238;
}
.site-footer .icons {
  position: relative;
}
.site-footer .icons .item {
  position: relative;
  cursor: pointer;
}
.site-footer .icons .icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #bbb;
}
.site-footer .icons .icon:hover {
  color: #32A238;
}
.site-footer .icons .qr {
  position: absolute;
  bottom: 35px;
  right: 0;
  width: 90px;
  height: 98px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  border-radius: 4px;
}
.site-footer .icons .item:hover .qr {
  opacity: 1;
  visibility: visible;
}

/* Back to top button */
.backtop {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  font-size: 24px;
  color: #666;
}
.backtop.active {
  opacity: 1;
  visibility: visible;
}
.backtop:hover {
  color: #32A238;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .site-footer .top,
  .site-footer .bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .site-footer .address .line {
    display: none;
  }
}
@media (max-width: 960px) {
  .nav-links, .nav-actions { display: none; }
  .nav-hamburger { display: flex; }
  .container { padding: 0 1.25rem; }
  .main-content { padding: 2rem 1.25rem 5rem; }
}
@media (max-width: 480px) {
  :root { --nav-h: 60px; }
}
