/* Quectel IoTGuys Mini-Site — Shared Stylesheet */
/* Brand: Quectel red #E31C25 | Charcoal #1A1F2E | White */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@600;700;800&family=Source+Code+Pro:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:      #E31C25;
  --red-dark: #b5151c;
  --navy:     #1A1F2E;
  --navy2:    #242a3d;
  --grey:     #3d4458;
  --mid:      #6b7280;
  --light:    #f4f5f7;
  --border:   #e2e5ec;
  --white:    #ffffff;
  --font:     'Barlow', sans-serif;
  --mono:     'Source Code Pro', monospace;
  --condensed:'Barlow Condensed', sans-serif;
  --radius:   6px;
  --shadow:   0 2px 8px rgba(0,0,0,.09);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--white); color: var(--navy); font-size: 16px; line-height: 1.6; }

/* ── HEADER ── */
.site-header {
  background: var(--navy);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--red);
}
.site-header .logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--white);
}
.site-header .logo-brand {
  font-family: var(--condensed);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--red);
}
.site-header .logo-sep { color: #555; margin: 0 2px; }
.site-header .logo-sub {
  font-size: .8rem;
  font-weight: 500;
  color: #9ba3b6;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.site-header nav { display: flex; gap: 4px; }
.site-header nav a {
  color: #bcc3d6;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 4px;
  transition: color .2s, background .2s;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.site-header nav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.site-header .cta-btn {
  background: var(--red);
  color: var(--white) !important;
  padding: 7px 16px !important;
  border-radius: 4px;
}
.site-header .cta-btn:hover { background: var(--red-dark) !important; }

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--light);
  padding: 10px 32px;
  font-size: .82rem;
  color: var(--mid);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--grey); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { margin: 0 6px; }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--navy);
  padding: 52px 32px 44px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
}
.page-hero::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227,28,37,.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 960px; margin: 0 auto; }
.hero-tag {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 14px;
}
.page-hero h1 {
  font-family: var(--condensed);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: .01em;
  margin-bottom: 14px;
}
.page-hero p {
  font-size: 1.05rem;
  color: #9ba3b6;
  max-width: 640px;
  line-height: 1.6;
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat .num {
  font-family: var(--condensed);
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
}
.hero-stat .label {
  font-size: .78rem;
  color: #7a8299;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 2px;
}

/* ── MAIN LAYOUT ── */
.page-wrap { max-width: 1060px; margin: 0 auto; padding: 40px 24px 80px; }

/* ── SECTION INTRO ── */
.section-intro {
  margin-bottom: 32px;
}
.section-intro h2 {
  font-family: var(--condensed);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.section-intro p { color: var(--grey); font-size: .97rem; max-width: 720px; }

/* ── PRODUCT GRID ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  transition: box-shadow .2s, border-color .2s, transform .15s;
  position: relative;
}
.product-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.1);
  border-color: #c5cad8;
  transform: translateY(-2px);
}
.product-card .part-number {
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 500;
  color: var(--red);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.product-card .product-name {
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.3;
}
.product-card .spec-list {
  list-style: none;
  font-size: .79rem;
  color: var(--mid);
  line-height: 1.6;
}
.product-card .spec-list li { display: flex; gap: 6px; }
.product-card .spec-list .key { color: #aab0be; min-width: 60px; flex-shrink: 0; }
.product-card .tag {
  display: inline-block;
  background: var(--light);
  color: var(--grey);
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  margin: 8px 2px 2px 0;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.product-card .tag.red { background: rgba(227,28,37,.1); color: var(--red); }

/* ── BIG TABLE FOR SPEC COMPARISON ── */
.spec-table-wrap {
  overflow-x: auto;
  margin-bottom: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}
.spec-table thead {
  background: var(--navy);
  color: var(--white);
}
.spec-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  font-size: .8rem;
  letter-spacing: .04em;
}
.spec-table thead th:first-child { width: 160px; background: #13172298; }
.spec-table tbody tr:nth-child(even) { background: var(--light); }
.spec-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: .81rem;
  color: var(--grey);
}
.spec-table tbody td:first-child {
  font-weight: 600;
  color: var(--navy2);
  white-space: nowrap;
  background: #fafbfc;
  border-right: 1px solid var(--border);
}
.spec-table .pn-cell {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--red) !important;
  font-size: .8rem;
}

/* ── ANTENNA CARDS ── */
.antenna-section { margin-bottom: 44px; }
.antenna-section h3 {
  font-family: var(--condensed);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.antenna-section h3 .count {
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 500;
  background: var(--light);
  color: var(--mid);
  padding: 2px 8px;
  border-radius: 12px;
}
.antenna-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.antenna-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: box-shadow .2s, transform .15s;
}
.antenna-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.antenna-card .ant-pn {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 4px;
}
.antenna-card .ant-desc {
  font-size: .83rem;
  color: var(--grey);
  line-height: 1.4;
}
.antenna-card .ant-freq {
  font-size: .75rem;
  color: var(--mid);
  margin-top: 6px;
}
.antenna-card .ant-freq strong { color: var(--navy2); }

/* ── INDEX CATEGORY GRID ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 32px;
}
.category-card {
  display: block;
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: box-shadow .2s, border-color .2s, transform .15s;
  position: relative;
  overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--red);
  opacity: 0;
  transition: opacity .2s;
}
.category-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
  border-color: #bfc5d4;
  transform: translateY(-2px);
}
.category-card:hover::before { opacity: 1; }
.category-card .cat-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
  display: block;
}
.category-card .cat-title {
  font-family: var(--condensed);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.category-card .cat-desc {
  font-size: .84rem;
  color: var(--mid);
  line-height: 1.5;
  margin-bottom: 12px;
}
.category-card .cat-count {
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--red);
  font-weight: 600;
}

/* ── CTA BOX ── */
.cta-box {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 36px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 48px;
}
.cta-box .cta-text h3 {
  font-family: var(--condensed);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.cta-box .cta-text p { font-size: .9rem; color: #9ba3b6; }
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  padding: 12px 24px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background .2s, transform .15s;
  letter-spacing: .02em;
}
.cta-link:hover { background: var(--red-dark); transform: translateY(-1px); }
.cta-link::after { content: ' →'; }

/* ── BACK LINK ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mid);
  text-decoration: none;
  font-size: .84rem;
  margin-bottom: 28px;
  transition: color .2s;
}
.back-link:hover { color: var(--red); }

/* ── FOOTER ── */
.site-footer {
  background: var(--navy);
  color: #7a8299;
  text-align: center;
  padding: 24px;
  font-size: .82rem;
  border-top: 3px solid var(--red);
  margin-top: 60px;
}
.site-footer a { color: #9ba3b6; text-decoration: none; }
.site-footer a:hover { color: var(--white); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .page-hero { padding: 36px 20px 30px; }
  .page-hero h1 { font-size: 1.9rem; }
  .page-wrap { padding: 24px 16px 60px; }
  .site-header nav { display: none; }
  .cta-box { padding: 24px 20px; }
  .hero-stats { gap: 20px; }
}

/* ── PRODUCT IMAGE CARDS ── */
.product-card .prod-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--light);
  border-radius: 4px;
  margin-bottom: 12px;
  padding: 10px;
  display: block;
}
.product-card .prod-img-wrap {
  background: var(--light);
  border-radius: 4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 140px;
}
.product-card .prod-img-wrap img {
  max-width: 100%;
  max-height: 130px;
  object-fit: contain;
  padding: 8px;
}
.product-card .no-img {
  height: 140px;
  background: var(--light);
  border-radius: 4px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccd0db;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Antenna cards with images */
.antenna-card .ant-img-wrap {
  background: var(--light);
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  overflow: hidden;
}
.antenna-card .ant-img-wrap img {
  max-width: 100%;
  max-height: 110px;
  object-fit: contain;
  padding: 6px;
}

/* Wider grid when images present */
.product-grid.has-images {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.antenna-grid.has-images {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
