.auto-photo-gallery {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.scroll-photo-stack[data-auto-gallery] {
  display: flex;
  position: relative;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  gap: 16px;
  align-items: stretch;
  padding: 8px 0 20px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
  scroll-snap-type: none;
  scrollbar-width: none;
}

.scroll-photo-stack[data-auto-gallery]::-webkit-scrollbar {
  display: none;
}

.scroll-photo-stack[data-auto-gallery] > .photo-card,
.scroll-photo-stack[data-auto-gallery] > .visual-card {
  position: relative;
  flex: 0 0 clamp(260px, 28vw, 380px);
  width: clamp(260px, 28vw, 380px);
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 12px;
  transform: none !important;
  opacity: 1 !important;
  scroll-snap-align: none;
}

.scroll-photo-stack[data-auto-gallery] > .photo-card img,
.scroll-photo-stack[data-auto-gallery] > .visual-card img {
  display: block;
  width: 100%;
  height: 420px;
  min-height: 0;
  object-fit: cover;
  border-radius: calc(var(--radio) - 10px);
}

.auto-gallery-controls {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px;
  color: var(--texto-suave);
  font-size: .8rem;
}

.auto-gallery-controls button {
  display: none;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  color: var(--azul-profundo);
  background: #fff;
  cursor: pointer;
}

.auto-photo-gallery.is-auto-ready .auto-gallery-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scroll-photo-stack[data-auto-gallery]:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: -3px;
  border-radius: 18px;
}

@media (max-width: 860px) {
  .scroll-photo-stack[data-auto-gallery] > .photo-card,
  .scroll-photo-stack[data-auto-gallery] > .visual-card {
    flex-basis: min(78vw, 340px);
    width: min(78vw, 340px);
  }

  .scroll-photo-stack[data-auto-gallery] > .photo-card img,
  .scroll-photo-stack[data-auto-gallery] > .visual-card img {
    height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auto-photo-gallery.is-auto-ready .auto-gallery-controls button {
    display: none;
  }
}
