/* =========================================================
   Shenghuan Telecom - Clean Unified site.css
   Replace the whole file with this version
   ========================================================= */

/* ---------- Design tokens ---------- */
:root{
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f1f5ff;

  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;

  --border: #e6eaf0;

  --brand: #2563eb;
  --brand-2: #1e40af;

  --shadow: 0 10px 24px rgba(16,24,40,.06);

  --radius: 16px;
  --radius-sm: 12px;

  --container: 1120px;
}

*{ box-sizing: border-box; }
html{ font-size: 16px; }
@media (min-width: 1024px){
  html{ font-size: 18px; }
}

body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-weight: 500;
}

/* ---------- Typography ---------- */
h1,h2,h3{
  margin: 0 0 10px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}
h1{ font-size: 1.7rem; letter-spacing: .2px; }
h2{ font-size: 1.25rem; }
h3{ font-size: 1.05rem; }

p, li, dd, dt, label, small{
  color: var(--text-2);
  line-height: 1.75;
}

.muted{ color: var(--muted) !important; }

a{ color: var(--brand); text-decoration: none; }
a:hover{ color: var(--brand-2); text-decoration: underline; }

/* ---------- Layout ---------- */
.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px 16px 64px;
}

.p{ padding: 18px; }

/* ---------- Surfaces ---------- */
.panel, .card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,248,251,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom:  1px solid var(--border);
}

.header-container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
}

.header-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-header img.brand-logo{
  height: 56px;
  width: auto;
  max-height: 56px;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

.top-nav{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.top-nav .nav-link{
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 750;
  font-size: 14px;
  text-decoration: none;
}
.top-nav .nav-link:hover{
  border-color: rgba(37,99,235,.35);
  color: var(--brand);
  text-decoration: none;
  background: rgba(37,99,235,.06);
}

.top-actions{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- Buttons (clear hierarchy) ---------- */
.btn, a.btn, button.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.btn:hover, a.btn:hover, button.btn:hover{
  border-color: rgba(37,99,235,.35);
  color: var(--brand);
  background: rgba(37,99,235,.06);
  text-decoration: none;
}

.btn-pill{ border-radius: 999px; }

.btn-primary{
  background: var(--brand);
  border-color: rgba(37,99,235,.25);
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(37,99,235,.18);
}
.btn-whatsapp{
  background: #25D366;
  border-color: rgba(37,211,102,.35);
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(37,211,102,.22);
}
.btn-whatsapp:hover{
  background: #1FB85A;
  border-color: rgba(31,184,90,.40);
  color: #fff !important;
}

.btn-primary:hover{
  background: var(--brand-2);
  border-color: rgba(30,64,175,.30);
  color: #fff !important;
}

.btn-ghost{
  background: #fff;
}

/* ---------- Home: hero lead line (optional) ---------- */
.hero-lead{
  color: var(--text);
  font-size: 18px;
  line-height: 1.55;
  margin: 0 0 10px;
  max-width: 900px;
}

/* ---------- Grids ---------- */
.grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 920px){
  .grid2{ grid-template-columns: 1fr; }
}

/* Home: products buttons area (default grid) */
#products .cta{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 700px){
  #products .cta{ grid-template-columns: 1fr; }
}
#products .cta .btn{
  height: 46px;
  justify-content: center;
}

/* =========================================================
   Home page requirement:
   - Keep header Email/WhatsApp as buttons
   - Other CTA anchors on home should NOT look like buttons
   Targeted to home structure: #products .cta, .trust-block, section.card
   ========================================================= */

/* 1) Products unified entrance: make links normal (no button) */
#products .cta{
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}
#products .cta a,
#products .cta a.btn{
  display: inline;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  font-weight: 700;
  color: var(--brand);
  text-decoration: underline;
}
#products .cta a:hover,
#products .cta a.btn:hover{
  color: var(--brand-2);
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}

/* 2) Home: "View QC process" inside trust block -> normal link */
.trust-block a.btn{
  display: inline;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  font-weight: 700;
  color: var(--brand);
  text-decoration: underline;
}
.trust-block a.btn:hover{
  color: var(--brand-2);
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}

/* 3) Home: "View all news" in the Tech News card -> normal link */
section.card > div a.btn,
section.card a.btn[href="/news/index.html"]{
  display: inline;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  font-weight: 700;
  color: var(--brand);
  text-decoration: underline;
}
section.card > div a.btn:hover,
section.card a.btn[href="/news/index.html"]:hover{
  color: var(--brand-2);
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}

/* Safety: ensure header buttons stay buttons even if rules above are expanded later */
.site-header .top-actions a.btn{
  display: inline-flex;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
}

/* ---------- News list ---------- */
.news-list{
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.news-link{
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
}
.news-link:hover{
  text-decoration: underline;
  color: var(--brand);
}
.news-meta{
  font-size: .92rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Product listing page ---------- */
.filters{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* product grid container used in products_page_template */
.grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr; }
}

/* Product cards */
.card{
  overflow: hidden;
}
.card .thumb{
  display: block;
}
.card .thumb img{
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.card .body{ padding: 14px; }
.card .row{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.pill{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,.02);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.card .title{ margin: 0 0 8px; font-size: 15px; }
.card .title a{ color: var(--text); }
.card .title a:hover{ color: var(--brand); text-decoration: none; }
.card .desc{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.card .actions{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
a.small{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}
a.small:hover{
  border-color: rgba(37,99,235,.35);
  color: var(--brand);
  background: rgba(37,99,235,.06);
}
a.small.primary{
  background: var(--brand);
  border-color: rgba(37,99,235,.25);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37,99,235,.18);
}
a.small.primary:hover{
  background: var(--brand-2);
  color: #fff;
}

/* Pager */
.pager{
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- Product detail ---------- */
.product-detail p,
.product-detail li,
.product-detail .overview,
.product-detail .desc{
  color: var(--text);
  font-weight: 600;
  line-height: 1.75;
}

/* ---------- Home: Lab / Testing photos ---------- */
.photo-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.photo-grid figure{ margin: 0; }
.photo-grid img{
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #f9fafb;
  display: block;
}
.photo-grid figcaption{
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
@media (max-width: 900px){
  .photo-grid{ grid-template-columns: 1fr; }
  .photo-grid img{ height: auto; }
}

/* ---------- Footer ---------- */
footer{
  margin-top: 18px;
  padding-top: 16px;
  border-top:  1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

