.manufacturing {
  background: #fff;
  padding-top: clamp(4.75rem, 8vw, 8.5rem);
  padding-bottom: clamp(4.75rem, 8vw, 8.5rem);
}

.manufacturing-heading {
  margin-bottom: clamp(1.75rem, 3vw, 3rem);
}

.manufacturing-feature {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #26373e;
  box-shadow: 0 22px 48px rgba(35, 47, 53, 0.15);
}

.manufacturing-feature::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(30, 42, 48, 0.24), transparent 46%, rgba(30, 42, 48, 0.06));
}

.manufacturing-feature img {
  display: block;
  width: 100%;
  min-height: 320px;
  max-height: 620px;
  object-fit: cover;
  object-position: center;
}

.manufacturing-feature figcaption {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 390px);
  padding: 1rem 1.25rem;
  color: #fff;
  background: var(--topsun-red, #e2231a);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.manufacturing-feature figcaption b {
  color: rgba(255, 255, 255, 0.78);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.65rem;
  line-height: 1;
}

@media (max-width: 720px) {
  .manufacturing-feature img { min-height: 240px; }
  .manufacturing-feature figcaption { width: 100%; padding: 0.8rem 1rem; font-size: 0.8rem; }
}

/* Auto-playing manufacturing carousel. The original figure remains as a no-JavaScript fallback. */
.manufacturing-feature.manufacturing-carousel {
  aspect-ratio: 16 / 8.4;
  min-height: 360px;
}

.manufacturing-carousel::after { display: none; }

.manufacturing-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.manufacturing-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 700ms cubic-bezier(0.22, 0.76, 0.24, 1);
  will-change: transform;
}

.manufacturing-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: #28343a;
}

.manufacturing-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, rgba(15, 24, 29, 0.26), transparent 42%, rgba(15, 24, 29, 0.08));
}

.manufacturing-feature.manufacturing-carousel img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.78) contrast(1.05) brightness(0.94);
  transform: scale(1.008);
}

.manufacturing-carousel-bar {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  color: #fff;
  background: linear-gradient(90deg, rgba(20, 31, 37, 0.92), rgba(20, 31, 37, 0.74));
}

.manufacturing-caption {
  margin: 0;
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.manufacturing-carousel-actions,
.manufacturing-dots {
  display: flex;
  align-items: center;
}

.manufacturing-carousel-actions { gap: 0.55rem; }
.manufacturing-dots { gap: 0.4rem; margin-right: 0.35rem; }

.manufacturing-dot,
.manufacturing-control {
  border: 0;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.manufacturing-dot {
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border-radius: 100%;
  background: rgba(255, 255, 255, 0.42);
}

.manufacturing-dot:hover,
.manufacturing-dot:focus-visible,
.manufacturing-dot.active { background: var(--topsun-red, #e2231a); transform: scale(1.3); }

.manufacturing-control {
  display: inline-grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  padding: 0;
  color: #fff;
  background: var(--topsun-red, #e2231a);
  font-size: 1.2rem;
  line-height: 1;
}

.manufacturing-control:hover,
.manufacturing-control:focus-visible { background: #bd170f; transform: translateY(-1px); }

@media (max-width: 720px) {
  .manufacturing-feature.manufacturing-carousel { min-height: 250px; aspect-ratio: 16 / 10; }
  .manufacturing-carousel-bar { gap: 0.75rem; padding: 0.7rem 0.8rem; }
  .manufacturing-caption { max-width: 52%; font-size: 0.76rem; line-height: 1.35; }
  .manufacturing-carousel-actions { gap: 0.35rem; }
  .manufacturing-dots { display: none; }
  .manufacturing-control { width: 1.9rem; height: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .manufacturing-track { transition: none; }
}

/* Static four-photo gallery: source images are never enlarged or zoomed. */
.manufacturing-feature.manufacturing-gallery {
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.manufacturing-feature.manufacturing-gallery::after { display: none; }

.manufacturing-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.4vw, 1.2rem);
}

.manufacturing-gallery-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #d9e1e5;
  background: #fff;
  box-shadow: 0 0.9rem 2rem rgba(25, 47, 59, 0.09);
}

.manufacturing-gallery-image {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  padding: 0.3rem;
  overflow: hidden;
  background: #edf1f3;
}

.manufacturing-feature.manufacturing-gallery .manufacturing-gallery-image img {
  display: block;
  width: auto;
  height: auto;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  filter: saturate(0.8) contrast(1.04) brightness(0.98);
  transform: none;
}

.manufacturing-feature.manufacturing-gallery .manufacturing-gallery-card figcaption {
  position: static;
  z-index: auto;
  display: block;
  width: auto;
  margin: 0;
  padding: 0.85rem 0.9rem 0.9rem;
  color: #213846;
  background: #fff;
  font-size: clamp(0.82rem, 1vw, 0.98rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}

@media (max-width: 960px) {
  .manufacturing-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .manufacturing-gallery-grid { grid-template-columns: 1fr; }
}
