/* ============================================================
   Homepage
   ============================================================ */

/* ---- Hero (static, non-carousel version) ---- */
.home-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-16) 0 var(--space-12);
}

.home-hero__eyebrow {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-600);
  margin-bottom: var(--space-3);
}

.home-hero__title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy-900);
  margin-bottom: var(--space-4);
}

.home-hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-6);
  max-width: 42ch;
}

.home-hero__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.home-hero__trust {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.home-hero__trust span {
  font-size: var(--font-size-sm);
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.home-hero__trust span::before {
  content: "✓";
  color: var(--navy-600);
  font-weight: 700;
}

.home-hero__visual {
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-lg);
}

.home-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.home-hero__visual:hover .home-hero__image {
  transform: scale(1.03);
}

/* ---- Sections ---- */
.home-section {
  padding: var(--space-10) 0;
  border-top: 1px solid var(--border);
}

.home-section--tinted {
  background: #f0f0f0;
  --carousel-fade-bg: #f0f0f0;
  padding: var(--space-10) var(--space-6);
  border-radius: var(--radius-xl);
  margin-top: var(--space-10);
  border-top: none;
}

.home-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.home-section__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 var(--space-1);
}

.home-section__subtitle {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  margin: 0;
}

.home-section__link {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--navy-700);
  text-decoration: none;
  white-space: nowrap;
  align-self: center;
}

.home-section__link:hover {
  color: var(--navy-900);
  text-decoration: underline;
}

/* ---- Category grid ---- */
.home-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

/* ---- Product grid ---- */
.home-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

/* ---- CTA buttons ---- */
.btn-home-primary {
  display: inline-flex;
  align-items: center;
  padding: var(--space-3) var(--space-6);
  background: var(--navy-700);
  color: var(--white);
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 2px solid var(--navy-700);
  transition: background 0.15s, border-color 0.15s;
}

.btn-home-primary:hover {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
  text-decoration: none;
}

.btn-home-outline {
  display: inline-flex;
  align-items: center;
  padding: var(--space-3) var(--space-6);
  background: transparent;
  color: var(--navy-700);
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 2px solid var(--navy-700);
  transition: background 0.15s, color 0.15s;
}

.btn-home-outline:hover {
  background: var(--navy-700);
  color: var(--white);
  text-decoration: none;
}

.btn-home-outline--light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-home-outline--light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
  color: var(--white);
}

/* ---- Trust section ---- */
.home-trust {
  background: var(--navy-900);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-8);
  margin: var(--space-10) 0;
}

.home-trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.home-trust__item {
  text-align: center;
}

.home-trust__accent {
  width: 2.5rem;
  height: 3px;
  background: var(--navy-300);
  border-radius: 2px;
  margin: 0 auto var(--space-4);
}

.home-trust__item-title {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-2);
}

.home-trust__item-text {
  font-size: var(--font-size-sm);
  color: var(--navy-300);
  line-height: 1.6;
  margin: 0;
}

/* ---- Final CTA ---- */
.home-final-cta {
  background: var(--navy-800);
  border-radius: var(--radius-xl);
  padding: var(--space-12) var(--space-8);
  text-align: center;
  margin-bottom: var(--space-8);
}

.home-final-cta__title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-3);
}

.home-final-cta__subtitle {
  font-size: var(--font-size-lg);
  color: var(--navy-300);
  margin-bottom: var(--space-7);
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

.home-final-cta__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Featured Products section header ---- */
.featured-products__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.featured-products__eyebrow {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-500);
  margin: 0 0 var(--space-1);
}

.featured-products__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 var(--space-1);
}

.featured-products__description {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  margin: 0;
}

.featured-products__all-link {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--navy-700);
  text-decoration: none;
  white-space: nowrap;
}

.featured-products__all-link:hover {
  color: var(--navy-900);
  text-decoration: underline;
}

/* ---- Homepage Hero Carousel ---- */

/* Full-bleed breakout from Bootstrap container.
   margin-left: calc(-50vw + 50%) shifts the element so its left edge
   aligns with the viewport's left edge regardless of the container's
   auto-margin or gutter size. */
.home-hero-carousel {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 720px;
  overflow: hidden;
}

.home-hero-carousel__slides {
  position: absolute;
  inset: 0;
}

.home-hero-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  background-color: var(--navy-900);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.home-hero-carousel__slide.is-active {
  opacity: 1;
}

/* Navy gradient — denser on left where text sits, fades right */
.home-hero-carousel__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(15, 30, 51, 0.80) 0%,
    rgba(15, 30, 51, 0.55) 45%,
    rgba(15, 30, 51, 0.22) 100%
  );
  z-index: 1;
}

.home-hero-carousel__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-16) 5%;
  max-width: 780px;
}

.home-hero-carousel__eyebrow {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-300);
  margin-bottom: var(--space-4);
}

.home-hero-carousel__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--white);
  margin-bottom: var(--space-5);
  max-width: 680px;
}

.home-hero-carousel__description {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  max-width: 52ch;
}

.home-hero-carousel__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.home-hero-carousel__features {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.home-hero-carousel__features span {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.home-hero-carousel__features span::before {
  content: "✓";
  color: var(--navy-300);
  font-weight: 700;
}

/* Navigation dots */
.home-hero-carousel__dots {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.home-hero-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.home-hero-carousel__dot.is-active {
  background: var(--white);
  transform: scale(1.5);
}

.home-hero-carousel__dot:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* ---- Responsive ---- */

@media (max-width: 991px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: var(--space-8) 0;
  }

  .home-hero__visual {
    aspect-ratio: 3 / 2;
    order: -1;
  }

  .home-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-trust__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-hero-carousel {
    height: 600px;
  }

  .home-hero-carousel__content {
    padding: var(--space-12) var(--space-6);
    max-width: 100%;
  }

  .home-hero-carousel__overlay {
    background: linear-gradient(
      to bottom,
      rgba(15, 30, 51, 0.65) 0%,
      rgba(15, 30, 51, 0.58) 100%
    );
  }
}

@media (max-width: 575px) {
  .home-hero__title {
    font-size: 1.75rem;
  }

  .home-hero__visual {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }

  .home-category-grid {
    grid-template-columns: 1fr;
  }

  .home-product-grid {
    grid-template-columns: 1fr;
  }

  .home-trust__grid {
    grid-template-columns: 1fr;
  }

  .home-trust {
    padding: var(--space-8) var(--space-4);
  }

  .home-section--tinted {
    padding: var(--space-8) var(--space-4);
    border-radius: var(--radius-lg);
  }

  .home-final-cta {
    padding: var(--space-8) var(--space-4);
    border-radius: var(--radius-lg);
  }

  .home-hero-carousel {
    height: 640px;
  }

  .home-hero-carousel__content {
    padding: var(--space-10) var(--space-4);
    justify-content: flex-end;
    padding-bottom: var(--space-16);
  }

  .home-hero-carousel__title {
    font-size: 1.75rem;
  }

  .home-hero-carousel__description {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-6);
  }

  .home-hero-carousel__actions {
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
  }

  .home-hero-carousel__features {
    gap: var(--space-3);
  }
}
