/* ===== Variables ===== */
:root {
  --color-primary: #1a1a2e;
  --color-accent: #e94560;
  --color-bg: #ffffff;
  --color-text: #333333;
  --color-muted: #666666;
  --color-border: #e0e0e0;

  --font-sans: system-ui, -apple-system, sans-serif;

  --max-width: 1100px;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
}

/* ===== Base ===== */
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ===== Header ===== */
.site-header {
  background: var(--color-primary);
  color: #fff;
  padding: var(--spacing-sm) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.nav-list {
  display: flex;
  gap: var(--spacing-md);
}

.nav-list a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-list a:hover {
  color: var(--color-accent);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.88;
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ===== Hero ===== */
.hero {
  background-color: #0d1b2a;
  color: #fff;
  padding: var(--spacing-lg) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* PCB SVG overlay */
.hero-pcb-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Trace path lengths — used for dasharray/dashoffset animation.
   Each path gets a short bright dash traveling along its length. */
.trace { stroke-dasharray: 60 9999; }

/* flowing current animations */
@keyframes flow-fwd {
  from { stroke-dashoffset:  600; }
  to   { stroke-dashoffset: -600; }
}
@keyframes flow-rev {
  from { stroke-dashoffset: -600; }
  to   { stroke-dashoffset:  600; }
}

.t1  { animation: flow-fwd 3.2s linear infinite; }
.t2  { animation: flow-fwd 4.0s linear infinite 0.6s; }
.t3  { animation: flow-fwd 2.4s linear infinite 1.1s; }
.t4  { animation: flow-rev 3.5s linear infinite 0.3s; }
.t5  { animation: flow-rev 4.8s linear infinite 1.4s; }
.t6  { animation: flow-rev 2.8s linear infinite 0.8s; }
.t7  { animation: flow-fwd 3.0s linear infinite 2.0s; }
.t8  { animation: flow-fwd 4.2s linear infinite 0.2s; }
.t9  { animation: flow-rev 3.6s linear infinite 1.7s; }
.t10 { animation: flow-fwd 2.6s linear infinite 0.9s; }

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(0, 200, 140, 0.15);
  border: 1px solid rgba(0, 200, 140, 0.4);
  color: #00c88c;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: var(--spacing-sm);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
  line-height: 1.15;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--spacing-md);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Intro pillars ===== */
.section-intro {
  padding: var(--spacing-lg) 0;
}

.section-intro h2 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-sm);
  margin-top: 0.5rem;
}

.section-intro > .container > p {
  color: var(--color-muted);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
}

.intro-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--spacing-md);
}

.pillar {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: var(--spacing-md);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.pillar:hover {
  border-color: #00aacc;
  box-shadow: 0 4px 18px rgba(0, 170, 204, 0.1);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  background: #edf7fb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.pillar-icon svg {
  width: 28px;
  height: 28px;
}

.pillar h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--color-primary);
}

.pillar p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.6;
}

/* ===== Page hero (inner pages) ===== */
.page-hero {
  background: var(--color-primary);
  color: #fff;
  padding: var(--spacing-md) 0;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.25rem;
}

.page-hero p {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ===== Sections ===== */
.section-content {
  padding: var(--spacing-lg) 0;
}

.section-content h2 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.section-content h2:first-child {
  margin-top: 0;
}

/* ===== Products grid ===== */
.products-grid {
  padding: var(--spacing-lg) 0;
}

.products-grid .container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.product-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
}

.product-image {
  background: var(--color-border);
  height: 180px;
  border-radius: 4px;
}

.product-card h3 {
  font-size: 1.2rem;
}

.product-card p {
  color: var(--color-muted);
  flex: 1;
}

/* ===== About page ===== */
.section-label {
  color: #00aacc;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.about-text h2 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-sm);
  margin-top: 0.5rem;
}

.about-text p {
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: var(--spacing-sm);
}

.about-image img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

@media (max-width: 700px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Product carousel (about page) ===== */
.carousel-section {
  padding: var(--spacing-lg) 0;
}

.carousel-heading {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-md);
  text-align: center;
  color: var(--color-primary);
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  flex: 1;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  scroll-snap-align: start;
  flex-shrink: 0;
  width: 220px;
  height: 180px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: #f7f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.carousel-btn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.carousel-btn:hover {
  background: var(--color-accent);
}

/* ===== Stats section (about page) ===== */
.stats-section {
  padding: var(--spacing-lg) 0;
  background: #f7f9fc;
}

.stats-grid {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
}

.stat-icon {
  background: #e8f0f8;
  border-radius: 10px;
  padding: 0.75rem;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 32px;
  height: 32px;
}

.stat-body {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
  max-width: 120px;
  line-height: 1.4;
}

/* ===== Contact page ===== */
.page-hero--contact {
  background: #6e7a8a;
  padding: var(--spacing-lg) 0;
}

.page-hero-breadcrumb {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}

.page-hero-breadcrumb a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}

.page-hero-breadcrumb a:hover {
  color: #fff;
}

.page-hero-breadcrumb span {
  margin: 0 0.4rem;
}

.nav-active {
  border-bottom: 2px solid #fff;
  padding-bottom: 2px;
}

.contact-section {
  padding: var(--spacing-lg) 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--spacing-lg);
  align-items: start;
}

.contact-info h2 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
}

.contact-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: var(--spacing-md);
}

.contact-card-icon {
  background: #edf3fa;
  border-radius: 8px;
  padding: 0.6rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card-icon svg {
  width: 28px;
  height: 28px;
}

.contact-card-body strong {
  display: block;
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.contact-card-body p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.contact-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.contact-details svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.contact-details a {
  color: #00aacc;
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-form-wrap {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.09);
  padding: var(--spacing-md);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.88rem;
  color: var(--color-text);
}

.form-optional {
  color: var(--color-muted);
  font-weight: 400;
}

.form-group input,
.form-group textarea {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--color-text);
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00aacc;
}

.form-group textarea {
  resize: vertical;
}

.contact-submit {
  align-self: flex-start;
  background: #00aacc;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.contact-submit:hover {
  background: #0090aa;
  opacity: 1;
}

@media (max-width: 700px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* ===== Products page — sidebar layout ===== */
.page-hero--products {
  background: #2a2a2a;
  padding: var(--spacing-lg) 0;
}

.products-layout {
  padding: var(--spacing-lg) 0;
}

.products-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-lg);
  align-items: start;
}

/* Sidebar */
.products-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.sidebar-category {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.sidebar-category-title {
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.65rem 1rem;
  margin: 0;
  /* h3 by default; keep visual style regardless of tag */
  display: block;
}

.sidebar-list {
  list-style: none;
  padding: 0.5rem 0;
}

.sidebar-list li {
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-list li:last-child {
  border-bottom: none;
}

.sidebar-list a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  font-size: 0.83rem;
  color: var(--color-text);
  transition: color 0.15s, background 0.15s;
}

.sidebar-list a::before {
  content: "›";
  color: var(--color-accent);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.sidebar-list a:hover {
  color: var(--color-accent);
  background: #fafafa;
}

/* Category cards grid */
.products-main {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--spacing-md);
  align-content: start;
}

.category-card {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.category-card:hover {
  border-color: #00aacc;
  box-shadow: 0 4px 18px rgba(0, 170, 204, 0.12);
}

.category-card-image {
  background: #f7f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
}

.category-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8edf5 0%, #d0d8e8 100%);
}

.category-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.category-card-title {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 760px) {
  .products-container {
    grid-template-columns: 1fr;
  }
}

/* ===== Product detail page ===== */
.product-detail-wrap {
  display: block;
}

.product-detail-image {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  height: 280px;
  margin-bottom: var(--spacing-md);
  background: #f7f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.product-detail-body {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.product-detail-title {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.product-detail-body p {
  color: var(--color-text);
  line-height: 1.7;
}

.product-specs-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: var(--spacing-sm);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-primary);
}

.product-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.product-specs-table th,
.product-specs-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.product-specs-table th {
  width: 40%;
  font-weight: 600;
  color: var(--color-primary);
  background: #f7f9fc;
}

.product-specs-table td {
  color: var(--color-text);
}

.product-enquire-btn {
  align-self: flex-start;
  margin-top: var(--spacing-sm);
}

/* ===== Product benefits list ===== */
.product-benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.product-benefits-list li {
  padding-left: 1.4rem;
  position: relative;
  font-size: 0.93rem;
  color: var(--color-text);
  line-height: 1.5;
}

.product-benefits-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #00aacc;
  font-weight: 700;
}

/* ===== FAQ page ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.faq-item {
  border-left: 3px solid var(--color-primary);
  padding-left: 1rem;
}

.faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.faq-item p {
  font-size: 0.93rem;
  color: var(--color-text);
  line-height: 1.7;
}

.faq-item ul {
  margin-top: 0.4rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: var(--spacing-md) 0;
  font-size: 0.9rem;
}
