/* ============================================================
   GEMATRIC SDN BHD — PRODUCT CATALOGUE  (Light Theme)
   ============================================================ */

:root {
  --white:      #ffffff;
  --bg:         #f4f6f9;
  --bg2:        #eef0f4;
  --card:       #ffffff;
  --border:     #e2e5eb;
  --border-hi:  #1a3a5c;
  --navy:       #1a3a5c;
  --navy-lt:    #2a5080;
  --blue:       #0070cc;
  --blue-lt:    #e8f2fc;
  --gold:       #b8860b;
  --red:        #c0392b;
  --text:       #111827;
  --text2:      #4b5563;
  --text3:      #9ca3af;
  --sans:       'Inter', system-ui, sans-serif;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.10);
  --r:          10px;
  --r-sm:       6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; line-height: 1.55; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 3px; }
::selection { background: rgba(0,112,204,0.18); }
a { color: inherit; text-decoration: none; }

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
header {
  position: sticky; top: 0; z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: 56px;
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}

.hd-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.88rem; font-weight: 800;
  letter-spacing: 0.1em; white-space: nowrap;
  color: var(--navy);
}
.hd-mark {
  width: 28px; height: 28px;
  background: var(--navy);
  border-radius: 6px;
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 900; color: #fff;
}
.hd-brand span { color: var(--blue); }

.hd-nav {
  display: flex; gap: 0.1rem; flex: 1; justify-content: center;
  overflow-x: auto; scrollbar-width: none;
}
.hd-nav::-webkit-scrollbar { display: none; }
.hd-nav a {
  padding: 0.32rem 0.85rem;
  font-size: 0.76rem; font-weight: 500;
  color: var(--text2); border-radius: var(--r-sm);
  white-space: nowrap;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.hd-nav a:hover { color: var(--navy); background: var(--bg); }
.hd-nav a.active { color: var(--blue); background: var(--blue-lt); border-color: rgba(0,112,204,0.25); font-weight: 600; }

.btn-quote {
  padding: 0.4rem 1.1rem;
  font-size: 0.76rem; font-weight: 700;
  border-radius: var(--r-sm);
  background: var(--navy); color: #fff;
  border: none; cursor: pointer;
  white-space: nowrap; transition: background 0.15s;
}
.btn-quote:hover { background: var(--navy-lt); }

/* ══════════════════════════════════════════
   COVER
══════════════════════════════════════════ */
.cover {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 2rem;
  display: flex; align-items: center;
  justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.cover-left h1 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800; letter-spacing: -0.03em;
  color: var(--navy); margin-bottom: 0.35rem;
}
.cover-left h1 span { color: var(--blue); }
.cover-left p { font-size: 0.84rem; color: var(--text2); max-width: 520px; line-height: 1.65; }

.cover-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.cstat { text-align: center; }
.cstat-num { font-size: 1.7rem; font-weight: 900; letter-spacing: -0.04em; color: var(--navy); display: block; line-height: 1; }
.cstat-lbl { font-size: 0.65rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.2rem; }

/* ══════════════════════════════════════════
   SERIES INDEX BAR
══════════════════════════════════════════ */
.series-index {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  display: flex; overflow-x: auto;
  scrollbar-width: none;
}
.series-index::-webkit-scrollbar { display: none; }
.sic {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.25rem;
  border-right: 1px solid var(--border);
  cursor: pointer; text-decoration: none;
  transition: background 0.15s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.sic:hover { background: var(--bg); }
.sic.active { border-bottom-color: var(--navy); background: var(--bg); }
.sic-icon { font-size: 1.15rem; flex-shrink: 0; }
.sic-name { font-size: 0.78rem; font-weight: 600; color: var(--navy); white-space: nowrap; }
.sic-count { font-size: 0.66rem; color: var(--text3); margin-top: 0.08rem; }

/* ══════════════════════════════════════════
   MAIN LAYOUT
══════════════════════════════════════════ */
.catalogue-body { max-width: 1340px; margin: 0 auto; padding: 2rem; }

/* ══════════════════════════════════════════
   PRODUCT SECTION
══════════════════════════════════════════ */
.product-section { margin-bottom: 4rem; scroll-margin-top: 72px; }

/* Section header */
.sec-head {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 1.5rem; flex-wrap: wrap;
}
.sec-eyebrow {
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 0.2rem;
}
.sec-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--navy); }
.sec-title span { color: var(--blue); }
.sec-desc { font-size: 0.8rem; color: var(--text2); margin-top: 0.2rem; max-width: 600px; line-height: 1.6; }

/* ── Product Hero (Photo + Info row) ── */
.product-hero {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) { .product-hero { grid-template-columns: 1fr; } }

/* Photo placeholder */
.product-photo {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--r);
  aspect-ratio: 4/3;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.6rem;
  overflow: hidden;
  position: relative;
  min-height: 280px;
}
.product-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: calc(var(--r) - 2px);
}
.photo-placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.6rem; padding: 1.5rem; text-align: center;
  width: 100%; height: 100%;
}
.photo-placeholder-icon { font-size: 2.8rem; opacity: 0.3; }
.photo-placeholder-text { font-size: 0.75rem; color: var(--text3); font-weight: 500; }
.photo-placeholder-sub { font-size: 0.65rem; color: var(--text3); opacity: 0.7; }

/* Photo upload button */
.photo-upload-btn {
  position: absolute; bottom: 0.75rem; right: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: 0.7rem; font-weight: 600;
  color: var(--text2); cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; gap: 0.3rem;
  box-shadow: var(--shadow-sm);
}
.photo-upload-btn:hover { border-color: var(--navy); color: var(--navy); }

/* Product info panel */
.product-info {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.product-info-head {
  padding: 1rem 1.25rem;
  background: var(--navy);
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.product-info-name { font-size: 1rem; font-weight: 700; color: #fff; }
.product-info-badge {
  padding: 0.22rem 0.7rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  font-size: 0.65rem; font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.keyspecs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0; border-bottom: 1px solid var(--border);
}
@media (max-width: 600px) { .keyspecs { grid-template-columns: repeat(2, 1fr); } }
.ks {
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--border);
}
.ks:last-child { border-right: none; }
.ks-lbl { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); margin-bottom: 0.18rem; }
.ks-val { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; color: var(--navy); font-family: var(--mono); }
.ks-val small { font-size: 0.6rem; font-weight: 500; color: var(--text2); font-family: var(--sans); letter-spacing: 0; }

.product-desc { padding: 0.85rem 1.25rem; font-size: 0.8rem; color: var(--text2); line-height: 1.65; border-bottom: 1px solid var(--border); }

.apps-row {
  padding: 0.75rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.35rem;
}
.app-tag {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.7rem; color: var(--text2);
  transition: all 0.15s;
}
.app-tag:hover { border-color: var(--navy); color: var(--navy); }

/* ── Model Tabs ── */
.model-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mtab {
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem; font-weight: 600;
  border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--border);
  background: var(--white); color: var(--text2);
  transition: all 0.15s; font-family: var(--mono);
  letter-spacing: 0.04em; box-shadow: var(--shadow-sm);
}
.mtab:hover { border-color: var(--navy); color: var(--navy); }
.mtab.active { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(26,58,92,0.25); }

/* ── Spec Panel ── */
.spec-wrap {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-bottom: 1rem;
}
@media (max-width: 700px) { .spec-wrap { grid-template-columns: 1fr; } }

.spec-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.spec-card-head {
  padding: 0.6rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text2);
  display: flex; align-items: center; gap: 0.4rem;
}
table.specs { width: 100%; border-collapse: collapse; }
table.specs tr { border-bottom: 1px solid rgba(0,0,0,0.04); }
table.specs tr:last-child { border-bottom: none; }
table.specs tr:hover td { background: #f9fafb; }
table.specs td { padding: 0.6rem 1rem; font-size: 0.8rem; vertical-align: middle; }
table.specs td:first-child { color: var(--text2); width: 46%; }
table.specs td:last-child { color: var(--text); font-weight: 600; font-family: var(--mono); font-size: 0.77rem; }
table.specs td.editable { cursor: text; outline: none; border-radius: 3px; }
table.specs td.editable:focus { background: #fff3cd !important; color: var(--navy); }

/* ── All Models Table ── */
.all-models-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow-x: auto;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
table.all-models { width: 100%; border-collapse: collapse; min-width: 620px; }
table.all-models thead tr { background: var(--navy); }
table.all-models th {
  padding: 0.7rem 1rem; text-align: left;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.75); white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.1);
}
table.all-models th:first-child { color: #fff; min-width: 120px; }
table.all-models th:last-child { border-right: none; }
table.all-models td {
  padding: 0.65rem 1rem; font-size: 0.79rem;
  color: var(--text2); border-bottom: 1px solid var(--border);
  font-family: var(--mono); white-space: nowrap;
  border-right: 1px solid rgba(0,0,0,0.04);
}
table.all-models td:first-child { color: var(--navy); font-weight: 700; font-family: var(--sans); border-right-color: var(--border); }
table.all-models td:last-child { border-right: none; }
table.all-models tbody tr:last-child td { border-bottom: none; }
table.all-models tbody tr:hover td { background: #f5f8ff; }
table.all-models td.best { color: var(--blue); font-weight: 700; }

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem; margin-bottom: 1.25rem;
}
.feat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
  display: flex; gap: 0.7rem; align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.feat-card:hover { border-color: var(--navy); box-shadow: var(--shadow-md); }
.feat-icon-wrap {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--blue-lt);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 1rem;
}
.feat-title { font-size: 0.8rem; font-weight: 700; color: var(--navy); margin-bottom: 0.2rem; }
.feat-desc { font-size: 0.73rem; color: var(--text2); line-height: 1.5; }

/* ══════════════════════════════════════════
   COMPARISON MATRIX
══════════════════════════════════════════ */
#comparison { scroll-margin-top: 72px; }
.cmp-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
table.cmp { width: 100%; border-collapse: collapse; min-width: 900px; }
table.cmp thead tr { background: var(--navy); }
table.cmp th {
  padding: 0.75rem 0.9rem;
  font-size: 0.65rem; font-weight: 700;
  text-align: center; letter-spacing: 0.07em;
  text-transform: uppercase; color: rgba(255,255,255,0.7);
  border-right: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}
table.cmp th:first-child { text-align: left; color: #fff; min-width: 155px; }
table.cmp th:last-child { border-right: none; }
table.cmp td {
  padding: 0.6rem 0.9rem;
  font-size: 0.77rem; text-align: center;
  color: var(--text2);
  border-right: 1px solid rgba(0,0,0,0.05);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
}
table.cmp td:first-child {
  text-align: left; font-family: var(--sans);
  font-size: 0.76rem; color: var(--text2);
  background: var(--bg); font-weight: 500;
}
table.cmp td:last-child { border-right: none; }
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp tbody tr:hover td { background: #f5f8ff; }
table.cmp tbody tr:hover td:first-child { background: #eef2f7; }
table.cmp td.hi { color: var(--navy); font-weight: 700; }
table.cmp td.best { color: var(--blue); font-weight: 700; }

/* ══════════════════════════════════════════
   CLIENTS / PARTNERS
══════════════════════════════════════════ */
.clients-section { margin: 0 -2rem; padding: 3rem 2rem; background: #f4f6f9; }
.clients-intro { font-size: 0.85rem; color: var(--text2); max-width: 680px; margin-bottom: 2rem; line-height: 1.7; }

.logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 580px) { .logo-grid { grid-template-columns: repeat(2, 1fr); } }

.logo-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.logo-card:hover { border-color: #b0b8c8; box-shadow: var(--shadow-md); }
.logo-card img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter 0.2s ease;
}
.logo-card:hover img { filter: grayscale(0%); }
.logo-placeholder {
  font-size: 0.75rem; font-weight: 700;
  color: var(--text3); text-align: center;
  line-height: 1.4; padding: 0.25rem;
  font-family: var(--sans);
  display: none;
}
.logo-card img + .logo-placeholder { display: none; }

/* ══════════════════════════════════════════
   CERTIFICATIONS
══════════════════════════════════════════ */
.certs-wrap { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.5rem; }
.cert-tag {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: 0.73rem; color: var(--text2);
  box-shadow: var(--shadow-sm);
}
.cert-tag::before { content: '✓'; color: var(--blue); font-weight: 700; font-size: 0.72rem; }

/* ══════════════════════════════════════════
   CONTACT
══════════════════════════════════════════ */
#contact { scroll-margin-top: 72px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.25rem; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.ci-block, .cf-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.ci-head, .cf-head {
  padding: 0.7rem 1.1rem;
  background: var(--navy);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.ci-rows { list-style: none; }
.ci-rows li {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.ci-rows li:last-child { border-bottom: none; }
.ci-lbl { font-size: 0.62rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.1rem; }
.ci-val { color: var(--text); font-weight: 500; }

.cf-body { padding: 1.1rem; display: flex; flex-direction: column; gap: 0.65rem; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.cf-group { display: flex; flex-direction: column; gap: 0.25rem; }
.cf-label { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); }
input.cf-inp, select.cf-inp, textarea.cf-inp {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 0.5rem 0.8rem;
  color: var(--text); font-size: 0.82rem;
  font-family: var(--sans); outline: none;
  transition: border-color 0.15s, background 0.15s; width: 100%;
}
input.cf-inp:focus, select.cf-inp:focus, textarea.cf-inp:focus {
  border-color: var(--navy); background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.08);
}
input.cf-inp::placeholder, textarea.cf-inp::placeholder { color: var(--text3); }
textarea.cf-inp { resize: vertical; min-height: 80px; }
select.cf-inp { appearance: none; cursor: pointer; }
.btn-submit {
  padding: 0.6rem 1.5rem;
  background: var(--navy); color: #fff;
  border: none; border-radius: var(--r-sm);
  font-size: 0.82rem; font-weight: 700;
  cursor: pointer; display: inline-flex;
  align-items: center; gap: 0.4rem;
  transition: background 0.15s; align-self: flex-start;
}
.btn-submit:hover { background: var(--navy-lt); }

/* ══════════════════════════════════════════
   SECTION ALTERNATING BACKGROUNDS
══════════════════════════════════════════ */
.bg-white { background: #d8dce6; margin: 0 -2rem; padding: 2.5rem 2rem; }
.bg-grey  { background: #f4f6f9; margin: 0 -2rem; padding: 2.5rem 2rem; }
.bg-mid   { background: #eaecf1; margin: 0 -2rem; padding: 2.5rem 2rem; }

/* ══════════════════════════════════════════
   DIVIDER & FOOTER
══════════════════════════════════════════ */
.sdiv { height: 1px; background: var(--border); margin: 0; }

footer {
  background: var(--navy); color: rgba(255,255,255,0.5);
  padding: 1.25rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.75rem; font-size: 0.72rem;
}
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: rgba(255,255,255,0.5); transition: color 0.15s; }
.footer-links a:hover { color: #fff; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) { .hd-nav { display: none; } .cover { flex-direction: column; } .cover-stats { gap: 1.25rem; } }
@media (max-width: 600px) { .catalogue-body { padding: 1rem; } .cf-row { grid-template-columns: 1fr; } .keyspecs { grid-template-columns: repeat(2, 1fr); } }

/* ══════════════════════════════════════════
   FADE-IN
══════════════════════════════════════════ */
.fade { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade.in { opacity: 1; transform: none; }

/* ══════════════════════════════════════════
   NOTIFICATION
══════════════════════════════════════════ */
#notif {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--navy); color: #fff;
  padding: 0.55rem 1.1rem; border-radius: var(--r-sm);
  font-size: 0.77rem; z-index: 9999;
  opacity: 0; transition: all 0.25s ease; pointer-events: none;
  box-shadow: var(--shadow-md);
}
#notif.show { opacity: 1; transform: translateX(-50%) translateY(0); }
