/* ═══════════════════════════════════════════════════════
   MANUAL DE PARTERÍA HOMEOPÁTICA — styles.css
   Paleta: púrpura/lavanda + gris claro, tipografía elegante
   Mobile-first responsive
   ═══════════════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────────────── */
:root {
  --purple:       #7B5EA7;
  --purple-dark:  #5C3F88;
  --purple-deep:  #3D2260;
  --lavender:     #C4AEE0;
  --lavender-lt:  #EDE6F7;
  --soft-bg:      #F2EEF8;
  --grey-light:   #F0EEF3;
  --grey-mid:     #D6D0E0;
  --grey-text:    #9087A0;
  --text:         #2A1F3D;
  --text-body:    #4A3F5C;
  --white:        #FFFFFF;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', system-ui, sans-serif;

  --radius:       6px;
  --radius-lg:    14px;
  --shadow:       0 4px 24px rgba(91, 62, 136, 0.10);
  --shadow-lg:    0 12px 48px rgba(91, 62, 136, 0.18);

  --transition:   0.25s ease;
  --max-w:        1100px;
  --max-narrow:   1200px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--purple); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--purple-dark); }
a:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 2px; }

/* ── Layout helpers ─────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container--narrow { max-width: var(--max-narrow); }

/* ── Label / eyebrow ─────────────────────────────────── */
.label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 0.75rem;
}
.label--light { color: var(--lavender); }

/* ── Section titles ──────────────────────────────────── */
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 2rem;
}

/* ── Section spacing ─────────────────────────────────── */
.section {
  padding: 4rem 0;
}
.section--soft {
  background: var(--soft-bg);
}
.section--form {
  background: var(--lavender-lt);
  padding: 4rem 0 5rem;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-align: center;
  padding: 0.85rem 2rem;
}
.btn--primary {
  background: var(--purple);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(123, 94, 167, 0.35);
}
.btn--primary:hover {
  background: var(--purple-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(92, 63, 136, 0.4);
}
.btn--primary:active { transform: translateY(0); }
.btn--large { padding: 1rem 2.5rem; font-size: 1rem; }
.btn--full { width: 100%; }

/* ══════════════════════════════════════
   SUCCESS BANNER
══════════════════════════════════════ */
.success-banner {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: calc(100% - 2rem);
  max-width: 600px;
  background: var(--white);
  border: 2px solid #5cb85c;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.4s ease;
}
.success-banner[hidden] { display: none; }
.success-banner__inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}
.success-banner__icon {
  font-size: 1.5rem;
  color: #5cb85c;
  flex-shrink: 0;
  line-height: 1;
}
.success-banner__inner strong { font-size: 1.05rem; color: var(--text); }
.success-banner__inner p { font-size: 0.9rem; color: var(--text-body); margin-top: 0.2rem; }
.success-banner__close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--grey-text);
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  padding: 0;
}
.success-banner__close:hover { color: var(--text); }

@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  position: relative;
  background: var(--purple-deep);
  overflow: hidden;
  padding: 4rem 0 3rem;
}
.hero__bg-shape {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(196,174,224,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 10% 80%, rgba(123,94,167,0.3) 0%, transparent 60%);
  pointer-events: none;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  position: relative;
  z-index: 1;
}
.hero__content { display: flex; flex-direction: column; gap: 0.75rem; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--white);
  letter-spacing: 0.02em;
}
.hero__title em {
  font-style: italic;
  color: var(--lavender);
}

.hero__authors {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lavender);
}

.hero__desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
  max-width: 500px;
  margin-top: 0.5rem;
}

.hero__price {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.5rem;
}
.price-tag {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.price-tag__label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lavender);
}
.price-tag__amount {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--white);
}
.price-tag__note {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

.hero__whatsapp {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-top: 0.5rem;
}
.hero__whatsapp a {
  color: var(--lavender);
  text-decoration: underline;
}

/* ══════════════════════════════════════
   BOOK 3D — con imagen real
   Usa CSS transform 3D + perspectiva
   Proporciones reales del libro: 1333×1600 → ratio 0.833
══════════════════════════════════════ */

/* Variables del libro (ajustar si cambia el tamaño) */
.hero__book-wrap {
  --bw: 195px;    /* ancho de tapa */
  --bh: 274px;    /* alto de tapa  (195 / 0.833 × 1.18 aprox) */
  --bs: 28px;     /* grosor del lomo */
  --bp: 6px;      /* canto de páginas */

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem 3rem;
}

.book3d {
  position: relative;
  animation: bookFloat 5s ease-in-out infinite;
  /* Dejar espacio para la sombra */
  padding-bottom: 24px;
}

@keyframes bookFloat {
  0%, 100% { transform: translateY(0px);   }
  50%       { transform: translateY(-12px); }
}

/* Escena con perspectiva 3D */
.book3d__scene {
  position: relative;
  width: var(--bw);
  height: var(--bh);
  transform-style: preserve-3d;
  transform: perspective(700px) rotateY(-28deg) rotateX(4deg);
  filter: drop-shadow(12px 20px 30px rgba(0,0,0,0.55));
}

/* ── TAPA (cara frontal) ─────────────────── */
.book3d__cover {
  position: absolute;
  inset: 0;
  border-radius: 0 3px 3px 0;
  overflow: hidden;
  backface-visibility: hidden;
  /* Gradiente sutil para dar brillo a la tapa */
  background: #f8f8f8;
}

.book3d__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Brillo reflejo sobre la tapa */
.book3d__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.18) 0%,
    rgba(255,255,255,0.06) 40%,
    transparent 60%
  );
  pointer-events: none;
  border-radius: inherit;
}

/* Sombra de encuadernación (borde izquierdo de la tapa) */
.book3d__cover::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0; width: 10px;
  background: linear-gradient(to right, rgba(0,0,0,0.18), transparent);
  z-index: 2;
  pointer-events: none;
}

/* ── LOMO ────────────────────────────────── */
.book3d__spine {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--bs);
  height: var(--bh);
  /* Rotar sobre el borde izquierdo de la tapa */
  transform-origin: left center;
  transform: translateZ(0) rotateY(90deg) translateZ(calc(var(--bs) * -1));
  background: linear-gradient(
    to right,
    #6B4E9A 0%,
    var(--purple) 50%,
    #8B6DB5 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.book3d__spine span {
  font-family: var(--font-body);
  font-size: 0.38rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  overflow: hidden;
  max-height: calc(var(--bh) - 16px);
  text-overflow: ellipsis;
}

/* ── PÁGINAS (canto derecho) ─────────────── */
.book3d__pages {
  position: absolute;
  top: var(--bp);
  right: calc(var(--bp) * -1);
  width: var(--bp);
  height: calc(var(--bh) - var(--bp) * 2);
  background: repeating-linear-gradient(
    to bottom,
    #ece8f2 0px, #ece8f2 1px,
    #f5f2f9 1px, #f5f2f9 3px
  );
  border-radius: 0 2px 2px 0;
  border: 1px solid rgba(0,0,0,0.07);
}

/* ── SOMBRA BAJO EL LIBRO ────────────────── */
.book3d__shadow {
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 18px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.35) 0%, transparent 70%);
  filter: blur(6px);
  transform: scaleX(1.1);
}

/* ══════════════════════════════════════
   STRIP
══════════════════════════════════════ */
.strip {
  background: var(--purple);
  padding: 1rem 0;
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.5rem;
}
.strip__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
}
.strip__item strong {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.strip__item span {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
}
.strip__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  display: none;
}

/* ══════════════════════════════════════
   AUDIENCE GRID
══════════════════════════════════════ */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.audience-card {
  background: var(--white);
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.audience-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.audience-card__icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  display: block;
}
.audience-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--purple-dark);
  margin-bottom: 0.5rem;
}
.audience-card p {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* ══════════════════════════════════════
   CHAPTERS
══════════════════════════════════════ */
.chapters {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.chapter {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--grey-mid);
}
.chapter:last-child { border-bottom: none; }
.chapter__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--lavender);
  line-height: 1;
  flex-shrink: 0;
  min-width: 2.5rem;
}
.chapter h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--purple-dark);
  margin-bottom: 0.4rem;
}
.chapter p {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* ══════════════════════════════════════
   AUTHORS
══════════════════════════════════════ */
.authors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.author-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.author-card__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--purple);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.author-card__body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--purple-dark);
  margin-bottom: 0.5rem;
}
.author-card__body p {
  font-size: 0.88rem;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.author-card__social {
  font-size: 0.82rem;
  color: var(--purple);
  font-weight: 500;
}

/* ══════════════════════════════════════
   TESTIMONIALS
══════════════════════════════════════ */
.testimonials {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.testimonial {
  background: var(--white);
  border-left: 3px solid var(--lavender);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.testimonial p {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.testimonial footer {
  font-size: 0.82rem;
  color: var(--grey-text);
}
.testimonial cite { font-style: normal; }

/* ══════════════════════════════════════
   FAQ
══════════════════════════════════════ */
.faq { display: flex; flex-direction: column; gap: 0; }
.faq__item {
  border-bottom: 1px solid var(--grey-mid);
}
.faq__item:first-child { border-top: 1px solid var(--grey-mid); }
.faq__question {
  font-family: var(--font-body);
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--text);
  padding: 1.1rem 2rem 1.1rem 0;
  cursor: pointer;
  list-style: none;
  position: relative;
  user-select: none;
  transition: color var(--transition);
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--purple);
  font-weight: 300;
  transition: transform var(--transition);
}
.faq__item[open] .faq__question::after {
  content: '–';
}
.faq__item[open] .faq__question { color: var(--purple-dark); }
.faq__answer {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.7;
  padding-bottom: 1.1rem;
}

/* ══════════════════════════════════════
   CTA BAND
══════════════════════════════════════ */
.cta-band {
  background: var(--purple-deep);
  padding: 3.5rem 0;
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.75rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.3;
}
.cta-band p { color: var(--lavender); margin-bottom: 1.5rem; font-size: 0.9rem; }

/* ══════════════════════════════════════
   FORM
══════════════════════════════════════ */
.form-intro {
  font-size: 0.9rem;
  color: var(--text-body);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--grey-mid);
}

.form__row { display: flex; flex-direction: column; gap: 0; }
.form__group { margin-bottom: 1.25rem; }

.form__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.form__label span[aria-hidden="true"] { color: var(--purple); }
.form__optional {
  font-weight: 300;
  color: var(--grey-text);
  font-size: 0.78rem;
}

.form__input {
  display: block;
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form__input::placeholder { color: var(--grey-text); }
.form__input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123,94,167,0.12);
}
.form__input.is-error {
  border-color: #d9534f;
  box-shadow: 0 0 0 3px rgba(217,83,79,0.1);
}
.form__select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237B5EA7' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.5rem; cursor: pointer; }
.form__textarea { resize: vertical; min-height: 80px; }

.form__error {
  display: block;
  font-size: 0.78rem;
  color: #d9534f;
  margin-top: 0.3rem;
  min-height: 1rem;
}

.form__summary {
  background: var(--soft-bg);
  border: 1px solid var(--lavender);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  color: var(--text-body);
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.form__summary strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--purple-dark);
}

.form__server-error {
  background: #fdf0f0;
  border: 1px solid #f5c6c6;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: #d9534f;
  margin-bottom: 1.25rem;
}
.form__server-error[hidden] { display: none; }

.form__secure {
  text-align: center;
  font-size: 0.78rem;
  color: var(--grey-text);
  margin-top: 0.75rem;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
  background: var(--purple-deep);
  color: rgba(255,255,255,0.65);
  padding: 2.5rem 0;
  font-size: 0.85rem;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.footer__title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--white);
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.footer__links a {
  color: var(--lavender);
  font-size: 0.82rem;
}
.footer__links a:hover { color: var(--white); }
.footer__legal {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  margin-top: 0.5rem;
}

/* ══════════════════════════════════════
   RESPONSIVE — TABLET  ≥ 640px
══════════════════════════════════════ */
@media (min-width: 640px) {
  .hero { padding: 5rem 0 4rem; }

  .strip__dot { display: block; }

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

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

  .testimonials { display: grid; grid-template-columns: repeat(2, 1fr); }
  .testimonials .testimonial:last-child { grid-column: span 2; }

  .form__row--2col { flex-direction: row; gap: 1rem; }
  .form__row--2col .form__group { flex: 1; margin-bottom: 0; }
  .form__row { margin-bottom: 1.25rem; }

  .form { padding: 2.5rem; }

  .footer__inner { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; }
}

/* ══════════════════════════════════════
   RESPONSIVE — DESKTOP  ≥ 960px
══════════════════════════════════════ */
@media (min-width: 960px) {
  .hero { padding: 6rem 0 5rem; }
  .hero__grid {
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
  }
  /* Agrandar el libro en desktop */
  .hero__book-wrap {
    --bw: 240px;
    --bh: 338px;
    --bs: 32px;
    --bp: 7px;
    padding: 2rem 1rem 3rem 2rem;
  }

  .section { padding: 5rem 0; }

  .audience-grid { grid-template-columns: repeat(4, 1fr); }

  .testimonials { grid-template-columns: repeat(3, 1fr); }
  .testimonials .testimonial:last-child { grid-column: auto; }

  .strip__inner { gap: 0 3rem; }
  .strip__dot { display: block; }
}

/* ══════════════════════════════════════
   FOTO DE AUTORES
   Placeholder inteligente: muestra SVG si no carga la imagen
══════════════════════════════════════ */
.author-photo-wrap {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  position: relative;
}

.author-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--lavender);
  background: var(--grey-light);
  display: block;
}

/* Placeholder que aparece si la imagen no carga (onerror en HTML) */
.author-photo-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  border: 3px solid var(--lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
}
.author-photo-placeholder span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.05em;
}

/* Cuando NO hay imagen cargada (foto por defecto = placeholder siempre visible) */
.author-card .author-photo-placeholder {
  display: flex; /* visible por defecto hasta que cargue la img */
}
/* Si la img carga bien, onerror no se dispara y el placeholder queda tapado */
.author-photo-wrap .author-photo:not([src=""]):not([src="autor-myrian.jpg"]):not([src="autor-roberto.jpg"]) ~ .author-photo-placeholder {
  display: none;
}

/* Ajuste del card para la foto más grande */
.author-card {
  align-items: flex-start;
}
.author-card__body h3 { margin-top: 0.25rem; }

@media (min-width: 640px) {
  .author-photo-wrap { width: 100px; height: 100px; }
  .author-photo      { width: 100px; height: 100px; }
  .author-photo-placeholder { width: 100px; height: 100px; }
  .author-photo-placeholder span { font-size: 1.6rem; }
}

/* ══════════════════════════════════════
   FORMULARIO — DIRECCIÓN DE ENVÍO
══════════════════════════════════════ */
.form__fieldset {
  border: 1.5px solid var(--lavender);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 0.5rem;
  margin-bottom: 1.25rem;
  background: rgba(196,174,224,0.05);
}
.form__legend {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--purple-dark);
  padding: 0 0.5rem;
}

/* Wrapper input + botón cotizar alineados */
.form__input-btn-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.form__input-btn-wrap .form__input {
  flex: 1;
  min-width: 0;
}

/* Botón "Calcular envío" */
.btn-cotizar {
  flex-shrink: 0;
  padding: 0 0.9rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
  background: var(--lavender-lt);
  color: var(--purple-dark);
  border: 1.5px solid var(--lavender);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  line-height: 1;
}
.btn-cotizar:hover {
  background: var(--lavender);
  border-color: var(--purple);
  color: var(--purple-deep);
}
.btn-cotizar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Resultado del cotizador */
.shipping-result {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}
.shipping-result[hidden] { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.shipping-result__inner {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Estado: cargando */
.shipping-result--loading .shipping-result__inner {
  padding: 0.75rem 1rem;
  background: var(--grey-light);
  color: var(--grey-text);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Estado: error */
.shipping-result--error .shipping-result__inner {
  padding: 0.75rem 1rem;
  background: #fdf0f0;
  border: 1px solid #f5c6c6;
  color: #c0392b;
  border-radius: var(--radius);
}

/* Estado: opciones de envío */
.shipping-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.shipping-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.shipping-option:has(input:checked) {
  border-color: var(--purple);
  background: var(--lavender-lt);
}
.shipping-option input[type=\"radio\"] {
  accent-color: var(--purple);
  width: 16px; height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.shipping-option__info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.shipping-option__name {
  font-weight: 500;
  color: var(--text);
  font-size: 0.88rem;
}
.shipping-option__detail {
  font-size: 0.78rem;
  color: var(--grey-text);
}
.shipping-option__price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--purple-dark);
  white-space: nowrap;
}

/* Resumen con fila de envío */
.form__summary {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem;
}
.form__summary > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.88rem;
  color: var(--text-body);
}
.form__summary-total {
  border-top: 1.5px solid var(--lavender);
  padding-top: 0.5rem;
  margin-top: 0.2rem;
  font-weight: 600;
}
.form__summary-total span { color: var(--text); font-size: 0.95rem; }
.form__summary-total strong {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--purple-dark);
}

/* Nota informativa dentro del cotizador */
.shipping-note {
  font-size: 0.75rem;
  color: var(--grey-text);
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--grey-light);
  border-radius: var(--radius);
  line-height: 1.5;
}
.shipping-note a {
  color: var(--purple);
  text-decoration: underline;
}

/* ══════════════════════════════════════
   DELIVERY TOGGLE — selector de modalidad
══════════════════════════════════════ */
.delivery-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.delivery-toggle__option { cursor: pointer; }
.delivery-toggle__option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.delivery-toggle__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .9rem .5rem;
  border: 2px solid var(--grey-mid);
  border-radius: var(--radius-lg);
  background: var(--white);
  text-align: center;
  transition: border-color var(--transition), background var(--transition),
              box-shadow var(--transition);
  user-select: none;
}
.delivery-toggle__option input:checked ~ .delivery-toggle__box {
  border-color: var(--purple);
  background: var(--lavender-lt);
  box-shadow: 0 0 0 3px rgba(123,94,167,.12);
}
.delivery-toggle__option:hover .delivery-toggle__box {
  border-color: var(--lavender);
}
.delivery-toggle__icon { font-size: 1.5rem; line-height: 1; }
.delivery-toggle__text {
  font-size: .83rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

/* ── Panel animado ──────────────────── */
.delivery-panel {
  animation: panelFadeIn .25s ease;
}
.delivery-panel[hidden] { display: none; }
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── Hint + link cotizador ──────────── */
.delivery-hint {
  font-size: .86rem;
  color: var(--grey-text);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.link-correo {
  color: var(--purple);
  font-weight: 500;
  text-decoration: underline;
  white-space: nowrap;
}
.link-correo:hover { color: var(--purple-dark); }

/* ── Input con prefijo $ ────────────── */
.form__label-hint {
  display: block;
  font-size: .75rem;
  font-weight: 400;
  color: var(--grey-text);
  margin-top: .15rem;
}
.form__input-prefix-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
}
.form__input-prefix-wrap:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123,94,167,.12);
}
.form__input-prefix-wrap.is-error { border-color: #c0392b; }
.form__input-prefix {
  padding: 0 .75rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  color: var(--purple-dark);
  background: var(--lavender-lt);
  border-right: 1.5px solid var(--grey-mid);
  /* Ocupar toda la altura del wrapper sin height:100% */
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.form__input--prefixed {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  flex: 1;
}
.form__input--prefixed:focus { outline: none; }

/* ══════════════════════════════════════
   PICKUP LIST — puntos de retiro
══════════════════════════════════════ */
.pickup-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.pickup-option { cursor: pointer; }
.pickup-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pickup-option__box {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1rem;
  border: 1.5px solid var(--grey-mid);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: border-color var(--transition), background var(--transition),
              box-shadow var(--transition);
}
.pickup-option:hover .pickup-option__box {
  border-color: var(--lavender);
  background: rgba(196,174,224,.05);
}
.pickup-option input:checked ~ .pickup-option__box {
  border-color: var(--purple);
  background: var(--lavender-lt);
  box-shadow: 0 0 0 3px rgba(123,94,167,.12);
}

/* El círculo de radio custom */
.pickup-option__radio-dot {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--grey-mid);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}
.pickup-option input:checked ~ .pickup-option__box .pickup-option__radio-dot {
  border-color: var(--purple);
  background: var(--purple);
  box-shadow: inset 0 0 0 3px var(--white);
}

/* Texto del punto */
.pickup-option__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.pickup-option__name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}
.pickup-option__address {
  font-size: .8rem;
  color: var(--grey-text);
}
.pickup-option__hours {
  font-size: .75rem;
  color: var(--purple);
  font-weight: 500;
}

/* Badge "Sin costo" */
.pickup-option__badge {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #2e7d32;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 999px;
  padding: .2rem .55rem;
  white-space: nowrap;
}

/* ══════════════════════════════════════
   ENVÍO DESHABILITADO — pre-venta
══════════════════════════════════════ */

/* Cartel de aviso WhatsApp */
.shipping-disabled-notice {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  margin-bottom: 1rem;
  background: #fff8e1;
  border: 1.5px solid #ffe082;
  border-radius: var(--radius-lg);
  font-size: .875rem;
  line-height: 1.45;
}
.shipping-disabled-notice__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.shipping-disabled-notice strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: .2rem;
}
.shipping-disabled-notice__link {
  color: #25d366;
  font-weight: 600;
  text-decoration: none;
}
.shipping-disabled-notice__link:hover {
  text-decoration: underline;
}

/* Fieldset deshabilitado */
.form__fieldset--disabled {
  opacity: .45;
  pointer-events: none;
  user-select: none;
  background: var(--grey-lt, #f5f5f5);
  border-color: var(--grey-mid) !important;
  filter: grayscale(0.3);
}
.form__fieldset--disabled .form__input {
  background: #ebebeb;
  color: var(--grey-text);
  cursor: not-allowed;
}

/* Tag "Disponible al lanzamiento" en la legend */
.form__legend-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #795548;
  background: #efebe9;
  border: 1px solid #d7ccc8;
  border-radius: 999px;
  padding: .15rem .5rem;
  margin-left: .5rem;
  vertical-align: middle;
}

/* Opciones del toggle en modo deshabilitado */
.delivery-toggle--disabled {
  pointer-events: none;
}
.delivery-toggle--disabled .delivery-toggle__box {
  border-color: var(--grey-mid);
  background: #ebebeb;
  color: var(--grey-text);
  cursor: not-allowed;
}

/* Fila de envío en el resumen — estilo nota */
.form__summary-shipping-note {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .83rem;
  color: var(--grey-text);
  font-style: italic;
}

/* ── Opción de toggle deshabilitada (solo domicilio) ── */
.delivery-toggle__option--disabled {
  cursor: not-allowed;
  opacity: .45;
  filter: grayscale(0.4);
}
.delivery-toggle__option--disabled .delivery-toggle__box {
  border-color: var(--grey-mid);
  background: #ebebeb;
  color: var(--grey-text);
  flex-direction: column;
  align-items: center;
}

/* Tag "Próximamente" dentro del botón deshabilitado */
.delivery-toggle__soon {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #795548;
  background: #efebe9;
  border: 1px solid #d7ccc8;
  border-radius: 999px;
  padding: .1rem .45rem;
  margin-top: .1rem;
}

.delivery-toggle__available {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #2e7d32;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 999px;
  padding: .1rem .45rem;
  margin-top: .1rem;
}