.hero {
  position: relative;
  width: 100%;
  height: 80vh;
  overflow: hidden;
}

/* Slides */
.hero-slide {
  width: 100%;
  height: 80vh;
  background-size: cover;
  background-position: center;
}

/* Overlay para centrar texto + buscador */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 60vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 20px 15px;
  z-index: 2;
}

/* Fondo oscuro con pseudo-elemento */
.hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0; /* top, right, bottom, left 0 */
  background: rgb(0 0 0 / 60%);
  z-index: -1; /* para que no tape el texto */
}

.hero-text,
.hero-search {
  transform: translateY(100px); /* baja solo texto y buscador */
}
/* Títulos */
.hero-text {
  max-width: 900px; /* opcional, para limitar ancho y centrar bonito */
  width: 100%;
}
.hero-text h1 {
  font-size: 50px;
  font-weight: bold;
  color: #ffffff;
}

.hero-text h2 {
  font-size: 40px;
  font-weight: bold;
  margin-bottom: 30px;
  color: #ffffff;
}

/* Palabra cambiante */
.changing-words.fadeshow {
  position: relative;
  display: inline-block;
  vertical-align: middle; /* Alinea con el texto adyacente */
  min-width: 80px; /* opcional, reserva espacio para que el texto no “salte” */
  color: #ffcc00;
}

.changing-words.fadeshow span {
  position: absolute;
  left: 0;
  top: 50%; /* Coloca la palabra al centro vertical */
  transform: translateY(-50%); /* Corrige el centrado */
  opacity: 0;
  animation: fadeWords 9s infinite;
  white-space: nowrap; /* Evita saltos de línea */
}

.changing-words.fadeshow span:nth-child(1) { animation-delay: 0s; }
.changing-words.fadeshow span:nth-child(2) { animation-delay: 3s; }
.changing-words.fadeshow span:nth-child(3) { animation-delay: 6s; }

@keyframes fadeWords {
  0%, 20%   { opacity: 1; }
  33.33%,100% { opacity: 0; }
}

/* Buscador */
.search-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50px;
  padding: 10px 15px;
  width: 50vw; 
  margin: 0 auto;
  box-sizing: border-box;
  flex-wrap: wrap; 
}

.search-box input {
  flex: 1;
  min-width: 0;
  width: 100%;       
  border: none;
  outline: none;
  padding: 10px 15px;
  font-size: 1rem;
  border-radius: 50px 0 0 50px;
  box-sizing: border-box;
}

.search-box button {
  background: #002c84;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.3s ease;
  white-space: nowrap;
}
.search-box button i {
  font-size: 12px;
  margin-left: 5px;
}
.search-box button:hover {
  background: #063593;
}

/*NUEVOS INGRESOS*/
.new-arrivals {
  padding: 50px 0px;
  background: #f8f9fc; /* color de fondo */
}

.new-arrivals h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #000000;
}
/* Contenedor del carrusel */
.recientes .owl-stage {
  display: flex;              /* hace que owl use flex para alinear */
}

/* Cada tarjeta se expande a la misma altura */
.recientes .owl-item {
  display: flex;
}

/* Tarjeta libro con altura uniforme */
.recientes .arrival-card {
  position: relative;
  background-color: rgb(243, 243, 247);
  padding: 20px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;     /* para que h3, rating, p se acomoden en columna */
  justify-content: space-between; /* reparte espacio y alinea */
  height: 100%;               /* se adapta al item */
}

.arrival-card .image-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
}

.arrival-card .image-wrap img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}

/* Zoom efecto en hover */
.arrival-card .image-wrap:hover img {
  transform: scale(1.05);
}

/* Info */
.arrival-card .info {
  text-align: left;
  padding: 10px 0px 0;
}

.arrival-card .info .title {
  font-weight: 500;
  font-size: 1.1rem;
  color: #000000;
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
  transition: color 0.3s ease;
}

/* Color hover del título */
.arrival-card .info .title:hover {
  color: #002c84; /* el color que prefieras */
}

.arrival-card .rating {
  font-size: 1rem;
  color: #ff9900; /* color de estrellas */
}

.arrival-card .author {
  font-size: 0.9rem;
  color: #555555;
  margin: 0;
}

.owl-nav .fa-chevron-left,
.owl-nav .fa-chevron-right {
  font-size: 1.5rem;
  color: #333;
}

.owl-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}
/**/
.mask-card {
  position: relative;
  display: block;
  overflow: hidden;
  text-decoration: none;
}

.mask-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.mask-card::before {
  content: "";
  position: absolute;
  inset: 0; /* top:0, right:0, bottom:0, left:0 */
  background: rgba(0, 0, 0, 0.3); /* oscuridad ligera */
  transition: background 0.3s ease;
  z-index: 1; /* por encima de la imagen */
}

/* Efecto de zoom al pasar el mouse */
.mask-card:hover img {
  transform: scale(1.05);
}

/* Texto sobre la imagen */
.mask-info {
  position: absolute;
  bottom: 15px;
  left: 15px;
  font-size: 1.2rem;
  color: #ffffff;
  text-shadow: 0 2px 5px rgba(0,0,0,0.6);
  transition: color 0.3s ease;
  z-index: 2;
}

/* Hover opcional para cambiar color del texto */
.mask-card:hover .mask-info {
  color: #e6e6e6; /* más claro al pasar el mouse */
}


.owl-nav .fa-chevron-left,
.owl-nav .fa-chevron-right {
  font-size: 1.5rem;
  color: #333;
}

.owl-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
/**/
.horror-books-section {
  padding: 50px 0px;
}

.horror-books-section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #000000;
}

/* Contenedor flex */
.col-lg-12:nth-of-type(n + 2) .horror-books-content{
  margin-top: 40px;
}
.horror-books-container {
  display: flex;
  gap: 20px;
}

/* Columna izquierda fija */
.horror-left {
  flex: 0 0 30%; /* ancho fijo 30% */
}

.book-static-card {
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
}

.book-static-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

/* Columna derecha (Carousel) */
.horror-right {
  flex: 1; /* el resto del espacio */
  overflow: hidden;
}

/* Contenedor del carrusel */
.categorias-productos .owl-stage {
  display: flex;              /* hace que owl use flex para alinear */
}

/* Cada tarjeta se expande a la misma altura */
.categorias-productos .owl-item {
  display: flex;
}

/* Tarjeta libro con altura uniforme */
.book-card {
  background: #ffffff;
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;     /* para que h3, rating, p se acomoden en columna */
  justify-content: space-between; /* reparte espacio y alinea */
  height: 100%;               /* se adapta al item */
}

.book-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.book-card img {
  width: 100%;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.book-card:hover img {
  transform: scale(1.05);
}

.book-card h3 {
  margin: 10px 0px 0px;
  font-size: 1rem;
  transition: color 0.3s ease;
  color: #000000;
}

.book-card:hover h3 {
  color: #002c84;
}

.rating {
  font-size: 1rem;
  color: #f39c12;
}

.book-card p {
  font-size: 0.9rem;
  color: #555555;
  margin: 0;
}

.owl-nav .fa-chevron-left,
.owl-nav .fa-chevron-right {
  font-size: 1.5rem;
  color: #333;
}

.owl-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

/* ========== MEDIA QUERIES RESPONSIVE ========== */

img {
  max-width: 100%;
  height: auto;
}
/* Tablets (pantallas medianas) */
@media (max-width: 992px) {

  .hero {
    height: 60vh;
  }

  .hero-text h1 {
    font-size: 36px;
  }

  .hero-text h2 {
    font-size: 28px;
  }

  .horror-books-container {
    flex-direction: column;
  }

  .horror-left,
  .horror-right {
    flex: 1 1 100%;
  }

  .book-static-card img {
    max-height: 300px;
    object-fit: cover;
  }
  .search-box {
    width: 80vw; 
  }
}

/* Móviles (pantallas pequeñas) */
@media (max-width: 576px) {

  .hero {
    height: auto; /* no altura fija */
  }

  .hero-slide {
    height: auto;
    min-height: 300px; /* aseguramos visibilidad mínima */
  }

  .hero-overlay {
    justify-content: flex-start;
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-text h1 {
    font-size: 28px;
    margin-bottom: 10px;
  }

  .hero-text h2 {
    font-size: 20px;
  }

  .changing-words.fadeshow {
    font-size: 18px;
  }

  .new-arrivals h2,
  .horror-books-section h2 {
    font-size: 1.5rem;
  }

  .mask-info {
    font-size: 1rem;
  }

  .arrival-card,
  .book-card {
    padding: 15px;
    border-radius: 20px;
  }

  .arrival-card .info .title,
  .book-card h3 {
    font-size: 1rem;
  }

  .mask-card .mask-info {
    bottom: 10px;
    left: 10px;
  }

  .horror-books-container {
    gap: 15px;
  }
  .hero-search {
    display: none !important;
  }
  .search-box {
    display: none !important; 
  }
}
