/*
Theme Name: Solimund Theme
Description: Editorial digital y marketplace de libros
Author: Solimund
Version: 2.0
*/

/* ===============================
   RESET Y BASE GLOBAL
================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background: #ffffff;
  color: #0f172a;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===============================
   HEADER
================================ */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.site-header .container {
  max-width: 1200px;
  margin: auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===============================
   BOTONES GENERALES
================================ */
.btn-primary {
  background: #6366f1;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-block;
}

.btn-secondary {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid #1f2933;
}

/* ===============================
   HOME NETFLIX (AISLADO)
================================ */
body.home .home-netflix {
  background: radial-gradient(1200px at 70% 20%, #1e2244, #0b0d17);
  color: #ffffff;
}

body.home .hero-netflix {
  padding: 100px 20px;
}

body.home .hero-grid {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

body.home .hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  margin-bottom: 16px;
}

body.home h1 {
  font-size: 46px;
  line-height: 1.1;
  margin-bottom: 20px;
}

body.home h1 span {
  color: #818cf8;
}

body.home .hero-netflix p {
  max-width: 520px;
  opacity: 0.9;
  margin-bottom: 24px;
}

body.home .hero-actions {
  display: flex;
  gap: 14px;
}

body.home .hero-image img {
  border-radius: 20px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.45);
}

/* ===============================
   CARRUSELES (CATÁLOGO / HOME)
================================ */
.book-row {
  padding: 40px 20px;
}

.book-row h2 {
  max-width: 1200px;
  margin: auto;
  margin-bottom: 20px;
}

.book-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.book-carousel::-webkit-scrollbar {
  height: 6px;
}

.book-carousel::-webkit-scrollbar-thumb {
  background: #6366f1;
  border-radius: 10px;
}

.book-card {
  min-width: 140px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .25s ease;
}

.book-card:hover {
  transform: scale(1.06);
}

.book-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

/* ===============================
   PANEL AUTOR – PROFESIONAL
================================ */
body.page-template-template-dashboard-autor,
body.page-template-template-mis-libros,
body.page-template-template-subir-libro {
  background: #f4f6fb;
}

/* Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 70px);
}

/* Sidebar */
.dashboard-sidebar {
  background: #0f172a;
  padding: 24px;
  color: #ffffff;
}

.dashboard-sidebar h3 {
  font-size: 14px;
  margin-bottom: 20px;
  opacity: 0.7;
}

.dashboard-sidebar a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 6px;
  font-weight: 500;
}

.dashboard-sidebar a:hover,
.dashboard-sidebar a.active {
  background: #1f2937;
}

/* Content */
.dashboard-content {
  padding: 32px;
}

.dashboard-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* ===============================
   MIS LIBROS
================================ */
.libro-item {
  display: flex;
  gap: 20px;
  align-items: center;
}

.libro-portada img {
  width: 90px;
  border-radius: 8px;
}

.libro-info h4 {
  margin-bottom: 6px;
}

.libro-actions a {
  font-size: 13px;
  margin-right: 10px;
  color: #6366f1;
}

/* ===============================
   FORM SUBIR LIBRO
================================ */
.form-card {
  background: #ffffff;
  padding: 24px;
  border-radius: 16px;
  max-width: 700px;
}

.form-card label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.form-card input,
.form-card textarea {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  margin-bottom: 16px;
}

/* ===============================
   FOOTER
================================ */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 40px 20px;
  font-size: 14px;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
  body.home .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  body.home h1 {
    font-size: 34px;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    display: none;
  }
}
/* ===============================
   FIX HOME SOLIMUND (URGENTE)
================================ */

.home-netflix {
  background: radial-gradient(1200px at 70% 20%, #1e2244, #0b0d17);
  color: #ffffff;
}

.hero-netflix {
  padding: 90px 20px;
}

.hero-grid {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  margin-bottom: 16px;
}

.hero-netflix h1 {
  font-size: 46px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-netflix h1 span {
  color: #818cf8;
}

.hero-netflix p {
  max-width: 520px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 14px;
}

.hero-image img {
  border-radius: 20px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.45);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-netflix h1 {
    font-size: 34px;
  }

  .hero-actions {
    justify-content: center;
  }
}
/* ===============================
   PORTADAS DE LIBROS (GLOBAL)
================================ */

.book-cover {
  width: 140px;
  height: 210px;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* ===============================
   GRID DE LIBROS
================================ */

.books-grid,
.home-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}

.book-card {
  text-decoration: none;
  color: inherit;
}

.book-title {
  font-size: 14px;
  margin-top: 8px;
  text-align: center;
  font-weight: 500;
}
/* ===============================
   HOME
================================ */

.home-netflix {
  background: #0b0f1a;
  color: #fff;
}

.home-netflix img {
  max-width: 100%;
}
/* ===============================
   PANEL AUTOR
================================ */

.dashboard-autor {
  background: #f4f6fb;
  color: #111;
}

.dashboard-autor .panel-sidebar {
  background: #0b132b;
  color: #fff;
  min-height: 100vh;
  padding: 20px;
}

.dashboard-autor .panel-sidebar a {
  color: #c7d2fe;
  text-decoration: none;
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
}

.dashboard-autor .panel-sidebar a:hover {
  background: #1c2541;
  color: #fff;
}

.dashboard-autor .panel-content {
  padding: 30px;
}

@media (max-width: 1024px) {
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .book-cover {
    width: 120px;
    height: 180px;
  }
}

@media (max-width: 600px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ======================================
   GRID DE LIBROS - CATALOGO / HOME
====================================== */

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1300px;
  margin: 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}

.book-card:hover {
  transform: translateY(-4px);
}

.book-cover {
  width: 140px;
  height: 210px;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-title {
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
  color: #e5e7eb;
  line-height: 1.3;
}
.books-grid.horizontal {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding-bottom: 10px;
}

.books-grid.horizontal::-webkit-scrollbar {
  height: 6px;
}
/* ===========================
   GRID DE LIBROS - CATÁLOGO
   Estilo Amazon / Netflix
=========================== */

.books-grid,
.catalog-grid,
.home-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
  padding: 30px 0;
  width: 100%;
}

/* Card del libro */
.book-card {
  background: transparent;
  text-align: center;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.book-card:hover {
  transform: translateY(-6px);
}

/* Contenedor de portada */
.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #000; /* placeholder negro */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagen de portada */
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Título del libro */
.book-title {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 1.3;
}

/* Evitar que imágenes gigantes rompan el layout */
.book-card img {
  max-width: 100%;
}

/* ===========================
   HOME – TENDENCIAS
=========================== */

.home-netflix .books-grid {
  padding-left: 40px;
  padding-right: 40px;
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 768px) {
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
  }

  .book-title {
    font-size: 13px;
  }
}

/* =========================
   SECCIÓN CATÁLOGO (AISLADA)
========================= */

.catalog-section {
  width: 100%;
  background: #fff;
  padding: 40px 0;
}

.catalog-container {
  max-width: 1300px;   /* ← COMO AMAZON */
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================
   GRID DE LIBROS
========================= */

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
}

/* Card */
.book-card {
  text-decoration: none;
  color: inherit;
}

/* Portada */
.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #000; /* placeholder */
  border-radius: 10px;
  overflow: hidden;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Título */
.book-title {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #000;
  text-align: left;
  line-height: 1.3;
}

/* =========================
   EVITAR QUE SE EXPANDA
========================= */

.catalog-section img {
  max-width: 100%;
  height: auto;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
  }
}

body {
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-publica {
    padding: 120px 0;
    text-align: center;
}

.publica-beneficios {
    padding: 100px 0;
}

.publica-pasos {
    padding: 100px 0;
}

.cta-center {
    margin-top: 60px;
    text-align: center;
}

.precio-libro {
    font-weight: bold;
    margin: 5px 0;
}

.precio-libro.gratis {
    color: #16a34a;
}

.bloque-pago {
    text-align: center;
    padding: 80px;
}

.btn-comprar {
    background: #2563eb;
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
}
