/*
Theme Name: XK Instrument Pro EN
Theme URI: https://www.xk-instrument.com/theme
Author: XK Web Studio
Author URI: https://www.xk-instrument.com
Description: Tech deep-blue, modern industrial-style corporate theme designed for industrial instrument / level meter manufacturers. Built-in product catalog (custom post type + parameter spec table), online inquiry system, banned-word detection (real-time front-end form blocking + backend save blocking, with a customizable word library), modular home sections, and responsive layout. Compatible with PHP 7.4–8.4, WordPress 6.x, MySQL 5.7/8.0; supports mainstream plugins such as WooCommerce, Contact Form 7, WPForms, Yoast SEO, WPML/Polylang, with multilingual and continuous-upgrade interfaces reserved at the code level.
    Version: 1.42.12
    Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: xk-instrument
Tags: industrial, business, e-commerce, custom-logo, custom-menu, featured-images, translation-ready, one-column, two-columns, left-sidebar
*/

/* ==========================================================
   XK Instrument Pro v1.42.2
   Design system: Tech deep-blue · modern industrial style
   ========================================================== */

:root {
  /* Primary palette */
  --xk-navy-900: #060f24;
  --xk-navy-800: #0a1b3d;
  --xk-navy-700: #0e2a5c;
  --xk-navy-600: #123a7d;
  --xk-blue-500: #1b5fd9;
  --xk-blue-400: #3b82f6;
  --xk-cyan-400: #22d3ee;
  --xk-cyan-300: #67e8f9;

  /* Accent color (brand orange, complements deep blue, used for call-to-action elements) */
  --xk-orange: #ff6600;
  --xk-orange-2: #ff8a3d;
  --xk-orange-light: #ffb27d;

  /* Neutral colors */
  --xk-bg: #f4f7fc;
  --xk-surface: #ffffff;
  --xk-line: #dbe4f0;
  --xk-text: #1f2a3d;
  --xk-text-2: #55637a;
  --xk-text-3: #8a97ab;
  --xk-header-bg: rgba(245, 246, 248, .6); /* Top nav: light gray 60% transparent */

  /* Functional colors */
  --xk-success: #10b981;
  --xk-warning: #f59e0b;
  --xk-danger: #ef4444;

  /* Gradients and shadows */
  --xk-grad-hero: linear-gradient(135deg, #060f24 0%, #0e2a5c 55%, #123a7d 100%);
  --xk-grad-btn: linear-gradient(90deg, #1b5fd9 0%, #22d3ee 100%);
  --xk-grad-orange: linear-gradient(90deg, #ff6600 0%, #ff8a3d 100%);
  --xk-grad-band: linear-gradient(90deg, #0a1b3d 0%, #123a7d 100%);
  --xk-shadow-sm: 0 2px 8px rgba(10, 27, 61, .06);
  --xk-shadow-md: 0 8px 24px rgba(10, 27, 61, .10);
  --xk-shadow-lg: 0 16px 48px rgba(10, 27, 61, .16);
  --xk-shadow-orange: 0 6px 18px rgba(255, 102, 0, .35);

  /* Dimensions */
  --xk-radius: 10px;
  --xk-radius-lg: 16px;
  --xk-container: 1240px;
  --xk-header-h: 75px;

  /* Adjustable fonts and colors (overridable via Customizer → Fonts & Colors) */
  --xk-base-font-size: 16px;
  --xk-body-color: #1f2a3d;
  --xk-heading-color: #0a1b3d;
  --xk-link-color: #1b5fd9;
  --xk-nav-font-size: 17px;
  --xk-site-title-size: 18px;
  --xk-site-title-color: #ffffff;
  --xk-site-title-weight: 800;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--xk-base-font-size);
  line-height: 1.7;
  color: var(--xk-body-color);
  background: var(--xk-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; border: 0; }
figure { margin: 0; }
a { color: var(--xk-link-color); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--xk-cyan-400); }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .6em; line-height: 1.35; font-weight: 700; color: var(--xk-heading-color); }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }

.xk-container {
  width: 100%;
  max-width: var(--xk-container);
  margin: 0 auto;
  padding: 0 20px;
}

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute !important; word-wrap: normal !important;
}

/* ---------- Buttons ---------- */
.xk-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-decoration: none;
}

.xk-btn-primary {
  background: var(--xk-grad-btn);
  color: #fff;
  box-shadow: 0 6px 18px rgba(27, 95, 217, .35);
}
.xk-btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(34, 211, 238, .4);
}

.xk-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .55);
}
.xk-btn-ghost:hover {
  color: var(--xk-navy-800);
  background: #fff;
  border-color: #fff;
}

.xk-btn-dark {
  background: var(--xk-navy-800);
  color: #fff;
}
.xk-btn-dark:hover { background: var(--xk-blue-500); color: #fff; }

.xk-btn-sm { padding: 8px 18px; font-size: 14px; }

/* ---------- Top info bar ---------- */
.xk-topbar {
  background: var(--xk-navy-900);
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
}
.xk-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  gap: 20px;
}
.xk-topbar-logo-area { display: flex; align-items: center; flex-shrink: 0; }
.xk-topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.xk-topbar-logo .topbar-logo-img {
  max-height: 26px;
  width: auto;
}
.xk-topbar .xk-topbar-logo .topbar-name {
  font-size: var(--xk-site-title-size);
  font-weight: var(--xk-site-title-weight);
  color: var(--xk-site-title-color);
  letter-spacing: .06em;
  white-space: nowrap;
}
.xk-topbar a { color: rgba(255, 255, 255, .72); }
.xk-topbar a:hover { color: var(--xk-cyan-300); }
.xk-topbar .xk-topbar-right { display: flex; align-items: center; gap: 18px; }
.xk-topbar .xk-topbar-hotline a { color: var(--xk-cyan-300); font-size: 15px; font-weight: 700; }
.xk-topbar .xk-topbar-hotline a:hover { color: #fff; }
.xk-topbar .xk-lang-switch a { margin: 0 0 0 12px; opacity: .55; }
.xk-topbar .xk-lang-switch a.active { opacity: 1; color: var(--xk-cyan-300); }

/* ---------- Header navigation ---------- */
.xk-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(246, 248, 251, .98); /* v1.42.11: removed backdrop-filter (it creates a fixed positioning context, causing the .xk-nav container to have 0 height and an empty menu); a higher-opacity background compensates visually */
  border-bottom: 1px solid rgba(219, 228, 240, .6);
  transition: box-shadow .25s ease;
}
.xk-header.is-stuck { box-shadow: var(--xk-shadow-md); }

.xk-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--xk-header-h);
  gap: 24px;
}

.xk-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.xk-logo img { max-height: 46px; width: auto; }
.xk-logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.xk-logo-text .site-name { font-size: 20px; font-weight: 800; color: var(--xk-navy-800); }
.xk-logo-text .site-slogan { font-size: 11px; letter-spacing: .22em; color: var(--xk-text-3); text-transform: uppercase; }

.xk-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.xk-nav li { position: relative; }
.xk-nav a {
  display: block;
  padding: 11px 18px;
  color: var(--xk-text);
  font-size: var(--xk-nav-font-size);
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}
.xk-nav > ul > li > a::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 2px;
  background: var(--xk-grad-orange);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.xk-nav > ul > li:hover > a::after,
.xk-nav > ul > li.current-menu-item > a::after,
.xk-nav > ul > li.current_page_item > a::after { transform: scaleX(1); }
.xk-nav > ul > li:hover > a,
.xk-nav > ul > li.current-menu-item > a { color: var(--xk-orange); }

/* Dropdown menu */
.xk-nav .sub-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: var(--xk-radius);
  box-shadow: var(--xk-shadow-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .22s ease;
  border: 1px solid var(--xk-line);
}
.xk-nav li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.xk-nav .sub-menu a { padding: 9px 14px; border-radius: 6px; font-size: 14px; }
.xk-nav .sub-menu a:hover { background: var(--xk-bg); color: var(--xk-blue-500); }
.xk-nav .sub-menu .sub-menu { top: -8px; left: 100%; }

.xk-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.xk-header-actions .xk-btn-primary {
  background: var(--xk-grad-orange);
  box-shadow: var(--xk-shadow-orange);
}
.xk-header-actions .xk-btn-primary:hover {
  box-shadow: 0 10px 26px rgba(255, 102, 0, .45);
}

/* Search button */
.xk-search-toggle {
  width: 40px; height: 40px;
  border: 1px solid var(--xk-line);
  border-radius: 10px;
  background: #fff;
  color: var(--xk-text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}
.xk-search-toggle:hover,
.xk-search-toggle.is-open {
  color: #fff;
  background: var(--xk-grad-orange);
  border-color: transparent;
  box-shadow: var(--xk-shadow-orange);
}

/* Search panel (expands below the nav when the search button is clicked) */
.xk-search-panel {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--xk-line);
  box-shadow: var(--xk-shadow-md);
  padding: 20px 0;
  z-index: 998;
}
.xk-search-panel.is-open { display: block; }
.xk-search-panel .xk-searchform { max-width: 640px; margin: 0 auto; }

/* Search form */
.xk-searchform { display: flex; gap: 10px; }
.xk-searchform input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--xk-line);
  border-radius: 8px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.xk-searchform input[type="search"]:focus {
  outline: none;
  border-color: var(--xk-blue-400);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}
.xk-searchform .xk-btn { border-radius: 8px; flex-shrink: 0; }

/* Browsers without backdrop-filter support: use a near-opaque fallback background to keep text readable */
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .xk-header { background: rgba(246, 248, 251, .98); }
  .xk-search-panel { background: rgba(255, 255, 255, .99); }
}

/* Mobile hamburger button (v1.42.9: add position:relative + z-index:1000 to stay above the search panel at 998, never obscured) */
.xk-nav-toggle {
  display: none;
  position: relative;
  z-index: 1000;
  width: 44px; height: 44px;
  border: 1px solid var(--xk-line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.xk-nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--xk-navy-800);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.xk-nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.xk-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.xk-nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.xk-hero {
  position: relative;
  background: var(--xk-grad-hero);
  color: #fff;
  overflow: hidden;
}
.xk-hero::before {
  /* Grid-line tech texture */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(103, 232, 249, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 30%, transparent 75%);
}
.xk-hero::after {
  /* Cyan glow */
  content: "";
  position: absolute;
  width: 560px; height: 560px;
  right: -140px; top: -180px;
  background: radial-gradient(circle, rgba(34, 211, 238, .22) 0%, transparent 65%);
  pointer-events: none;
}

.xk-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 48px;
  align-items: center;
  padding: 88px 0 96px;
  min-height: 520px;
}
.xk-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 102, 0, .45);
  background: rgba(255, 102, 0, .10);
  color: var(--xk-orange-light);
  font-size: 13px;
  position: relative;
  transform: translateX(-50px); /* v1.42.12: shift badge 50px to the left */
  letter-spacing: .08em;
  margin-bottom: 22px;
}
.xk-hero-badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--xk-orange);
  box-shadow: 0 0 0 4px rgba(255, 102, 0, .18);
}
.xk-hero h1 {
  color: #fff;
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 800;
  letter-spacing: .02em;
  margin-bottom: 18px;
}
.xk-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--xk-orange-light), var(--xk-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.xk-hero-sub {
  color: rgba(255, 255, 255, .76);
  font-size: 17px;
  max-width: 34em;
  margin-bottom: 34px;
}
.xk-hero-actions { display: flex; gap: 14px; flex-wrap: nowrap; }
.xk-hero-stats {
  display: flex;
  gap: 44px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  flex-wrap: wrap;
}
.xk-hero-stats .num {
  font-size: 30px;
  font-weight: 800;
  color: var(--xk-cyan-300);
  line-height: 1.2;
}
.xk-hero-stats .lbl { font-size: 13px; color: rgba(255, 255, 255, .6); }

.xk-hero-media {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.xk-hero-media img {
  border-radius: var(--xk-radius-lg);
  box-shadow: 0 24px 60px rgba(2, 8, 26, .5);
  border: 1px solid rgba(255, 255, 255, .12);
}
/* Right-side product image carousel layer */
.xk-hero-media-bgs {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 460 / 380;
  display: block;
}
.xk-hero-media-item {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--xk-radius-lg);
  box-shadow: 0 24px 60px rgba(2, 8, 26, .5);
  border: 1px solid rgba(255, 255, 255, .12);
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none; /* v1.42.2: inactive items are transparent but still stacked in the same position; disable click to avoid mis-hitting other images' links */
}
.xk-hero-media-item.is-active { opacity: 1; pointer-events: auto; }
.xk-hero-media-item.xk-hero-media-link,
a.xk-hero-media-item { display: block; }
.xk-hero-media-dots {
  display: flex;
  gap: 8px;
}
.xk-hero-media-dot {
  width: 8px; height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .6);
  background: transparent;
  cursor: pointer;
  transition: all .25s ease;
}
.xk-hero-media-dot.is-active {
  background: var(--xk-orange);
  border-color: var(--xk-orange);
  transform: scale(1.25);
}
.xk-hero-actions .xk-float-card {
  margin-left: 160px; /* positioned 160px to the right of the Get Quote button */
  background: rgba(255, 255, 255, .94);
  color: var(--xk-navy-800);
  border-radius: var(--xk-radius);
  padding: 10px 16px;
  box-shadow: var(--xk-shadow-lg);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.xk-hero-actions .xk-float-card strong { font-size: 15px; display: block; }
.xk-float-card .dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--xk-grad-btn);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; flex-shrink: 0;
}

/* ---------- General Section ---------- */
.xk-section { padding: 76px 0; }
.xk-section-alt { background: var(--xk-surface); }

.xk-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}
.xk-sec-head .xk-sec-title { margin: 0; }
.xk-sec-title .en {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--xk-blue-500);
  margin-bottom: 8px;
}
.xk-sec-title .cn {
  display: block;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  color: var(--xk-navy-800);
  position: relative;
  padding-bottom: 14px;
}
.xk-sec-title .cn::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 56px; height: 4px;
  border-radius: 2px;
  background: var(--xk-grad-btn);
}
.xk-sec-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--xk-blue-500);
  white-space: nowrap;
  padding-bottom: 10px;
}
.xk-sec-more:hover { color: var(--xk-orange); }

/* Scroll Reveal Animation */
.xk-reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.xk-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Product Categories ---------- */
.xk-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 36px;
}
/* Category Quick Switch Bar: a more compact card variant */
.xk-cat-card--compact { padding: 16px 12px; }
/* Empty State Hint */
.xk-empty-tip { color: var(--xk-text-3); }
/* Gallery column-count modifiers are defined below, after the .xk-product-grid base class (v1.42.7 fix: the original definition here was overridden by the base class's repeat(4) at the same specificity because it came later, which forced the front-end to always show 4 columns even when 3/5 was selected in the admin) */
/* Full-card Clickable Link: overlays the entire card so clicking anywhere jumps to the linked page (the Inquiry button remains clickable) */
.xk-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: var(--xk-radius);
}
.xk-product-card > .xk-product-body { position: relative; }
.xk-card-foot .inquiry-link { position: relative; z-index: 3; }
.xk-cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 18px;
  background: var(--xk-surface);
  border: 1px solid var(--xk-line);
  border-radius: var(--xk-radius);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden;
}
.xk-cat-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--xk-grad-btn);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.xk-cat-card:hover { transform: translateY(-5px); box-shadow: var(--xk-shadow-md); border-color: transparent; }
.xk-cat-card:hover::before { transform: scaleX(1); }
.xk-cat-card.is-active { border-color: var(--xk-blue-500); box-shadow: var(--xk-shadow-sm); }
.xk-cat-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(27, 95, 217, .1), rgba(34, 211, 238, .12));
  color: var(--xk-blue-500);
  font-size: 26px;
}
.xk-cat-card .name { font-size: 16px; font-weight: 700; color: var(--xk-navy-800); }
.xk-cat-card .count { font-size: 12px; color: var(--xk-text-3); }

/* ---------- Product Card ---------- */
.xk-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* default 4 columns; the --3/--5 modifiers below override to 3/5 columns */
  gap: 15px;
}
/* Gallery grid column count (adjustable 3-5 columns; media queries auto-reduce columns on narrow screens) - placed after the base class to ensure it overrides the default repeat(4) */
.xk-product-grid--3 { grid-template-columns: repeat(3, 1fr); }
.xk-product-grid--4 { grid-template-columns: repeat(4, 1fr); }
.xk-product-grid--5 { grid-template-columns: repeat(5, 1fr); }
.xk-product-card {
  position: relative;
  background: var(--xk-surface);
  border: 1px solid var(--xk-line);
  border-radius: var(--xk-radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.xk-product-card:hover { transform: translateY(-6px); box-shadow: var(--xk-shadow-lg); }
.xk-product-thumb {
  position: relative;
  aspect-ratio: 1 / 1; /* card thumbnail locked to a fixed 1:1 square ratio; images are auto-cropped and centered */
  overflow: hidden;
  background: linear-gradient(135deg, #eef3fa, #e3ebf7);
  display: flex; align-items: center; justify-content: center;
}
.xk-product-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.xk-product-card:hover .xk-product-thumb img { transform: scale(1.06); }
.xk-product-thumb .xk-badge {
  position: absolute;
  left: 12px; top: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--xk-grad-orange);
  box-shadow: var(--xk-shadow-orange);
}
.xk-product-thumb .xk-noimg {
  color: var(--xk-text-3);
  font-size: 40px;
}
.xk-product-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.xk-product-body h3 {
  /* Card title font matches the body text style (size/weight/line-height follow the body font settings) */
  font-size: var(--xk-base-font-size);
  font-weight: 400;
  margin-bottom: 8px;
  line-height: 1.7;
}
.xk-product-body h3 a { color: var(--xk-navy-800); }
.xk-product-body h3 a:hover { color: var(--xk-blue-500); }
/* Since v1.27.0 cards no longer output the spec list (the card spec meta box was removed); only the bottom model number and Inquiry remain */
.xk-product-card .xk-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--xk-line);
  padding-top: 12px;
}
.xk-card-foot .model { font-size: 12px; color: var(--xk-text-3); letter-spacing: .03em; }
.xk-card-foot .inquiry-link { font-size: 13px; font-weight: 700; color: var(--xk-blue-500); }
.xk-card-foot .inquiry-link:hover { color: var(--xk-cyan-400); }

/* Product Gallery Page (cards reuse the product card styles; no standalone styles) */

/* ---------- Strengths / Stats Section ---------- */
.xk-strength-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.xk-strength-card {
  position: relative;
  padding: 34px 26px;
  border-radius: var(--xk-radius-lg);
  background: linear-gradient(160deg, #0e2a5c 0%, #0a1b3d 100%);
  color: #fff;
  overflow: hidden;
}
.xk-strength-card::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .25), transparent 70%);
}
.xk-strength-card .icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34, 211, 238, .14);
  border: 1px solid rgba(34, 211, 238, .35);
  color: var(--xk-cyan-300);
  font-size: 24px;
  margin-bottom: 18px;
}
.xk-strength-card h3 { color: #fff; font-size: 18px; margin-bottom: 10px; }
.xk-strength-card p { color: rgba(255, 255, 255, .66); font-size: 14px; margin: 0; }
.xk-strength-card .big-num {
  position: absolute;
  right: 20px; bottom: 10px;
  font-size: 52px;
  font-weight: 800;
  color: rgba(255, 255, 255, .06);
  line-height: 1;
}

/* ---------- Certifications Strip ---------- */
.xk-cert-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 44px;
  padding: 26px 20px;
  background: var(--xk-surface);
  border-block: 1px solid var(--xk-line);
}
.xk-cert-band .cert {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--xk-text-2);
}
.xk-cert-band .cert i {
  font-style: normal;
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(16, 185, 129, .12); color: var(--xk-success); font-size: 15px;
}

/* ---------- News ---------- */
.xk-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.xk-news-card {
  background: var(--xk-surface);
  border: 1px solid var(--xk-line);
  border-radius: var(--xk-radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.xk-news-card:hover { transform: translateY(-5px); box-shadow: var(--xk-shadow-md); }
.xk-news-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #eef3fa, #dfe9f8);
  overflow: hidden;
}
.xk-news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.xk-news-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.xk-news-date {
  font-size: 12px;
  color: var(--xk-blue-500);
  font-weight: 600;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.xk-news-body h3 { font-size: 16px; line-height: 1.5; margin-bottom: 8px; }
.xk-news-body h3 a { color: var(--xk-navy-800); }
.xk-news-body h3 a:hover { color: var(--xk-blue-500); }
.xk-news-body p { font-size: 14px; color: var(--xk-text-2); margin: 0; }

/* ---------- Inquiry CTA Banner ---------- */
.xk-cta-band {
  position: relative;
  background: var(--xk-grad-band);
  color: #fff;
  overflow: hidden;
}
.xk-cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(103,232,249,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103,232,249,.06) 1px, transparent 1px);
  background-size: 38px 38px;
}
.xk-cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 56px 0;
  flex-wrap: wrap;
}
.xk-cta-inner h2 { color: #fff; font-size: clamp(22px, 2.4vw, 30px); margin-bottom: 8px; }
.xk-cta-inner p { color: rgba(255, 255, 255, .72); margin: 0; }
.xk-cta-inner .xk-btn-primary {
  background: var(--xk-grad-orange);
  box-shadow: var(--xk-shadow-orange);
}
.xk-cta-inner .xk-btn-primary:hover {
  box-shadow: 0 10px 26px rgba(255, 102, 0, .45);
}
.xk-cta-phone { display: flex; align-items: center; gap: 14px; }
.xk-cta-phone .lbl { font-size: 13px; color: rgba(255,255,255,.6); }
.xk-cta-phone .tel { font-size: 28px; font-weight: 800; color: var(--xk-cyan-300); letter-spacing: .02em; }

/* ---------- Content Page (Post / Single Page) ---------- */
.xk-page-wrap { padding: 56px 0 72px; }
.xk-layout-2col {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr); /* left sidebar + main content */
  gap: 18px;
  align-items: start;
}
/* Explicit placement: regardless of the sidebar's DOM order, it is pinned to the left column */
.xk-layout-2col > .xk-sidebar { grid-column: 1; grid-row: 1; }
.xk-layout-2col > :not(.xk-sidebar) { grid-column: 2; grid-row: 1; }

.xk-main-card {
  background: var(--xk-surface);
  border: 1px solid var(--xk-line);
  border-radius: var(--xk-radius-lg);
  padding: 40px;
}
.xk-page-title { font-size: 28px; margin-bottom: 6px; }
.xk-page-meta { font-size: 13px; color: var(--xk-text-3); margin-bottom: 24px; }
.xk-entry { font-size: 15.5px; color: var(--xk-text); }
.xk-entry img { border-radius: var(--xk-radius); }
.xk-entry blockquote {
  margin: 1.4em 0; padding: 14px 20px;
  border-left: 4px solid var(--xk-blue-500);
  background: var(--xk-bg); border-radius: 0 8px 8px 0;
  color: var(--xk-text-2);
}
.xk-entry table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 14px; }
.xk-entry table th, .xk-entry table td { border: 1px solid var(--xk-line); padding: 9px 12px; text-align: left; }
.xk-entry table th { background: var(--xk-bg); color: var(--xk-navy-800); }

/* Breadcrumb */
.xk-breadcrumb {
  font-size: 13px;
  color: var(--xk-text-3);
  padding: 18px 0 0;
}
.xk-breadcrumb a { color: var(--xk-text-2); }
.xk-breadcrumb a:hover { color: var(--xk-blue-500); }
.xk-breadcrumb .sep { margin: 0 8px; opacity: .5; }

/* Sidebar (left side, sticky follow) */
.xk-sidebar {
  position: sticky;
  top: calc(var(--xk-header-h) + 20px);
  align-self: start;
}
.xk-sidebar .widget {
  background: var(--xk-surface);
  border: 1px solid var(--xk-line);
  border-radius: var(--xk-radius);
  padding: 22px;
  margin-bottom: 15px;
}
.xk-sidebar .widget-title {
  font-size: 16px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--xk-line);
  position: relative;
}
.xk-sidebar .widget-title::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 40px; height: 2px;
  background: var(--xk-grad-btn);
}
.xk-sidebar ul { list-style: none; margin: 0; padding: 0; }
.xk-sidebar ul li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 4px; color: var(--xk-text-2); font-size: 14px;
  border-bottom: 1px dashed var(--xk-line);
}
.xk-sidebar ul li:last-child a { border-bottom: 0; }
.xk-sidebar ul li a:hover { color: var(--xk-blue-500); }

/* Sidebar navigation menu */
.xk-sidebar .xk-sidebar-menu,
.xk-sidebar .xk-sidebar-menu ul { margin: 0; padding: 0; list-style: none; }
.xk-sidebar .xk-sidebar-menu > li > a {
  display: block;
  padding: 7px 12px;
  margin-bottom: 2px;
  color: var(--xk-text);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 8px;
  border-left: 3px solid transparent;
  border-bottom: 0;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.xk-sidebar .xk-sidebar-menu > li > a:hover,
.xk-sidebar .xk-sidebar-menu > li.current-menu-item > a,
.xk-sidebar .xk-sidebar-menu > li.current_page_item > a,
.xk-sidebar .xk-sidebar-menu > li.current-menu-ancestor > a {
  color: var(--xk-orange);
  background: var(--xk-bg);
  border-left-color: var(--xk-orange);
}
.xk-sidebar .xk-sidebar-menu .sub-menu { padding: 2px 0 6px 15px; }
.xk-sidebar .xk-sidebar-menu .sub-menu a {
  display: block;
  padding: 6px 12px;
  font-size: 13.5px;
  color: var(--xk-text-2);
  border-radius: 6px;
  border-bottom: 0;
}
.xk-sidebar .xk-sidebar-menu .sub-menu a:hover,
.xk-sidebar .xk-sidebar-menu .sub-menu .current-menu-item > a {
  color: var(--xk-orange);
  background: var(--xk-bg);
}

/* ---------- Product Detail Page ---------- */
.xk-product-detail {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 44px;
  align-items: start;
}
.xk-pd-gallery-main {
  border-radius: var(--xk-radius-lg);
  overflow: hidden;
  border: 1px solid var(--xk-line);
  background: linear-gradient(135deg, #f6f9fd, #e9f0fa);
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.xk-pd-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.xk-pd-gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.xk-pd-gallery-thumbs img {
  width: 76px; height: 76px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--xk-line);
  cursor: pointer;
}
.xk-pd-info .cat-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(27, 95, 217, .1);
  color: var(--xk-blue-500);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.xk-pd-info h1 { font-size: 26px; margin-bottom: 10px; }
.xk-pd-info .excerpt { color: var(--xk-text-2); font-size: 15px; margin-bottom: 22px; }

.xk-spec-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 26px; }
.xk-spec-table caption {
  caption-side: top; text-align: left;
  font-weight: 700; font-size: 15px; color: var(--xk-navy-800);
  padding-bottom: 10px;
}
.xk-spec-table th, .xk-spec-table td {
  border: 1px solid var(--xk-line);
  padding: 10px 14px;
  text-align: left;
}
.xk-spec-table th {
  width: 34%;
  background: var(--xk-bg);
  color: var(--xk-text-2);
  font-weight: 600;
}
.xk-pd-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Archive Header (Category / Search / Tag) ---------- */
/* Breadcrumb */
.xk-archive-head {
  background: var(--xk-grad-hero);
  color: #fff;
  padding: 0;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}
.xk-archive-head::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(103,232,249,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103,232,249,.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
/* v1.36.1: title centered vertically within the banner (horizontal alignment unchanged), out of flow so it does not cover the breadcrumb */
.xk-archive-head > .xk-container:not(.xk-breadcrumb) {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
}
.xk-archive-head h1 { color: #fff; font-size: 30px; margin-bottom: 6px; }
.xk-archive-head p { color: rgba(255,255,255,.7); margin: 0; font-size: 15px; }
/* v1.32.0: breadcrumb snaps to the banner bottom (10px from bottom), clean and compact with no separator line */
.xk-archive-head .xk-breadcrumb {
  position: relative;
  z-index: 1; /* v1.42.1: placed above the absolutely-positioned title container to ensure links remain clickable */
  padding: 0 0 10px;
  margin-top: auto;
  font-size: 12.5px;
  color: rgba(255,255,255,.55);
}
.xk-archive-head .xk-breadcrumb .xk-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 6px;
}
.xk-archive-head .xk-breadcrumb a,
.xk-archive-head .xk-breadcrumb span {
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}
.xk-archive-head .xk-breadcrumb a {
  color: rgba(255,255,255,.78);
  padding: 2px 0;
  transition: color .2s ease;
  border-bottom: 1px dashed rgba(255,255,255,.65); /* v1.42.1: dashed separator line added to links for instant recognition */
}
.xk-archive-head .xk-breadcrumb a:hover { color: #fff; border-bottom-color: #fff; }
.xk-archive-head .xk-breadcrumb .sep {
  opacity: .45;
  font-size: 11px;
  transform: translateY(-1px);
}

/* v1.34.0: child cards of the "XK Product Gallery" block in the editor display as a 3/4/5-column grid per the columns attribute */
.xk-gallery-editor-grid,
.wp-block-xk-instrument-gallery > .block-editor-inner-blocks > .block-editor-block-list__layout {
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns, 3), 1fr);
  gap: 18px;
  align-items: start;
}

/* ---------- Development History Timeline ---------- */
.xk-timeline-section {
  background: linear-gradient(135deg, #08306b, #06214b);
  color: #fff;
  padding: 70px 0 80px;
  position: relative;
  overflow: hidden;
}
.xk-timeline-header {
  text-align: center;
  margin-bottom: 18px;
  /* v1.36.4: raise the title's stacking level to avoid being covered by the absolutely-positioned cards above */
  position: relative;
  z-index: 3;
}
.xk-timeline-header h2 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #fff;
}
.xk-timeline-subtitle {
  font-size: 13px;
  letter-spacing: .16em;
  color: rgba(255,255,255,.55);
  font-weight: 600;
}
.xk-timeline-wrap {
  display: flex;
  position: relative;
  /* v1.37.0: removed the left/right 25% padding; the main axis returns to full width → node spacing ~200px, fitting 230px image-text cards without overlap */
  /* v1.36.4: top padding 160→210px so the cards above do not cover the "Development History" section title */
  /* v1.38.0: main axis fixed at 720px (6 nodes × 120px) centered → same-side cards (top↔top / bottom↔bottom) have a 10px gap */
  padding: 210px 0 150px;
  max-width: 720px;
  margin: 0 auto;
}
/* v1.36.0: the wavy line is now a full period per node (center as the midpoint), so the ring center always lands precisely on the wave */
/* Timeline fades out at both ends, visually extendable to left and right */
.xk-timeline-wrap::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 60px;
  transform: translateY(-50%);
  background: linear-gradient(90deg,
    #08306b 0%,
    rgba(8,48,107,0) 8%,
    rgba(8,48,107,0) 92%,
    #08306b 100%);
  pointer-events: none;
  z-index: 1;
}
.xk-timeline-node {
  flex: 1;
  position: relative;
  min-height: 320px;
}
.xk-timeline-dot {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* v1.36.2: rings keep their original size; only the adjacent ring spacing is compressed to 1/2 of the original */
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: rgba(8,48,107,.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow:
    0 0 0 5px rgba(255,255,255,.08),
    0 0 20px rgba(255,255,255,.35),
    0 8px 16px rgba(0,0,0,.35);
}
/* v1.36.2: the timeline main line is changed from wavy to straight; each node embeds a horizontal line segment (y=30 centerline),
   the ring center always lands precisely on the line; the fade-out at both ends is kept for left/right continuation */
.xk-timeline-node::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 60px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 60' preserveAspectRatio='none'%3E%3Cpath d='M0,30 L300,30' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 100% 60px;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
.xk-timeline-ring {
  position: relative;
  z-index: 2;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px rgba(255,255,255,.7);
}
.xk-timeline-year {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
/* v1.36.3: vertical gap between the ring (radius 17px) and the year text is 6px (offset = 17 + 6 = 23px) */
.xk-timeline-node:nth-child(odd) .xk-timeline-year {
  bottom: calc(50% + 23px);
}
.xk-timeline-node:nth-child(even) .xk-timeline-year {
  top: calc(50% + 23px);
}
/* v1.37.0: image-text cards restored to the designed 230px width (fixed width so adjacent cards do not overlap on desktop) */
.xk-timeline-card {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 230px;
  max-width: 230px;
  text-align: center;
  /* v1.37.0: by default image on top, text below; only cards below the timeline (even) place the image at the bottom */
  display: flex;
  flex-direction: column;
}
.xk-timeline-node:nth-child(odd) .xk-timeline-card {
  bottom: calc(50% + 66px);
}
.xk-timeline-node:nth-child(even) .xk-timeline-card {
  top: calc(50% + 66px);
  /* v1.37.0: cards below the timeline show the image at the very bottom (text on top, image below) */
  flex-direction: column-reverse;
}
.xk-timeline-img {
  border-radius: 8px;
  overflow: hidden;
  /* v1.37.0: by default the card image is on top, with the gap placed below the image (between image and text) */
  margin-bottom: 10px;
  margin-top: 0;
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.12);
}
.xk-timeline-img img {
  width: 100%;
  /* v1.36.4: image display ratio fixed at 4:3 */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
/* v1.37.0: for cards below the timeline the image sits at the bottom, with the gap placed above the image (between text and image) */
.xk-timeline-node:nth-child(even) .xk-timeline-img {
  margin-top: 10px;
  margin-bottom: 0;
}
.xk-timeline-text h4 {
  font-size: 15px;
  font-weight: 700;
  color: #ffb547;
  margin-bottom: 6px;
}
.xk-timeline-text p {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,.78);
  margin: 0;
}
/* v1.37.0: for cards above the timeline - the title is placed below the content (image + body), on the side nearest the timeline */
.xk-timeline-node:nth-child(odd) .xk-timeline-text {
  display: flex;
  flex-direction: column;
}
.xk-timeline-node:nth-child(odd) .xk-timeline-text h4 {
  order: 2;
}
.xk-timeline-node:nth-child(odd) .xk-timeline-text p {
  order: 1;
  margin-bottom: 6px;
}

/* Timeline child blocks laid out horizontally in the editor */
.xk-timeline-editor-items {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.xk-timeline-editor-items > .wp-block {
  flex: 0 0 240px;
  max-width: 240px;
}

@media (max-width: 900px) {
  .xk-timeline-wrap {
    flex-direction: column;
    padding: 0 0 0 34px;
    gap: 28px;
    /* v1.38.0: mobile restores full width, not constrained by the desktop 720px main axis */
    max-width: none;
    margin: 0;
  }
  .xk-timeline-wrap::before {
    left: 23px; right: auto; top: 0; bottom: 0;
    width: 4px; height: auto;
    transform: none;
    background: rgba(255,255,255,.35);
  }
  .xk-timeline-node {
    min-height: auto;
    padding-left: 28px;
  }
  /* v1.36.2: mobile vertical line stays centered with the ring center */
  .xk-timeline-dot {
    left: -26px; top: 6px;
    transform: none;
    box-shadow:
      0 0 0 4px rgba(255,255,255,.08),
      0 0 14px rgba(255,255,255,.3),
      4px 8px 14px rgba(0,0,0,.35);
  }
  /* Mobile vertical timeline: hide each node's wave segment (switch to a left vertical line, already centered with the ring center) */
  .xk-timeline-node::before { display: none; }
  .xk-timeline-year,
  .xk-timeline-card,
  .xk-timeline-node:nth-child(odd) .xk-timeline-year,
  .xk-timeline-node:nth-child(even) .xk-timeline-year,
  .xk-timeline-node:nth-child(odd) .xk-timeline-card,
  .xk-timeline-node:nth-child(even) .xk-timeline-card {
    position: static;
    transform: none;
    width: 100%;
    max-width: none;
    text-align: left;
    bottom: auto; top: auto;
  }
  .xk-timeline-year {
    font-size: 22px;
    margin-bottom: 8px;
  }
  .xk-timeline-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    align-items: start;
  }
  .xk-timeline-img {
    margin: 0;
  }
  /* v1.37.0: mobile grid uses image-left / text-right, unaffected by the even-card image-bottom gap */
  .xk-timeline-node:nth-child(even) .xk-timeline-img {
    margin: 0;
  }
  .xk-timeline-img img { height: 90px; }
  /* v1.37.0: mobile restores the default text order for top cards (title on top, body below) */
  .xk-timeline-node:nth-child(odd) .xk-timeline-text {
    display: block;
  }
}

/* ---------- Contact / Inquiry Page ---------- */
.xk-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  align-items: start;
}
.xk-contact-info-card {
  background: var(--xk-grad-hero);
  color: #fff;
  border-radius: var(--xk-radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
}
.xk-contact-info-card::after {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  right: -90px; bottom: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.25), transparent 70%);
}
.xk-contact-info-card h2 { color: #fff; font-size: 22px; margin-bottom: 22px; position: relative; z-index: 1; }
.xk-contact-item {
  display: flex; gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  position: relative; z-index: 1;
}
.xk-contact-item:last-of-type { border-bottom: 0; }
.xk-contact-item .ico {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px;
  background: rgba(34,211,238,.14);
  border: 1px solid rgba(34,211,238,.35);
  display: flex; align-items: center; justify-content: center;
  color: var(--xk-cyan-300);
}
.xk-contact-item .lbl { font-size: 12px; color: rgba(255,255,255,.55); }
.xk-contact-item .val { font-size: 15px; font-weight: 600; }

/* Form */
.xk-form-card {
  background: var(--xk-surface);
  border: 1px solid var(--xk-line);
  border-radius: var(--xk-radius-lg);
  padding: 36px;
}
.xk-form-card h2 { font-size: 22px; margin-bottom: 6px; }
.xk-form-card .form-sub { color: var(--xk-text-3); font-size: 14px; margin-bottom: 24px; }
.xk-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.xk-field { margin-bottom: 16px; }
.xk-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--xk-navy-800);
  margin-bottom: 6px;
}
.xk-field label .req { color: var(--xk-danger); margin-left: 2px; }
.xk-field input,
.xk-field select,
.xk-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--xk-line);
  border-radius: 8px;
  background: var(--xk-bg);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.xk-field input:focus,
.xk-field select:focus,
.xk-field textarea:focus {
  outline: none;
  border-color: var(--xk-blue-400);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}
.xk-field textarea { min-height: 120px; resize: vertical; }

/* v1.42.5 Captcha */
.xk-captcha-flex {
  display: flex;
  align-items: center;
  gap: 10px;
}
.xk-captcha-code {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border: 1px solid var(--xk-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f7f9fc, #eef2f8);
  overflow: hidden;
  cursor: pointer;
  line-height: 0;
}
.xk-captcha-svg { display: block; }
.xk-captcha-input {
  flex: 1 1 auto;
  min-width: 0;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.xk-captcha-refresh {
  flex: 0 0 auto;
  border: none;
  background: none;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--xk-blue-500, #1b5fd9);
  cursor: pointer;
  white-space: nowrap;
}
.xk-captcha-refresh:hover { text-decoration: underline; }
@media (max-width: 480px) {
  .xk-captcha-flex { flex-wrap: wrap; }
  .xk-captcha-code { width: 100%; justify-content: center; }
}

.xk-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--xk-text-3);
  cursor: pointer;
  user-select: none;
}
.xk-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--xk-blue-500);
  cursor: pointer;
}
.xk-consent:hover { color: var(--xk-navy-700); }
.xk-form-msg { margin-top: 14px; font-size: 14px; border-radius: 8px; padding: 10px 14px; display: none; }
.xk-form-msg.ok { display: block; background: rgba(16,185,129,.1); color: #047857; }
.xk-form-msg.err { display: block; background: rgba(239,68,68,.08); color: #b91c1c; }
.xk-hp { position: absolute !important; left: -9999px !important; opacity: 0; }

/* ---------- Footer ---------- */
.xk-footer {
  background: var(--xk-navy-900);
  color: rgba(255, 255, 255, .68);
  font-size: 14px;
}
.xk-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  padding: 60px 0 46px;
}
.xk-footer h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}
.xk-footer h4::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 28px; height: 2px;
  background: var(--xk-grad-btn);
}
.xk-footer-about .f-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.xk-footer-about .f-logo img { max-height: 40px; }
.xk-footer-about .f-name { font-size: 18px; font-weight: 800; color: #fff; }
.xk-footer ul { list-style: none; margin: 0; padding: 0; }
.xk-footer ul li { margin-bottom: 9px; }
.xk-footer ul a { color: rgba(255, 255, 255, .68); }
.xk-footer ul a:hover { color: var(--xk-cyan-300); }
.xk-footer .f-contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.xk-footer .f-contact .ico { color: var(--xk-cyan-400); flex-shrink: 0; }
.xk-footer .f-hot { font-size: 24px; font-weight: 800; color: var(--xk-cyan-300); letter-spacing: .02em; }
.xk-footer .f-sub { font-size: 12px; opacity: .6; }

.xk-copyright {
  background: #3d3d3d;
  color: #cfcfcf;
  font-size: 13px;
  text-align: center;
  padding: 15px 20px;
  letter-spacing: .05em;
}
.xk-copyright a { color: #cfcfcf; }
.xk-copyright a:hover { color: #fff; }

/* ---------- Back to Top ---------- */
.xk-backtop {
  position: fixed;
  right: 14px; bottom: 18px;
  width: 24px;
  padding: 7px 0;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(180deg, #ff9a5c 0%, #ffb27d 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(255, 154, 92, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .25s ease;
  z-index: 990;
}
.xk-backtop .arrow {
  font-size: 11px;
  line-height: 1;
}
.xk-backtop .txt {
  writing-mode: vertical-rl;
  letter-spacing: .12em;
}
.xk-backtop:hover {
  box-shadow: 0 10px 26px rgba(255, 138, 61, .45);
  transform: translateY(-2px);
}
.xk-backtop.is-show { opacity: 1; visibility: visible; transform: none; }

/* ---------- Pagination ---------- */
/* v1.41.3: horizontal numbered perfect circles, page numbers visible and precisely centered.
   Covers three outputs:
   1) xk_gallery_pagination() -> nav.xk-pagination > ul > li > a.page-numbers
   2) the_posts_pagination()  -> nav.navigation.pagination > ul > li > a.page-numbers
   3) wp_link_pages() (post content pagination) -> div.xk-pagination > span/a.post-page-numbers
   Key properties use !important to prevent old CSS cache or other styles from hiding the numbers. */
.xk-pagination,
.navigation.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 44px;
}
.navigation.pagination .nav-links {
  display: block;
  text-align: center;
  width: 100%;
}
/* Prevent .xk-pagination, as a flex container, from compressing the inner nav into a single column */
.xk-pagination > .navigation.pagination {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  justify-content: center;
}
.xk-pagination ul,
.navigation.pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
/* WP's the_posts_pagination adds the .page-numbers class to both the ul container and the inner a/span,
   so the .page-numbers rule above mistakenly applies to the ul, turning it into a 40px-wide inline dot.
   Use a more specific selector to restore the ul as a flex container. */
.xk-pagination ul.page-numbers,
.navigation.pagination ul.page-numbers {
  display: flex !important;
  width: auto !important;
  height: auto !important;
  min-width: auto !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
.xk-pagination li,
.navigation.pagination li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* "Pagination:" prefix label */
.xk-pagination .xk-pagination-label {
  display: inline-flex;
  align-items: center;
  color: #0a1b3d;
  font-size: 14px;
  font-weight: 600;
  margin-right: 4px;
}
/* Page-number perfect circles: unify page-numbers (gallery / post list) and post-page-numbers (post content pagination) */
.xk-pagination .page-numbers,
.xk-pagination .post-page-numbers,
.navigation.pagination .page-numbers {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: #d0d8e7 !important;
  color: #0a1b3d !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  vertical-align: middle;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.xk-pagination .page-numbers.current,
.xk-pagination .post-page-numbers.current,
.navigation.pagination .page-numbers.current {
  background: #ff6600 !important;
  color: #ffffff !important;
  transform: scale(1.1);
}
.xk-pagination .page-numbers:hover:not(.current):not(.xk-page-dots),
.xk-pagination .post-page-numbers:hover:not(.current),
.navigation.pagination .page-numbers:hover:not(.current):not(.xk-page-dots) {
  background: #ff944d !important;
  color: #ffffff !important;
}
.xk-pagination .xk-page-dots,
.navigation.pagination .xk-page-dots {
  background: transparent !important;
  color: #8a97ab;
  width: auto !important;
  min-width: 24px;
  border-radius: 0 !important;
  font-weight: 400;
  cursor: default;
}
.navigation.pagination .screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); }

/* ---------- 404 ---------- */
.xk-404 { text-align: center; padding: 100px 20px; }
.xk-404 .code {
  font-size: 110px; font-weight: 800; line-height: 1;
  background: linear-gradient(90deg, var(--xk-blue-500), var(--xk-cyan-400));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .xk-product-grid { grid-template-columns: repeat(3, 1fr); }
  /* 5-column gallery reduced to 4 columns */
  .xk-product-grid--5 { grid-template-columns: repeat(4, 1fr); }
  .xk-strength-grid { grid-template-columns: repeat(2, 1fr); }
  .xk-layout-2col { grid-template-columns: 1fr; }
  .xk-layout-2col > .xk-sidebar,
  .xk-layout-2col > :not(.xk-sidebar) { grid-column: auto; grid-row: auto; }
  .xk-sidebar { position: static; }
}

@media (max-width: 900px) {
  .xk-hero-inner { grid-template-columns: 1fr; padding: 56px 0 64px; }
  .xk-hero-media { display: none; }
  .xk-product-detail { grid-template-columns: 1fr; }
  .xk-contact-grid { grid-template-columns: 1fr; }
  .xk-news-grid { grid-template-columns: repeat(2, 1fr); }

  /* Mobile navigation */
  .xk-nav-toggle { display: flex; }
  .xk-nav {
    position: fixed;
    top: var(--xk-header-h);
    left: 0; right: 0; bottom: 0;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 998;
  }
  .xk-nav.is-open { transform: translateX(0); }
  /* v1.42.10: explicit visibility reinforcement for mobile ul/li/a (prevents flex compression, color loss, blank content) */
  .xk-nav ul {
    display: block;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .xk-nav > ul > li {
    display: block;
    width: 100%;
    min-height: 48px;
    border-bottom: 1px solid var(--xk-line);
  }
  .xk-nav > ul > li > a {
    display: block;
    width: 100%;
    padding: 14px 8px;
    border-radius: 0;
    color: var(--xk-navy-800, #1a2a44); /* explicit dark color to prevent being overridden to white by global rules */
    visibility: visible;
    opacity: 1;
  }
  .xk-nav > ul > li > a::after { display: none; }
  .xk-nav .sub-menu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0;
    padding-left: 16px;
    display: none;
  }
  .xk-nav li.menu-item-open > .sub-menu { display: flex; }
  .xk-header-actions .xk-btn { display: none; } /* hide Get Quote on mobile, keep search */
  .xk-hero-actions .xk-float-card { margin-left: 0; }
}

@media (max-width: 1199px) {
  .xk-hero-actions { flex-wrap: wrap; }
  .xk-hero-actions .xk-float-card { margin-left: 0; }
}

@media (max-width: 640px) {
  .xk-product-grid { grid-template-columns: repeat(2, 1fr); }
  /* 4/5-column gallery uniformly reduced to 2 columns */
  .xk-product-grid--4,
  .xk-product-grid--5 { grid-template-columns: repeat(2, 1fr); }
  /* v1.36.1: mobile banner height slightly reduced; title centered so no top padding needed */
  .xk-archive-head { min-height: 170px; }
  .xk-archive-head h1 { font-size: 24px; }
  .xk-news-grid { grid-template-columns: 1fr; }
  .xk-strength-grid { grid-template-columns: 1fr; }
  .xk-form-row { grid-template-columns: 1fr; }
  .xk-main-card { padding: 24px; }
  .xk-sec-head { flex-direction: column; align-items: flex-start; }
  .xk-topbar-right .xk-topbar-mail,
  .xk-topbar-right .xk-topbar-time,
  .xk-topbar-right .xk-lang-switch { display: none; }
  .xk-topbar-right { gap: 10px; }
}

@media (max-width: 420px) {
  .xk-product-grid { grid-template-columns: 1fr; }
}


/* ---------- Corporate Image Page ---------- */
.xk-corporate-wrap {
  padding: 72px 0 90px;
}
.xk-corporate-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  align-items: center;
  margin-bottom: 5px;
}
.xk-corporate-row:last-child { margin-bottom: 0; }

/* v1.41.0: direction is controlled by the block setting (visual editing in admin), no longer relying on nth-child.
   The block always renders DOM as image->text; --left keeps the image on the left (no swap), --right places the image on the right (order swapped) */
.xk-corporate-row--right .xk-corporate-img { order: 2; }
.xk-corporate-row--right .xk-corporate-text { order: 1; }

.xk-corporate-img {
  border-radius: var(--xk-radius-lg);
  overflow: hidden;
  box-shadow: var(--xk-shadow-lg);
  border: 1px solid var(--xk-line);
  aspect-ratio: 4 / 3;
  background: var(--xk-bg);
}
.xk-corporate-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.xk-corporate-img:hover img { transform: scale(1.03); }

.xk-corporate-text { padding: 10px 0; }
.xk-corporate-text h3 {
  font-size: 28px;
  margin-bottom: 18px;
  position: relative;
  padding-left: 16px;
}
.xk-corporate-text h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: var(--xk-grad-orange);
}
.xk-corporate-text p {
  font-size: 16px;
  color: var(--xk-text-2);
  line-height: 1.85;
  margin: 0;
}

/* ---------- Corporate Image Page ---------- */
.xk-corporate-img,
.xk-corporate-text {
  opacity: 0;
  transition: opacity .75s ease, transform .75s ease;
}
.xk-corporate-img { transform: translateY(64px); }
.xk-corporate-text { transform: translateX(90px); }
.xk-corporate-row--right .xk-corporate-text { transform: translateX(-90px); }
.xk-corporate-img.is-visible,
.xk-corporate-row .xk-corporate-text.is-visible {
  opacity: 1;
  transform: none;
}
/* Text slides in slightly later than the image, creating a sequential layering effect */
.xk-corporate-text { transition-delay: .12s; }

@media (max-width: 900px) {
  .xk-corporate-wrap { padding: 52px 0 66px; }
  .xk-corporate-row {
    grid-template-columns: 1fr;
    gap: 5px;
    margin-bottom: 5px;
  }
  .xk-corporate-row--right .xk-corporate-img,
  .xk-corporate-row--right .xk-corporate-text { order: 0; }
  .xk-corporate-text h3 { font-size: 23px; }
  .xk-corporate-text p { font-size: 15px; }
}

/* Admin editor hint bar: shown to administrators when the Corporate Image page body is empty and the theme's built-in content is displayed */
.xk-editor-hint {
  margin-top: 40px;
  padding: 14px 18px;
  border-radius: 8px;
  background: rgba(27, 95, 217, .08);
  border: 1px dashed #1b5fd9;
  color: #4b5a75;
  font-size: 14px;
  line-height: 1.7;
}

/* ---------- Accessibility: Reduced Motion Preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .xk-reveal { opacity: 1 !important; transform: none !important; }
  .xk-hero-slide { animation: none !important; }
}
