/**
 * abahome — Electro marketplace density (own HVAC brand)
 * Stack: Hero → Trust(3) → Rails(4) → Promo → Brands → Newsletter
 */

.abahome {
  --abahome-gap: 2%;
}

/* Kill Classic lean padding on home wrapper */
body#index #wrapper {
  padding-block: 0;
}

body#index #content-wrapper,
body#index .page-home {
  max-width: none;
  padding: 0;
}

/* —— Full-width hero —— */
.abahome-hero {
  position: relative;
  width: 100%;
  max-width: var(--layout-max, 1360px);
  margin: 0 auto;
  min-height: 420px;
  height: clamp(380px, 42vw, 500px);
  background:
    linear-gradient(105deg, rgb(14 77 92 / 92%) 0%, rgb(14 77 92 / 55%) 45%, rgb(31 168 160 / 35%) 100%),
    linear-gradient(160deg, var(--color-brand, #0e4d5c) 0%, var(--color-ink, #0b1220) 100%);
  overflow: hidden;
  z-index: 1; /* mega overlays above at z-index 60 */
}

.abahome-hero__track,
.abahome-hero__slide {
  height: 100%;
  min-height: inherit;
}

.abahome-hero__slide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 2.5rem 2rem 2.5rem clamp(1.5rem, 22vw, 18rem); /* leave room for open mega overlay */
  gap: 1.5rem;
}

.abahome-hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-soft, #d5f3f0);
}

.abahome-hero__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display, Syne, sans-serif);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

.abahome-hero__text {
  margin: 0 0 1.25rem;
  max-width: 28rem;
  font-size: 1.05rem;
  color: rgb(255 255 255 / 88%);
}

.abahome-hero__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  background: var(--color-accent, #1fa8a0);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm, 4px);
}

.abahome-hero__cta:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.abahome-hero__visual {
  height: 70%;
  min-height: 200px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 40%, rgb(255 255 255 / 25%), transparent 55%),
    radial-gradient(circle at 70% 60%, rgb(31 168 160 / 40%), transparent 50%);
  opacity: 0.9;
}

/* —— Sections —— */
.abahome-section {
  padding: 2.5rem 0 1.5rem;
}

.abahome-section__head {
  margin-bottom: 1.25rem;
}

.abahome-section__title {
  font-family: var(--font-display, Syne, sans-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-ink, #0b1220);
}

/* —— 3-col trust —— */
.abahome-trust {
  padding-top: 2.75rem;
  padding-bottom: 2rem;
  background: var(--color-surface, #fff);
}

.abahome-trust__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.abahome-trust__icon {
  display: inline-block;
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  border: 2px solid var(--color-brand, #0e4d5c);
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 40%, var(--color-brand, #0e4d5c) 40% 60%, transparent 60%);
}

.abahome-trust__col h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-ink, #0b1220);
}

.abahome-trust__col p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--color-ink-muted, #3d4a5c);
  line-height: 1.45;
}

.abahome-trust__link {
  color: var(--color-brand, #0e4d5c);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.abahome-trust__link:hover {
  text-decoration: underline;
}

/* —— 4-col product rails —— */
.abahome-section__rail,
.abahome-rail .products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
}

.abahome-rail .product-miniature,
.abahome-section__rail .product-miniature {
  width: 100%;
  margin: 0;
}

/* —— Category tiles —— */
.abahome-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.abahome-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 100px;
  padding: 1rem 0.75rem;
  border: 1px solid var(--color-line, #c9d4e0);
  border-radius: 4px;
  background: var(--color-surface, #fff);
  color: var(--color-ink, #0b1220);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
}

.abahome-tile__icon {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--color-ink-subtle, #6b7a8f);
  border-radius: 2px;
}

.abahome-tile:hover {
  border-color: var(--color-brand, #0e4d5c);
  color: var(--color-brand, #0e4d5c);
  text-decoration: none;
}

/* —— Promo banners: lead + 3-col —— */
.abahome-banner-lead {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 160px;
  margin-bottom: 1rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(100deg, var(--color-brand, #0e4d5c), var(--color-ink, #0b1220));
  color: #fff !important;
  text-decoration: none;
  border-radius: 4px;
}

.abahome-banner-lead strong {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.abahome-banner-lead span {
  opacity: 0.9;
}

.abahome-banners__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.abahome-banner-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 140px;
  padding: 1.25rem;
  background: var(--color-surface-2, #e8eef4);
  border: 1px solid var(--color-line, #c9d4e0);
  border-radius: 4px;
  color: var(--color-ink, #0b1220);
  text-decoration: none;
}

.abahome-banner-tile strong {
  font-size: 1.05rem;
}

.abahome-banner-tile span {
  font-size: 0.9rem;
  color: var(--color-ink-muted, #3d4a5c);
}

.abahome-banner-tile:hover {
  border-color: var(--color-brand, #0e4d5c);
  text-decoration: none;
}

/* —— Brands row —— */
.abahome-brands {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.abahome-brands a {
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--color-line, #c9d4e0);
  border-radius: 2px;
  color: var(--color-ink-muted, #3d4a5c);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.85;
}

.abahome-brands a:hover {
  opacity: 1;
  color: var(--color-brand, #0e4d5c);
  border-color: var(--color-brand, #0e4d5c);
}

/* —— Newsletter full-width —— */
.abahome-newsletter {
  margin-top: 2rem;
  padding: 2.5rem 0 1.5rem;
  background: var(--color-brand, #0e4d5c);
  color: #fff;
}

.abahome-newsletter__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
}

.abahome-newsletter__title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}

.abahome-newsletter__sub {
  margin: 0;
  opacity: 0.9;
}

.abahome-newsletter__form {
  display: flex;
  gap: 0.5rem;
}

.abahome-newsletter__form input[type="email"] {
  flex: 1;
  min-height: 48px;
  padding: 0 1rem;
  border: 0;
  border-radius: 2px;
  font-size: 1rem;
}

.abahome-newsletter__form button {
  min-height: 48px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 2px;
  background: var(--color-ink, #0b1220);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.abahome-newsletter__form button:hover {
  background: #000;
}

.abahome-newsletter__legal {
  margin: 1.25rem auto 0;
  font-size: 0.7rem;
  line-height: 1.4;
  opacity: 0.85;
}

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

@media (max-width: 1199px) {
  .abahome-section__rail,
  .abahome-rail .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .abahome-hero__slide {
    grid-template-columns: 1fr;
    padding: 2rem 1.25rem;
  }

  .abahome-hero__visual {
    display: none;
  }

  .abahome-trust__grid,
  .abahome-banners__grid {
    grid-template-columns: 1fr;
  }

  .abahome-section__rail,
  .abahome-rail .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .abahome-newsletter__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .abahome-section__rail,
  .abahome-rail .products {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .abahome-hero {
    min-height: 320px;
    height: auto;
  }
}
