/*
Theme Name: Senmatrix Industrial
Theme URI: https://senmatrix.cn/
Author: Senmatrix
Description: A fast, editable block theme for the Senmatrix industrial sensor website.
Version: 2.1.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: senmatrix-industrial
Tags: full-site-editing, block-patterns, custom-colors, custom-logo, wide-blocks
*/

:root {
  --senmatrix-shadow: 0 18px 45px rgba(17, 19, 24, .08);
  --senmatrix-radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
a { text-underline-offset: 3px; }
.wp-site-blocks { min-height: 100vh; }

.senmatrix-topline {
  border-bottom: 1px solid rgba(255,255,255,.1);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.senmatrix-header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(17,19,24,.08);
}

.admin-bar .senmatrix-header { top: 32px; }
.senmatrix-brand { letter-spacing: -.035em; }
.senmatrix-brand a { text-decoration: none; }
.senmatrix-brand-mark { color: var(--wp--preset--color--brand-red); }
.senmatrix-nav .wp-block-navigation-item__content { padding: .65rem .25rem; }
.senmatrix-nav .current-menu-item > .wp-block-navigation-item__content {
  color: var(--wp--preset--color--brand-red);
}

.senmatrix-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 680px;
}

.senmatrix-hero::before,
.senmatrix-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
}

.senmatrix-hero::before {
  width: 520px;
  height: 520px;
  right: -140px;
  top: -180px;
  border: 1px solid rgba(198,40,40,.35);
  box-shadow: 0 0 0 70px rgba(198,40,40,.04), 0 0 0 140px rgba(198,40,40,.025);
}

.senmatrix-hero::after {
  width: 260px;
  height: 260px;
  right: 20%;
  bottom: -180px;
  background: var(--wp--preset--color--brand-red);
  filter: blur(90px);
  opacity: .2;
}

.senmatrix-eyebrow {
  display: inline-flex;
  gap: .55rem;
  align-items: center;
  margin-bottom: 1.2rem;
  color: var(--wp--preset--color--brand-red);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.senmatrix-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

.senmatrix-hero h1 { max-width: 820px; }
.senmatrix-lead { max-width: 760px; }
.senmatrix-proofbar { border-top: 1px solid rgba(255,255,255,.12); }
.senmatrix-proofbar strong { display: block; font-size: 1.2rem; color: #fff; }

.senmatrix-visual {
  position: relative;
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.08), transparent 40%),
    repeating-linear-gradient(90deg, transparent 0 52px, rgba(255,255,255,.04) 52px 53px),
    #171a21;
  border: 1px solid rgba(255,255,255,.12);
}

.senmatrix-visual::before {
  content: "SENSING / CONTROL / MEASUREMENT";
  position: absolute;
  inset: 46px 46px auto;
  color: rgba(255,255,255,.38);
  font-size: .72rem;
  letter-spacing: .15em;
}

.senmatrix-visual::after {
  content: "Replace with your product or facility image";
  position: absolute;
  inset: auto 46px 46px;
  max-width: 250px;
  padding: 1rem;
  color: rgba(255,255,255,.72);
  border-left: 3px solid var(--wp--preset--color--brand-red);
  background: rgba(17,19,24,.72);
  font-size: .82rem;
}

.senmatrix-visual-disc {
  width: 230px;
  height: 230px;
  margin: 95px auto 0;
  border: 22px solid #2b303a;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15), 0 24px 65px rgba(0,0,0,.45);
  background: radial-gradient(circle at 38% 35%, #e9edf2 0 7%, #656d79 8% 10%, #20242b 11% 34%, #c62828 35% 38%, #111318 39%);
}

.senmatrix-section { padding-top: clamp(4rem, 8vw, 7rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.senmatrix-section-title { max-width: 760px; }
.senmatrix-card-grid { align-items: stretch; }
.senmatrix-card-grid > .wp-block-column,
.senmatrix-card {
  position: relative;
  height: 100%;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--senmatrix-radius);
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.senmatrix-card-grid > .wp-block-column { padding: clamp(1.4rem, 3vw, 2rem); }
.senmatrix-card { padding: clamp(1.4rem, 3vw, 2rem); }
.senmatrix-card-grid > .wp-block-column:hover,
.senmatrix-card:hover { transform: translateY(-3px); box-shadow: var(--senmatrix-shadow); border-color: #cbd0d8; }
.senmatrix-card-number { color: var(--wp--preset--color--brand-red); font-weight: 700; font-size: .78rem; letter-spacing: .12em; }
.senmatrix-card a { text-decoration: none; }

.senmatrix-icon-box {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 1.2rem;
  border-radius: 10px;
  background: var(--wp--preset--color--brand-red-soft);
  color: var(--wp--preset--color--brand-red);
  font-weight: 800;
}

.senmatrix-band { overflow: hidden; }
.senmatrix-cta { border-radius: 20px; overflow: hidden; }
.senmatrix-cta .wp-block-buttons { flex-shrink: 0; }
.senmatrix-page-hero { border-bottom: 1px solid var(--wp--preset--color--border); }
.senmatrix-page-hero h1 { max-width: 840px; }
.senmatrix-narrow { max-width: 790px; }

.senmatrix-taxonomy-grid,
.senmatrix-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.senmatrix-category-card,
.senmatrix-product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--senmatrix-radius);
  overflow: hidden;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}

.senmatrix-category-card:hover,
.senmatrix-product-card:hover { transform: translateY(-3px); box-shadow: var(--senmatrix-shadow); }
.senmatrix-category-visual,
.senmatrix-product-image {
  aspect-ratio: 1 / 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(198,40,40,.08), transparent 45%),
    repeating-linear-gradient(90deg, transparent 0 35px, rgba(17,19,24,.035) 35px 36px),
    var(--wp--preset--color--light);
}

.senmatrix-category-visual { overflow: hidden; text-decoration: none; }
.senmatrix-category-visual img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; padding: .5rem; object-fit: contain; background: #fff; transition: transform .25s ease; }
.senmatrix-category-card:hover .senmatrix-category-visual img { transform: scale(1.025); }
.senmatrix-taxonomy-grid.senmatrix-embedded-grid { grid-template-columns: repeat(var(--senmatrix-grid-columns, 3), minmax(0, 1fr)); }
.senmatrix-elementor-categories { width: 100%; }
.senmatrix-elementor-heading { margin-bottom: .5rem; }
.senmatrix-elementor-introduction { max-width: 760px; margin-bottom: 2rem; }

.senmatrix-category-visual span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 10px solid #2b303a;
  border-radius: 50%;
  color: #fff;
  background: var(--wp--preset--color--brand-red);
  font-size: .75rem;
  font-weight: 700;
}

.senmatrix-product-image img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; padding: .5rem; object-fit: contain; background: #fff; }
.senmatrix-card-body { padding: 1.5rem; flex: 1; }
.senmatrix-card-body h2,
.senmatrix-card-body h3 { margin-top: 0; }
.senmatrix-card-link { color: var(--wp--preset--color--brand-red); font-weight: 700; text-decoration: none; }
.senmatrix-subcategories { margin: .9rem 0 0; padding-left: 1.1rem; color: var(--wp--preset--color--body); font-size: .88rem; }
.senmatrix-empty { padding: 2rem; border: 1px dashed #b7bdc7; border-radius: var(--senmatrix-radius); background: #fff; }

.senmatrix-product-meta { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1rem; }
.senmatrix-product-meta span { padding: .35rem .65rem; border-radius: 999px; background: var(--wp--preset--color--light); font-size: .78rem; font-weight: 650; }
.senmatrix-product-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 5rem); }
.senmatrix-product-gallery-main,
.senmatrix-product-gallery-placeholder { aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--senmatrix-radius); background: var(--wp--preset--color--light); }
.senmatrix-product-gallery-main img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; padding: .75rem; object-fit: contain; background: #fff; }
.senmatrix-product-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-top: .7rem; }
.senmatrix-product-thumbs img { width: 100%; aspect-ratio: 1; padding: .25rem; object-fit: contain; border-radius: 8px; background: #fff; }
.senmatrix-back-nav { margin: 0 0 1.4rem; }
.senmatrix-back-link { display: inline-flex; align-items: center; gap: .45rem; color: var(--wp--preset--color--brand-red); font-weight: 700; text-decoration: none; }
.senmatrix-specs { width: 100%; border-collapse: collapse; }
.senmatrix-specs th, .senmatrix-specs td { padding: .85rem 1rem; border-bottom: 1px solid var(--wp--preset--color--border); text-align: left; vertical-align: top; }
.senmatrix-specs th { width: 40%; color: var(--wp--preset--color--dark); background: var(--wp--preset--color--light); }
.senmatrix-detail-section { padding: 1.7rem 0; border-top: 1px solid var(--wp--preset--color--border); }
.senmatrix-detail-section:first-child { border-top: 0; }

.senmatrix-inquiry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}
.senmatrix-inquiry-form label { display: block; color: var(--wp--preset--color--dark); font-size: .88rem; font-weight: 650; }
.senmatrix-inquiry-form label:nth-last-of-type(2),
.senmatrix-inquiry-form label:last-of-type { grid-column: 1 / -1; }
.senmatrix-inquiry-form input:not([type="submit"]),
.senmatrix-inquiry-form select,
.senmatrix-inquiry-form textarea {
  width: 100%;
  margin-top: .4rem;
  padding: .8rem .9rem;
  border: 1px solid #cbd0d8;
  border-radius: 5px;
  background: #fff;
  color: var(--wp--preset--color--dark);
  font: inherit;
}
.senmatrix-inquiry-form textarea { min-height: 145px; resize: vertical; }
.senmatrix-inquiry-form input:focus,
.senmatrix-inquiry-form select:focus,
.senmatrix-inquiry-form textarea:focus { outline: 2px solid var(--wp--preset--color--brand-red); outline-offset: 1px; border-color: transparent; }
.senmatrix-inquiry-form .wpcf7-submit {
  padding: .85rem 1.3rem;
  border: 0;
  border-radius: 6px;
  background: var(--wp--preset--color--brand-red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.wpcf7 form .wpcf7-response-output { margin: 1.25rem 0 0; padding: 1rem; border-width: 1px; border-radius: 6px; }

.senmatrix-footer { margin-top: 0; }
.senmatrix-footer a { color: inherit; }
.senmatrix-footer .wp-block-page-list { list-style: none; margin: 0; padding: 0; }
.senmatrix-footer .wp-block-pages-list__item { margin-bottom: .55rem; }
.senmatrix-footer-category-links {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(5, auto);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .86rem;
  line-height: 1.35;
}
.senmatrix-footer-category-links li { margin: 0; }

@media (max-width: 960px) {
  .senmatrix-taxonomy-grid, .senmatrix-product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .senmatrix-product-layout { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
  .admin-bar .senmatrix-header { top: 46px; }
  .senmatrix-topline { display: none; }
  .senmatrix-header .wp-block-buttons { display: none; }
  .senmatrix-hero { min-height: auto; }
  .senmatrix-visual { min-height: 350px; }
}

@media (max-width: 620px) {
  .senmatrix-taxonomy-grid, .senmatrix-product-grid { grid-template-columns: 1fr; }
  .senmatrix-inquiry-form { grid-template-columns: 1fr; }
  .senmatrix-inquiry-form label { grid-column: auto !important; }
  .senmatrix-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .senmatrix-card-grid { gap: 1rem; }
  .senmatrix-cta { border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
