/* ==========================================================================
   AIRISH 3D STACKED ARTWORK CAROUSEL / BIG BANNER SLIDER
   Inspiration: CRED UI Card Carousel / 3D Layered Deck Swipe
   ========================================================================== */

.stacked-slider-section {
  width: 100%;
  box-sizing: border-box;
}

.stacked-slider-wrapper {
  position: relative;
  width: 100%;
  margin: -5px 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

/* 3D Deck Container - anchored with explicit height and top margin for stacked cards */
.stacked-deck-container {
  position: relative;
  width: 100%;
  height: 490px;
  margin: 25px 0 0px;
  overflow: visible;
  display: block;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

/* Individual Stacked Card */
.stacked-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  height: 460px;
  border-radius: 26px;
  overflow: hidden;
  border: none;
  outline: none;
  background: transparent;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.45);
  cursor: grab;
  will-change: transform, opacity, box-shadow;
  transition: transform 0.45s cubic-bezier(0.34, 1.2, 0.64, 1),
    opacity 0.45s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

/* Card Dimming Depth Overlay (Pure GPU opacity, 0% CPU filter lag) */
.stacked-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  border-radius: 26px;
  z-index: 4;
  transition: opacity 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.stacked-card:active {
  cursor: grabbing;
}

/* Artwork Background Image (Clickable Link to Detail) */
.stacked-card-media {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  z-index: 1;
  display: block;
  cursor: pointer;
  text-decoration: none;
  border: none;
  outline: none;
}

.stacked-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border: none;
  outline: none;
  display: block;
}

.stacked-card:hover .stacked-card-img {
  transform: scale(1.04);
}

/* Gradient Vignette over Artwork */
.stacked-card-scrim {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  background: linear-gradient(180deg,
      rgba(7, 9, 14, 0.72) 0%,
      rgba(7, 9, 14, 0.15) 20%,
      rgba(7, 9, 14, 0.0) 40%,
      rgba(7, 9, 14, 0.35) 60%,
      rgba(7, 9, 14, 0.82) 78%,
      rgba(7, 9, 14, 0.98) 100%);
  z-index: 2;
  pointer-events: none;
  border: none;
  outline: none;
}

/* Card Top Bar */
.stacked-card-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  pointer-events: none;
}

.stacked-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

/* WebAR Button at Top Left (next to status) */
.stacked-btn-ar {
  pointer-events: auto;
  padding: 4px 11px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgb(255 255 255 / 20%);
  color: var(--accent-gold);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.stacked-btn-ar:hover {
  background: rgba(233, 216, 166, 0.22);
  border-color: rgba(233, 216, 166, 0.75);
  color: #fff;
  transform: translateY(-1px);
}

.stacked-btn-ar svg,
.stacked-btn-ar i {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stacked-card-like {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgb(255 255 255 / 20%);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.stacked-card-like svg,
.stacked-card-like i {
  font-size: 18px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.stacked-card-like:hover {
  background: rgba(231, 111, 81, 0.25);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
  transform: scale(1.08);
}

.stacked-card-like.liked svg,
.stacked-card-like.liked i {
  fill: #f87171;
  stroke: #f87171;
  color: #f87171;
}

/* Direct Content Overlay over Artwork (No inner card box container) */
.stacked-card-info {
  position: relative;
  z-index: 3;
  width: 100%;
  box-sizing: border-box;
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.stacked-title-block {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  box-sizing: border-box;
}

.stacked-title-link {
  text-decoration: none;
  display: block;
  color: inherit;
  width: 100%;
  max-width: 100%;
  transition: transform var(--transition-fast);
}

.stacked-title-link:hover {
  transform: translateX(2px);
}

.stacked-artwork-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: 1.3px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
  display: block;
  min-height: calc(2 * 1.25 * 26px);
  max-height: calc(2 * 1.25 * 26px + 4px);
  /* Selalu 2 baris stabil */
  overflow: hidden;
  width: 100%;
  max-width: 75%;
  margin: 0;
  transition: color var(--transition-fast);
}

.title-arrow,
.stacked-artwork-title .title-arrow {
  display: inline-block;
  vertical-align: baseline;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--accent-sage);
  opacity: 0.9;
  margin-left: 4px;
  white-space: nowrap;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.stacked-title-link:hover .stacked-artwork-title {
  color: var(--accent-sage);
}

.stacked-title-link:hover .title-arrow {
  transform: translate(3px, -3px);
  opacity: 1;
}

.stacked-artist-info {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

.stacked-artist-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(148, 210, 189, 0.65);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  background: #111;
}

.stacked-artist-name {
  font-weight: 600;
  margin-left: 5px;
}

.stacked-artist-info .verified-icon {
  width: 14px;
  height: 14px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-sage);
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.stacked-artist-specialty {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgb(255 255 255 / 70%);
  background: transparent;
  border: 1px solid rgb(255 255 255 / 20%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3px 15px 4px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================
   STACK POSITIONS & 3D LAYER STYLES
   Visual Effect: Natural Playing Card Deck / Layered Fan
   Small-to-large scale growth on appearance
   ========================================== */

/* Active Front Card (Position 0) */
.stacked-card.pos-0 {
  transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
  z-index: 10;
  opacity: 1;
  pointer-events: auto;
  box-shadow:
    0 -4px 16px -2px rgba(0, 0, 0, 0.35),
    0 16px 36px -8px rgba(0, 0, 0, 0.50),
    0 6px 14px -3px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.stacked-card.pos-0::after {
  opacity: 0;
}

/* 1st Card Behind: Peeking from above and tilted right */
.stacked-card.pos-1 {
  transform: translate3d(0, -22px, 0) scale(0.94) rotate(3deg);
  z-index: 9;
  opacity: 0.94;
  pointer-events: none;
  box-shadow:
    0 -3px 12px -2px rgba(0, 0, 0, 0.28),
    0 12px 26px -6px rgba(0, 0, 0, 0.40),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.stacked-card.pos-1::after {
  opacity: 0.14;
}

/* 2nd Card Behind: Peeking further above and tilted left */
.stacked-card.pos-2 {
  transform: translate3d(0, -40px, 0) scale(0.88) rotate(-3deg);
  z-index: 8;
  opacity: 0.82;
  pointer-events: none;
  box-shadow:
    0 -2px 10px -2px rgba(0, 0, 0, 0.22),
    0 10px 20px -5px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.stacked-card.pos-2::after {
  opacity: 0.28;
}

/* 3rd Card Behind: Deep peek */
.stacked-card.pos-3 {
  transform: translate3d(0, -54px, 0) scale(0.82) rotate(1.6deg);
  z-index: 7;
  opacity: 0.58;
  pointer-events: none;
  box-shadow:
    0 8px 18px -4px rgba(0, 0, 0, 0.30),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.stacked-card.pos-3::after {
  opacity: 0.45;
}

/* 4th Card Behind: Hidden deep layer */
.stacked-card.pos-4 {
  transform: translate3d(0, -62px, 0) scale(0.76);
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.stacked-card.pos-4::after {
  opacity: 0.70;
}

/* Disable heavy backdrop-filter on cards behind the active card to save GPU on mobile */
.stacked-card:not(.pos-0) .stacked-btn-ar,
.stacked-card:not(.pos-0) .stacked-card-like,
.stacked-card:not(.pos-0) .stacked-artist-specialty {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Exit Animations on Swipe / Next / Prev (CodePen myOXYbE Acceleration Curve with scale down) */
.stacked-card.exit-left {
  transform: translate3d(-130%, 40px, 0) rotate(-22deg) scale(0.85) !important;
  opacity: 0 !important;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.6, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.6, 1) !important;
  z-index: 20 !important;
  pointer-events: none !important;
}

.stacked-card.exit-right {
  transform: translate3d(130%, 40px, 0) rotate(22deg) scale(0.85) !important;
  opacity: 0 !important;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.6, 1), opacity 0.5s cubic-bezier(0.4, 0, 0.6, 1) !important;
  z-index: 20 !important;
  pointer-events: none !important;
}

/* Enter Animation for Previous Slide */
.stacked-card.enter-left {
  transform: translate3d(-130%, 40px, 0) rotate(-22deg) scale(0.85) !important;
  opacity: 0 !important;
  z-index: 20 !important;
  pointer-events: none !important;
  transition: none !important;
}

.stacked-card.enter-right {
  transform: translate3d(130%, 40px, 0) rotate(22deg) scale(0.85) !important;
  opacity: 0 !important;
  z-index: 20 !important;
  pointer-events: none !important;
  transition: none !important;
}

/* ==========================================
   SLIDER CONTROLS (Dots Indicator)
   ========================================== */
.stacked-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 380px;
  padding: 0 6px;
  margin-top: -10px;
}

.stacked-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border-light);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.stacked-nav-btn:hover {
  background: var(--glass-bg-active);
  border-color: var(--accent-sage);
  color: var(--accent-sage);
  transform: scale(1.08);
}

.stacked-nav-btn:active {
  transform: scale(0.94);
}

.stacked-dots-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stacked-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.22);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.stacked-dot.active {
  width: 26px;
  background: linear-gradient(135deg, var(--accent-sage), #52b788);
  box-shadow: 0 0 12px rgba(148, 210, 189, 0.5);
}

/* Swipe Gesture Hint */
.stacked-swipe-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  animation: pulseHint 2.4s infinite ease-in-out;
}

.stacked-swipe-hint span {
  font-size: 0.85rem;
}

@keyframes pulseHint {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* Compact screens */
@media (max-width: 375px) {
  .stacked-deck-container {
    height: 440px;
    margin: 30px 0 12px;
  }

  .stacked-card {
    height: 420px;
  }

  .stacked-artwork-title {
    font-size: 1.05rem;
    min-height: calc(2 * 1.25 * 1.05rem);
    max-height: calc(2 * 1.25 * 1.05rem + 4px);
    max-width: 100%;
  }
}