/* ============================================================ */
/* ===== LIBROS - BANNER PRINCIPAL ===== */
/* ============================================================ */

.books-banner {
  position: relative;
  color: #ffffff;
  padding: 100px 25px;
  text-align: center;
  overflow: hidden;
}

.books-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.books-banner-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 81, 152, 0.92) 0%, rgba(38, 49, 77, 0.88) 100%);
}

.books-banner-inner {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
}

.books-banner-super {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #B8CDDE;
  margin-bottom: 10px;
}

.books-banner h2 {
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.books-banner-sub {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 auto;
  max-width: 860px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================================ */
/* ===== SECCIÓN DE LIBROS ===== */
/* ============================================================ */

.books-section {
  padding: 60px 25px;
  background: #f5f7fa;
}

.books-container {
  max-width: 1200px;
  margin: 0 auto;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ============================================================ */
/* ===== TARJETA DE LIBRO ===== */
/* ============================================================ */

.book-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.book-card-img {
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: #eef2f7;
  cursor: pointer;
}

.book-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-card-body {
  padding: 24px 22px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-card-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.4;
  margin-bottom: 14px;
}

.book-author {
  font-size: 14px;
  color: #4a5568;
  line-height: 1.5;
  margin-bottom: 5px;
}

.book-publisher {
  font-size: 13px;
  color: #718096;
  margin-bottom: 5px;
}

.book-format {
  font-size: 13px;
  color: #718096;
  margin-bottom: 18px;
}

.book-price {
  display: flex;
  align-items: flex-start;
  margin-bottom: 6px;
}

.book-price-symbol {
  font-size: 18px;
  font-weight: 700;
  color: #005198;
  line-height: 1;
  margin-right: 1px;
  margin-top: 4px;
}

.book-price-amount {
  font-size: 36px;
  font-weight: 800;
  color: #005198;
  line-height: 1;
}

.book-price-cents {
  font-size: 16px;
  font-weight: 700;
  color: #005198;
  line-height: 1;
  margin-top: 2px;
}

.book-discount {
  font-size: 13px;
  color: #2d9a4a;
  font-weight: 600;
  margin-bottom: 20px;
}

.book-btn {
  display: inline-block;
  text-align: center;
  background: linear-gradient(135deg, #005198, #0066c2);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  align-self: flex-start;
}

.book-btn:hover {
  background: linear-gradient(135deg, #004080, #005198);
  box-shadow: 0 4px 12px rgba(0, 81, 152, 0.35);
}

/* ============================================================ */
/* ===== LIGHTBOX ===== */
/* ============================================================ */

.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #ffffff;
  font-size: 40px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 1;
}

.lightbox-close:hover {
  color: #cccccc;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* ============================================================ */
/* ===== RESPONSIVE ===== */
/* ============================================================ */

@media (max-width: 768px) {
  .books-banner {
    padding: 70px 20px;
  }

  .books-banner h2 {
    font-size: 28px;
  }

  .books-banner-sub {
    font-size: 15px;
  }

  .books-section {
    padding: 40px 20px;
  }

  .books-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .book-card-img {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .books-banner {
    padding: 50px 15px;
  }

  .books-banner h2 {
    font-size: 24px;
  }

  .books-banner-sub {
    font-size: 14px;
  }

  .books-section {
    padding: 30px 15px;
  }

  .books-grid {
    grid-template-columns: 1fr;
  }

  .book-card-img {
    height: 260px;
  }

  .book-card-body h3 {
    font-size: 16px;
  }

  .book-price-amount {
    font-size: 30px;
  }
}
