/* Tira de historias */
.stories-strip {
  display: flex;
  justify-content: center;
  gap: 18px;
  overflow-x: auto;
  padding: 18px 12px;
  margin: 10px auto;
  width: 100%;
  max-width: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stories-strip::-webkit-scrollbar {
  display: none;
}

.stories-item {
  flex: 0 0 auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 4px;
  border: 3px solid #c9a34e;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.stories-item:hover {
  transform: scale(1.05);
}

.stories-item img,
.stories-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Visor estilo Instagram */
.stories-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.stories-viewer__frame {
  position: relative;
  width: min(480px, 96vw);
  height: min(860px, 96vh);
  display: flex;
  flex-direction: column;
}

.stories-viewer__progress {
  display: flex;
  gap: 4px;
  padding: 8px;
  position: relative;
  z-index: 3;
}

.stories-viewer__bar {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
}

.stories-viewer__bar.is-active {
  background: #c9a34e;
}

.stories-viewer__media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.stories-viewer__media img,
.stories-viewer__media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.stories-viewer__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: #fff;
  text-align: center;
  padding: 32px 16px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  z-index: 2;
  margin: 0;
}

.stories-viewer__close {
  position: absolute;
  top: 20px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
}

/* Zonas de toque izquierda/derecha */
.stories-viewer__zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2;
}

.stories-viewer__zone--prev {
  left: 0;
}

.stories-viewer__zone--next {
  right: 0;
}

/* Historias por categoría en el listado */
.stories-item-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 128px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.stories-item-wrap .stories-item {
  display: block;
  width: 116px;
  height: 116px;
}

.stories-item__name {
  font-size: 1rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stories-strip--tier {
  justify-content: flex-start;
}
