/**
 * Genpro v2.6.1 — Cascade conflict resolution & mobile cohesion
 * Loads last. Fixes legacy gradient text, white panels, layout collisions.
 */

/* ─── Reset legacy gradient text on dark theme ─── */
body.genpro-futuristic .section-title-enhanced,
body.genpro-futuristic .products-title-enhanced,
body.genpro-futuristic .brands-title-enhanced,
body.genpro-futuristic .about-title-enhanced,
body.genpro-futuristic .vision-title-enhanced,
body.genpro-futuristic .contact-title-enhanced,
body.genpro-futuristic .service-title-enhanced,
body.genpro-futuristic .product-title-enhanced {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: var(--fx-text) !important;
  color: var(--fx-text) !important;
  text-shadow: none !important;
}

/* ─── Kill legacy white section shells (enhancements !important) ─── */
body.genpro-futuristic .services-section.services-enhanced,
body.genpro-futuristic .products-section.products-enhanced,
body.genpro-futuristic .brands-section.brands-enhanced,
body.genpro-futuristic .about-section.about-enhanced,
body.genpro-futuristic .vision-section.vision-enhanced,
body.genpro-futuristic .contact-section.contact-enhanced {
  background: transparent !important;
}

body.genpro-futuristic .service-card-inner-enhanced,
body.genpro-futuristic .product-card-enhanced,
body.genpro-futuristic .product-card-page-enhanced .product-card-inner-page-enhanced,
body.genpro-futuristic .brand-logo-card-enhanced,
body.genpro-futuristic .brands-showcase-card-enhanced {
  background: var(--fx-bg-glass) !important;
  border: 1px solid var(--fx-border) !important;
  box-shadow: var(--fx-shadow-glass) !important;
  color: var(--fx-text-muted);
}

body.genpro-futuristic .service-card-inner-enhanced .service-title-enhanced,
body.genpro-futuristic .product-card-enhanced .product-title-enhanced {
  color: var(--fx-text) !important;
  -webkit-text-fill-color: var(--fx-text) !important;
}

/* ─── Home services visual — fluid height, no 600px void ─── */
body.genpro-futuristic .services-visual-enhanced {
  min-height: auto !important;
  margin: 2rem 0 !important;
  padding: 1rem 0 !important;
  background: transparent !important;
}

body.genpro-futuristic .services-hero-enhanced {
  margin-bottom: 2rem !important;
}

body.genpro-futuristic .service-highlights-enhanced {
  position: relative !important;
  min-height: auto !important;
  height: auto !important;
}

body.genpro-futuristic .service-highlight-card-enhanced {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: 100%;
  max-width: 100%;
}

body.genpro-futuristic .service-highlight-card-enhanced::before {
  display: none !important;
}

/* ─── Hero: stacking, controls, clickable CTAs ─── */
body.genpro-futuristic .kb-hero__track {
  min-height: clamp(420px, 68vh, 680px);
  pointer-events: none;
}

body.genpro-futuristic .kb-hero__slide {
  position: absolute;
  inset: 0;
  z-index: 0;
}

body.genpro-futuristic .kb-hero__slide.is-active {
  z-index: 2;
  position: absolute;
}

body.genpro-futuristic .kb-hero__inner {
  position: relative;
  z-index: 3;
}

body.genpro-futuristic .kb-hero__controls {
  z-index: 30;
  pointer-events: auto;
}

body.genpro-futuristic .kb-hero__btn,
body.genpro-futuristic .kb-hero__ctrl,
body.genpro-futuristic .kb-hero__dot {
  pointer-events: auto !important;
  touch-action: manipulation;
  cursor: pointer;
  position: relative;
  z-index: 5;
}

body.genpro-futuristic .kb-hero__btn {
  text-decoration: none;
}

/* ─── Mobile drawer scroll lock ─── */
body.genpro-futuristic.fx-nav-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

body.genpro-futuristic .fx-drawer-overlay {
  z-index: var(--fx-z-overlay);
}

body.genpro-futuristic .fx-drawer {
  z-index: var(--fx-z-drawer);
}

body.genpro-futuristic .fx-nav-wrap {
  z-index: calc(var(--fx-z-header) + 1);
}

/* ─── Header / announce bar — no horizontal bleed ─── */
body.genpro-futuristic .fx-announce,
body.genpro-futuristic .fx-nav-wrap,
body.genpro-futuristic .fx-nav-glass {
  max-width: 100%;
  box-sizing: border-box;
}

html.genpro-futuristic {
  overflow-x: clip;
}

/* ─── Viewport cohesion ─── */
@media (max-width: 1024px) {
  body.genpro-futuristic .services-visual-enhanced {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
  }

  body.genpro-futuristic .service-highlights-enhanced {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  body.genpro-futuristic .generator-visual-enhanced {
    order: -1;
    max-width: 240px;
    margin: 0 auto 1rem;
  }

  body.genpro-futuristic .products-grid-enhanced,
  body.genpro-futuristic .brands-grid-enhanced,
  body.genpro-futuristic .services-grid-enhanced {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
}

@media (max-width: 768px) {
  body.genpro-futuristic .kb-hero__btn,
  body.genpro-futuristic .kb-hero__ctrl,
  body.genpro-futuristic .kb-hero__dot,
  body.genpro-futuristic .cta-link-enhanced,
  body.genpro-futuristic .contact-cta-btn-enhanced {
    min-height: 44px !important;
    min-width: 44px !important;
  }

  body.genpro-futuristic main {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 414px) {
  body.genpro-futuristic .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}

@media (max-width: 360px) {
  body.genpro-futuristic .fx-announce__inner {
    padding: 0 0.25rem;
  }
}

/* ─── Compact home cards — downscale legacy bloat ─── */
body.genpro-futuristic .service-card-inner-enhanced {
  padding: 0.75rem !important;
}

body.genpro-futuristic .service-icon-enhanced {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  font-size: 1.1rem !important;
  border-radius: var(--fx-radius-sm) !important;
  border: 1px solid var(--fx-border-accent) !important;
  box-shadow: 0 0 12px rgba(255, 102, 0, 0.2) !important;
}

body.genpro-futuristic .service-image-wrapper-enhanced {
  aspect-ratio: 16 / 9;
  height: auto !important;
  min-height: 0 !important;
  margin-bottom: 0.5rem !important;
  border-radius: var(--fx-radius-sm) !important;
  overflow: hidden;
}

body.genpro-futuristic .service-image-enhanced {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.genpro-futuristic .service-title-enhanced,
body.genpro-futuristic .product-title-enhanced {
  font-size: clamp(0.82rem, 2.8vw, 1rem) !important;
  word-break: break-word;
  line-height: 1.25 !important;
}

body.genpro-futuristic .service-description-enhanced,
body.genpro-futuristic .product-description-enhanced {
  font-size: clamp(0.68rem, 2.2vw, 0.82rem) !important;
  line-height: 1.4 !important;
  word-break: break-word;
}

body.genpro-futuristic .product-image-wrapper-enhanced {
  aspect-ratio: 16 / 9;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden;
  border-radius: var(--fx-radius-sm) !important;
}

body.genpro-futuristic .product-image-enhanced {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.genpro-futuristic .product-card-enhanced {
  padding: 0.65rem !important;
}

body.genpro-futuristic .brand-card-inner-enhanced {
  padding: 0.65rem !important;
}

body.genpro-futuristic .brand-logo-card-enhanced img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

body.genpro-futuristic .services-section.services-enhanced,
body.genpro-futuristic .products-section.products-enhanced,
body.genpro-futuristic .brands-section.brands-enhanced {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 !important;
}

/* Prevent ambient canvas from intercepting taps */
body.genpro-futuristic #genpro-ambient-canvas {
  pointer-events: none !important;
}
