/* offers carousel (1:1 social posts) */
.offers-card {
  width: 100%;
  max-width: var(--offer-max-w);
  margin-inline: auto;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}
.offers-card:hover { transform: none; }

.carousel {
  position: relative;
  direction: ltr;
  background: #FAF5F0;
}

.carousel-viewport { overflow: hidden; }

.carousel-track {
  display: flex;
  transition: transform .48s cubic-bezier(.22, .8, .32, 1);
  will-change: transform;
}

/* absolute img stops html height attr from stretching the box */
.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
  aspect-ratio: var(--offer-ratio);
  overflow: hidden;
}
.carousel-slide picture,
.carousel-slide img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
/* swap to contain if mixing non-square posters that have text */
.carousel-slide img { object-fit: cover; }

/* overlay prev/next arrows in translucent circles */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  padding: 0;
  line-height: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .65);
  cursor: pointer;
  touch-action: manipulation;
  background: rgba(255, 255, 255, .52);
  color: var(--red);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .20);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .16s ease, color .16s ease, transform .14s ease;
}
.carousel-btn svg { pointer-events: none; }
.carousel-btn:hover { background: rgba(255, 255, 255, .85); color: var(--red-dark); }
.carousel-btn:active { transform: translateY(-50%) scale(.92); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* dots sit in a light frosted pill so they show on both dark & white posters */
.carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .14);
}

/* bigger tap target while keeping the visible dot small */
.carousel-dot {
  min-width: 24px;
  min-height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.carousel-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(23, 18, 16, .30);
  transition: background .25s ease, width .25s ease;
}
.carousel-dot[aria-current="true"]::before {
  background: var(--red);
  width: 20px;
}

@supports (backdrop-filter: blur(6px)) {
  .carousel-btn,
  .carousel-dots {
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}

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