/* ============ ZMSK B2B Site Styles ============ */
:root {
  --primary: #1a4fa0;
  --primary-dark: #133a78;
  --primary-light: #eaf1fb;
  --accent: #f59e0b;
  --text: #1f2937;
  --text-2: #6b7280;
  --bg: #ffffff;
  --bg-2: #f5f7fa;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(20, 40, 80, 0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); line-height: 1.65; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 13px 30px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all .25s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(26,79,160,.3); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Top bar ---------- */
.topbar { background: var(--primary-dark); color: #cfe0f7; font-size: 13px; padding: 7px 0; }
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #fff; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 48px; width: auto; display: block; }
.footer-logo .logo-img { height: 54px; filter: brightness(0) invert(1); opacity: .92; }
.logo-badge { width: 42px; height: 42px; background: var(--primary); color: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; }
.logo-text { font-size: 22px; font-weight: 800; color: var(--primary-dark); letter-spacing: .5px; line-height: 1; display: flex; flex-direction: column; }
.logo-sub { font-size: 9px; letter-spacing: 3.5px; color: var(--text-2); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav > a { font-weight: 600; font-size: 15px; color: var(--text); position: relative; padding: 6px 0; }
.nav > a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--primary); transition: width .25s; }
.nav > a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta { margin-left: 6px; }
.menu-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--primary-dark); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, #f2f6fd 0%, #e6eefb 55%, #dde8f8 100%); padding: 72px 0 84px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-tag { color: var(--primary); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 13px; margin-bottom: 14px; }
.hero h1 { font-size: 44px; line-height: 1.18; color: var(--primary-dark); margin-bottom: 18px; }
.hero h1 span { color: var(--accent); }
.hero-desc { font-size: 17px; color: var(--text-2); margin-bottom: 28px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-points { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: var(--primary-dark); }

/* hero kiosk mockup */
.hero-visual { display: flex; justify-content: center; }
.kiosk-mock { width: 250px; background: linear-gradient(160deg, #243b6b, #17264a); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); animation: float 5s ease-in-out infinite; }
.kiosk-screen { background: #fff; border-radius: 10px; padding: 14px; }
.ks-bar { height: 10px; width: 45%; background: var(--primary); border-radius: 5px; margin-bottom: 12px; }
.ks-line { height: 7px; background: #d7e2f2; border-radius: 4px; margin-bottom: 8px; }
.w80 { width: 80%; } .w60 { width: 60%; }
.ks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.ks-grid span { height: 34px; background: #eaf1fb; border-radius: 6px; }
.ks-grid span:nth-child(2n) { background: #fbeed3; }
.ks-btn { height: 16px; width: 55%; background: var(--accent); border-radius: 8px; margin: 4px auto 2px; }
.kiosk-body { height: 90px; margin-top: 14px; background: rgba(255,255,255,.08); border-radius: 10px; }
.kiosk-qr { width: 44px; height: 44px; margin: 10px auto 0; background: repeating-conic-gradient(#fff 0 25%, #17264a 0 50%) 0 0/12px 12px; border-radius: 6px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Stats ---------- */
.stats { background: var(--primary-dark); color: #fff; padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat strong { font-size: 38px; font-weight: 800; display: block; color: #fff; }
.stat span { font-size: 14px; color: #b9cdee; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-title { font-size: 32px; color: var(--primary-dark); margin-bottom: 16px; line-height: 1.25; }
.section-title.center { text-align: center; }
.section-desc { color: var(--text-2); max-width: 640px; margin-bottom: 40px; }
.section-desc.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- About ---------- */
.about { background: var(--bg-2); }
.about-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: start; }
.about-text p { margin-bottom: 14px; color: #374151; }
.about-list { list-style: none; margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about-list li { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.about-list strong { color: var(--primary); display: block; }
.about-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.about-card h3 { color: var(--primary-dark); margin-bottom: 18px; font-size: 20px; }
.why-item { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.why-item:first-of-type { border-top: none; }
.why-num { font-size: 22px; font-weight: 800; color: var(--primary-light); -webkit-text-stroke: 1px var(--primary); flex-shrink: 0; }
.why-item p { font-size: 13.5px; color: var(--text-2); }

/* ---------- Products ---------- */
.cat-tabs { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.cat-tab { padding: 10px 22px; border-radius: 30px; border: 1.5px solid var(--border); background: #fff; font-weight: 600; font-size: 14.5px; cursor: pointer; transition: all .2s; color: var(--text-2); }
.cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.cat-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .25s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #c8d8ef; }
.product-thumb { aspect-ratio: 1 / 1; width: 100%; padding: 10px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 44px; overflow: hidden; }
.product-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-body h3 { font-size: 15px; line-height: 1.4; margin-bottom: 6px; min-height: 42px; }
.product-model { font-size: 13px; color: var(--primary); font-weight: 700; margin-bottom: 12px; }
.product-btn { margin-top: auto; text-align: center; padding: 9px 0; border-radius: 7px; border: 1.5px solid var(--primary); color: var(--primary); font-weight: 700; font-size: 14px; cursor: pointer; transition: all .2s; background: #fff; }
.product-btn:hover { background: var(--primary); color: #fff; }

/* ---------- Solutions ---------- */
.solutions { background: var(--bg-2); }
.solution-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.solution-card { background: #fff; border-radius: var(--radius); padding: 28px; border-top: 3px solid var(--primary); transition: all .25s; }
.solution-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.sol-icon { font-size: 34px; margin-bottom: 12px; }
.solution-card h3 { font-size: 18px; color: var(--primary-dark); margin-bottom: 8px; }
.solution-card p { font-size: 14px; color: var(--text-2); }

/* ---------- Inquiry ---------- */
.inquiry { background: linear-gradient(135deg, #142c57, #1a4fa0); color: #fff; }
.inquiry .section-title { color: #fff; }
.inquiry-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.inquiry-info p { color: #c9dbf5; margin-bottom: 26px; }
.contact-list { list-style: none; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.cl-icon { width: 44px; height: 44px; background: rgba(255,255,255,.12); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.contact-list strong { display: block; font-size: 14px; color: #fff; }
.contact-list span, .contact-list a { font-size: 14px; color: #c9dbf5; }
.contact-list a:hover { color: #fff; text-decoration: underline; }

.inquiry-form { background: #fff; border-radius: var(--radius); padding: 32px; color: var(--text); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: #374151; }
.form-group em { color: #dc2626; font-style: normal; }
.form-group input, .form-group textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14.5px; font-family: inherit; transition: border-color .2s; background: #fafbfc; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
.form-group input.invalid, .form-group textarea.invalid { border-color: #dc2626; }
.form-status { display: none; padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.form-status.error { display: block; background: #fee2e2; color: #b91c1c; }
.form-status.success { display: block; background: #dcfce7; color: #15803d; }
.form-note { font-size: 12.5px; color: var(--text-2); text-align: center; margin-top: 12px; }

/* ---------- Footer ---------- */
.footer { background: #101d38; color: #9db2d6; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 36px; padding-bottom: 40px; }
.footer-col p { font-size: 13.5px; margin-top: 14px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 15px; }
.footer-col a, .footer-col span { display: block; font-size: 14px; margin-bottom: 10px; color: #9db2d6; }
.footer-col a:hover { color: #fff; }
.footer-logo .logo-text { color: #fff; }
.footer-logo .logo-sub { color: #9db2d6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; font-size: 13px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner, .about-inner, .inquiry-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
  .nav { position: fixed; top: 72px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 20px; gap: 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); display: none; }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
}
@media (max-width: 560px) {
  .form-row, .about-list { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}

/* ============ v2: dynamic front-end additions ============ */
.hero h1 .hl { color: var(--accent); }
.header.scrolled { box-shadow: 0 4px 14px rgba(20,40,80,.07); }
.product-search { max-width: 420px; margin: 0 auto 26px; }
.product-search input { width: 100%; padding: 12px 18px; border: 1.5px solid var(--border); border-radius: 30px; font-size: 14.5px; background: #fff; }
.product-search input:focus { outline: none; border-color: var(--primary); }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-card-actions { display: flex; gap: 8px; margin-top: auto; }
.product-btn.ghost { background: #fff; color: var(--text-2); border-color: var(--border); }
.product-btn.ghost:hover { border-color: var(--primary); color: var(--primary); background: #fff; }
.product-card-actions .product-btn { flex: 1; padding: 8px 4px; font-size: 13.5px; }
.empty-hint { text-align: center; color: var(--text-2); padding: 24px 0; }
.load-more-wrap { text-align: center; margin-top: 32px; }
.cat-tab small { opacity: .7; font-size: 12px; }
.solution-img { margin: -28px -28px 18px; height: 150px; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; }
.solution-img img { width: 100%; height: 100%; object-fit: cover; }
.sol-detail { margin-top: 10px; font-size: 13.5px; color: var(--text-2); opacity: .9; }

/* product detail modal */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,20,40,.55); backdrop-filter: blur(2px); }
.modal-box { position: relative; background: #fff; border-radius: 14px; max-width: 860px; width: 100%; max-height: 88vh; overflow: auto; display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; }
.modal-close { position: absolute; top: 12px; right: 14px; border: none; background: #f1f5f9; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; color: #475569; z-index: 2; }
.modal-media { background: #f5f7fa; display: flex; align-items: center; justify-content: center; min-height: 260px; overflow: hidden; aspect-ratio: 1 / 1; }
.modal-media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.modal-media { flex-direction: column; }
.modal-media > img { width: 100%; flex: 1; min-height: 0; }
.modal-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.modal-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; opacity: .7; }
.modal-thumbs img.active { border-color: var(--primary); opacity: 1; }
.product-link { color: inherit; }
.product-link:hover { color: var(--primary); }
.modal-placeholder { font-size: 90px; width: 100%; height: 100%; min-height: 260px; display: flex; align-items: center; justify-content: center; }
.modal-body { padding: 32px 28px; }
.modal-body h3 { font-size: 20px; color: var(--primary-dark); margin-bottom: 6px; }
.modal-body p { font-size: 14px; color: #475569; margin-bottom: 10px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 16px 0 20px; font-size: 13.5px; }
.spec-table th { text-align: left; background: var(--primary-light); color: var(--primary-dark); padding: 8px 12px; width: 40%; font-weight: 700; border-bottom: 1px solid #fff; }
.spec-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); color: #475569; }
.modal-actions .btn { width: 100%; }
@media (max-width: 720px) {
  .modal-box { grid-template-columns: 1fr; }
  .modal-media, .modal-placeholder { min-height: 180px; }
  .modal-body { padding: 22px 20px; }
}

/* ============ v2.2: multi-page ============ */
.nav > a.active { color: var(--primary); }
.nav > a.active::after { width: 100%; }
.page-hero { background: linear-gradient(135deg, #142c57 0%, #1a4fa0 100%); color: #fff; padding: 58px 0 52px; }
.page-hero h1 { font-size: 36px; color: #fff; line-height: 1.2; }
.page-hero .crumbs { color: #b9cdee; font-size: 13.5px; margin-top: 10px; }
.page-hero .crumbs a { color: #fff; }
.page-hero .crumbs a:hover { text-decoration: underline; }
.page-hero .lead { color: #c9dbf5; max-width: 640px; margin-top: 12px; font-size: 16px; }
.page-section { padding-top: 56px; }
.link-more { display: inline-block; margin-top: 18px; color: var(--primary); font-weight: 700; font-size: 14.5px; }
.link-more:hover { text-decoration: underline; }
.solution-item { display: flex; flex-direction: column; }
.solution-item .link-more { margin-top: auto; padding-top: 14px; }
.btn-light { background: #fff; color: var(--primary-dark); border: 2px solid #fff; }
.btn-light:hover { background: transparent; color: #fff; }
.cta-strip { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; padding: 52px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-strip h2 { font-size: 26px; color: #fff; margin-bottom: 6px; }
.cta-strip p { color: #c9dbf5; }
.cta-strip .btn-light { flex-shrink: 0; }
@media (max-width: 720px) {
  .page-hero h1 { font-size: 28px; }
  .cta-inner { flex-direction: column; text-align: center; }
}

/* ============ v2.3: global inquiry popup ============ */
button.btn { font-family: inherit; }
button.link-more { background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.inquiry-modal .modal-box { max-width: 620px; display: block; }
.inquiry-modal .modal-body { padding: 28px 30px 24px; }
.inquiry-modal .modal-body h3 { font-size: 22px; }
.inq-sub { font-size: 14px; color: #475569; margin-bottom: 18px; }
.inquiry-modal .form-note { margin-top: 10px; }
@media (max-width: 560px) {
  .inquiry-modal .form-row { grid-template-columns: 1fr; gap: 0; }
  .inquiry-modal .modal-body { padding: 22px 18px; }
}

/* ============ v2.4: SSR fallback content (crawlers / no-JS) ============ */
.ssr-content { padding: 42px 0; background: #fff; }
.ssr-content h1 { font-size: 30px; color: var(--primary-dark); margin-bottom: 18px; }
.ssr-content img { max-width: 420px; width: 100%; height: auto; display: block; margin: 0 0 18px; border: 1px solid var(--border); border-radius: 10px; }
.ssr-content .ssr-lead { font-size: 16.5px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.ssr-content p { font-size: 15px; color: #475569; margin-bottom: 12px; line-height: 1.7; }
.ssr-content .ssr-specs { width: 100%; max-width: 560px; border-collapse: collapse; margin: 14px 0 18px; font-size: 14px; }
.ssr-content .ssr-specs th { text-align: left; background: var(--primary-light); color: var(--primary-dark); padding: 8px 12px; width: 38%; border-bottom: 1px solid #fff; }
.ssr-content .ssr-specs td { padding: 8px 12px; border-bottom: 1px solid var(--border); color: #475569; }
.ssr-content a { color: var(--primary); font-weight: 700; }
