/*
Theme Name: Chipsimple Global
Author: Chipsimple
Description: Modern B2B export website theme for Chipsimple Electronic Tech.
Version: 1.0.3
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: chipsimple
*/

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #657083;
  --line: #dce3ec;
  --brand: #1266d6;
  --brand-dark: #0c3f86;
  --accent: #16a085;
  --soft: #eaf2ff;
  --shadow: 0 20px 50px rgba(23, 32, 51, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-quote {
  color: var(--brand);
  font-weight: 800;
}

.topbar-quote:hover {
  color: var(--brand-dark);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
}

.language-switcher select {
  min-height: 30px;
  max-width: 170px;
  padding: 4px 28px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #243044;
  background: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.nav {
  display: grid;
  grid-template-columns: auto 44px;
  align-items: center;
  gap: 12px 20px;
  min-height: 0;
  padding: 12px 0;
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand img {
  width: clamp(130px, 13vw, 152px);
  height: auto;
}

.menu {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
  border-top: 1px solid rgba(220, 227, 236, 0.9);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.menu-toggle span:not(.screen-reader-text) {
  display: block;
  width: 20px;
  height: 2px;
  background: #243044;
}

.menu-list {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
  color: #243044;
  font-size: 15px;
  font-weight: 700;
}

.menu-list li {
  list-style: none;
  position: relative;
}

.menu-list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.menu-list a:hover {
  color: var(--brand);
  background: var(--soft);
}

.menu-list .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 260px;
  display: none;
  list-style: none;
  margin: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.menu-list .sub-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.menu-list li:hover > .sub-menu,
.menu-list li:focus-within > .sub-menu {
  display: grid;
  gap: 4px;
}

.menu-list .sub-menu a {
  display: block;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 6px;
  color: #243044;
  white-space: nowrap;
}

.menu-list .sub-menu a:hover {
  color: #fff;
  background: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 750;
  line-height: 1;
}

.btn-primary {
  color: #fff;
  background: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-secondary {
  color: var(--brand-dark);
  background: #fff;
  border-color: #b9ccea;
}

.hero {
  position: relative;
  min-height: 680px;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #111827;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 18, 34, 0.94), rgba(8, 18, 34, 0.76), rgba(8, 18, 34, 0.36));
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 16px;
  color: #9ed4ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: 1.06;
}

.hero p {
  max-width: 690px;
  margin: 24px 0 0;
  color: #dbe7f5;
  font-size: 19px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.stats-band {
  position: relative;
  z-index: 3;
  margin-top: -58px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stat {
  padding: 24px 22px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  display: block;
  color: var(--brand-dark);
  font-size: 28px;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.section {
  padding: 92px 0;
}

.section.alt {
  background: #fff;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.section-head h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
}

.section-head p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

.catalog-sidebar {
  position: sticky;
  top: 140px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.catalog-sidebar h3 {
  margin: 0 0 16px;
}

.catalog-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.catalog-sidebar a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: #314057;
  background: #f7f9fc;
}

.catalog-sidebar a:hover {
  color: #fff;
  background: var(--brand);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.product-card,
.capability,
.application-card,
.contact-panel,
.quote-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-card {
  overflow: hidden;
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef2f6;
}

.product-body {
  padding: 22px;
}

.product-body h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.product-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--soft);
  font-size: 12px;
  font-weight: 750;
}

.product-detail {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 42px;
  align-items: start;
}

.product-detail-media img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.spec-table {
  width: 100%;
  margin-top: 22px;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
}

.spec-table th,
.spec-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  width: 34%;
  color: #314057;
  background: #f8fafc;
}

.post-list {
  display: grid;
  gap: 18px;
}

.post-row {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.post-row h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.post-row time {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.pagination .page-numbers {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #314057;
  background: #fff;
  font-weight: 700;
}

.pagination .current,
.pagination .page-numbers:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.product-body p,
.capability p,
.application-card p,
.content-page p,
.quote-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.product-body ul,
.capability ul,
.content-page ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: #3c485c;
  line-height: 1.75;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 54px;
  align-items: center;
}

.split img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.capability {
  padding: 24px;
}

.capability strong {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 6px;
  color: #fff;
  background: var(--brand);
}

.capability h3 {
  margin: 0;
  font-size: 20px;
}

.application-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.application-card {
  overflow: hidden;
}

.application-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.application-card div {
  padding: 22px;
}

.cta {
  padding: 78px 0;
  color: #fff;
  background: linear-gradient(135deg, #123761, #1266d6 62%, #16a085);
}

.cta-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
}

.cta h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
}

.cta p {
  max-width: 680px;
  color: #dcecff;
  line-height: 1.7;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  padding: 58px 0 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  gap: 34px;
}

.site-footer h3,
.site-footer h4 {
  color: #fff;
  margin-top: 0;
}

.site-footer p,
.site-footer li {
  color: #cbd5e1;
  line-height: 1.7;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.copyright {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 13px;
}

.page-hero {
  padding: 96px 0 70px;
  color: #fff;
  background: linear-gradient(135deg, #10223c, #1455a0);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.7;
}

.content-page {
  padding: 72px 0;
  background: #fff;
}

.content-page h2 {
  margin-top: 40px;
  font-size: 34px;
}

.quote-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
}

.contact-panel,
.quote-panel {
  padding: 28px;
}

.rfq-form {
  display: grid;
  gap: 14px;
}

.rfq-form label {
  display: grid;
  gap: 7px;
  color: #314057;
  font-weight: 700;
}

.rfq-form input,
.rfq-form textarea,
.rfq-form select {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
}

.rfq-form textarea {
  min-height: 138px;
  resize: vertical;
}

.notice {
  padding: 13px 15px;
  border-radius: 6px;
  line-height: 1.6;
}

.notice.success {
  color: #14532d;
  background: #dcfce7;
}

.notice.error {
  color: #7f1d1d;
  background: #fee2e2;
}

@media (max-width: 980px) {
  .topbar,
  .section-head,
  .cta-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .menu {
    display: none;
  }

  .nav.is-open .menu {
    display: block;
  }

  .menu-list {
    display: grid;
    align-items: stretch;
    justify-content: stretch;
    flex-wrap: initial;
    overflow: visible;
    gap: 4px;
    padding: 10px 0;
    font-size: 16px;
  }

  .menu-list .sub-menu {
    position: static;
    display: grid;
    min-width: 220px;
    margin-top: 6px;
    padding: 6px 0 6px 14px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .menu-list .sub-menu::before {
    display: none;
  }

  .menu-list a,
  .menu-list .sub-menu a {
    width: 100%;
    white-space: normal;
  }

  .stats-grid,
  .product-grid,
  .catalog-layout,
  .catalog-grid,
  .capability-grid,
  .application-grid,
  .split,
  .product-detail,
  .quote-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    position: static;
  }

  .stats-band {
    margin-top: 0;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero {
    min-height: 620px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .hero h1 {
    font-size: 34px;
    line-height: 1.12;
  }

  .section {
    padding: 64px 0;
  }
}
