:root {
  --font-main: "EB Garamond", serif;
  --font-ui: "Noto Sans", sans-serif;
  --font-display: "Playfair Display", serif;
  --color-gold: #c5a059;
  --color-gold-dark: #b08d4a;
  --color-bluedark: #2c3e50;
  --color-light: #fdfaf6;
  --color-text: #2a2a2a;
  --header-height: 70px;

  --color-instagram: #e4405f;
  --color-twitter: #000000;
  --color-facebook: #1877f2;
  --color-tiktok: #010101;
  --color-glyph: #888888;
  --color-amazon: #ff9900;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-light);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background-color: rgba(253, 250, 246, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  height: var(--header-height);
  display: flex;
  align-items: center;
}
.header__container {
  width: 95%;
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header__logo {
  font-family: var(--font-main);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  text-decoration: none;
  color: var(--color-bluedark);
}
.header__logo span {
  color: var(--color-bluedark);
}

.header__back {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-bluedark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
}
.header__back:hover {
  color: var(--color-gold);
}

/* HERO */
.buy-hero {
  padding: clamp(4rem, 8vh, 7rem) 1.5rem clamp(3rem, 5vh, 5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.buy-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 50% at 50% 0%,
    rgba(197, 160, 89, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.buy-hero__tag {
  display: inline-block;
  background-color: rgba(197, 160, 89, 0.1);
  color: var(--color-gold-dark);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(197, 160, 89, 0.2);
  animation: fade-up 0.6s cubic-bezier(0.2, 1, 0.3, 1) both;
}

.buy-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--color-bluedark);
  font-style: italic;
  line-height: 1.1;
  margin-bottom: 1rem;
  animation: fade-up 0.6s cubic-bezier(0.2, 1, 0.3, 1) 0.1s both;
}

.buy-hero__sub {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: #666;
  font-style: italic;
  animation: fade-up 0.6s cubic-bezier(0.2, 1, 0.3, 1) 0.2s both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SECCIÓN PRINCIPAL */
.buy-main {
  flex: 1;
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: clamp(5rem, 10vh, 8rem);
}

/* PORTADA + COLUMNAS */
.buy-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: start;
  margin-bottom: 5rem;
}
@media (min-width: 900px) {
  .buy-layout {
    grid-template-columns: 320px 1fr;
    gap: 5rem;
  }
}

/* Portada */
.buy-cover {
  position: relative;
}
@media (min-width: 900px) {
  .buy-cover {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
  }
}

.buy-cover__img-wrap {
  perspective: 1500px;
  display: flex;
  justify-content: center;
}
.buy-cover__img {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 12px 12px 12px 12px;
  box-shadow: 25px 25px 60px rgba(0, 0, 0, 0.2);
  transform: rotateY(-10deg);
  transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
  animation: fade-up 0.8s cubic-bezier(0.2, 1, 0.3, 1) 0.3s both;
}
.buy-cover__img:hover {
  transform: rotateY(-3deg) scale(1.02);
}

/* Datos del libro */
.book-meta {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: center;
}
.book-meta__item {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.book-meta__item i {
  color: var(--color-gold);
  font-size: 0.75rem;
}

/* Columna derecha */
.buy-options {
  animation: fade-up 0.7s cubic-bezier(0.2, 1, 0.3, 1) 0.2s both;
}

.buy-options__intro {
  margin-bottom: 2.5rem;
}
.buy-options__intro h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--color-bluedark);
  margin-bottom: 0.8rem;
  font-style: italic;
}
.buy-options__intro p {
  font-size: 1.15rem;
  color: #666;
  line-height: 1.7;
}

/* Tabs de formato */
.format-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 0;
}
.format-tab {
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaa;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s ease;
}
.format-tab.active {
  color: var(--color-bluedark);
  border-bottom-color: var(--color-gold);
}
.format-tab:hover {
  color: var(--color-gold);
}

/* Panel de tiendas */
.stores-panel {
  display: none;
}
.stores-panel.active {
  display: block;
}

/* Tarjeta de tienda */
.store-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.8rem;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 1rem;
  text-decoration: none;
  background: white;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  gap: 1rem;
}
.store-card:hover {
  border-color: var(--color-gold);
  transform: translateX(6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.store-card__left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.store-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: #f0f0f0;
}

.store-card__book-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  border-radius: 10px;
}

.store-card:hover .store-card__book-img {
  transform: scale(1.1);
}

.store-card__name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-bluedark);
  display: block;
  margin-bottom: 0.2rem;
}
.store-card__desc {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: #999;
}

.store-card__arrow {
  color: var(--color-gold);
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.store-card:hover .store-card__arrow {
  transform: translateX(4px);
}

/* SECCIÓN MUESTRA GRATUITA */
.free-sample {
  background: var(--color-bluedark);
  border-radius: 20px;
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 5rem;
}
.free-sample::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    rgba(197, 160, 89, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.free-sample__content {
  position: relative;
  z-index: 1;
}
.free-sample__icon {
  font-size: 2.5rem;
  color: var(--color-gold);
  margin-bottom: 1rem;
}
.free-sample h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-style: italic;
  margin-bottom: 1rem;
}
.free-sample p {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.btn-gold {
  background: var(--color-gold);
  color: white;
  padding: 1.1rem 2.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  cursor: pointer;
}
.btn-gold:hover {
  background: var(--color-gold-dark);
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(197, 160, 89, 0.4);
}

/* RESEÑAS / SOCIAL PROOF */
.reviews {
  margin-bottom: 5rem;
}
.reviews__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--color-bluedark);
  text-align: center;
  font-style: italic;
  margin-bottom: 2.5rem;
}
.reviews__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .reviews__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .reviews__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.review-card {
  background: white;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 2rem;
  position: relative;
}
.review-card__stars {
  color: var(--color-gold);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}
.review-card__text {
  font-style: italic;
  font-size: 1.05rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.review-card__author {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.review-card__quote {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: rgba(197, 160, 89, 0.15);
  font-family: Georgia, serif;
  line-height: 1;
}

/* 10. FOOTER */
.footer {
  margin-top: auto;
  padding: clamp(4rem, 8vh, 6rem) 1.5rem;
  background-color: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
  scroll-margin-top: var(--header-height);
}

/* Newsletter block */
.footer__newsletter {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer__newsletter-title {
  font-family: var(--font-main);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--color-bluedark);
}

.footer__newsletter-text {
  font-family: var(--font-main);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #666;
  max-width: 500px;
  line-height: 1.6;
}

.footer__newsletter-action {
  margin-top: 0.5rem;
}

/* Redes sociales */
.footer__social-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer__social-link {
  font-size: 1.8rem;
  color: var(--color-glyph);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  display: inline-block;
  padding: 0.5rem;
}
.footer__social-link--instagram:hover {
  color: var(--color-instagram);
  transform: translateY(-5px);
}
.footer__social-link--twitter:hover {
  color: var(--color-twitter);
  transform: translateY(-5px);
}
.footer__social-link--facebook:hover {
  color: var(--color-facebook);
  transform: translateY(-5px);
}
.footer__social-link--tiktok:hover {
  color: var(--color-tiktok);
  transform: translateY(-5px);
}
.footer__social-link--amazon:hover {
  color: var(--color-amazon);
  transform: translateY(-3px);
}

/* Email */
.footer__email {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--color-bluedark);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-ui);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  transition: color 0.3s ease;
  position: relative;
}
.footer__email::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.footer__email:hover {
  color: var(--color-gold);
}
.footer__email:hover::after {
  transform: scaleX(1);
}

/* Copy */
.footer__copy {
  font-size: 0.85rem;
  color: #777;
  letter-spacing: 0.5px;
  margin-bottom: 0.8rem;
  font-family: var(--font-main);
}

/* 11. BOTONES */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-gold);
  color: white;
  padding: 1.2rem 2.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
  text-align: center;
}
.btn-cta:hover {
  background-color: var(--color-gold-dark);
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(197, 160, 89, 0.35);
}
.btn-cta:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 5px 10px rgba(197, 160, 89, 0.2);
}

/* 12. FOMO TAG */
.fomo-tag {
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #555;
  font-family: var(--font-main);
  background-color: rgba(0, 0, 0, 0.03);
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.fomo-tag i {
  color: #27ae60;
  margin-right: 8px;
  font-size: 0.9rem;
  animation: pulse-icon 2s infinite;
}
@keyframes pulse-icon {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.footer__credit {
  font-size: 0.75rem;
  color: #bbb;
  font-family: var(--font-ui);
  margin-top: 1.5rem;
  letter-spacing: 0.3px;
}

.footer__credit-link {
  color: var(--color-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer__credit-link:hover {
  color: var(--color-gold-dark);
}

/* MODAL — Estructura */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

.modal--active {
  opacity: 1;
  visibility: visible;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

/* MODAL — Contenido (extraído del style inline) */
.modal__content {
  position: relative;
  background: var(--color-light);
  padding: 4rem;
  max-width: 550px;
  width: 90%;
  border-radius: 20px;
  text-align: center;
  z-index: 1;
}

/* MODAL — Botón de cierre (extraído del style inline) */
.modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
  border: none;
  background: none;
  line-height: 1;
  color: var(--color-text);
  transition: color 0.3s ease;
}

.modal__close:hover {
  color: var(--color-gold);
}

/* MODAL — Título (extraído del style inline) */
.modal__title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--color-bluedark);
  font-style: italic;
}

/* MODAL — Descripción (extraído del style inline) */
.modal__description {
  font-size: 1.3rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* MODAL — Formulario (extraído del style inline) */
.modal__form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* MODAL — Input (extraído del style inline) */
.modal__input {
  width: 100%;
  padding: 1.2rem;
  border: 2px solid #eee;
  border-radius: 8px;
  outline: none;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.modal__input:focus {
  border-color: var(--color-gold);
}

/* MODAL — Botón de envío (extraído del style inline) */
.modal__submit {
  width: 100%;
  background: var(--color-gold);
  color: white;
  padding: 1.2rem 2.5rem;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal__submit:hover {
  background: var(--color-gold-dark);
  transform: translateY(-3px);
}
