/* Shared factory carousel, Homepage + Products only.
   Layers: photographs 0, localized copy scrim/copy 1, controls 2.
   JavaScript owns horizontal image positions; CSS leaves slide one visible. */
.shared-factory-carousel {
  position: relative;
  isolation: isolate;
  color: var(--white);
  background: var(--ink);
}
.shared-factory-carousel__stage {
  position: relative;
  height: 620px;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.shared-factory-carousel__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}
.shared-factory-carousel__slide.is-active { visibility: visible; }
.shared-factory-carousel__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
/* Retain the individual approved image focal points and source files. */
.shared-factory-carousel__slide--sewing img { object-position: 57% 100%; }
.shared-factory-carousel__slide--cutting img { object-position: 52% 90%; }
.shared-factory-carousel__slide--craft img { object-position: 48% 90%; }
.shared-factory-carousel__slide--exterior img { object-position: 50% 90%; }

.shared-factory-carousel__copy {
  position: absolute;
  z-index: 1;
  isolation: isolate;
  left: max(6.5vw, 82px);
  bottom: 88px;
  width: min(460px, calc(100% - 164px));
  padding: 0;
  color: var(--white);
  background: none;
  pointer-events: none;
}
/* Readability only around the copy; soft edges, no rectangular panel or glass. */
.shared-factory-carousel__copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -70px -180px -70px -120px;
  background: linear-gradient(90deg, rgba(8, 10, 8, .72) 0%, rgba(8, 10, 8, .66) 82%, rgba(8, 10, 8, 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  pointer-events: none;
}
.shared-factory-carousel__eyebrow {
  margin: 0 0 15px;
  color: var(--white);
  font: 700 11px/1.5 var(--sans);
  letter-spacing: .12em;
}
.shared-factory-carousel h1 {
  margin: 0;
  color: var(--white);
  font: 650 38px/1.1 var(--sans);
  letter-spacing: -.035em;
}
.shared-factory-carousel__description {
  margin: 18px 0 22px;
  max-width: 36ch;
  color: var(--white);
  font-size: 16px;
  line-height: 1.65;
}
.shared-factory-carousel .button {
  min-height: 48px;
  color: var(--white);
  background: rgba(8, 10, 8, .16);
  border-color: rgba(255, 253, 249, .75);
  white-space: nowrap;
  pointer-events: auto;
}
.shared-factory-carousel .button:hover,
.shared-factory-carousel .button:focus-visible {
  color: var(--ink);
  background: var(--white);
  border-color: var(--white);
}
.shared-factory-carousel__controls {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  color: var(--white);
}
.shared-factory-carousel__controls[hidden] { display: none; }
.shared-factory-carousel__controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}
.shared-factory-carousel__controls .shared-factory-carousel__arrow {
  position: absolute;
  top: calc(50% - 24px);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 253, 249, .45);
  border-radius: 50%;
  background: rgba(21, 19, 15, .48);
}
.shared-factory-carousel__arrow[data-carousel-prev] { left: 18px; }
.shared-factory-carousel__arrow[data-carousel-next] { right: 18px; }
.shared-factory-carousel__controls .shared-factory-carousel__arrow:hover,
.shared-factory-carousel__controls .shared-factory-carousel__arrow:focus-visible {
  background: rgba(21, 19, 15, .78);
  border-color: var(--white);
}
.shared-factory-carousel__controls .shared-factory-carousel__arrow:active { background: rgba(21, 19, 15, .9); }
.shared-factory-carousel__pagination {
  position: absolute;
  isolation: isolate;
  right: max(6.5vw, 82px);
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 44px);
  padding: 0;
  background: none;
  pointer-events: auto;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
.shared-factory-carousel__pagination::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -12px -26px;
  background: radial-gradient(ellipse, rgba(8, 10, 8, .64) 0%, rgba(8, 10, 8, .48) 52%, transparent 76%);
  pointer-events: none;
}
.shared-factory-carousel__counter { font: 600 11px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .06em; white-space: nowrap; }
.shared-factory-carousel__controls .shared-factory-carousel__play { width: 48px; border-radius: 22px; font: 600 11px/1 var(--sans); }
.shared-factory-carousel__controls .shared-factory-carousel__play:hover,
.shared-factory-carousel__controls .shared-factory-carousel__play:focus-visible { background: rgba(255, 253, 249, .16); }
.shared-factory-carousel__controls button:disabled { opacity: .45; cursor: default; }
.shared-factory-carousel__controls button:focus-visible,
.shared-factory-carousel .button:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.shared-factory-carousel__dots { display: flex; }
.shared-factory-carousel__dots button { border-radius: 22px; }
.shared-factory-carousel__dots button span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 253, 249, .6);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.shared-factory-carousel__dots button[aria-current="true"] span { width: 32px; height: 4px; background: var(--white); }
.shared-factory-carousel__dots button:hover span,
.shared-factory-carousel__dots button:focus-visible span { background: var(--white); }
.shared-factory-carousel__chevron {
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateX(-2px) rotate(45deg);
}
.shared-factory-carousel__chevron--previous { transform: translateX(2px) rotate(-135deg); }
.shared-factory-carousel:focus-visible { outline: 2px solid var(--white); outline-offset: -4px; }
.shared-factory-carousel[data-carousel-ready] .shared-factory-carousel__stage { cursor: grab; }
.shared-factory-carousel.is-dragging .shared-factory-carousel__stage { cursor: grabbing; }
.shared-factory-carousel.is-moving .shared-factory-carousel__slide,
.shared-factory-carousel.is-dragging .shared-factory-carousel__slide { will-change: transform; }

@media (max-width: 1180px) {
  .shared-factory-carousel__stage { height: 560px; }
  .shared-factory-carousel__copy { width: min(420px, calc(100% - 164px)); }
  .shared-factory-carousel h1 { font-size: 34px; }
}
@media (max-width: 980px) {
  .shared-factory-carousel__stage { height: 520px; }
  .shared-factory-carousel__copy { bottom: 82px; width: min(390px, calc(100% - 164px)); }
  .shared-factory-carousel h1 { font-size: 31px; }
}
@media (max-width: 620px) {
  /* Copy and photo now share one frame, replacing the previous two-part stack. */
  .shared-factory-carousel__stage { height: clamp(560px, 146vw, 620px); }
  .shared-factory-carousel__copy { left: 22px; bottom: 70px; width: calc(100% - 44px); }
  .shared-factory-carousel__copy::before {
    inset: -24px -40px -30px -22px;
    background: linear-gradient(90deg, rgba(8, 10, 8, .64) 0%, rgba(8, 10, 8, .52) 72%, rgba(8, 10, 8, 0) 100%);
  }
  .shared-factory-carousel__eyebrow { margin-bottom: 8px; font-size: 11px; letter-spacing: .12em; }
  .shared-factory-carousel h1 { font-size: 28px; line-height: 1.12; }
  .shared-factory-carousel__description { margin: 10px 0 12px; font-size: 14px; line-height: 1.5; }
  /* Use the upper building/ceiling area; keep the sign, workers and machines clear.
     The narrower copy also stays between the unchanged edge arrows. */
  .shared-factory-carousel:has(.shared-factory-carousel__slide--exterior.is-active) .shared-factory-carousel__copy,
  .shared-factory-carousel:has(.shared-factory-carousel__slide--sewing.is-active) .shared-factory-carousel__copy,
  .shared-factory-carousel:has(.shared-factory-carousel__slide--cutting.is-active) .shared-factory-carousel__copy {
    top: 22px;
    bottom: auto;
    left: 56px;
    width: calc(100% - 112px);
  }
  .shared-factory-carousel__controls .shared-factory-carousel__arrow { width: 44px; height: 44px; top: calc(26% - 22px); }
  .shared-factory-carousel__arrow[data-carousel-prev] { left: 12px; }
  .shared-factory-carousel__arrow[data-carousel-next] { right: 12px; }
  .shared-factory-carousel__pagination { left: 22px; right: auto; bottom: 16px; gap: 10px; }
  .shared-factory-carousel__dots button { width: 36px; }
  .shared-factory-carousel__dots button[aria-current="true"] span { width: 28px; }
  /* Mobile-only moderate crops; retain cover and the approved craft focal point. */
  .shared-factory-carousel__slide img { top: auto; bottom: 0; }
  .shared-factory-carousel__slide--sewing img { height: 112%; object-position: 60% 100%; }
  .shared-factory-carousel__slide--cutting img { height: 108%; object-position: 50% 100%; }
  .shared-factory-carousel__slide--craft img { height: 115%; object-position: 36% 100%; }
  .shared-factory-carousel__slide--exterior img { height: 100%; object-position: 50% 100%; }
}
