/* ============================================================
   JWM Guard Tour — responsive stylesheet (desktop / tablet / mobile)
   ============================================================ */
:root {
  --c-primary: #0e3a6b;
  --c-primary-dark: #0a2547;
  --c-primary-light: #1d5aa0;
  --c-accent: #ff6b1a;
  --c-accent-dark: #e2560c;
  --c-bg: #ffffff;
  --c-bg-soft: #f4f7fb;
  --c-bg-dark: #0a2547;
  --c-text: #1f2937;
  --c-text-soft: #5b6977;
  --c-border: #e3e9f0;
  --c-ok: #1f9d55;
  --shadow: 0 6px 24px rgba(14, 58, 107, 0.10);
  --shadow-lg: 0 12px 40px rgba(14, 58, 107, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1200px;
  --header-h: 72px;
  --font: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-accent); }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--c-primary-dark); font-weight: 700; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: clamp(18px, 2vw, 22px); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-soft { background: var(--c-bg-soft); }
.section-dark { background: var(--c-bg-dark); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.text-center { text-align: center; }
.lead { font-size: 18px; color: var(--c-text-soft); }
.muted { color: var(--c-text-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; cursor: pointer;
  border: 2px solid transparent; transition: all .2s ease; white-space: nowrap;
}
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-light { background: #fff; color: var(--c-primary); }
.btn-light:hover { background: var(--c-bg-soft); }

/* ---------- Auto-detect language bar ---------- */
#lang-detect-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
  background: var(--c-primary-dark); color: #fff;
  display: none; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 16px; font-size: 14px; flex-wrap: wrap;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
#lang-detect-bar.show { display: flex; }
#lang-detect-bar .ld-text { margin-right: 4px; }
#lang-detect-bar .ld-flag { font-size: 18px; }
#lang-detect-bar .ld-count { font-weight: 700; color: var(--c-accent); }
#lang-detect-bar button {
  border: none; padding: 6px 14px; border-radius: 6px; cursor: pointer;
  font-weight: 600; font-size: 13px;
}
#lang-detect-bar .ld-yes { background: var(--c-accent); color: #fff; }
#lang-detect-bar .ld-no  { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { display: flex; align-items: center; }
.logo img { height: 44px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 6px; color: var(--c-text);
  font-weight: 600; font-size: 15px;
}
.nav a:hover, .nav a.active { color: var(--c-primary); background: var(--c-bg-soft); }

/* Language switcher (flag bar) */
.lang-switch { position: relative; margin-left: 8px; }
.lang-switch > button {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--c-bg-soft); border: 1px solid var(--c-border);
  border-radius: 20px; padding: 6px 12px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.lang-switch .flag-grid {
  display: none; position: absolute; right: 0; top: 110%;
  background: #fff; border: 1px solid var(--c-border); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 8px; grid-template-columns: 1fr 1fr;
  gap: 4px; min-width: 220px; z-index: 1100;
}
.lang-switch.open .flag-grid { display: grid; }
.lang-switch .flag-grid a {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: 6px; font-size: 14px; color: var(--c-text);
}
.lang-switch .flag-grid a:hover, .lang-switch .flag-grid a.active { background: var(--c-bg-soft); color: var(--c-primary); }
.lang-switch .flag-grid .fl { font-size: 18px; }

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

/* ---------- Mobile drawer ---------- */
.drawer-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1050; }
.drawer-backdrop.show { display: block; }
.drawer {
  position: fixed; top: 0; right: -300px; width: 280px; height: 100%;
  background: #fff; z-index: 1060; transition: right .25s ease; padding: 70px 18px 18px;
  box-shadow: -8px 0 30px rgba(0,0,0,.15); overflow-y: auto;
}
.drawer.open { right: 0; }
.drawer a { display: block; padding: 12px 8px; border-bottom: 1px solid var(--c-border); font-weight: 600; }
.drawer .lang-switch-m { margin-top: 14px; }
.drawer .lang-switch-m a { display: flex; align-items: center; gap: 10px; border: none; padding: 8px; }
.drawer .drawer-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 26px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 60%, var(--c-primary-light) 100%);
  color: #fff; padding: 90px 0 80px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(255,107,26,.35), transparent 70%); border-radius: 50%;
}
.hero h1 { color: #fff; max-width: 760px; }
.hero .lead { color: rgba(255,255,255,.88); max-width: 620px; margin: 18px 0 28px; }
.hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; margin-top: 48px; flex-wrap: wrap; }
.hero-stats .stat .num { font-size: 30px; font-weight: 800; color: var(--c-accent); }
.hero-stats .stat .lbl { font-size: 14px; color: rgba(255,255,255,.8); }

/* ---------- Section heading ---------- */
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.sec-head .eyebrow { color: var(--c-accent); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; }
.sec-head h2 { margin: 10px 0; }
.sec-head p { color: var(--c-text-soft); }

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

.card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .ic { font-size: 30px; margin-bottom: 12px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--c-text-soft); font-size: 15px; }

/* ---------- Product grid ---------- */
.product-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-thumb {
  height: 200px; background: linear-gradient(135deg, #eaf1fa, #d7e6f7);
  display: flex; align-items: center; justify-content: center; font-size: 54px; color: var(--c-primary);
  overflow: hidden;
}
/* Cards must show the WHOLE product, never a cropped one -> contain + inner padding */
.product-thumb img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  padding: 10px; box-sizing: border-box;
}
.thumb-emoji { line-height: 1; }
.product-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-body .model { color: var(--c-accent); font-weight: 700; font-size: 13px; letter-spacing: 1px; }
.product-body h3 { font-size: 19px; margin: 4px 0 8px; }
.product-body p { color: var(--c-text-soft); font-size: 14px; flex: 1; }
.product-body .tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.tag { background: var(--c-bg-soft); color: var(--c-primary); font-size: 12px; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.product-body .btn { align-self: flex-start; }

/* ---------- Spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--c-border); font-size: 15px; }
.spec-table th { width: 42%; color: var(--c-text-soft); font-weight: 600; background: var(--c-bg-soft); }
.spec-table tr:last-child td, .spec-table tr:last-child th { border-bottom: none; }

/* ---------- Lists / features ---------- */
.feature-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--c-border); }
.feature-list li:last-child { border-bottom: none; }
.feature-list .mk { color: var(--c-ok); font-weight: 800; flex-shrink: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 14px; color: var(--c-text-soft); padding: 18px 0; }
.breadcrumb a { color: var(--c-primary); }

/* ---------- Forms ---------- */
.form-wrap { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-row label .req { color: var(--c-accent); margin-left: 2px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; color: var(--c-text); background: #fff;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(14,58,107,.12); }
.form-row textarea { min-height: 130px; resize: vertical; }
.form-hint { font-size: 13px; color: var(--c-text-soft); margin-bottom: 18px; }
.form-alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; display: none; }
.form-alert.ok { display: block; background: #e7f6ee; color: #146c3a; border: 1px solid #b6e3c8; }
.form-alert.err { display: block; background: #fdecea; color: #b3261e; border: 1px solid #f5c4be; }
.form-note { font-size: 12px; color: var(--c-text-soft); margin-top: 10px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.contact-info .ci { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--c-border); }
.contact-info .ci .ic { font-size: 22px; }
.contact-info .ci .k { font-weight: 700; color: var(--c-primary-dark); }
.contact-info .ci .v { color: var(--c-text); }

/* ---------- Floating button ---------- */
#float-btn {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-ok); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; font-size: 26px; border: none;
}
#float-btn:hover { transform: scale(1.06); }
#wechat-pop {
  position: fixed; right: 22px; bottom: 90px; z-index: 900; background: #fff;
  border: 1px solid var(--c-border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow-lg);
  display: none; width: 240px; text-align: center;
}
#wechat-pop.show { display: block; }
#wechat-pop .wx-id { font-weight: 800; font-size: 18px; color: var(--c-primary-dark); margin: 6px 0; }
#wechat-pop .wx-qr { width: 150px; height: 150px; margin: 8px auto; background: #f0f0f0; display: flex; align-items: center; justify-content: center; color: var(--c-text-soft); font-size: 13px; border-radius: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-bg-dark); color: #cdd8e6; padding: 54px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.site-footer a { color: #cdd8e6; display: block; padding: 5px 0; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.site-footer .f-about { font-size: 14px; line-height: 1.7; }
.site-footer .f-logo { font-weight: 800; color: #fff; font-size: 20px; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 18px; font-size: 13px; text-align: center; color: #9fb0c4; }

/* ---------- News / cases ---------- */
.news-card { display: flex; gap: 18px; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.news-card .date { color: var(--c-accent); font-weight: 700; font-size: 13px; }
.news-card h3 { font-size: 17px; margin: 4px 0 6px; }
.news-card p { color: var(--c-text-soft); font-size: 14px; }

/* ---------- Misc ---------- */
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: #fff; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 40px; }

/* ---------- Product detail media ---------- */
.pdp-main {
  height: 380px; background: linear-gradient(135deg, #eaf1fa, #d7e6f7);
  border-radius: var(--radius); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 96px; color: var(--c-primary); overflow: hidden;
}
.pdp-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pdp-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.pdp-gallery .gal-thumb {
  width: 100%; height: 92px; object-fit: contain; border-radius: 8px;
  border: 1px solid var(--c-border); background: #fff; cursor: pointer;
  padding: 4px; box-sizing: border-box;
  transition: border-color .2s, transform .2s;
}
.pdp-gallery .gal-thumb:hover { border-color: var(--c-primary); transform: translateY(-2px); }
.pdp-gallery .gal-thumb.is-active { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(11,79,214,.18); }
/* click-to-enlarge affordance (icon only — no untranslated label text) */
.pdp-zoomable { cursor: zoom-in; }
.pdp-gallery .gal-thumb { cursor: pointer; }
.product-thumb img { cursor: pointer; }

/* ---------- Lightbox (full-size product photo) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(8, 18, 34, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 96vw; max-height: 92vh; width: auto; height: auto;
  object-fit: contain; border-radius: 10px; background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
}
.lightbox::after {
  content: '✕'; position: absolute; top: 14px; right: 20px;
  color: #fff; font-size: 26px; line-height: 1; opacity: .8;
}
@media (max-width: 768px) {
  .lightbox { padding: 10px; }
  .lightbox img { max-height: 86vh; }
  .pdp-gallery { grid-template-columns: repeat(2, 1fr); }
}
.breadcrumb { font-size: 14px; color: var(--c-text-soft); margin-bottom: 22px; }
.breadcrumb a { color: var(--c-primary); }
.breadcrumb span { color: var(--c-text-soft); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 900px; margin: 0 auto; }
.faq-item {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden;
}
.faq-item > summary {
  cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700;
  font-size: 16px; color: var(--c-text); position: relative; padding-right: 52px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 700; color: var(--c-primary); transition: transform .2s;
}
.faq-item[open] > summary::after { content: '–'; }
.faq-item[open] > summary { color: var(--c-primary-dark); }
.faq-item .faq-a { padding: 0 22px 20px; color: var(--c-text-soft); font-size: 15px; line-height: 1.75; }

/* ============================================================
   Responsive — tablet
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  /* 8 nav items + logo + language switcher no longer fit below ~1100px:
     collapse into the drawer (which carries every nav link and language). */
  .nav { display: none; }
  .lang-switch { display: none; }
  .menu-toggle { display: block; }
}

/* ============================================================
   Responsive — mobile
   ============================================================ */
@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .logo img { height: 34px; }
  .nav { display: none; }
  .lang-switch { display: none; }
  .menu-toggle { display: block; }
  .section { padding: 44px 0; }
  .hero { padding: 64px 0 56px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .form-wrap { padding: 22px; }
  .product-thumb { height: 160px; }
  .pdp-main { height: 260px; font-size: 72px; }
  .pdp-gallery { grid-template-columns: repeat(3, 1fr); }
  .faq-item > summary { padding: 15px 16px; font-size: 15px; padding-right: 44px; }
  .faq-item > summary::after { right: 16px; }
  .faq-item .faq-a { padding: 0 16px 16px; font-size: 14px; }
  #lang-detect-bar { font-size: 13px; padding: 8px 12px; gap: 8px; }
  #float-btn { width: 50px; height: 50px; font-size: 22px; right: 16px; bottom: 16px; }
}
