/* ============================================
   KINATECH HUB — Shared Styles
   ============================================ */

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

:root {
  --tan:        #c9b89a;
  --tan-light:  #e8ddd0;
  --tan-dark:   #a89070;
  --tan-footer: #c4b398;
  --bg:         #ffffff;
  --bg-alt:     #f7f3ee;
  --card-bg:    #ede4d8;
  --text:       #1a1a1a;
  --text-muted: #555;
  --radius:     12px;
  --radius-pill:40px;
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
}

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── LOGO ─────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}

.logo-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

/* ── NAVBAR ───────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  position: fixed;
  top: 0; left: 0; right: 0;
  /* Transparent over hero */
  background: transparent;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

/* Solid nav once user scrolls past the hero */
nav.scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--tan-light);
}

/* On non-hero pages the nav should always be solid —
   add class="nav-solid" to <nav> on products/contact/etc. */
nav.nav-solid {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--tan-light);
}

.nav-links {
  display: flex;
  background: var(--tan);
  border-radius: var(--radius-pill);
  padding: 6px 8px;
  gap: 2px;
}

.nav-links a {
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--bg);
}

/* ── HAMBURGER ────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  border-radius: 8px;
  transition: background 0.2s;
}

.hamburger:hover { background: var(--tan-light); }

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}

/* Open state */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-inner {
  position: absolute;
  top: 0;
  right: 0;
  width: 260px;
  height: 100%;
  background: var(--bg);
  padding: 80px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}

.mobile-nav.open .mobile-nav-inner {
  transform: translateX(0);
}

.mobile-nav-inner a {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.15s;
}

.mobile-nav-inner a:hover,
.mobile-nav-inner a.active {
  background: var(--tan-light);
}

/* ── FOOTER ───────────────────────────────── */
footer {
  background: var(--tan-footer);
  padding: 48px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-col h4 {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.footer-col ul li a:hover { text-decoration: underline; }

/* Products column: two-sub-column layout */
.footer-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.footer-products h4 {
  grid-column: 1 / -1;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #1877f2;
  border-radius: 10px;
  margin-top: 8px;
}

.footer-social svg {
  width: 24px;
  height: 24px;
  fill: white;
}

/* ── BUTTONS ──────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.15s;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-primary { background: var(--tan-dark); color: #fff; }
.btn-outline  { background: transparent; border: 2px solid var(--text); color: var(--text); }
.btn-tan      { background: var(--tan); color: var(--text); }

/* Hero VIEW PRODUCTS button → black on hover */
.btn-outline:hover {
  background: #1a1a1a !important;
  color: #fff !important;
  border-color: #1a1a1a !important;
  opacity: 1;
}

/* ── SECTION COMMON ───────────────────────── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 48px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.section-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: underline;
  display: inline-block;
  margin-bottom: 28px;
}

.section-link:hover { color: var(--text); }

/* ── IMAGE PLACEHOLDER ────────────────────── */
.img-placeholder {
  background: var(--card-bg);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 12px;
  gap: 8px;
  width: 100%;
  height: 100%;
}

.img-placeholder svg {
  width: 28px;
  height: 28px;
  opacity: 0.4;
}

/* ── WARRANTY BADGE ───────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1.5px solid #ddd;
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
}

.badge svg {
  width: 16px;
  height: 16px;
  color: #5a9c5a;
}

/* ── SHARED NAV SCRIPT ────────────────────── */

/* ── NON-HERO PAGE OFFSET ─────────────────── */
/* Pages without a hero need top padding to clear the fixed nav */
.page-header,
.product-detail,
.contact-section {
  padding-top: calc(80px + 24px); /* nav height + breathing room */
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 860px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: block; }
  .section { padding: 40px 20px; }
  footer { padding: 32px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  /* Non-hero pages: reduce nav offset on mobile */
  .page-header,
  .product-detail,
  .contact-section {
    padding-top: calc(72px + 16px);
  }
}

@media (max-width: 600px) {
  /* Hero CTA buttons: stack vertically on small screens */
  .hero-cta {
    flex-direction: column;
    gap: 10px;
  }
  .hero-cta .btn {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }
}

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

/* ── PRODUCT SERIES / MODEL CONFIGURATIONS ── */
.series-nav-row {
  max-width: 1160px;
}

.series-hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 48px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.series-hero-media .gallery {
  width: 100%;
}

.series-hero-content h1 {
  margin-top: 8px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1.05;
}

.series-hero-content .product-tagline {
  max-width: 580px;
  margin-top: 18px;
}

.series-highlight-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.series-highlight-row span,
.series-status {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  background: var(--tan-light);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
}

.series-availability {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.series-availability strong {
  color: var(--text);
}

.series-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn-secondary {
  border: 1.5px solid var(--tan-light);
  background: var(--bg);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--tan-dark);
  background: var(--bg-alt);
}

.series-models-section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 48px 80px;
}

.series-models-intro {
  max-width: 720px;
  margin-bottom: 26px;
}

.series-models-intro h2 {
  margin-top: 6px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.series-models-intro > p:last-child {
  margin-top: 10px;
  color: var(--text-muted);
  line-height: 1.6;
}

.series-filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1.5px solid var(--tan-light);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.series-filter-field span {
  display: block;
  margin-bottom: 7px;
  font-size: 0.76rem;
  font-weight: 600;
}

.series-filter-select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--tan-light);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
}

.series-filter-select:focus {
  outline: none;
  border-color: var(--tan-dark);
}

.series-results-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 18px 0 28px;
}

.series-results-count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.series-clear-filters {
  border: 0;
  background: transparent;
  color: var(--tan-dark);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.series-model-groups,
.series-model-group,
.series-model-list {
  display: grid;
  gap: 18px;
}

.series-model-groups {
  gap: 40px;
}

.series-model-group > h3 {
  font-size: 1.15rem;
}

.series-model-card {
  padding: 24px;
  border: 1.5px solid var(--tan-light);
  border-radius: var(--radius);
  background: var(--bg-alt);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.series-model-card:hover {
  border-color: var(--tan);
  box-shadow: var(--shadow);
}

.series-model-card[hidden],
.series-model-group[hidden],
.series-empty-state[hidden] {
  display: none;
}

.series-model-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.series-model-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.series-model-title-row h3 {
  font-size: 1.05rem;
  line-height: 1.35;
}

.series-model-code {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.series-status {
  padding: 5px 9px;
  font-size: 0.68rem;
  white-space: nowrap;
}

.series-spec-toggle {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tan-dark);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
}

.series-spec-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.series-spec-summary span,
.series-spec-group span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.series-spec-summary strong,
.series-spec-group strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
}

.series-support-line {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.79rem;
  line-height: 1.55;
}

.series-full-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 22px;
  padding: 20px;
  border-radius: 12px;
  background: var(--bg);
}

.series-full-specs[hidden] {
  display: none;
}

.series-spec-group h4 {
  margin-bottom: 11px;
  font-size: 0.85rem;
}

.series-spec-group > div {
  padding: 8px 0;
  border-bottom: 1px solid var(--tan-light);
}

.series-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--tan-light);
}

.series-qty-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.series-qty-stepper > span {
  margin-right: 4px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.series-qty-stepper button,
.series-qty-stepper input {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--tan-light);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  text-align: center;
}

.series-qty-stepper button {
  border-radius: 9px;
  cursor: pointer;
  font-size: 1rem;
}

.series-qty-stepper input {
  width: 46px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 700;
  appearance: textfield;
}

.series-qty-stepper input::-webkit-inner-spin-button,
.series-qty-stepper input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.series-inquiry-btn {
  min-width: 160px;
  padding: 12px 19px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--tan-dark);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.series-inquiry-btn:hover {
  opacity: 0.88;
}

.series-empty-state {
  padding: 38px;
  border: 1.5px dashed var(--tan-light);
  border-radius: var(--radius);
  text-align: center;
}

.series-empty-state p {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.series-recommendation {
  max-width: 1064px;
  margin: 0 auto 80px;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--tan-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.series-recommendation h2 {
  font-size: 1.45rem;
}

.series-recommendation p {
  max-width: 710px;
  margin-top: 8px;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .series-hero {
    padding: 16px 24px 58px;
    gap: 34px;
  }

  .series-models-section {
    padding: 0 24px 64px;
  }

  .series-spec-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .series-recommendation {
    margin: 0 24px 64px;
  }
}

@media (max-width: 720px) {
  .series-hero {
    grid-template-columns: 1fr;
  }

  .series-filter-panel,
  .series-full-specs {
    grid-template-columns: 1fr;
  }

  .series-model-top,
  .series-card-actions,
  .series-recommendation {
    align-items: flex-start;
    flex-direction: column;
  }

  .series-spec-toggle {
    padding-top: 2px;
  }

  .series-inquiry-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .series-hero,
  .series-models-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .series-hero-actions,
  .series-hero-actions .btn {
    width: 100%;
  }

  .series-spec-summary {
    grid-template-columns: 1fr;
  }

  .series-results-row {
    align-items: flex-start;
  }

  .series-model-card {
    padding: 19px;
  }

  .series-recommendation {
    margin-left: 18px;
    margin-right: 18px;
    padding: 24px;
  }
}
