/* ================================================================
   PRODUCTS PAGE — Heptacare Power Industries
   ================================================================ */

/* CSS VARIABLES & RESET */
:root {
  --serif: 'Source Serif 4', serif;
  --sans: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --navy: #0B2545;
  --navy-2: #13315C;
  --accent: #134074;
  --steel: #2B4F76;
  --bg: #F5F6F7;
  --border: #D5D9DD;
  --text: #1a1a1a;
  --muted: #5F6B7A;
  --light: #8896A6;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: #ffffff;
  line-height: 1.6;
}

/* WRAPPER */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* NAV */
.nav {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 2px 16px rgba(11,37,69,0.25);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
}

.nav-logo img {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  letter-spacing: 0.01em;
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a.active {
  color: #fff;
  border-bottom-color: #fff;
}

.nav-cta {
  margin-left: 2rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  padding: 0.5rem 1.25rem;
  text-decoration: none;
  transition: all 0.2s;
}

.nav-cta:hover {
  background: #E8ECF0;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
  margin-left: 1rem;
  padding: 0;
  width: 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
}

.nav-mobile-menu {
  display: none;
  background: var(--navy);
  padding: 1rem 2.5rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.nav-mobile-menu.active {
  display: block;
}

.nav-mobile-menu a {
  display: block;
  padding: 0.85rem 0;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-mobile-menu a:last-child {
  border-bottom: none;
}

/* PRODUCT NAV (Sub-nav) */
.product-nav {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 2rem;
  position: sticky;
  top: 64px;
  z-index: 90;
}

.product-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 0;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.product-nav-inner::-webkit-scrollbar {
  display: none;
}

.product-tab {
  flex: 0 0 auto;
  padding: 0.85rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.product-tab:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
}

.product-tab.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

/* BLUEPRINT GRID BG */
@keyframes gridDrift {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

.blueprint-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridDrift 20s linear infinite;
}

/* HERO */
.hero {
  background: var(--navy);
  color: #ffffff;
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}

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

.hero .eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  max-width: 800px;
}

.hero .subtitle {
  font-family: var(--sans);
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 720px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-button {
  display: inline-block;
  background: #ffffff;
  color: var(--navy);
  padding: 0.95rem 2rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 0;
}

.hero-button:hover {
  background: #E8ECF0;
}

/* PRODUCT SECTIONS */
.product-section {
  padding: 5rem 2rem;
  scroll-margin-top: 140px;
}

.product-section.gray-bg {
  background: var(--bg);
}

/* SECTION HEADING PATTERN */
.section-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.section-rule::before,
.section-rule::after {
  content: '';
  flex: 0 0 20px;
  height: 1px;
  background: var(--border);
}

.section-rule::after {
  flex: 1;
}

.section-title-rule {
  height: 1px;
  background: var(--border);
  margin: 1rem 0 2rem;
}

.product-header {
  margin-bottom: 2.5rem;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.product-header .eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.product-header h2 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.product-header .subtitle {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
}

.product-container {
  max-width: 1280px;
  margin: 0 auto;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: start;
}

.product-image-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.product-image {
  background: var(--bg);
  border: 1px solid var(--border);
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  max-width: 95%;
  max-height: 95%;
  width: auto;
  height: auto;
  display: block;
  transform: scale(1.2);
}

/* Interactive diagram iframe &#8212; fills wrapper without its own frame */
.product-image .diagram-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  display: block;
}

.product-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.product-description {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
}

/* FEATURE CHIPS */
.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.feature-chip {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: #ffffff;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 0;
  white-space: nowrap;
  cursor: default;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.feature-chip:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.product-section.gray-bg .feature-chip {
  background: #ffffff;
}

.product-section.gray-bg .feature-chip:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

/* SPECS TABLE HEADER */
.specs-header {
  padding: 1rem;
  background: var(--navy);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  width: 100%;
}

/* SPECS TABLE */
.specs-table {
  display: block;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-top: none;
}

/* Scroll-shadow indicator: JS adds .has-scroll only when the table overflows AND
   the user has not yet scrolled to the right end. Tells phone users they can swipe sideways. */
.specs-table.has-scroll {
  box-shadow: inset -16px 0 12px -12px rgba(11, 37, 69, 0.22);
}

.specs-table table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
}

.specs-table th {
  background: var(--navy);
  color: #ffffff;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.specs-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  text-align: center;
}

.specs-table tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

/* BANDED COLUMNS variant &#8212; alternating column shading (disables row banding) */
.specs-table.banded-cols tr:nth-child(even) {
  background: transparent;
}

.specs-table.banded-cols tbody td:nth-child(even) {
  background: rgba(11, 37, 69, 0.05);
}

.specs-table .param-name {
  font-weight: 600;
  color: var(--navy);
}

.specs-table .param-unit {
  color: var(--muted);
  font-size: 0.8rem;
}

.specs-table .param-value {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--text);
}

/* CTA SECTION */
.cta-section {
  background: var(--navy);
  color: #ffffff;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section .wrap {
  position: relative;
  z-index: 2;
}

.cta-section h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.cta-section p {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
}

.cta-button {
  display: inline-block;
  background: #ffffff;
  color: var(--navy);
  padding: 0.95rem 2.5rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 0;
}

.cta-button:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* FOOTER */
.footer {
  background: var(--navy-2);
  color: rgba(255, 255, 255, 0.6);
  padding: 3rem 0 1.5rem;
  font-size: 0.82rem;
}

.footer .wrap {
  max-width: 1200px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  font-family: var(--serif);
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.footer-grid a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.footer-grid a:hover {
  color: #ffffff;
}

.footer-grid p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-grid strong {
  color: #ffffff;
}

.footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

/* FADE-IN ANIMATION */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-inner {
    padding: 0 1.5rem;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-hamburger {
    display: block;
  }

  .product-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-nav {
    position: static;
  }

  .product-nav-inner {
    gap: 0;
  }

  .product-tab {
    padding: 1rem 1rem;
    font-size: 0.7rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .product-header h2 {
    font-size: 1.45rem;
  }

  .product-image {
    height: 450px;
  }

  .wrap {
    padding: 0 1.5rem;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 1rem;
  }

  .nav-inner {
    padding: 0 1rem;
  }

  .product-nav {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .product-section {
    padding: 3rem 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .specs-table {
    font-size: 0.75rem;
  }

  .specs-table th,
  .specs-table td {
    padding: 0.5rem;
  }
}
