/**
 * Thunder EV — Unified public marketplace layout (Phase 1)
 * Load after page CSS. Scoped to body.tev-public-marketplace
 */

body.tev-public-marketplace {
  --tev-mp-navy: #0c1e4a;
  --tev-mp-navy-dark: #071428;
  --tev-mp-blue: #2563eb;
  --tev-mp-blue-light: #eff6ff;
  --tev-mp-orange: #ff6600;
  --tev-mp-text: #0f172a;
  --tev-mp-muted: #64748b;
  --tev-mp-border: #e2e8f0;
  --tev-mp-sidebar-w: 220px;
  --tev-mp-chrome-brand-w: 272px;
  --tev-mp-max-w: 1400px;
  --tev-mp-h-pad: clamp(0.65rem, 1.25vw, 1rem);
  --tev-mp-h-pad-right: clamp(1.65rem, 3.8vw, 2.5rem);
  --tev-mp-safe-right: env(safe-area-inset-right, 0px);
  --tev-mp-edge-gap: max(0.85rem, env(safe-area-inset-right, 0px));
  --tev-mp-chrome-h: 168px;
  --tev-mp-radius: 12px;
  --tev-mp-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  color: var(--tev-mp-text);
  background: #fff;
  overflow-x: clip;
}

html:has(body.tev-public-marketplace) {
  overflow-x: clip;
}

body.tev-public-marketplace .tev-mp-legacy-hidden {
  display: none !important;
}

body.tev-public-marketplace .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body.tev-public-marketplace #tev-mp-chrome {
  position: sticky;
  top: 0;
  z-index: 500;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  overflow-x: clip;
  overflow-y: visible;
}

body.tev-public-marketplace .tev-mp-shell {
  box-sizing: border-box;
}

/* Logo column + header row — aligns with sidebar grid */
body.tev-public-marketplace .tev-mp-chrome-head {
  display: grid;
  grid-template-columns: var(--tev-mp-chrome-brand-w, 272px) minmax(0, 1fr);
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--tev-mp-border);
  box-shadow: var(--tev-mp-shadow);
  max-width: 100%;
  overflow-x: clip;
}

body.tev-public-marketplace.tev-home-page .tev-mp-chrome-head {
  position: relative;
  min-height: 3.35rem;
}

body.tev-public-marketplace .tev-mp-chrome-brand {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.65rem 0.55rem 0.75rem;
  border-right: 1px solid var(--tev-mp-border);
  box-sizing: border-box;
  min-width: 0;
}

body.tev-public-marketplace .tev-mp-chrome-brand .brand--sidebar-wrap {
  width: 100%;
  min-width: 0;
  overflow: visible;
}

body.tev-public-marketplace .tev-mp-chrome-brand .brand--sidebar {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  align-items: flex-end;
  max-width: 100%;
  min-width: 0;
  font-size: clamp(0.7rem, 0.6rem + 0.32vw, 0.88rem);
  gap: 0.28rem;
  line-height: 1;
}

body.tev-public-marketplace .tev-mp-chrome-brand .brand--sidebar .logo-icon {
  flex-shrink: 0;
  line-height: 0;
  align-self: center;
  transform: scale(0.82);
  transform-origin: left center;
}

body.tev-public-marketplace .tev-mp-chrome-brand .brand--sidebar .logo-icon .tev-brand-mark {
  width: 28px;
  height: 28px;
}

body.tev-public-marketplace .tev-mp-chrome-brand .brand--sidebar .brand-thunder,
body.tev-public-marketplace .tev-mp-chrome-brand .brand--sidebar .brand-ev {
  flex-shrink: 0;
  white-space: nowrap !important;
  font-size: 1em;
  line-height: 1;
}

body.tev-public-marketplace .tev-mp-chrome-brand .brand--sidebar .brand-charging {
  flex-shrink: 0;
  white-space: nowrap !important;
  font-size: 0.5em !important;
  line-height: 1;
  align-self: flex-end;
  margin-bottom: 0.08em;
  letter-spacing: 0.03em;
}

body.tev-public-marketplace .tev-mp-sidebar .tev-mp-sidebar-brand,
body.tev-public-marketplace #sidebar-nav > .tev-mp-sidebar-brand {
  display: none !important;
}

/* —— Top info bar —— */
body.tev-public-marketplace .tev-mp-topbar {
  background: var(--tev-mp-navy-dark);
  color: #e2e8f0;
  font-size: 0.72rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}

body.tev-public-marketplace .tev-mp-topbar__inner {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0.35rem calc(var(--tev-mp-h-pad-right) + var(--tev-mp-safe-right) + 0.35rem) 0.35rem var(--tev-mp-h-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  box-sizing: border-box;
}

body.tev-public-marketplace .tev-mp-topbar__trust {
  margin: 0;
  font-weight: 600;
  color: #bfdbfe;
}

body.tev-public-marketplace .tev-mp-topbar__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding-right: 0.2rem;
  margin-right: 0.15rem;
}

body.tev-public-marketplace .tev-mp-topbar__links a {
  color: #cbd5e1;
  text-decoration: none;
  white-space: nowrap;
}

body.tev-public-marketplace .tev-mp-topbar__links a:hover {
  color: #fff;
}

/* —— Main header —— */
body.tev-public-marketplace .tev-mp-market-header {
  background: transparent;
  border-bottom: none;
  box-shadow: none;
  position: static;
  min-width: 0;
  width: 100%;
}

body.tev-public-marketplace.tev-home-page .tev-mp-market-header--home {
  min-height: 3.35rem;
}

body.tev-public-marketplace .tev-mp-market-header__inner {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0.55rem calc(var(--tev-mp-h-pad-right) + var(--tev-mp-safe-right) + 0.35rem) 0.55rem 0.65rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 0.65rem 0.85rem;
  min-height: 100%;
  box-sizing: border-box;
}

body.tev-public-marketplace .tev-mp-market-header__lead {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  justify-self: start;
}

body.tev-public-marketplace .tev-mp-menu-toggle {
  display: none;
}

body.tev-public-marketplace .tev-mp-market-header__logo {
  text-decoration: none;
  font-size: clamp(0.78rem, 0.62rem + 0.45vw, 0.95rem);
}

body.tev-public-marketplace .tev-mp-market-header__title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  text-align: center;
  min-width: 0;
  max-width: 100%;
  padding: 0 0.35rem;
}

body.tev-public-marketplace .tev-mp-market-header__title {
  margin: 0;
  font-size: clamp(0.92rem, 0.72rem + 0.55vw, 1.28rem);
  font-weight: 700;
  color: var(--tev-mp-navy);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
}

body.tev-public-marketplace .tev-mp-market-header__search {
  display: none;
}

body.tev-public-marketplace .tev-mp-market-header__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  justify-self: end;
  padding-right: 0.45rem;
  margin-right: 0.25rem;
}

body.tev-public-marketplace .tev-mp-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--tev-mp-navy);
  border: 1px solid var(--tev-mp-border);
  background: #fff;
  white-space: nowrap;
}

body.tev-public-marketplace .tev-mp-header-cta__icon {
  font-size: 0.9rem;
  line-height: 1;
}

body.tev-public-marketplace .tev-mp-header-cta--planner {
  background: var(--tev-mp-blue-light);
  border-color: #bfdbfe;
  color: var(--tev-mp-blue);
}

body.tev-public-marketplace .tev-mp-header-cta--customer {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-color: transparent;
  color: #fff;
}

body.tev-public-marketplace .tev-mp-header-cta--associate {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #075985;
}

body.tev-public-marketplace .tev-mp-header-cta--cart {
  background: var(--tev-mp-navy);
  border-color: var(--tev-mp-navy);
  color: #fff;
}

body.tev-public-marketplace .tev-mp-header-cta [data-tev-cart-count] {
  background: var(--tev-mp-orange);
  color: #fff;
  font-size: 0.62rem;
  min-width: 1.1rem;
  height: 1.1rem;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* —— Primary navigation —— */
body.tev-public-marketplace .tev-mp-primary-nav {
  background: var(--tev-mp-navy);
  color: #fff;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: clip;
}

body.tev-public-marketplace .tev-mp-primary-nav__inner {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0 calc(var(--tev-mp-h-pad-right) + var(--tev-mp-safe-right) + 0.35rem) 0 var(--tev-mp-h-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  box-sizing: border-box;
}

body.tev-public-marketplace .tev-mp-primary-nav__links {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.tev-public-marketplace .tev-mp-primary-nav__links::-webkit-scrollbar {
  display: none;
}

body.tev-public-marketplace .tev-mp-primary-nav__live {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  margin-right: 0;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}

body.tev-public-marketplace .tev-mp-primary-nav__live:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

body.tev-public-marketplace .tev-mp-primary-nav__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35);
  animation: tev-mp-live-pulse 1.8s ease-in-out infinite;
}

body.tev-public-marketplace #tev-mp-live-points-count {
  color: #93c5fd;
  font-weight: 800;
}

@keyframes tev-mp-live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

body.tev-public-marketplace .tev-mp-primary-nav__link {
  flex-shrink: 0;
  padding: 0.65rem 0.85rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

body.tev-public-marketplace .tev-mp-primary-nav__link:hover,
body.tev-public-marketplace .tev-mp-primary-nav__link.is-active {
  color: #fff;
  border-bottom-color: var(--tev-mp-orange);
  background: rgba(255, 255, 255, 0.06);
}

/* —— Shell: sidebar + content (full-width, flush edges) —— */
body.tev-public-marketplace .tev-mp-shell {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: var(--tev-mp-sidebar-w) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  box-sizing: border-box;
}

body.tev-public-marketplace .tev-mp-sidebar {
  position: sticky;
  top: var(--tev-mp-chrome-h, 168px);
  align-self: stretch;
  height: auto;
  min-height: calc(100vh - var(--tev-mp-chrome-h, 168px));
  overflow-x: hidden;
  overflow-y: visible;
  background: #fff;
  border: none;
  border-right: 1px solid var(--tev-mp-border);
  border-radius: 0;
  padding: 0.65rem 0.5rem 1rem;
  box-shadow: none;
}

body.tev-public-marketplace.tev-home-page .tev-mp-sidebar {
  position: sticky;
  top: var(--tev-mp-chrome-h, 168px);
  align-self: stretch;
  min-height: calc(100vh - var(--tev-mp-chrome-h, 168px));
  overflow-x: hidden;
  overflow-y: visible;
}

body.tev-public-marketplace #sidebar-nav .vertical-tabs > li > a.tab.v-tab[href*="index.html"],
body.tev-public-marketplace #sidebar-nav .vertical-tabs > li > a.tab.v-tab[href="index.html"] {
  cursor: pointer;
}

body.tev-public-marketplace #sidebar-nav.tev-edge-sidebar-panel,
body.tev-public-marketplace .tev-mp-sidebar #sidebar-nav {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  clip-path: none !important;
  top: auto !important;
  left: auto !important;
  bottom: auto !important;
  overflow: visible !important;
}

body.tev-public-marketplace .tev-mp-main,
body.tev-public-marketplace .tev-mp-page-content,
body.tev-public-marketplace #tev-shared-footer {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.tev-public-marketplace .tev-mp-sidebar__legacy {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.tev-public-marketplace .tev-mp-sidebar__heading,
body.tev-public-marketplace .tev-mp-sidebar .electric-heading {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tev-mp-navy);
}

body.tev-public-marketplace .tev-mp-sidebar__block + .tev-mp-sidebar__block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--tev-mp-border);
}

body.tev-public-marketplace .tev-mp-sidebar__list,
body.tev-public-marketplace .tev-mp-sidebar .vertical-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.tev-public-marketplace .tev-mp-sidebar__list a,
body.tev-public-marketplace .tev-mp-sidebar .vertical-tabs a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.8rem;
  color: #334155;
  text-decoration: none;
}

body.tev-public-marketplace .tev-mp-sidebar__list a:hover,
body.tev-public-marketplace .tev-mp-sidebar .vertical-tabs a:hover {
  color: var(--tev-mp-blue);
}

body.tev-public-marketplace .tev-mp-sidebar__help-text {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  color: var(--tev-mp-muted);
  line-height: 1.45;
}

body.tev-public-marketplace .tev-mp-sidebar__help-btn {
  display: block;
  text-align: center;
  padding: 0.45rem;
  background: var(--tev-mp-blue);
  color: #fff;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 0.4rem;
}

body.tev-public-marketplace .tev-mp-sidebar__help-link {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  color: var(--tev-mp-blue);
}

body.tev-public-marketplace .tev-mp-page-col {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--tev-mp-h-pad-right) + var(--tev-mp-safe-right));
  box-sizing: border-box;
}

body.tev-public-marketplace .tev-mp-page-content {
  min-width: 0;
  width: 100%;
}

/* —— Breadcrumb bar (below primary nav) —— */
body.tev-public-marketplace .tev-mp-breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid var(--tev-mp-border);
}

body.tev-public-marketplace .tev-mp-breadcrumb-bar__inner {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0.4rem calc(var(--tev-mp-h-pad-right) + var(--tev-mp-safe-right)) 0.4rem var(--tev-mp-h-pad);
  box-sizing: border-box;
}

body.tev-public-marketplace .tev-mp-breadcrumb-bar .tev-mp-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--tev-mp-muted);
}

body.tev-public-marketplace .tev-mp-breadcrumb-bar .tev-mp-breadcrumb li:not(:last-child)::after {
  content: '›';
  margin-left: 0.35rem;
  opacity: 0.65;
}

body.tev-public-marketplace .tev-mp-breadcrumb-bar .tev-mp-breadcrumb a {
  color: var(--tev-mp-blue);
  text-decoration: none;
}

body.tev-public-marketplace .tev-mp-breadcrumb-bar .tev-mp-breadcrumb a:hover {
  text-decoration: underline;
}

body.tev-public-marketplace .tev-mp-breadcrumb-bar .tev-mp-breadcrumb li[aria-current='page'] {
  color: var(--tev-mp-text);
  font-weight: 600;
}

/* —— Legacy page hero (removed; breadcrumb-only layout) —— */
body.tev-public-marketplace .tev-mp-page-hero {
  display: none !important;
}

body.tev-public-marketplace #tev-mp-hero-slot {
  display: none !important;
}

/* —— Duplicate body titles (header is canonical) —— */
body.tev-public-marketplace.tev-cart-page .tev-cart-section-head--amz h2,
body.tev-public-marketplace .tev-amz-checkout__head h2 {
  display: none !important;
}

body.tev-public-marketplace.tev-product-detail-page .tev-pd-title,
body.tev-public-marketplace.tev-product-detail-page .tev-pd-breadcrumb {
  display: none !important;
}

/* —— Page hero (legacy styles retained for reference) —— */
body.tev-public-marketplace .tev-mp-page-hero--legacy {
  position: relative;
  border-radius: var(--tev-mp-radius);
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--tev-mp-border);
}

body.tev-public-marketplace .tev-mp-page-hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #0ea5e9 100%);
  opacity: 0.92;
}

body.tev-public-marketplace .tev-mp-page-hero__inner {
  position: relative;
  padding: 1.35rem 1.5rem;
  color: #fff;
}

body.tev-public-marketplace .tev-mp-breadcrumb ol {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.72rem;
}

body.tev-public-marketplace .tev-mp-breadcrumb li:not(:last-child)::after {
  content: '›';
  margin-left: 0.35rem;
  opacity: 0.7;
}

body.tev-public-marketplace .tev-mp-breadcrumb a {
  color: #dbeafe;
  text-decoration: none;
}

body.tev-public-marketplace .tev-mp-page-hero__title {
  margin: 0;
  font-size: clamp(1.25rem, 0.9rem + 1.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
}

body.tev-public-marketplace .tev-mp-page-hero__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: #e0f2fe;
  font-weight: 500;
}

/* —— Category chips —— */
/* Category shortcut tiles duplicate primary nav — hide if any remain in markup */
body.tev-public-marketplace .tev-subpage-category-tiles,
body.tev-public-marketplace .tev-mp-category-chips {
  display: none !important;
}

body.tev-public-marketplace .tev-mp-category-chips {
  margin-top: 0 !important;
  margin-bottom: 0.65rem !important;
}

body.tev-public-marketplace .tev-mp-category-chips.tev-subpage-category-tiles {
  margin-top: 0 !important;
}

/* —— Product grid uses full content width —— */
body.tev-public-marketplace .tev-mp-grid,
body.tev-public-marketplace #vendor-grid {
  width: 100%;
  min-width: 0;
}

body.tev-public-marketplace.tev-marketplace-page .tev-mp-main {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0;
}

body.tev-public-marketplace #tev-shared-footer {
  width: 100%;
  max-width: none;
  margin: 0 !important;
  padding: 0;
  box-sizing: border-box;
}

body.tev-public-marketplace.tev-home-page #tev-shared-footer {
  margin-left: 0 !important;
  width: 100%;
}

body.tev-public-marketplace.tev-home-chrome #tev-shared-footer .tev-home-testimonial,
body.tev-public-marketplace.tev-home-chrome #tev-shared-footer .news-ticker-section,
body.tev-public-marketplace.tev-home-chrome #tev-shared-footer .tev-home-footer {
  width: 100%;
  max-width: none;
}

body.tev-public-marketplace .tev-floating-stack {
  right: calc(1.35rem + var(--tev-mp-edge-gap, 0px));
}

body.tev-public-marketplace .tev-floating-comm {
  right: calc(1.35rem + var(--tev-mp-edge-gap, 0px));
}
body.tev-public-marketplace .tev-mp-unified-footer {
  display: none !important;
}

/* —— Customer stories —— */
body.tev-public-marketplace .tev-mp-stories {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tev-mp-border);
}

body.tev-public-marketplace .tev-mp-stories__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

body.tev-public-marketplace .tev-mp-stories__head h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--tev-mp-navy);
}

body.tev-public-marketplace .tev-mp-stories__all {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--tev-mp-blue);
  text-decoration: none;
}

body.tev-public-marketplace .tev-mp-stories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 0.85rem;
}

body.tev-public-marketplace .tev-mp-story-card {
  background: #fff;
  border: 1px solid var(--tev-mp-border);
  border-radius: var(--tev-mp-radius);
  padding: 1rem;
  box-shadow: var(--tev-mp-shadow);
}

body.tev-public-marketplace .tev-mp-story-card__stars {
  color: #f59e0b;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

body.tev-public-marketplace .tev-mp-story-card__quote {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #334155;
}

body.tev-public-marketplace .tev-mp-story-card__meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--tev-mp-muted);
}

/* —— Unified footer —— */
body.tev-public-marketplace .tev-mp-unified-footer {
  background: var(--tev-mp-navy-dark);
  color: #cbd5e1;
  margin-top: 2rem;
}

body.tev-public-marketplace .tev-mp-unified-footer__inner {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 2rem clamp(0.5rem, 1.25vw, 0.75rem) 1rem;
}

body.tev-public-marketplace .tev-mp-unified-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.25rem;
}

body.tev-public-marketplace .tev-mp-unified-footer h4 {
  margin: 0 0 0.65rem;
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.tev-public-marketplace .tev-mp-unified-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.tev-public-marketplace .tev-mp-unified-footer a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.8;
}

body.tev-public-marketplace .tev-mp-unified-footer a:hover {
  color: #fff;
}

body.tev-public-marketplace .tev-mp-footer-newsletter {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

body.tev-public-marketplace .tev-mp-footer-newsletter input {
  flex: 1;
  min-width: 0;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #fff;
  padding: 0.4rem 0.5rem;
  font-size: 0.75rem;
}

body.tev-public-marketplace .tev-mp-footer-newsletter button {
  border: none;
  background: var(--tev-mp-blue);
  color: #fff;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

body.tev-public-marketplace .tev-mp-unified-footer__social {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

body.tev-public-marketplace .tev-mp-unified-footer__social a {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
}

body.tev-public-marketplace .tev-mp-unified-footer__bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.75rem;
}

body.tev-public-marketplace .tev-mp-unified-footer__gst {
  margin: 0.25rem 0 0;
  opacity: 0.7;
}

/* —— Home: chrome only, keep existing hero + sidebar —— */
body.tev-public-marketplace.tev-home-page .hero {
  margin-top: 0;
}

body.tev-public-marketplace.tev-home-page .hero > .nav.tev-mp-legacy-hidden {
  display: none !important;
}

/* —— Home page header: desktop 3-column alignment (home only) ——
   LEFT logo | CENTER heading+subtitle | RIGHT actions
   Does not change product/about/cart/login header behavior. */
@media (min-width: 1201px) {
  body.tev-public-marketplace.tev-home-page .tev-mp-chrome-head {
    display: grid;
    grid-template-columns: var(--tev-mp-chrome-brand-w, 272px) minmax(0, 1fr) auto;
    align-items: center;
    position: relative;
    min-height: 3.35rem;
  }

  /* Flatten header wrappers so title + actions become chrome-head columns */
  body.tev-public-marketplace.tev-home-page .tev-mp-market-header--home,
  body.tev-public-marketplace.tev-home-page .tev-mp-market-header--home .tev-mp-market-header__inner {
    display: contents;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__lead {
    display: none;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__title-wrap--home {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    grid-column: 2;
    justify-self: center;
    align-self: center;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.35rem 0.75rem;
    box-sizing: border-box;
    text-align: center;
    pointer-events: none;
    z-index: 2;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__title-wrap--home .tev-mp-market-header__title {
    white-space: normal;
    font-size: clamp(0.92rem, 0.72rem + 0.45vw, 1.15rem);
    color: var(--tev-mp-blue);
    line-height: 1.25;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
    text-align: center;
    margin: 0 auto;
    -webkit-line-clamp: unset;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__subtitle {
    margin: 0 auto;
    font-size: clamp(0.62rem, 0.56rem + 0.2vw, 0.74rem);
    font-weight: 500;
    color: var(--tev-mp-muted);
    line-height: 1.35;
    max-width: 100%;
    width: 100%;
    text-align: center;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__actions {
    position: static;
    grid-column: 3;
    justify-self: end;
    align-self: center;
    z-index: 3;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    white-space: nowrap;
    margin: 0;
    /* Sit under topbar Help Center (match its right edge) */
    padding: 0.5rem calc(0.35rem + var(--tev-mp-safe-right, 0px)) 0.5rem 0.75rem;
    box-sizing: border-box;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__actions .tev-mp-header-cta {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* Tablet home: slightly smaller heading; keep stacked/grid from shared rules */
@media (min-width: 768px) and (max-width: 1200px) {
  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__title-wrap--home .tev-mp-market-header__title {
    font-size: clamp(0.82rem, 0.7rem + 0.35vw, 1rem);
  }
}

/* Fallback home header (≤1200px) — no absolute overlap hacks */
body.tev-public-marketplace.tev-home-page .tev-mp-market-header--home .tev-mp-market-header__inner {
  position: static;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 3.35rem;
  padding: 0.5rem calc(var(--tev-mp-h-pad-right) + var(--tev-mp-safe-right) + 0.35rem) 0.5rem 0.65rem;
  gap: 0.5rem 0.75rem;
  box-sizing: border-box;
  width: 100%;
}

body.tev-public-marketplace.tev-home-page .tev-mp-market-header__lead {
  position: static;
  transform: none;
  flex-shrink: 0;
}

body.tev-public-marketplace.tev-home-page .tev-mp-market-header__title-wrap--home {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  transform: none;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0 0.5rem;
  box-sizing: border-box;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}

body.tev-public-marketplace.tev-home-page .tev-mp-market-header__title-wrap--home .tev-mp-market-header__title {
  white-space: normal;
  font-size: clamp(0.88rem, 0.7rem + 0.5vw, 1.15rem);
  color: var(--tev-mp-blue);
  line-height: 1.2;
  width: 100%;
  text-align: center;
  margin: 0 auto;
}

body.tev-public-marketplace.tev-home-page .tev-mp-market-header__subtitle {
  margin: 0 auto;
  font-size: clamp(0.62rem, 0.56rem + 0.2vw, 0.74rem);
  font-weight: 500;
  color: var(--tev-mp-muted);
  line-height: 1.35;
  max-width: 100%;
  width: 100%;
  text-align: center;
}

body.tev-public-marketplace.tev-home-page .tev-mp-market-header__actions {
  position: static;
  z-index: 3;
  flex-shrink: 0;
  justify-self: end;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  margin: 0;
}

/* Single page title — hide duplicate hero heading */
body.tev-public-marketplace.tev-home-page #tev-hero-heading,
body.tev-public-marketplace.tev-home-page #tev-hero-subheadline {
  display: none !important;
}

body.tev-public-marketplace.tev-home-page .hero-text {
  padding-top: 0;
}

/* —— Tablet —— */
@media (max-width: 1024px) {
  body.tev-public-marketplace .tev-mp-chrome-head {
    grid-template-columns: 1fr;
  }

  body.tev-public-marketplace .tev-mp-chrome-brand {
    border-right: none;
    border-bottom: 1px solid var(--tev-mp-border);
    padding: 0.5rem var(--tev-mp-h-pad);
  }

  body.tev-public-marketplace .tev-mp-market-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-chrome-head {
    position: static;
    min-height: 0;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header--home .tev-mp-market-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    position: static;
    min-height: 0;
  }

  body.tev-public-marketplace .tev-mp-market-header__title-wrap {
    grid-column: 1 / -1;
    order: 3;
    justify-self: center;
    text-align: center;
    padding: 0;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__lead {
    position: static;
    transform: none;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__title-wrap--home {
    position: static;
    transform: none;
    width: 100%;
    max-width: 100%;
    grid-column: 1 / -1;
    order: 3;
    justify-self: center;
    text-align: center;
    pointer-events: auto;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__subtitle {
    text-align: center;
  }

  body.tev-public-marketplace .tev-mp-market-header__actions {
    justify-self: end;
  }

  body.tev-public-marketplace .tev-mp-shell {
    grid-template-columns: 1fr;
  }

  body.tev-public-marketplace .tev-mp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 10060;
    width: min(300px, 88vw);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }

  /*
   * Mobile blank gap fix (home + AI planner / legacy-home):
   * Higher-specificity sticky rules kept the sidebar in document flow under a
   * 1-column shell and pushed page content far below the Live Points bar.
   * Force off-canvas fixed drawer on ≤1024px; desktop sticky unchanged.
   */
  body.tev-public-marketplace.tev-home-page .tev-mp-sidebar,
  body.tev-public-marketplace.tev-legacy-home .tev-mp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    z-index: 10060;
    width: min(300px, 88vw);
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    align-self: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-page-col,
  body.tev-public-marketplace.tev-home-page .tev-mp-page-content,
  body.tev-public-marketplace.tev-home-page main.tev-hm,
  body.tev-public-marketplace.tev-legacy-home .tev-mp-page-col,
  body.tev-public-marketplace.tev-legacy-home .tev-mp-page-content,
  body.tev-public-marketplace.tev-legacy-home main {
    margin-top: 0;
    padding-top: 0;
    min-height: 0;
  }

  body.tev-public-marketplace.tev-mp-sidebar-open .tev-mp-sidebar,
  body.tev-public-marketplace.tev-home-page.tev-mp-sidebar-open .tev-mp-sidebar,
  body.tev-public-marketplace.tev-legacy-home.tev-mp-sidebar-open .tev-mp-sidebar {
    transform: translateX(0);
  }

  body.tev-public-marketplace .tev-mp-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--tev-mp-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
  }
}

@media (max-width: 767px) {
  body.tev-public-marketplace .tev-mp-topbar__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  body.tev-public-marketplace .tev-mp-market-header__title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: clamp(0.85rem, 0.75rem + 0.4vw, 1rem);
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-market-header__subtitle {
    font-size: clamp(0.58rem, 0.54rem + 0.15vw, 0.68rem);
    line-height: 1.3;
    padding: 0 0.25rem;
  }

  body.tev-public-marketplace .tev-mp-market-header__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  body.tev-public-marketplace .tev-mp-header-cta__label {
    display: none;
  }

  body.tev-public-marketplace .tev-mp-header-cta {
    font-size: 0.68rem;
    padding: 0.35rem 0.5rem;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-primary-nav__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding-bottom: 0.35rem;
  }

  body.tev-public-marketplace.tev-home-page .tev-mp-primary-nav__links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    padding-bottom: 0.35rem;
  }

  body.tev-public-marketplace.tev-home-page.tev-mp-nav-open .tev-mp-primary-nav__links {
    display: flex;
  }

  body.tev-public-marketplace .tev-mp-primary-nav__live {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
  }

  body.tev-public-marketplace .tev-mp-shell {
    padding: 0.75rem;
  }

  body.tev-public-marketplace .tev-mp-stories__grid {
    grid-template-columns: 1fr;
  }
}

/* Legacy homepage + auth pages — unified marketplace chrome */
body.tev-public-marketplace.tev-legacy-home #bg-canvas.tev-mp-legacy-hidden,
body.tev-public-marketplace header.hero.tev-mp-legacy-hidden,
body.tev-public-marketplace .tev-auth-home-corner.tev-mp-legacy-hidden {
  display: none !important;
}

body.tev-public-marketplace.tev-legacy-home .tev-mp-page-content .products-column,
body.tev-public-marketplace.tev-legacy-home .tev-mp-page-content #marketplace {
  width: 100%;
  max-width: none;
  margin: 0;
}

body.tev-public-marketplace.tev-legacy-home .tev-mp-page-content .marketplace-layout {
  display: block;
}

body.tev-public-marketplace.tev-legacy-home .tev-mp-sidebar__legacy .sidebar-sub-menu.show,
body.tev-public-marketplace.tev-legacy-home .tev-mp-sidebar__legacy .sidebar-sub-menu--always-open {
  display: flex;
}

body.tev-public-marketplace .tev-auth-page-main {
  width: 100%;
  min-width: 0;
}

body.tev-public-marketplace .tev-auth-page-main .tev-onboard__grid {
  min-height: calc(100vh - var(--tev-mp-chrome-h, 180px) - 2rem);
}

body.tev-public-marketplace .tev-auth-page-main .login-container {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

body.tev-public-marketplace.tev-onboard--business .tev-mp-page-content {
  background: transparent;
}

body.tev-public-marketplace.tev-legacy-home .tev-mp-market-header--home .tev-mp-market-header__title-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

body.tev-public-marketplace.tev-legacy-home .tev-mp-chrome-head {
  position: relative;
}

/* SEO landing + compliance pages inside marketplace shell */
body.tev-public-marketplace .tev-mp-page-content.tev-seo-landing__main,
body.tev-public-marketplace .tev-mp-page-content.tev-home-charger-body,
body.tev-public-marketplace .tev-mp-page-content.tev-compliance {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.tev-public-marketplace .tev-mp-page-content .tev-seo-landing__hero {
  margin-bottom: 1.25rem;
}

body.tev-public-marketplace .tev-seo-landing__header.tev-mp-legacy-hidden,
body.tev-public-marketplace .tev-subnav.tev-mp-legacy-hidden,
body.tev-public-marketplace header.tev-mp-header.tev-mp-legacy-hidden {
  display: none !important;
}

body.tev-public-marketplace.tev-customer-portal .tev-mp-sidebar #sidebar-nav {
  position: static;
  transform: none;
  width: 100%;
  height: auto;
  min-height: 0;
}

body.tev-public-marketplace.tev-customer-portal .tev-mp-page-content.tev-cpo-main {
  width: 100%;
  min-width: 0;
  padding: 0;
}

body.tev-public-marketplace.tev-customer-portal .tev-mp-breadcrumb-bar {
  display: none !important;
}

body.tev-public-marketplace .tev-mp-breadcrumb-bar:empty {
  display: none !important;
}
