/* ── Reset & base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --naranja: #f7711f;
  --naranja-dark: #d95e10;
  --texto: #1a1a1a;
  --texto-suave: #555;
  --fondo: #fafaf8;
  --fondo-alt: #f2efe9;
  --borde: #e5e0d8;
  --blanco: #ffffff;
  --radius: 10px;
  --sombra: 0 2px 16px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.6;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

/* ── Header ────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blanco);
  border-bottom: 1px solid var(--borde);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--texto);
  white-space: nowrap;
}
.logo-text strong { color: var(--naranja); }

.logo-img {
  height: 42px;
  width: auto;
  display: block;
}

header nav {
  display: flex;
  gap: 24px;
  flex: 1;
}

header nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--texto-suave);
  transition: color .2s;
}
header nav a:hover { color: var(--naranja); }

.nav-wa {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #25d366;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 50px;
  white-space: nowrap;
  transition: background .2s;
}
.nav-wa:hover { background: #1db954; color: white; }

/* ── Hero ──────────────────────────────────────────── */
.hero {
  background: var(--texto);
  color: white;
  padding: 100px 24px;
  text-align: center;
}

.hero-inner {
  max-width: 700px;
  margin: 0 auto;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--naranja);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.1rem;
  color: #aaa;
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.btn-primary {
  display: inline-block;
  background: var(--naranja);
  color: white;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 50px;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--naranja-dark); transform: translateY(-1px); color: white; }

/* ── Sections ──────────────────────────────────────── */
.section { padding: 80px 0; }

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 10px;
}

.section-sub {
  color: var(--texto-suave);
  font-size: 1rem;
  margin-bottom: 50px;
}

/* ── Libros grid ───────────────────────────────────── */
.libros-section { background: var(--fondo); }

.libros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.libro-card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sombra);
  transition: transform .2s, box-shadow .2s;
}
.libro-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.libro-cover {
  height: 260px;
  overflow: hidden;
  background: var(--fondo-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}

.libro-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .3s;
}
.libro-card:hover .libro-cover img { transform: scale(1.03); }

.libro-info {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.libro-genero {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--naranja);
  margin-bottom: 8px;
}

.libro-titulo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.libro-autor {
  font-size: 0.9rem;
  color: var(--texto-suave);
  margin-bottom: 14px;
}
.colab { font-weight: 400; font-style: italic; }

.libro-desc {
  font-size: 0.88rem;
  color: var(--texto-suave);
  line-height: 1.65;
  margin-bottom: 16px;
  flex: 1;
}

.libro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.libro-meta span {
  font-size: 0.75rem;
  color: #888;
  background: var(--fondo-alt);
  padding: 3px 9px;
  border-radius: 20px;
}

.libro-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--borde);
}

.libro-precio {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--texto);
}

.precio-grupo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.precio-tachado {
  font-size: 0.85rem;
  color: #bbb;
  text-decoration: line-through;
}
.descuento-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: #fff0e8;
  color: var(--naranja);
  padding: 3px 8px;
  border-radius: 20px;
}

.btn-comprar {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #25d366;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 50px;
  white-space: nowrap;
  transition: background .2s;
}
.btn-comprar:hover { background: #1db954; color: white; }

/* ── Autores ───────────────────────────────────────── */
.autores-section { background: var(--fondo-alt); }

.autores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.autor-card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  box-shadow: var(--sombra);
}

.autor-inicial {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--naranja);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: .05em;
}

.autor-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.autor-datos {
  font-size: 0.78rem;
  color: var(--naranja);
  font-weight: 600;
  margin-bottom: 8px;
}
.autor-info p {
  font-size: 0.87rem;
  color: var(--texto-suave);
  line-height: 1.6;
}

/* ── Nosotros ──────────────────────────────────────── */
.nosotros-section { background: var(--blanco); }

.nosotros-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.nosotros-texto h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 20px;
}
.nosotros-texto p {
  color: var(--texto-suave);
  margin-bottom: 16px;
  line-height: 1.75;
}
.nosotros-texto .btn-primary { margin-top: 8px; }

.nosotros-datos {
  background: var(--fondo-alt);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--borde);
}
.nosotros-datos h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
}
.nosotros-datos ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nosotros-datos li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--texto-suave);
}
.nosotros-datos li svg {
  min-width: 18px;
  color: var(--naranja);
  margin-top: 2px;
}
.nosotros-datos a { color: var(--naranja); }
.nosotros-datos a:hover { text-decoration: underline; }

/* ── CTA ───────────────────────────────────────────── */
.cta-section {
  background: var(--naranja);
  color: white;
  text-align: center;
  padding: 80px 24px;
}

.cta-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 14px;
}
.cta-inner p {
  font-size: 1.05rem;
  opacity: .9;
  margin-bottom: 36px;
}

.btn-wa-grande {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: #25d366;
  font-size: 1rem;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 50px;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.btn-wa-grande:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.2); color: #1db954; }

/* ── Footer ────────────────────────────────────────── */
footer {
  background: var(--texto);
  color: #aaa;
  padding: 48px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}

.footer-brand .logo-text { font-size: 1.1rem; color: white; }
.footer-brand p { font-size: 0.8rem; margin-top: 6px; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}
.footer-links a { font-size: 0.85rem; transition: color .2s; }
.footer-links a:hover { color: var(--naranja); }

.footer-legal { text-align: right; }
.footer-legal p { font-size: 0.75rem; line-height: 1.6; }

/* ── WhatsApp flotante ─────────────────────────────── */
.wa-flotante {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform .2s, box-shadow .2s;
}
.wa-flotante:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.6);
  color: white;
}

/* ── Libro detalle page ─────────────────────────────── */
.libro-detalle {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: start;
}
.libro-detalle-cover {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  position: sticky;
  top: 84px;
}
.libro-detalle-cover img { width: 100%; display: block; }

.libro-detalle-titulo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}
.libro-detalle-autor {
  font-size: 1.05rem;
  color: var(--texto-suave);
  margin-bottom: 24px;
}
.libro-detalle-desc {
  font-size: 0.95rem;
  color: var(--texto-suave);
  line-height: 1.85;
  margin-bottom: 28px;
}
.libro-detalle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.libro-detalle-meta span {
  font-size: 0.78rem;
  color: #888;
  background: var(--fondo-alt);
  padding: 5px 12px;
  border-radius: 20px;
}
.libro-detalle-precio-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 0;
  border-top: 1px solid var(--borde);
  border-bottom: 1px solid var(--borde);
  margin-bottom: 24px;
}
.libro-detalle-precio-row .libro-precio { font-size: 1.6rem; }
.libro-detalle-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.libro-detalle-actions .btn-comprar { padding: 13px 24px; font-size: 0.95rem; }
.libro-detalle-actions .btn-outline { padding: 11px 22px; font-size: 0.9rem; }

/* Autor mini card en ficha de libro */
.autor-mini-card {
  background: var(--fondo-alt);
  border: 1px solid var(--borde);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 56px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.autor-mini-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--naranja);
  margin-bottom: 4px;
}
.autor-mini-nombre {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.autor-mini-bio {
  font-size: 0.87rem;
  color: var(--texto-suave);
  line-height: 1.7;
  margin-bottom: 12px;
}
.autor-mini-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--naranja);
}
.autor-mini-link:hover { text-decoration: underline; }

/* libro-titulo como link en grilla */
.libro-titulo a { color: inherit; transition: color .2s; }
.libro-titulo a:hover { color: var(--naranja); }

/* ── Page hero (páginas internas) ─────────────────── */
.page-hero {
  background: var(--texto);
  color: white;
  padding: 64px 24px;
  text-align: center;
}
.page-hero-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--naranja);
  margin-bottom: 12px;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
}
.page-hero p {
  color: #aaa;
  margin-top: 14px;
  font-size: 1rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Nav activo ────────────────────────────────────── */
header nav a.nav-active { color: var(--naranja); }

/* ── Botón outline ─────────────────────────────────── */
.btn-outline {
  display: inline-block;
  border: 2px solid var(--naranja);
  color: var(--naranja);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 50px;
  transition: background .2s, color .2s;
  font-size: 0.9rem;
}
.btn-outline:hover { background: var(--naranja); color: white; }

.section-ver-mas {
  text-align: center;
  margin-top: 44px;
}

/* ── Contacto page ─────────────────────────────────── */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contacto-bloque h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.contacto-bloque p {
  color: var(--texto-suave);
  line-height: 1.75;
  margin-bottom: 14px;
}
.contacto-lista {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 8px;
}
.contacto-lista li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 0.95rem;
  color: var(--texto-suave);
}
.contacto-lista li svg {
  min-width: 20px;
  color: var(--naranja);
  margin-top: 2px;
}
.contacto-lista a { color: var(--naranja); }
.contacto-lista a:hover { text-decoration: underline; }

.contacto-cta-box {
  background: var(--fondo-alt);
  border: 1px solid var(--borde);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
}
.contacto-cta-box h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.contacto-cta-box p {
  color: var(--texto-suave);
  margin-bottom: 24px;
  line-height: 1.6;
}
.contacto-cta-box .btn-comprar {
  font-size: 1rem;
  padding: 14px 28px;
  justify-content: center;
}

/* ── Aviso legal / Nosotros extendido ──────────────── */
.nosotros-full p {
  color: var(--texto-suave);
  line-height: 1.8;
  margin-bottom: 18px;
  font-size: 1rem;
}
.nosotros-full h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
}

/* ── Autor detalle ─────────────────────────────────── */
.autor-card-full {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--sombra);
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.autor-inicial-lg {
  width: 72px;
  height: 72px;
  min-width: 72px;
  background: var(--naranja);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .05em;
}
.autor-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.autor-body .autor-datos {
  font-size: 0.82rem;
  color: var(--naranja);
  font-weight: 600;
  margin-bottom: 14px;
}
.autor-body p {
  font-size: 0.92rem;
  color: var(--texto-suave);
  line-height: 1.7;
  margin-bottom: 10px;
}
.autor-libros-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--texto-suave);
  margin-top: 14px;
  margin-bottom: 6px;
}
.autor-libros-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.autor-libros-lista a {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--naranja);
  background: #fff0e8;
  padding: 4px 12px;
  border-radius: 20px;
  transition: background .2s;
}
.autor-libros-lista a:hover { background: var(--naranja); color: white; }

.autores-full-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Hamburger menu ────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--texto);
  border-radius: 2px;
  transition: all .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 1px solid var(--borde);
  padding: 8px 24px 16px;
  flex-direction: column;
  z-index: 99;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--texto-suave);
  padding: 14px 0;
  border-bottom: 1px solid var(--borde);
  transition: color .2s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover,
.mobile-nav a.nav-active { color: var(--naranja); }

/* ── Legal content ──────────────────────────────────── */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 0 64px;
}
.legal-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--texto);
  margin: 40px 0 12px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p {
  color: var(--texto-suave);
  margin-bottom: 16px;
  line-height: 1.75;
}
.legal-content a {
  color: var(--naranja);
  text-decoration: none;
}
.legal-content a:hover { text-decoration: underline; }
.legal-fecha {
  margin-top: 48px !important;
  font-size: 0.875rem;
  color: #999 !important;
  font-style: italic;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .nosotros-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-legal { text-align: center; }
  .libro-detalle { grid-template-columns: 1fr; }
  .libro-detalle-cover { max-width: 260px; margin: 0 auto; position: static; }
  .autor-mini-card { flex-direction: column; gap: 16px; }
}

@media (max-width: 900px) {
  .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
  .autor-card-full { flex-direction: column; gap: 20px; }
}

@media (max-width: 680px) {
  .hamburger { display: flex; }
  header nav { display: none !important; }
  .nav-wa { display: none; }
  .header-inner { gap: 16px; }
  .hero { padding: 70px 24px; }
  .section { padding: 56px 0; }
  .libros-grid { grid-template-columns: 1fr; }
  .autores-grid { grid-template-columns: 1fr; }
  .libro-footer { flex-direction: column; align-items: flex-start; }
}
