/* ============================================================
   paperpackmachinery.com — Industrial B2B Packaging Machinery
   Global Stylesheet v1.0  |  2026-09-13
   Author: Mavis
   ============================================================ */

/* ---- Reset & Base ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-primary: #1a3a5c;          /* deep industrial blue */
  --c-primary-dark: #0f2540;
  --c-primary-light: #2c5282;
  --c-accent: #f47920;           /* CTA orange */
  --c-accent-dark: #d86510;
  --c-text: #2d3748;
  --c-text-light: #718096;
  --c-border: #e2e8f0;
  --c-bg: #ffffff;
  --c-bg-alt: #f7fafc;
  --c-bg-dark: #0f2540;
  --c-success: #38a169;

  --max-w: 1280px;
  --header-h: 76px;
  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.15);

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Roboto, "Helvetica Neue",
               Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-base);
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-accent); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  color: var(--c-primary-dark);
  font-weight: 700;
  line-height: 1.25;
}
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: .75rem; }
h3 { font-size: 1.4rem; margin-bottom: .5rem; }
h4 { font-size: 1.1rem; margin-bottom: .5rem; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
  line-height: 1.2;
}
.btn-primary { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn-primary:hover { background: var(--c-accent-dark); border-color: var(--c-accent-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: var(--c-primary); }
.btn-ghost { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-ghost:hover { background: var(--c-primary); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* ---- Header / Navigation ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  width: 100%;
}
/* All body content gets pushed down by the fixed header height */
body { padding-top: var(--header-h); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  max-width: 100%;
  padding: 0 24px;
  margin: 0;
}
/* Header nav links may sit outside the centered content area on wide screens */
@media (min-width: 1440px) {
  .header-inner { padding: 0 32px; }
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 700; color: var(--c-primary-dark); }
.logo-mark { width: 38px; height: 38px; background: var(--c-primary); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.logo-text { line-height: 1.1; }
.logo-text small { display: block; font-size: .7rem; color: var(--c-text-light); font-weight: 400; letter-spacing: .5px; }

.nav-main { display: flex; align-items: center; gap: 28px; }
.nav-main a { color: var(--c-text); font-weight: 500; font-size: 14px; padding: 6px 0; position: relative; }
.nav-main a:hover, .nav-main a.active { color: var(--c-accent); }
.nav-main a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--c-accent);
}
.nav-cta { margin-left: 12px; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-left: 16px;
  font-size: 12px;
  font-weight: 600;
}
.lang-switch button {
  background: #fff;
  color: var(--c-text-light);
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 600;
}
.lang-switch button.active { background: var(--c-primary); color: #fff; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-primary-dark); margin: 5px 0; transition: .3s; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff;
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(244,121,32,.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(255,255,255,.05) 0%, transparent 40%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.hero-eyebrow { color: var(--c-accent); font-weight: 600; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { color: #fff; font-size: 3rem; line-height: 1.15; margin-bottom: 20px; }
.hero h1 span { color: var(--c-accent); }
.hero-lead { font-size: 1.15rem; opacity: .9; margin-bottom: 32px; max-width: 540px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; margin-top: 48px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.15); }
.hero-stat-num { font-size: 2rem; font-weight: 700; color: var(--c-accent); }
.hero-stat-label { font-size: 13px; opacity: .75; }

.hero-visual {
  position: relative;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-visual-placeholder {
  text-align: center;
  color: rgba(255,255,255,.5);
  font-size: 13px;
  padding: 24px;
}
.hero-visual-placeholder svg { width: 80px; height: 80px; opacity: .4; margin-bottom: 12px; }

/* ---- Sections ---- */
section { padding: 80px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-dark { background: var(--c-bg-dark); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-head { text-align: center; margin-bottom: 56px; }
.section-eyebrow { color: var(--c-accent); font-weight: 600; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--c-text-light); max-width: 700px; margin: 0 auto; font-size: 1.05rem; }

/* ---- Category Grid (9 categories) ---- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cat-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  transition: all .25s;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-accent);
}
.cat-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  margin-bottom: 20px;
  font-size: 28px;
}
.cat-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.cat-card p { color: var(--c-text-light); font-size: 14px; margin-bottom: 16px; flex: 1; }
.cat-link { color: var(--c-accent); font-weight: 600; font-size: 14px; }
.cat-link::after { content: " →"; transition: margin .2s; }
.cat-card:hover .cat-link::after { margin-left: 4px; }

/* ---- Feature Row ---- */
.feature-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.feature { text-align: center; }
.feature-icon { color: var(--c-accent); font-size: 2.5rem; margin-bottom: 16px; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--c-text-light); font-size: 14px; }

/* ---- Product List (used on category pages) ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all .25s;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-img {
  aspect-ratio: 4/3;
  background: var(--c-bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-light);
  font-size: 13px;
  position: relative;
}
.product-img-tag { position: absolute; top: 12px; left: 12px; background: var(--c-accent); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 3px; }
.product-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.product-model { color: var(--c-accent); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.product-body p { color: var(--c-text-light); font-size: 14px; flex: 1; margin-bottom: 12px; }
.product-specs { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--c-text-light); padding-top: 12px; border-top: 1px solid var(--c-border); }
.product-specs strong { color: var(--c-text); }

/* ---- Breadcrumb ---- */
.breadcrumb { padding: 16px 0; font-size: 13px; color: var(--c-text-light); background: var(--c-bg-alt); }
.breadcrumb a { color: var(--c-text-light); }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb .sep { margin: 0 8px; opacity: .5; }

/* ---- Page Header (smaller hero for inner pages) ---- */
.page-header {
  background: var(--c-primary);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.page-header h1 { color: #fff; margin-bottom: 8px; }
.page-header p { opacity: .85; max-width: 720px; margin: 0 auto; }
.page-header .crumbs { font-size: 13px; opacity: .7; margin-bottom: 12px; }
.page-header .crumbs a { color: #fff; opacity: .7; }

/* ---- CTA Banner ---- */
.cta-banner {
  background: var(--c-accent);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { opacity: .9; margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-banner .btn-primary { background: #fff; color: var(--c-accent); border-color: #fff; }
.cta-banner .btn-primary:hover { background: var(--c-primary-dark); color: #fff; border-color: var(--c-primary-dark); }

/* ---- Footer ---- */
.footer {
  background: var(--c-bg-dark);
  color: #cbd5e0;
  padding: 56px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { color: #fff; font-size: 14px; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { color: #cbd5e0; font-size: 14px; }
.footer a:hover { color: var(--c-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 13px; opacity: .7; }

/* ---- Forms ---- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--c-text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(244,121,32,.1);
}

/* ---- Product Detail ---- */
.pd-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.pd-gallery { background: var(--c-bg-alt); border-radius: 8px; padding: 24px; }
.pd-main-img { aspect-ratio: 4/3; background: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.pd-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pd-thumb { aspect-ratio: 1; background: #fff; border-radius: 4px; border: 2px solid transparent; cursor: pointer; }
.pd-thumb.active { border-color: var(--c-accent); }
.pd-info h1 { font-size: 1.8rem; margin-bottom: 8px; }
.pd-model { color: var(--c-accent); font-size: 1rem; font-weight: 600; margin-bottom: 20px; }
.pd-features { margin: 24px 0; }
.pd-features li { list-style: none; padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--c-border); }
.pd-features li::before { content: "✓"; position: absolute; left: 0; color: var(--c-accent); font-weight: 700; }
.pd-specs-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.pd-specs-table th, .pd-specs-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--c-border); font-size: 14px; }
.pd-specs-table th { background: var(--c-bg-alt); font-weight: 600; width: 40%; }

/* ---- Language Toggle Visibility ---- */
/* Default: English visible, Chinese hidden. JS toggles. */
[data-zh] { display: none; }
[data-en] { display: inline; }
body.lang-zh [data-zh] { display: inline; }
body.lang-zh [data-en] { display: none; }
body.lang-zh .block-zh, body.lang-zh div[data-zh], body.lang-zh p[data-zh], body.lang-zh h1[data-zh], body.lang-zh h2[data-zh], body.lang-zh h3[data-zh], body.lang-zh h4[data-zh], body.lang-zh li[data-zh], body.lang-zh span[data-zh], body.lang-zh a[data-zh], body.lang-zh label[data-zh], body.lang-zh button[data-zh] { display: block; }
body.lang-zh .block-en, body.lang-zh div[data-en], body.lang-zh p[data-en], body.lang-zh h1[data-en], body.lang-zh h2[data-en], body.lang-zh h3[data-en], body.lang-zh h4[data-en], body.lang-zh li[data-en], body.lang-zh span[data-en], body.lang-zh a[data-en], body.lang-zh label[data-en], body.lang-zh button[data-en] { display: none; }

/* For elements that should be inline (links, spans) by default */
body.lang-zh a[data-zh], body.lang-zh span[data-zh], body.lang-zh label[data-zh] { display: inline; }
body.lang-en a[data-en], body.lang-en span[data-en], body.lang-en label[data-en] { display: inline; }

/* Hide Chinese text by default for elements that are block by default */
body.lang-en div[data-zh], body.lang-en p[data-zh], body.lang-en h1[data-zh], body.lang-en h2[data-zh], body.lang-en h3[data-zh], body.lang-en h4[data-zh], body.lang-en li[data-zh] { display: none; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.4rem; }
  .cat-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  section { padding: 56px 0; }
  .hero { padding: 56px 0 64px; }
  .hero h1 { font-size: 1.9rem; }
  .cat-grid, .product-grid { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-main { display: none; }
  .nav-toggle { display: block; }
  .nav-open .nav-main {
    display: flex; flex-direction: column; gap: 16px;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; padding: 20px; border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
  }
  .lang-switch { margin-left: 0; }
}

/* ============================================================
   SIDEBAR (left product navigation — dark professional)
   Fixed full-height left rail; body has padding-left to make room
   ============================================================ */

body.has-sidebar { padding-left: 60px; }  /* default collapsed sidebar (60px) */
body.has-sidebar.sidebar-expanded { padding-left: 280px; }  /* expanded sidebar */
/* Fixed header doesn't need margin/padding tricks — it's already at top:0 left:0 right:0 */
body.has-sidebar > nav.subnav,
body.has-sidebar > footer.footer {
  /* still need to stretch past sidebar to full viewport width */
}
body.has-sidebar > nav.subnav {
  margin-left: -60px;
  padding-left: 60px;
}
body.has-sidebar.sidebar-expanded > nav.subnav {
  margin-left: -280px;
  padding-left: 280px;
}
body.has-sidebar > footer.footer {
  margin-left: -60px;
  padding-left: 60px;
}
body.has-sidebar.sidebar-expanded > footer.footer {
  margin-left: -280px;
  padding-left: 280px;
}

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 95;
  opacity: 0;
  transition: opacity .25s;
}
.sidebar-backdrop.show { display: block; opacity: 1; }

aside.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: 60px;  /* default collapsed — icon-only */
  background: var(--c-primary-dark);
  color: #fff;
  z-index: 96;
  overflow: hidden;  /* hide content when collapsed */
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-md);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
  transition: transform .25s, width .25s;
}
/* When body has sidebar-expanded, sidebar grows to full width */
body.has-sidebar.sidebar-expanded aside.sidebar { width: 280px; overflow-y: auto; }
aside.sidebar::-webkit-scrollbar { width: 6px; }
aside.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
aside.sidebar::-webkit-scrollbar-track { background: transparent; }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky; top: 0; background: var(--c-primary-dark); z-index: 1;
}
.sidebar-title { font-size: 15px; font-weight: 700; color: #fff; }
.sidebar-subtitle { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 2px; }

.sidebar-toggle {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: none;
  width: 28px; height: 28px;
  border-radius: 4px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .2s;
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.2); }

.sidebar-search {
  position: relative;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-search input {
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 8px 32px 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  transition: background .15s, border-color .15s;
}
.sidebar-search input::placeholder { color: rgba(255,255,255,0.5); }
.sidebar-search input:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--c-accent);
}
.sidebar-search-clear {
  position: absolute;
  right: 24px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  display: none;
}
.sidebar-search-clear.show { display: block; }
.sidebar-search-clear:hover { color: #fff; }

.sidebar-no-results {
  display: none;
  padding: 16px 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  text-align: center;
}
.sidebar-no-results.show { display: block; }

.sidebar-nav { padding: 8px 0 16px; }

.sidebar-group { margin-bottom: 8px; }

/* ============== Level 1: Business direction (Machinery / Production Line / Parts & Material) ============== */
.sidebar-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(255,255,255,0.06);
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  user-select: none;
  transition: background .15s, color .15s;
}
.sidebar-group-title:hover { background: rgba(255,255,255,0.12); }
.sidebar-group-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--c-accent);
  margin-right: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.sidebar-group-chevron {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255,255,255,0.7);
  transition: transform .2s, color .15s;
}
.sidebar-group-title:hover .sidebar-group-chevron { color: #fff; }
.sidebar-group.collapsed .sidebar-group-chevron { transform: rotate(-90deg); }
.sidebar-group.collapsed .sidebar-group-list { display: none; }
.sidebar-group-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  overflow: hidden;
}

/* Overview "All Products" link styled like a level-1 group */
.sidebar-group-overview { margin-bottom: 8px; }
.sidebar-group-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s, border-color .15s;
}
.sidebar-group-link::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--c-accent);
  margin-right: 6px;
  border-radius: 2px;
  flex-shrink: 0;
}
.sidebar-group-link:hover { background: rgba(255,255,255,0.12); }
.sidebar-group-link.active {
  background: rgba(244, 121, 32, 0.15);
  border-left-color: var(--c-accent);
}
.sidebar-group-overview .cat-emoji { font-size: 16px; }

/* ============== Level 2: Product category (Printing, Corrugated, etc.) ============== */
.sidebar-cat {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-cat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 22px;
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .15s;
  flex: 1;
  min-width: 0;
}
.sidebar-cat-link:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border-left-color: rgba(255,255,255,0.4);
}
.sidebar-cat-link.active {
  background: rgba(244, 121, 32, 0.15);
  color: #fff;
  font-weight: 600;
  border-left-color: var(--c-accent);
}
.sidebar-cat-link .cat-emoji { font-size: 14px; opacity: 0.95; }

/* Per-category chevron (toggles level 3) */
.sidebar-cat-chevron {
  position: absolute;
  right: 8px;
  top: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 3px;
  padding: 0;
  transition: transform .2s, color .15s, background .15s;
}
.sidebar-cat-chevron:hover { color: #fff; background: rgba(255,255,255,0.1); }
.sidebar-cat.expanded > .sidebar-cat-chevron { transform: rotate(90deg); color: #fff; }
.sidebar-cat.expanded > .sidebar-cat-chevron:hover { color: #fff; }

/* ============== Level 3: Individual model (CR-2200-2500, FP-S-SERIES, etc.) ============== */
.sidebar-cat-models {
  list-style: none;
  margin: 0;
  padding: 0 0 4px 0;
  background: rgba(0,0,0,0.18);
  display: none;
  border-left: 3px solid var(--c-accent);
  margin-left: 22px;
  border-radius: 0 0 4px 4px;
}
.sidebar-cat.expanded > .sidebar-cat-models { display: block; }
.sidebar-cat-models li { list-style: none; }
.sidebar-cat-models a {
  display: block;
  padding: 6px 14px 6px 18px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.3px;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.sidebar-cat-models a:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-left-color: rgba(255,255,255,0.3);
}
.sidebar-cat-models a.active {
  background: rgba(244, 121, 32, 0.2);
  color: #fff;
  font-weight: 600;
  border-left-color: var(--c-accent);
}

/* ============== Shared ============== */
.cat-emoji { font-size: 16px; line-height: 1; flex-shrink: 0; transition: transform .15s; }
.cat-label { flex: 1; min-width: 0; }
.cat-label-zh { display: none; }
body.lang-zh .cat-label { display: none; }
body.lang-zh .cat-label-zh { display: inline; }
.sidebar-group li a.hide,
.sidebar-cat.hide,
.sidebar-cat-models li.hide { display: none; }
.sidebar-cat.hide > .sidebar-cat-models { display: none; }

.sidebar-footer {
  padding: 12px 18px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-footer .btn {
  display: block;
  text-align: center;
  padding: 10px 14px;
  background: var(--c-accent);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s;
}
.sidebar-footer .btn:hover { background: #d9651a; }

/* When sidebar is collapsed (default state), hide all label text and show only icons */
aside.sidebar .sidebar-subtitle,
aside.sidebar .sidebar-search,
aside.sidebar .sidebar-no-results,
aside.sidebar .sidebar-group-title,
aside.sidebar .cat-label,
aside.sidebar .cat-label-zh,
aside.sidebar .sidebar-footer { display: none; }
aside.sidebar .sidebar-nav { padding: 8px 0; }
aside.sidebar .sidebar-group li a {
  justify-content: center;
  padding: 12px 8px;
}
aside.sidebar .sidebar-toggle { display: none; }  /* hide expand button when collapsed */

/* When sidebar is expanded, show all content (except .sidebar-no-results which
   only shows when .show class is added by JS during active search with zero matches) */
body.has-sidebar.sidebar-expanded aside.sidebar .sidebar-subtitle,
body.has-sidebar.sidebar-expanded aside.sidebar .sidebar-search,
body.has-sidebar.sidebar-expanded aside.sidebar .sidebar-group-title,
body.has-sidebar.sidebar-expanded aside.sidebar .cat-label,
body.has-sidebar.sidebar-expanded aside.sidebar .cat-label-zh,
body.has-sidebar.sidebar-expanded aside.sidebar .sidebar-footer { display: revert; }
body.has-sidebar.sidebar-expanded aside.sidebar .sidebar-no-results.show { display: block; }
body.has-sidebar.sidebar-expanded aside.sidebar .sidebar-group-title { display: flex; }
body.has-sidebar.sidebar-expanded aside.sidebar .sidebar-group li a { justify-content: flex-start; padding: 9px 14px 9px 22px; }
body.has-sidebar.sidebar-expanded aside.sidebar .sidebar-toggle { display: flex; }

/* Mobile FAB (open sidebar) */
.sidebar-toggle-mobile {
  display: none;
  position: fixed;
  bottom: 24px; left: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 90;
  box-shadow: var(--shadow-lg);
  align-items: center;
  justify-content: center;
  transition: transform .2s, background .15s;
}
.sidebar-toggle-mobile:hover { background: var(--c-primary-dark); }
.sidebar-toggle-mobile:active { transform: scale(0.95); }

/* ============================================================
   Responsive — Sidebar + PDP
   ============================================================ */

/* Tablet: narrower sidebar when expanded */
@media (max-width: 1024px) {
  body.has-sidebar.sidebar-expanded { padding-left: 240px; }
  body.has-sidebar.sidebar-expanded > header.header,
  body.has-sidebar.sidebar-expanded > nav.subnav,
  body.has-sidebar.sidebar-expanded > footer.footer {
    margin-left: -240px;
    padding-left: 240px;
  }
  body.has-sidebar.sidebar-expanded aside.sidebar { width: 240px; }
}

/* Mobile: sidebar becomes a slide-in drawer */
@media (max-width: 768px) {
  body.has-sidebar { padding-left: 0; }
  body.has-sidebar > header.header,
  body.has-sidebar > nav.subnav,
  body.has-sidebar > footer.footer {
    margin-left: 0;
    padding-left: 0;
  }
  body.has-sidebar.sidebar-expanded { padding-left: 0; }
  body.has-sidebar.sidebar-expanded > header.header,
  body.has-sidebar.sidebar-expanded > nav.subnav,
  body.has-sidebar.sidebar-expanded > footer.footer {
    margin-left: 0;
    padding-left: 0;
  }
  aside.sidebar {
    width: 60px;  /* collapsed icon strip */
  }
  body.has-sidebar.sidebar-expanded aside.sidebar {
    width: 300px;
    max-width: 85vw;
    transform: translateX(0);
    z-index: 100;
    box-shadow: var(--shadow-lg);
  }
  aside.sidebar { transform: translateX(-100%); transition: transform .25s, width .25s; }
  body.has-sidebar.sidebar-expanded aside.sidebar.mobile-open,
  body.has-sidebar.sidebar-expanded aside.sidebar { transform: translateX(0); }
  .sidebar-toggle-mobile { display: flex; }
  .sidebar-toggle { display: none; }
}

/* ============================================================
   PRODUCT DETAIL — Professional modules
   ============================================================ */

/* Sticky inquiry panel (right side) — now sticks below header + subnav */
.pd-inquiry-sticky {
  position: sticky;
  top: calc(var(--header-h) + 70px);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.pd-inquiry-sticky h3 {
  font-size: 1.1rem;
  color: var(--c-primary-dark);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-border);
}
.pd-inquiry-sticky .price { font-size: 0.85rem; color: var(--c-text-light); margin-bottom: 4px; }
.pd-inquiry-sticky .price-value { font-size: 1.4rem; font-weight: 700; color: var(--c-accent); margin-bottom: 16px; }
.pd-inquiry-sticky .price-note { font-size: 12px; color: var(--c-text-light); margin-bottom: 16px; }
.pd-inquiry-sticky .meta-row {
  display: flex; justify-content: space-between; padding: 6px 0;
  font-size: 13px; border-bottom: 1px dashed var(--c-border);
}
.pd-inquiry-sticky .meta-row:last-of-type { border-bottom: none; }
.pd-inquiry-sticky .meta-label { color: var(--c-text-light); }
.pd-inquiry-sticky .meta-value { color: var(--c-text); font-weight: 600; }

/* Video section */
.pd-video {
  position: relative; aspect-ratio: 16/9; background: #000;
  border-radius: 8px; overflow: hidden;
}
.pd-video iframe, .pd-video video { width: 100%; height: 100%; display: block; }
.pd-video-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a3a5c 0%, #0f2540 100%);
  color: rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; font-size: 14px;
}
.pd-video-placeholder svg { width: 64px; height: 64px; opacity: 0.5; margin-bottom: 12px; }

/* Principle / workflow diagram */
.pd-principle {
  background: var(--c-bg-alt); padding: 40px 24px; border-radius: 8px; text-align: center;
}
.pd-flow {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px; margin: 24px 0 16px;
}
.pd-flow-step {
  background: #fff; border: 2px solid var(--c-primary);
  color: var(--c-primary-dark); padding: 10px 16px; border-radius: 4px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.pd-flow-arrow { color: var(--c-accent); font-size: 18px; font-weight: 700; }
.pd-flow-legend { font-size: 13px; color: var(--c-text-light); margin-top: 8px; }

/* Collapsible spec table */
.pd-specs-group {
  background: #fff; border: 1px solid var(--c-border); border-radius: 6px;
  margin-bottom: 12px; overflow: hidden;
}
.pd-specs-group-header {
  background: var(--c-bg-alt); padding: 14px 18px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; color: var(--c-primary-dark);
  user-select: none; border-bottom: 1px solid var(--c-border);
  transition: background .15s;
}
.pd-specs-group-header:hover { background: #edf2f7; }
.pd-specs-group-header .toggle-icon { color: var(--c-accent); font-size: 18px; transition: transform .2s; }
.pd-specs-group.collapsed .toggle-icon { transform: rotate(-90deg); }
.pd-specs-group.collapsed .pd-specs-group-body { display: none; }
.pd-specs-group-body { padding: 0; }
.pd-specs-group-body .pd-specs-table { margin: 0; }
.pd-specs-group-body .pd-specs-table th { background: #fff; }
.pd-specs-group-body .pd-specs-table tr:last-child td,
.pd-specs-group-body .pd-specs-table tr:last-child th { border-bottom: none; }

/* Product gallery with thumbnails */
.pd-gallery {
  background: #fff; border: 1px solid var(--c-border); border-radius: 8px;
  padding: 16px; position: sticky; top: calc(var(--header-h) + 70px);
}
.pd-main-img {
  aspect-ratio: 4/3; background: var(--c-bg-alt); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-light); font-size: 13px; margin-bottom: 12px; overflow: hidden;
}
.pd-main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pd-thumb {
  aspect-ratio: 1; background: var(--c-bg-alt); border: 2px solid transparent;
  border-radius: 4px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; font-size: 11px; color: var(--c-text-light);
  transition: all .15s;
}
.pd-thumb:hover { border-color: var(--c-border); }
.pd-thumb.active { border-color: var(--c-accent); }
.pd-thumb-tag { background: var(--c-accent); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 2px; margin-left: 4px; }

/* PDP layout (no sidebar) */
.pdp-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.pdp-main { min-width: 0; }

/* ============================================================
   Responsive — Subnav + PDP
   ============================================================ */
@media (max-width: 1024px) {
  .pdp-layout { grid-template-columns: 1fr; }
  .pd-gallery, .pd-inquiry-sticky { position: static; }
}

@media (max-width: 640px) {
  .pd-specs-group-header { padding: 16px 18px; font-size: 15px; }
  .pd-video-placeholder { font-size: 12px; }
  .pd-flow-step { font-size: 12px; padding: 8px 12px; }
}
