/* Estructura del Carrusel */
.carousel-page {
  padding: 0;
  display: block;
}
.carousel-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Grid de Fotos */
.carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Wrapper de cada foto */
.photo-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Botones dentro de la foto */
.edit-actions {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 6px;
  display: flex;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}
.edit-btn {
  pointer-events: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, background-color 0.2s;
}
.edit-btn:hover {
  transform: scale(1.15);
}
.delete-btn {
  color: #e53935;
}
.delete-btn:hover {
  background-color: #ffebee;
}
.update-btn {
  color: #1e88e5;
}
.update-btn:hover {
  background-color: #e3f2fd;
}

/* Tarjeta Agregar */
.add-photo-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 2px dashed var(--secondary-color);
  border-radius: 10px;
  color: var(--secondary-dark-color);
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.5);
}
.add-photo-card:hover {
  background-color: rgba(255, 128, 171, 0.1);
  transform: translateY(-2px);
}
.add-photo-card i {
  font-size: 3.5rem;
  margin-bottom: 5px;
}

/* MEDIA QUERIES (Fotos) */
@media (max-width: 480px) {
  .carousel-slide {
    padding: 10px 20px;
    gap: 10px;
  }
  .add-photo-card i {
    font-size: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .carousel-slide {
    padding: 30px 40px;
    gap: 20px;
  }
  /* En PC priorizamos que no se corten las cabezas */
  .photo-wrapper img {
    object-position: top center;
  }

  /* Tarjeta agregar en PC */
  .add-photo-card {
    border-width: 3px;
    background-color: rgba(255, 255, 255, 0.8);
  }
  .add-photo-card i {
    font-size: 4rem;
  }
  .add-photo-card p {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
  }
}
