/*
Theme Name: Junxiong Self Managed
Theme URI: https://www.junxiongmetal.com/
Author: Junxiong Metal
Description: Lightweight migration-safe theme for Junxiong Metal.
Version: 1.0.12
Text Domain: junxiong-self-managed
*/

:root {
  --jx-red: #a50922;
  --jx-ink: #191919;
  --jx-muted: #666;
  --jx-line: #e4e4e4;
  --jx-paper: #fff;
  --jx-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--jx-ink);
  background: var(--jx-paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}
a { color: var(--jx-red); }
img, video { max-width: 100%; height: auto; }

.jx-site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--jx-line);
  background: #fff;
}
.jx-header-inner,
.jx-footer-inner,
.jx-content {
  width: min(calc(100% - 32px), var(--jx-width));
  margin: 0 auto;
}
.jx-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.jx-logo img { display: block; width: 153px; height: 68px; max-height: 54px; object-fit: contain; }
.jx-nav { display: flex; align-items: center; gap: 24px; }
.jx-nav a { color: #222; text-decoration: none; font-weight: 700; font-size: 14px; }
.jx-nav a:hover, .jx-nav a:focus { color: var(--jx-red); }
.jx-nav-dropdown { position: relative; }
.jx-nav-parent { display: inline-flex; align-items: center; gap: 6px; }
.jx-nav-parent span { font-size: 17px; line-height: 1; transition: transform 180ms ease; }
.jx-nav-submenu {
  position: absolute;
  top: calc(100% + 20px);
  left: -18px;
  z-index: 40;
  display: grid;
  min-width: 224px;
  padding: 8px 0;
  border-top: 3px solid var(--jx-red);
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}
.jx-nav-submenu::before {
  position: absolute;
  top: -23px;
  left: 0;
  width: 100%;
  height: 23px;
  content: "";
}
.jx-nav-submenu a { padding: 10px 18px; white-space: nowrap; font-weight: 600; }
.jx-nav-submenu a:hover,
.jx-nav-submenu a:focus { background: #f5f5f5; }
.jx-nav-dropdown:hover .jx-nav-submenu,
.jx-nav-dropdown:focus-within .jx-nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.jx-nav-dropdown:hover .jx-nav-parent span,
.jx-nav-dropdown:focus-within .jx-nav-parent span { transform: rotate(45deg); }
.jx-menu-button {
  display: none;
  border: 1px solid var(--jx-line);
  background: #fff;
  color: #222;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

.jx-content { padding: 44px 0 72px; }
.jx-content > article { min-width: 0; }
.jx-content h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.18; }
.jx-content h2 { font-size: clamp(23px, 3vw, 32px); line-height: 1.25; margin-top: 42px; }
.jx-content h3 { font-size: 20px; line-height: 1.35; margin-top: 30px; }
.jx-content table { width: 100%; border-collapse: collapse; }
.jx-content th, .jx-content td { border: 1px solid var(--jx-line); padding: 12px; text-align: left; vertical-align: top; }
.jx-content th { background: #f6f6f6; }
.jx-content .table-responsive { overflow-x: auto; }

.jx-contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 44px;
  align-items: start;
}
.jx-contact-panel {
  padding: 26px;
  border: 1px solid var(--jx-line);
  border-top: 4px solid var(--jx-red);
  background: #fafafa;
}
.jx-contact-panel h2 { margin-top: 0; }
.jx-contact-list { margin: 0; padding-left: 20px; }
.jx-contact-list li { margin-bottom: 10px; }
#dataFormLivechat { margin: 0; }
#dataFormLivechat ul { margin: 0; padding: 0; list-style: none; }
#dataFormLivechat li { margin: 0 0 12px; }
#dataFormLivechat label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}
#dataFormLivechat input,
#dataFormLivechat textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #b9b9b9;
  border-radius: 3px;
  background: #fff;
  color: var(--jx-ink);
  font: inherit;
}
#dataFormLivechat textarea { min-height: 150px; resize: vertical; }
#dataFormLivechat input:focus,
#dataFormLivechat textarea:focus { outline: 3px solid rgba(165, 9, 34, .14); border-color: var(--jx-red); }
#dataFormLivechat #customer_submit_button {
  width: auto;
  min-width: 160px;
  border: 0;
  background: var(--jx-red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
#dataFormLivechat #customer_submit_button:disabled { cursor: wait; opacity: .65; }

.jx-site-footer { padding: 46px 0 24px; color: #eee; background: #222; }
.jx-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.jx-site-footer h2 { margin-top: 0; color: #fff; font-size: 22px; }
.jx-site-footer a { color: #fff; }
.jx-footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.jx-footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.jx-footer-social a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 4px;
}
.jx-footer-social img { display: block; width: 34px; height: 34px; object-fit: contain; }
.jx-footer-meta { margin-top: 32px; padding-top: 18px; border-top: 1px solid #444; color: #aaa; font-size: 13px; }
.jx-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 16px;
  color: #fff;
  background: #137b3b;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0,0,0,.2);
}

/* The recovered homepage keeps the original visual assets and proportions. */
.home .jx-content { width: 100%; max-width: none; padding: 0; }
.home .jx-content > article { width: 100%; }
.home .slider_banner {
  position: relative;
  overflow: hidden;
  background: #111;
}
.home .slider_banner .swiper-wrapper { position: relative; width: 100%; }
.home .slider_banner .swiper-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 900ms ease, visibility 900ms ease;
}
.home .slider_banner .swiper-slide:first-child { position: relative; opacity: 1; visibility: visible; pointer-events: auto; }
.home .slider_banner.jx-slider-ready .swiper-slide:first-child:not(.is-active) { opacity: 0; visibility: hidden; pointer-events: none; }
.home .slider_banner .swiper-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
@keyframes jx-hero-fallback-first {
  0%, 29% { opacity: 1; visibility: visible; }
  34%, 96% { opacity: 0; visibility: hidden; }
  100% { opacity: 1; visibility: visible; }
}
@keyframes jx-hero-fallback-second {
  0%, 29% { opacity: 0; visibility: hidden; }
  34%, 62% { opacity: 1; visibility: visible; }
  67%, 100% { opacity: 0; visibility: hidden; }
}
@keyframes jx-hero-fallback-third {
  0%, 62% { opacity: 0; visibility: hidden; }
  67%, 96% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
.home .slider_banner:not(.jx-slider-ready) .swiper-slide:nth-child(1) {
  animation: jx-hero-fallback-first 13.5s infinite;
}
.home .slider_banner:not(.jx-slider-ready) .swiper-slide:nth-child(2) {
  animation: jx-hero-fallback-second 13.5s infinite;
}
.home .slider_banner:not(.jx-slider-ready) .swiper-slide:nth-child(3) {
  animation: jx-hero-fallback-third 13.5s infinite;
}
.home .slider_banner img {
  display: block;
  width: 100%;
  aspect-ratio: 1920 / 713;
  object-fit: cover;
}
.home .slider_banner .swiper-button-prev,
.home .slider_banner .swiper-button-next {
  display: block !important;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  line-height: 48px;
  opacity: .82 !important;
  background: rgba(255,255,255,.9);
  color: #202020;
  cursor: pointer;
}
.home .slider_banner .swiper-button-prev { left: 18px !important; }
.home .slider_banner .swiper-button-next { right: 18px !important; }
.home .slider_banner .swiper-button-prev:hover,
.home .slider_banner .swiper-button-next:hover { opacity: 1 !important; }
.home .slider_banner .swiper-pagination {
  display: flex !important;
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 18px;
  left: 0;
  justify-content: center;
  gap: 9px;
}
.home .slider_banner .swiper-pagination button {
  width: 10px;
  height: 10px;
  margin: 0;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  cursor: pointer;
}
.home .slider_banner .swiper-pagination button.is-active { background: #fff; }

/* Match the former site: four equal product cards in a single desktop row. */
.home .index_featured .product_slider { overflow: hidden; }
.home .index_featured .product_items {
  display: flex !important;
  width: 100%;
  margin: 0;
  gap: 0;
  transition: transform 420ms ease;
  will-change: transform;
}
.home .index_featured .product_items .product_item {
  flex: 0 0 25%;
  width: 25% !important;
  margin: 0 !important;
  padding: 0 10px;
}
.home .index_featured .product_item .item_img {
  aspect-ratio: 4 / 3;
  background: #fff;
}
.home .index_featured .product_item .item_img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home .index_featured .swiper-button-prev,
.home .index_featured .swiper-button-next { cursor: pointer; }

/* Keep the old three-column news and customer layout, with stable media boxes. */
.home .index_ad .product_items,
.home .index_product .product_items {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.home .index_ad .product_item,
.home .index_product .product_item { width: auto !important; max-width: none; margin: 0 !important; }
.home .index_ad .product_item .item_img { aspect-ratio: 16 / 9; background: #fff; }
.home .index_ad .product_item .item_img img,
.home .index_product .product_item .item_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home .index_product .product_item .item_img { aspect-ratio: 4 / 3; background: #fff; }

/* Repeated product/application evidence uses one consistent old-site-style frame. */
.jx-image-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.jx-image-block > h2,
.jx-image-block > p { grid-column: 1 / -1; }
.jx-image-block figure,
.jx-evidence-grid figure,
.jx-factory-evidence > div figure {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--jx-line);
  border-radius: 6px;
  background: #fff;
}
.jx-image-block figure img,
.jx-evidence-grid figure img,
.jx-factory-evidence > div figure img {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f7f7f7;
}
.jx-image-block figcaption,
.jx-evidence-grid figcaption,
.jx-factory-evidence > div figcaption {
  padding: 12px 14px;
  color: var(--jx-muted);
  font-size: 14px;
  line-height: 1.5;
}

.jx-product-hub {
  width: min(1120px, 100%);
  margin: 0 auto;
}
.jx-product-banner {
  position: relative;
  min-height: 270px;
  margin: -44px calc(50% - 50vw) 48px;
  display: flex;
  align-items: end;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  color: #fff;
}
.jx-product-banner::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(18, 18, 18, .9), rgba(18, 18, 18, .34));
}
.jx-product-banner-inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--jx-width));
  margin: 0 auto;
  padding: 48px 0 42px;
}
.jx-product-banner .jx-eyebrow { color: #fff; }
.jx-product-banner h1 { margin: 5px 0 0; color: #fff; }
.jx-product-catalog-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-bottom: 54px;
}
.jx-product-sidebar {
  border: 1px solid var(--jx-line);
  border-top: 4px solid var(--jx-red);
  background: #f7f7f7;
}
.jx-product-sidebar h2 {
  margin: 0;
  padding: 18px;
  color: #fff;
  background: #242424;
  font-size: 20px;
}
.jx-product-categories { display: grid; }
.jx-product-categories a {
  padding: 13px 18px;
  border-bottom: 1px solid var(--jx-line);
  color: #242424;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}
.jx-product-categories a:last-child { border-bottom: 0; }
.jx-product-categories a:hover,
.jx-product-categories a:focus { color: #fff; background: var(--jx-red); }
.jx-product-catalog-main .jx-hub-intro { margin-bottom: 28px; }
.jx-product-catalog-main .jx-hub-intro h2 { margin-top: 0; }
.jx-product-hub > section,
.jx-hub-intro { margin-bottom: 48px; }
.jx-product-hub h1 { max-width: 920px; margin: 8px 0 16px; }
.jx-eyebrow {
  margin: 0;
  color: #9b4f14;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}
.jx-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.jx-hub-item {
  overflow: hidden;
  border: 1px solid var(--jx-line);
  border-radius: 6px;
  background: #fff;
}
.jx-hub-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.jx-hub-item h3,
.jx-hub-item p { margin-right: 18px; margin-left: 18px; }
.jx-hub-item h3 { margin-top: 18px; margin-bottom: 8px; font-size: 20px; }
.jx-hub-item p { margin-top: 0; margin-bottom: 20px; }
.jx-hub-links,
.jx-hub-columns ul { padding-left: 22px; }
.jx-hub-links li,
.jx-hub-columns li { margin-bottom: 10px; }
.jx-hub-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.jx-former-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.jx-former-product-grid figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--jx-line);
  border-radius: 6px;
  background: #fff;
}
.jx-former-product-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f7f7f7;
}
.jx-former-product-grid figcaption {
  padding: 12px 14px;
  color: var(--jx-muted);
  font-size: 13px;
  line-height: 1.5;
}
.jx-hub-cta {
  padding: 28px;
  border-left: 5px solid #9b4f14;
  background: #f3f5f7;
}

.jx-customer-evidence {
  width: min(1120px, 100%);
  margin: 0 auto;
}
.jx-customer-evidence > header,
.jx-customer-evidence > section { margin-bottom: 52px; }
.jx-customer-intro { max-width: 900px; }
.jx-customer-video {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 34px;
  align-items: center;
  padding: 30px;
  border-left: 5px solid var(--jx-red);
  background: #f3f5f7;
}
.jx-customer-video video {
  display: block;
  width: 100%;
  max-height: 620px;
  background: #111;
}
.jx-customer-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.jx-customer-video-grid figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--jx-line);
  border-radius: 6px;
  background: #fff;
}
.jx-customer-video-grid video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #111;
}
.jx-customer-video-grid figcaption {
  padding: 12px 14px;
  color: var(--jx-muted);
  font-size: 13px;
  line-height: 1.5;
}
.jx-customer-logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.jx-customer-logo-grid figure {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--jx-line);
  background: #fff;
  text-align: center;
}
.jx-customer-logo-grid img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: contain;
}
.jx-customer-logo-grid figcaption {
  margin-top: 10px;
  color: var(--jx-muted);
  font-size: 13px;
}

.jx-about-page {
  width: min(1120px, 100%);
  margin: 0 auto;
}
.jx-about-page > header,
.jx-about-page > section { margin-bottom: 58px; }
.jx-about-intro { max-width: 940px; }
.jx-about-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.jx-about-fact-grid > div {
  display: grid;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--jx-line);
  border-radius: 6px;
  background: #fff;
}
.jx-about-fact-grid strong { color: var(--jx-red); }
.jx-about-split,
.jx-about-media-grid,
.jx-about-project-grid,
.jx-about-loading-grid {
  display: grid;
  gap: 20px;
}
.jx-about-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jx-about-media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jx-about-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 20px; }
.jx-about-project-grid,
.jx-about-loading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jx-about-project-video,
.jx-about-loading-video { grid-row: span 2; }
.jx-about-media {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--jx-line);
  border-radius: 6px;
  background: #fff;
}
.jx-about-media img,
.jx-about-media video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #111;
}
.jx-about-media figcaption {
  padding: 12px 14px;
  color: var(--jx-muted);
  font-size: 13px;
  line-height: 1.5;
}
.jx-about-cta {
  padding: 24px;
  border-left: 5px solid var(--jx-red);
  background: #f3f5f7;
}

@media (max-width: 900px) {
  .jx-menu-button { display: inline-block; }
  .jx-nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    display: none;
    padding: 16px;
    background: #fff;
    border-bottom: 1px solid var(--jx-line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .jx-nav.is-open { display: flex; }
  .jx-nav a { padding: 12px 4px; }
  .jx-nav-dropdown { display: grid; }
  .jx-nav-parent { justify-content: space-between; }
  .jx-nav-submenu {
    position: static;
    display: grid;
    min-width: 0;
    padding: 0 0 8px 16px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .jx-nav-submenu::before { display: none; }
  .jx-nav-submenu a { padding: 8px 4px; color: #555; font-size: 13px; }
  .jx-product-catalog-layout { grid-template-columns: 1fr; gap: 28px; }
  .jx-product-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jx-product-categories a:nth-child(odd) { border-right: 1px solid var(--jx-line); }
  .jx-footer-grid { grid-template-columns: 1fr; }
  .home .index_featured .product_items .product_item { flex-basis: 50%; width: 50% !important; }
  .home .index_ad .product_items,
  .home .index_product .product_items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jx-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jx-former-product-grid,
  .jx-customer-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jx-contact-layout { grid-template-columns: 1fr; }
  .jx-customer-video { grid-template-columns: 1fr; }
  .jx-customer-logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jx-about-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .jx-logo img { width: 150px; }
  .jx-content { width: min(calc(100% - 24px), var(--jx-width)); padding-top: 28px; }
  .jx-content h1 { font-size: 30px; }
  .jx-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .jx-content th, .jx-content td { min-width: 132px; padding: 10px; }
  .jx-contact-panel { padding: 20px; }
  .jx-footer-links { grid-template-columns: 1fr; }
  .home .index_featured .product_items .product_item { flex-basis: 100%; width: 100% !important; padding: 0 4px; }
  .home .index_ad .product_items,
  .home .index_product .product_items { grid-template-columns: 1fr; }
  .jx-hub-grid,
  .jx-hub-columns,
  .jx-former-product-grid,
  .jx-customer-video-grid { grid-template-columns: 1fr; }
  .jx-product-banner { min-height: 220px; margin-top: -28px; }
  .jx-product-banner-inner { width: min(calc(100% - 24px), var(--jx-width)); padding: 34px 0 30px; }
  .jx-product-categories { grid-template-columns: 1fr; }
  .jx-product-categories a:nth-child(odd) { border-right: 0; }
  .jx-customer-video { padding: 22px; }
  .jx-customer-logo-grid { grid-template-columns: 1fr; }
  .jx-about-fact-grid,
  .jx-about-split,
  .jx-about-media-grid,
  .jx-about-video-grid,
  .jx-about-project-grid,
  .jx-about-loading-grid { grid-template-columns: 1fr; }
  .jx-about-project-video,
  .jx-about-loading-video { grid-row: auto; }
}
