/* Homepage Products block (2026 redesign). Replaces the old .front-4 layout. */
.sm-products {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background-color: #171717;
}

.sm-products__mesh {
  position: absolute;
  left: 0;
  right: 0;
  top: 175px;
  height: 693px;
  background: url("../images/sm-products-mesh-bg.jpg") center top / cover no-repeat;
  pointer-events: none;
}

.sm-products__inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 30px;
  max-width: 1230px;
  margin: 0 auto;
  padding: 0 16px;
}

.sm-products__col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sm-products__col--left {
  padding-top: 29px;
}

.sm-products__col--right {
  gap: 30px;
}

.sm-products .sm-products__title {
  margin: 0 0 56px 3px;
  color: #fff;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 96px;
  letter-spacing: 10px;
  text-transform: uppercase;
}

.sm-products__card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 584 / 414;
  /* clip (not hidden) lets the card grow taller if its text needs the room */
  overflow: clip;
  background-color: #231f20;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.sm-products__card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.sm-products__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 43.485%, rgba(0, 0, 0, 0.8) 77.394%);
  pointer-events: none;
}

.sm-products__text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
}

.sm-products__label {
  color: #fff;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.sm-products__desc {
  max-width: 443px;
  color: #fff;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
}

.sm-products__explore {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  color: #ec2224;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 24px;
}

.sm-products__explore svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.sm-products__card:hover img,
.sm-products__card:focus-visible img {
  filter: brightness(0.8);
}

.sm-products__card:hover .sm-products__explore svg,
.sm-products__card:focus-visible .sm-products__explore svg {
  transform: translateX(3px);
}

.sm-products__card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.sm-products__badge {
  align-self: center;
  margin-top: 79px;
}

.sm-products__badge img {
  display: block;
  width: 222px;
  height: auto;
}

/* Tablet: keep two columns, tighten spacing */
@media screen and (max-width: 74.9375em) {
  .sm-products__inner,
  .sm-products__col--right {
    column-gap: 24px;
    gap: 24px;
  }

  .sm-products .sm-products__title {
    margin-bottom: 32px;
    line-height: 1.2;
  }

  .sm-products__col--left {
    padding-top: 0;
  }

  .sm-products__badge {
    margin-top: 48px;
  }

  .sm-products__label {
    font-size: 20px;
  }

  .sm-products__desc {
    font-size: 16px;
    line-height: 24px;
  }

  /* Smaller cards: the text covers more of the photo, so start the fade higher */
  .sm-products__card::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 15%, rgba(0, 0, 0, 0.8) 70%);
  }
}

/* Phone: single column — heading, Seals, Bags, Accessories, American Made */
@media screen and (max-width: 47.9375em) {
  .sm-products {
    padding: 48px 0;
  }

  /* End the mesh at the last card so the badge gets equal space above and below */
  .sm-products__mesh {
    top: 120px;
    bottom: 163px;
    height: auto;
  }

  .sm-products__inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .sm-products__col,
  .sm-products__col--right {
    display: contents;
  }

  .sm-products .sm-products__title {
    order: 0;
    margin: 0 0 8px;
    font-size: 32px;
    letter-spacing: 8px;
  }

  .sm-products__card--seals { order: 1; }
  .sm-products__card--bags { order: 2; }
  .sm-products__card--accessories { order: 3; }

  .sm-products__badge {
    order: 4;
    margin-top: 32px;
  }

  .sm-products__text {
    padding: 16px;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sm-products__card img,
  .sm-products__explore svg {
    transition: none;
  }
}
