:root {
  --rosa: #e8748a;
  --rosa-claro: #f2a4b2;
  --rosa-palido: #fce8ed;
  --rosa-oscuro: #b84d62;
  --amatista: #7b2cbf;
  --amatista-claro: #a663d1;
  --amatista-oscuro: #4a1480;
  --amatista-palido: #ede0f7;
  --blanco: #fff8f9;
  --texto: #2d1a24;
  --texto-suave: #6b3d4f;
  --sombra-md: 0 12px 40px rgba(74, 20, 128, 0.12);
  --radio: 16px;
  --radio-lg: 24px;
  --nav-h: 68px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Jost', sans-serif;
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a:focus-visible { outline: 2px solid var(--amatista); outline-offset: 3px; }

.container { width: min(1000px, calc(100% - 2rem)); margin-inline: auto; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255, 248, 249, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(123, 44, 191, 0.08);
}

.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  width: min(1000px, calc(100% - 2rem)); margin-inline: auto;
}

.nav__logo img { height: 40px; }

.nav__back {
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--amatista-oscuro); text-decoration: none;
  transition: color 0.2s;
}

.nav__back:hover { color: var(--amatista); }

/* DETAIL LAYOUT */
.detail { padding: 3rem 0 4rem; }

.detail__grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.detail__cover-col {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.book-cover {
  width: 100%; max-width: 260px;
  aspect-ratio: 2 / 3;
  margin: 0 auto 1.5rem;
  border-radius: 4px 18px 18px 4px;
  box-shadow: var(--sombra-md);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; padding: 1.5rem;
  color: var(--blanco);
  border-left: 6px solid rgba(255,255,255,0.25);
}

.book-cover__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem; font-weight: 600;
  line-height: 1.25; margin-bottom: 0.85rem;
}

.book-cover__cat {
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(255,255,255,0.2);
  padding: 0.3rem 0.75rem; border-radius: 999px;
}

.detail__price-box {
  text-align: center;
  padding: 1.25rem;
  background: var(--amatista-palido);
  border-radius: var(--radio);
}

.detail__price {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 600;
  color: var(--amatista-oscuro);
  line-height: 1;
}

.detail__format {
  font-size: 0.75rem; color: var(--texto-suave);
  margin-top: 0.35rem; display: block;
}

/* CONTENT */
.detail__category {
  display: inline-block;
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amatista);
  background: var(--amatista-palido);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.detail__content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  color: var(--amatista-oscuro);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.detail__author {
  font-size: 0.9rem; color: var(--texto-suave);
  margin-bottom: 1.75rem;
}

.detail__intro p {
  font-size: 1.05rem; color: var(--texto-suave);
  line-height: 1.8; margin-bottom: 0.5rem;
}

.detail__block {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(123, 44, 191, 0.1);
}

.detail__block h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem; font-weight: 500;
  color: var(--amatista-oscuro);
  margin-bottom: 1rem;
}

.detail__list {
  list-style: none;
  display: flex; flex-direction: column; gap: 0.55rem;
}

.detail__list li {
  display: flex; align-items: flex-start; gap: 0.65rem;
  font-size: 0.92rem; color: var(--texto-suave);
  line-height: 1.55;
}

.detail__list li::before {
  content: '✦';
  color: var(--amatista-claro);
  font-size: 0.55rem;
  margin-top: 0.45rem;
  flex-shrink: 0;
}

.detail__specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.detail__specs div {
  background: var(--rosa-palido);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.detail__specs dt {
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amatista-claro);
  margin-bottom: 0.25rem;
}

.detail__specs dd {
  font-size: 0.88rem; color: var(--texto);
}

.detail__cta {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(123, 44, 191, 0.1);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; padding: 1rem 2rem;
  border-radius: 999px; border: 1.5px solid transparent;
  transition: all 0.25s var(--ease);
}

.btn--whatsapp {
  background: #25D366; color: #fff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn--whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--amatista-oscuro);
  border-color: rgba(74, 20, 128, 0.25);
}

.btn--outline:hover {
  border-color: var(--amatista);
  color: var(--amatista);
}

/* RELATED */
.related {
  background: var(--rosa-palido);
  padding: 3.5rem 0;
}

.related__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 400;
  color: var(--amatista-oscuro);
  text-align: center;
  margin-bottom: 1.75rem;
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 520px;
  margin: 0 auto;
}

.related-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  text-decoration: none;
  padding: 1.25rem;
  background: var(--blanco);
  border-radius: var(--radio);
  border: 1px solid rgba(123, 44, 191, 0.1);
  transition: transform 0.25s, box-shadow 0.25s;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-md);
}

.related-card__cover {
  width: 70px; height: 100px;
  border-radius: 3px 10px 10px 3px;
  box-shadow: 3px 4px 12px rgba(0,0,0,0.15);
}

.related-card span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  color: var(--amatista-oscuro);
  text-align: center;
  line-height: 1.3;
}

/* FOOTER */
.footer {
  background: #140a10;
  color: rgba(255,248,249,0.5);
  text-align: center;
  padding: 1.75rem;
  font-size: 0.78rem;
}

.footer a { color: var(--rosa-claro); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* REVEAL */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
  .detail__grid { grid-template-columns: 1fr; gap: 2rem; }
  .detail__cover-col { position: static; }
  .book-cover { max-width: 200px; }
  .detail__specs { grid-template-columns: 1fr; }
  .detail__cta { flex-direction: column; }
  .detail__cta .btn { width: 100%; }
  .related__grid { grid-template-columns: 1fr; max-width: 280px; }
}
