/* ── DEVICE STACK (trang chủ — #uu-diem-thiet-bi "Ưu điểm nổi bật của các thiết bị") ── */
.uh-device-showcase {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, var(--uh-color-amber-tint) 0%, rgba(255, 248, 234, 0) 38%),
    radial-gradient(circle at 90% 70%, var(--uh-color-primary-tint) 0%, rgba(255, 241, 241, 0) 40%),
    linear-gradient(180deg, #ffffff 0%, var(--uh-bg-surface-gray) 100%);
}

.uh-device-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(20, 32, 46, 0.07) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
  pointer-events: none;
}

.uh-device-showcase > .container-1200 {
  position: relative;
  z-index: 1;
}

.uh-stack {
  --stack-card: min(500px, 74vw);
  max-width: 1000px;
  margin: 0 auto;
}

/* ── Stage: thẻ xếp chồng ── */
.uh-stack-stage {
  position: relative;
  height: calc(var(--stack-card) + 90px);
  perspective: 1400px;
  outline-offset: 6px;
  touch-action: pan-y;
  user-select: none;
}

/* Vầng sáng phía sau + bóng đổ sàn dưới thẻ chính */
.uh-stack-stage::before {
  content: "";
  position: absolute;
  top: 2%;
  left: 50%;
  width: calc(var(--stack-card) * 1.9);
  height: calc(var(--stack-card) * 1.9);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 167, 36, 0.28) 0%, rgba(228, 24, 31, 0.1) 38%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

.uh-stack-stage::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: calc(var(--stack-card) * 0.9);
  height: 36px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(20, 32, 46, 0.38) 0%, rgba(20, 32, 46, 0) 70%);
  filter: blur(6px);
  pointer-events: none;
}

.uh-stack-card {
  position: absolute;
  top: 24px;
  left: 50%;
  width: var(--stack-card);
  height: var(--stack-card);
  margin: 0 0 0 calc(var(--stack-card) / -2);
  border-radius: 28px;
  overflow: hidden;
  background: var(--uh-bg-surface-alt);
  box-shadow: 0 18px 40px -12px rgba(20, 32, 46, 0.28);
  transition: transform 0.6s cubic-bezier(0.22, 0.8, 0.28, 1), opacity 0.5s ease, filter 0.5s ease, box-shadow 0.5s ease;
}

.uh-stack-card.is-active {
  z-index: 3;
  transform: translateY(-10px);
  box-shadow: 0 50px 90px -24px rgba(20, 32, 46, 0.55), 0 18px 36px -14px rgba(228, 24, 31, 0.25);
}

.uh-stack-card.is-prev,
.uh-stack-card.is-next {
  z-index: 2;
  opacity: 0.55;
  filter: saturate(0.75);
  cursor: pointer;
}

.uh-stack-card.is-prev {
  transform: translateX(-66%) scale(0.78) rotateY(16deg);
}

.uh-stack-card.is-next {
  transform: translateX(66%) scale(0.78) rotateY(-16deg);
}

.uh-stack-card.is-prev:hover,
.uh-stack-card.is-next:hover {
  opacity: 0.85;
  filter: saturate(0.95);
}

.uh-stack-card.is-far {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0) scale(0.6);
}

.uh-stack-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  pointer-events: none;
}

.uh-stack-brand {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(20, 32, 46, 0.2);
}

.uh-stack-brand img {
  max-height: 26px;
  max-width: 110px;
  width: auto;
  object-fit: contain;
}

.uh-stack-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 44px 18px 16px;
  background: linear-gradient(180deg, rgba(14, 24, 38, 0) 0%, rgba(14, 24, 38, 0.88) 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── Điều khiển ── */
.uh-stack-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 26px 0 30px;
}

.uh-stack-nav {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: var(--uh-color-navy);
  box-shadow: 0 8px 22px rgba(20, 32, 46, 0.16);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.uh-stack-nav:hover,
.uh-stack-nav:focus-visible {
  background: var(--uh-color-primary);
  color: #ffffff;
  box-shadow: 0 10px 26px var(--uh-color-primary-glow);
  transform: scale(1.08);
}

.uh-stack-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.uh-stack-counter {
  color: var(--uh-color-text-subtle);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.uh-stack-counter b {
  color: var(--uh-color-navy);
  font-size: 18px;
}

.uh-stack-dots {
  display: flex;
  gap: 8px;
}

.uh-stack-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.3s, background 0.3s;
}

.uh-stack-dot.is-active {
  width: 32px;
  background: var(--uh-color-primary);
}

/* ── Panel mô tả (bên dưới) ── */
.uh-stack-panel.is-inactive {
  display: none;
}

.uh-stack-panel {
  animation: uh-stack-panel-in 0.45s ease both;
  border: 1px solid var(--uh-color-border-subtle);
  border-radius: 24px;
  box-shadow: 0 24px 60px -28px rgba(20, 32, 46, 0.35);
}

.uh-stack-specs {
  padding: 22px 26px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  font-size: 13.5px;
}

@keyframes uh-stack-panel-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .uh-stack-card.is-prev {
    transform: translateX(-62%) scale(0.78) rotateY(14deg);
  }
  .uh-stack-card.is-next {
    transform: translateX(62%) scale(0.78) rotateY(-14deg);
  }
  .uh-stack-controls {
    gap: 14px;
  }
  .uh-stack-nav {
    width: 42px;
    height: 42px;
  }
  .uh-stack-specs {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .uh-stack-card,
  .uh-stack-panel {
    transition: none;
    animation: none;
  }
}
