/* ====== GALLERY CAROUSEL (CSS) ====== */
.gallery {
  padding: 40px 16px;
  background: #000;
  color: #fff;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.gallery__title {
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 18px;
  font-size: 32px;
}

.carousel {
  position: relative;
  max-width: 1024px;
  margin: 0 auto;
  height: 490px;                 /* matches prototype stage height */
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;           /* matches prototype intent */
  overflow: hidden;
  padding-top: 50px;
}

.carousel__stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  width: 56px !important;
  height: 56px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  background: rgba(30, 30, 30, 0.75) !important;
  color: #fff !important;
  font-size: 34px !important;
  line-height: 1;
  cursor: pointer !important;
  backdrop-filter: blur(6px);
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease !important;
  display: block !important;
}

.carousel__btn:hover {
  transform: translateY(-50%) scale(1.08);
  background: rgba(134, 20, 202, 0.85) !important;
  border-color: rgba(134, 20, 202, 0.9) !important;
}

.carousel__btn--prev { left: 12px; }
.carousel__btn--next { right: 12px; }

.carousel__card {
  position: absolute;
  top: 0;
  left: 50%;
  transform-origin: center center;
  translate: -50% 0; 
  width: 288px;                  /* base size: 288x384 (then scaled) */
  height: 384px;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #222;
  transition: transform 500ms ease, opacity 500ms ease, box-shadow 500ms ease, border-color 500ms ease;
  will-change: transform, opacity;
}

.carousel__link {
  display: block;
  width: 100%;
  height: 100%;
}

.carousel__link:focus-visible {
  outline: 2px solid #c084fc;
  outline-offset: 4px;
  border-radius: 24px;
}

.carousel__card img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

.carousel__price {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: #fff;
  color: #000;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);

  /* crispness helpers */
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  backface-visibility: hidden;
}

.carousel__meta {
  max-width: 640px;
  margin: 14px auto 0;
  text-align: center;
  padding: 0 16px;
}

.carousel__metaTitle {
  text-decoration: none;
  display: inline-block;
  background: #fff;
  color: #000;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 999px;
  margin-bottom: 10px;
  box-shadow: 0 0 20px rgba(255,255,255,0.25);
}

.carousel__metaTitle:hover {
  box-shadow: 0 0 22px rgba(192, 132, 252, 0.35);
}

.carousel__metaTitle:focus-visible {
  outline: 2px solid #c084fc;
  outline-offset: 4px;
}

.carousel__metaDesc {
  color: #9CA3AF;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.6;
  max-width: 416px;
}

/* Responsive tweak: reduce side travel on small screens */
@media (max-width: 520px) {
  .carousel__btn { width: 48px; height: 48px; font-size: 30px; }
}

/* ====== MOBILE DOTS ====== */
.carousel__dots {
  display: none;
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  gap: 10px;
  z-index: 40;
}

.carousel__dot {
  width: 18px !important;
  height: 8px !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.35) !important;
  transition: transform 200ms ease, background 200ms ease !important;
  cursor: pointer !important;
}

.carousel__dot.is-active {
  background: #c084fc !important;
  transform: scale(1.4) !important;
}

/* Show dots + hide arrows on mobile */
@media (max-width: 639px) {
  .carousel__dots {
    display: flex;
  }

  .carousel__btn {
    display: none !important;
  }
}

/* Helps prevent unwanted browser gestures while dragging horizontally */
.carousel__stage {
  touch-action: pan-y;
}

/* Optional: while dragging, reduce transition for smoother feel */
@media (max-width: 520px) {
  .carousel__stage.is-dragging .carousel__card {
    transition: none;
    cursor: grabbing;
  }
  .carousel__card {
    cursor: grab;
  }
}

/* Side cards grayscale */
.carousel__card.is-side img {
  filter: grayscale(1) saturate(0.2) contrast(0.95);
  opacity: 0.9;
  transition: filter 250ms ease, opacity 250ms ease;
}

/* Center card keeps full color */
.carousel__card.is-center img {
  filter: none;
  opacity: 1;
}
