/**
 * Thunder EV — index-legacy.html layout (planner, ROI, tabs)
 * Keeps legacy homepage aligned on desktop + mobile without marketplace shell.
 */

body.tev-legacy-home {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  background: #f8fafc;
}

body.tev-legacy-home .hero {
  max-width: 100%;
  overflow-x: hidden;
}

body.tev-legacy-home .marketplace-layout {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: start;
  box-sizing: border-box;
}

body.tev-legacy-home .sidebar-column,
body.tev-legacy-home .products-column {
  min-width: 0;
  max-width: 100%;
}

body.tev-legacy-home .sidebar-sub-menu--always-open {
  display: flex !important;
}

body.tev-legacy-home .tev-roi-calc,
body.tev-legacy-home #planner-panel,
body.tev-legacy-home .tab-panels,
body.tev-legacy-home .panel {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

body.tev-legacy-home .tev-roi-calc__layout,
body.tev-legacy-home .tev-roi-calc__inner,
body.tev-legacy-home .tev-roi-calc__form {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 900px) {
  body.tev-legacy-home .marketplace-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  body.tev-legacy-home .sidebar-column {
    position: relative;
    width: 100%;
    max-width: 100%;
  }

  body.tev-legacy-home .sidebar-menu {
    max-height: none;
    overflow: visible;
  }

  body.tev-legacy-home .hero .nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  body.tev-legacy-home .nav-ctas-right {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  body.tev-legacy-home .nav-ctas-right .cta-small {
    flex: 1 1 auto;
    text-align: center;
  }

  body.tev-legacy-home .hero-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  body.tev-legacy-home .tev-roi-calc__layout--simple,
  body.tev-legacy-home .tev-roi-calc__advanced-grid {
    grid-template-columns: 1fr !important;
  }

  body.tev-legacy-home .card-grid,
  body.tev-legacy-home .charger-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body.tev-legacy-home .section.marketplace-layout {
    padding-left: 10px;
    padding-right: 10px;
  }

  body.tev-legacy-home .tev-roi-calc__invest-row {
    flex-direction: column;
    align-items: stretch;
  }
}
