/* Presentación editorial de los libros. Tokens compartidos de premium.css. */
body[data-page-type="book"] { --book-accent: var(--sage); --book-on-accent: var(--on-sage); }
body:has(.hero-stock) { --book-accent: var(--amber); --book-on-accent: var(--on-amber); }
body[data-page-type="book"] .hero { padding: 136px 0 64px; background: var(--bg); min-height: 0; }
body[data-page-type="book"] .hero-content { display: grid; grid-template-columns: minmax(0,1fr); gap: 40px; align-items: center; }
body[data-page-type="book"] .hero-text { min-width: 0; text-align: left; }
body[data-page-type="book"] .hero h1 { font-size: clamp(40px,4.2vw,60px); line-height: 0.98; margin: 24px 0; max-width: 850px; }
body[data-page-type="book"] .hero h1 span { color: var(--book-accent) !important; }
body[data-page-type="book"] .subtitle { font-size: 17px; line-height: 1.6; max-width: 620px; color: var(--muted); margin-bottom: 24px; }
body[data-page-type="book"] .badge { color: var(--book-accent) !important; font-weight: 500; }
body[data-page-type="book"] .hero-visual { width: 100%; min-width: 0; display: grid; place-items: center; padding: 32px; background: var(--book-accent); border-radius: 80px 28px 80px 6px; }
body[data-page-type="book"] .book-3d-wrapper { width: min(100%,280px); margin: 0; perspective: none; animation: none !important; }
body[data-page-type="book"] .book-3d-wrapper::before, body[data-page-type="book"] .book-3d-wrapper::after { display: none; }
body[data-page-type="book"] .book-cover-img { display: block; width: 100%; max-width: none; height: auto; max-height: 460px; object-fit: contain; border-radius: 0 !important; border: 0; filter: none; }
body[data-page-type="book"] .cta-wrapper { align-items: flex-start; }
body[data-page-type="book"] .guarantee { max-width: 520px; color: var(--muted); font-size: 13px; opacity: 1; }
body[data-page-type="book"] main > section { padding-top: 64px !important; padding-bottom: 64px !important; }
body[data-page-type="book"] .section-header { text-align: left !important; max-width: 760px !important; margin: 0 0 40px !important; }
body[data-page-type="book"] .section-header h2 { margin-top: 16px; }
body[data-page-type="book"] .section-header + .fade-in-up { max-width: none !important; }
body[data-page-type="book"] .problem-stat-card { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 24px 0; margin: 0; gap: 24px; }
body[data-page-type="book"] .problem-number { font-size: 48px; font-weight: 800; color: var(--muted) !important; min-width: 48px; text-align: left; }
body[data-page-type="book"] .problem-stat-card strong { font-size: 20px; line-height: 1.2; margin-bottom: 8px; }
body[data-page-type="book"] .problem-stat-card p { font-size: 17px; line-height: 1.6; }
body[data-page-type="book"] :is(.warning-box,.warning-box-dark,.time-impact) { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--botica-radius-feature); padding: 24px; }
body[data-page-type="book"] :is(.warning-box,.warning-box-dark,.time-impact) > i { display: none; }
body[data-page-type="book"] :is(.metrics-grid,.kpi-preview-grid) { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 16px; }
body[data-page-type="book"] :is(.metric-card,.kpi-preview-card) { min-width: 0; padding: 24px; text-align: left; border: 1px solid var(--line); }
body[data-page-type="book"] :is(.metric-card,.kpi-preview-card):first-child { grid-column: 1 / -1; background: var(--book-accent) !important; color: var(--book-on-accent); border: 0; border-radius: var(--botica-radius-feature) !important; }
body[data-page-type="book"] :is(.m-value,.kpi-value) { color: var(--book-accent) !important; font-size: clamp(36px,5vw,56px); line-height: 1; margin: 16px 0; overflow-wrap: anywhere; }
body[data-page-type="book"] :is(.m-name,.kpi-name) { font-size: 13px; font-weight: 500; color: var(--muted); }
body[data-page-type="book"] :is(.m-label,.kpi-label) { font-size: 14px; color: var(--muted); line-height: 1.5; }
body[data-page-type="book"] :is(.metric-card,.kpi-preview-card):first-child :is(.m-name,.m-value,.m-label,.kpi-name,.kpi-value,.kpi-label) { color: var(--book-on-accent) !important; }
body[data-page-type="book"] :is(.vm-two-col,.about-grid) { display: grid; grid-template-columns: minmax(0,1fr); gap: 32px !important; }
body[data-page-type="book"] .chapter-list li { padding: 24px 0; gap: 24px; border-color: var(--line); font-size: 17px; }
body[data-page-type="book"] .chapter-num { background: none; border: 0; padding: 0; color: var(--muted); font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; min-width: 56px; }
body[data-page-type="book"] .chapter-list strong { font-size: 20px; line-height: 1.2; margin-bottom: 8px; }
body[data-page-type="book"] .quote-pull { background: var(--book-accent); color: var(--book-on-accent); border: 0; border-radius: 48px 28px 6px 28px; padding: 32px; margin: 0 0 24px; font-size: clamp(28px,3vw,40px); line-height: 1.1; font-weight: 800; font-style: normal; letter-spacing: -0.04em; }
body[data-page-type="book"] .quote-pull cite { color: var(--book-on-accent); font-size: 14px; font-weight: 500; letter-spacing: 0; margin-top: 24px; }
body[data-page-type="book"] .benefits-list { padding: 0; }
body[data-page-type="book"] .benefits-list li { padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 17px; line-height: 1.6; }
body[data-page-type="book"] .benefits-list li i { display: none; }
body[data-page-type="book"] .comparison-table { table-layout: fixed; border-collapse: collapse; width: 100%; }
body[data-page-type="book"] .comparison-table :is(th,td) { padding: 16px 8px; border-color: var(--line); font-size: 13px; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
body[data-page-type="book"] .comparison-table th { background: var(--card); color: var(--text); }
body[data-page-type="book"] .comparison-table :is(.th-good,.green-header) { background: var(--book-accent) !important; color: var(--book-on-accent) !important; }
body[data-page-type="book"] .comparison-table .th-bad { color: var(--amber) !important; }
body[data-page-type="book"] .comparison-table td:last-child { color: var(--book-accent); }
body[data-page-type="book"] .summary-band { background: var(--card); border-color: var(--line); }
body[data-page-type="book"] .summary-band-inner { max-width: none; margin: 0; text-align: left; }
body[data-page-type="book"] .summary-band-inner h2 { font-size: var(--botica-h2); max-width: 700px; }
body[data-page-type="book"] .summary-form-wrap { justify-content: flex-start; gap: 16px; }
body[data-page-type="book"] .summary-input { min-width: 0; width: 100%; max-width: 400px; }
body[data-page-type="book"] .summary-privacy { color: var(--muted); opacity: 1; }
body[data-page-type="book"] .author-photo-wrapper { max-width: 340px; margin: 0; }
body[data-page-type="book"] .author-photo { border-radius: 64px 28px 64px 6px !important; width: 100%; filter: grayscale(1); }
body[data-page-type="book"] .author-badge { display: none; }
body[data-page-type="book"] .about-text p { font-size: 17px; line-height: 1.6; color: var(--muted); }
body[data-page-type="book"] .cta-band { background: var(--card); border-color: var(--line); text-align: left; }
body[data-page-type="book"] .cta-band :is(h2,p) { margin-left: 0; margin-right: 0; }
@media (min-width: 900px) {
    body[data-page-type="book"] .hero { padding: 160px 0 96px; }
    body[data-page-type="book"] .hero-content { grid-template-columns: minmax(0,1.25fr) minmax(0,.75fr); gap: 64px; }
    body[data-page-type="book"] .hero-visual { padding: 48px 32px; min-height: 520px; }
    body[data-page-type="book"] main > section { padding-top: 96px !important; padding-bottom: 96px !important; }
    body[data-page-type="book"] :is(.metrics-grid,.kpi-preview-grid) { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr) minmax(0,1fr) !important; }
    body[data-page-type="book"] :is(.metric-card,.kpi-preview-card):first-child { grid-column: auto; grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
    body[data-page-type="book"] :is(.metric-card,.kpi-preview-card):last-child { grid-column: 2 / -1; }
    body[data-page-type="book"] .vm-two-col { grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); }
    body[data-page-type="book"] .about-grid { grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); }
    body[data-page-type="book"] .comparison-table :is(th,td) { padding: 24px; font-size: 17px; }
}
@media (max-width: 480px) {
    body[data-page-type="book"] :is(.metric-card,.kpi-preview-card) { padding: 20px; }
    body[data-page-type="book"] .summary-form-wrap .btn { width: 100%; }
}

body[data-page-type="book"] .solution-section > .section-padding { padding-top: 0 !important; padding-bottom: 0 !important; }
body[data-page-type="book"] :is(.m-value,.kpi-value) { font-weight: 800 !important; }

body[data-page-type="book"] .comparison-table :is(th,td):first-child { width: 30% !important; }
body[data-page-type="book"] .comparison-table :is(th,td) { overflow-wrap: normal; }
body[data-page-type="book"] :is(.warning-box,.warning-box-dark,.time-impact) i { display: none; }

/* Mockup sin alterar las portadas: 200 páginas frente a 100, grosor aproximado. */
.botica-book-stage { --book-depth: 18px; perspective: 1400px; width: min(100%,300px); padding: 20px 8px; margin: 0; }
.hero-stock .botica-book-stage, .ed-book:nth-child(2) .botica-book-stage { --book-depth: 9px; }
.book-object { position: relative; width: 100%; transform-style: preserve-3d; transform: rotateY(16deg); transition: transform 650ms cubic-bezier(.2,.8,.2,1); transform-origin: center center; }
.book-object img { display: block; width: 100% !important; height: auto !important; max-height: none !important; object-fit: contain; border: 0; border-radius: 0; transform: translateZ(calc(var(--book-depth) / 2)) !important; }
.book-spine { position: absolute; left: 0; top: 0; height: 100%; width: var(--book-depth); background: var(--bg); border: 1px solid var(--line); transform-origin: left center; transform: translateZ(calc(var(--book-depth) / -2)) rotateY(-90deg); }
.book-pages { position: absolute; left: 1px; top: 1px; width: calc(100% - 2px); height: calc(var(--book-depth) - 2px); background: var(--cream); transform-origin: center top; transform: translateZ(calc(var(--book-depth) / -2 + 1px)) rotateX(90deg); display: flex; flex-direction: column; justify-content: space-evenly; }
.book-pages i { display: block; width: 100%; border-top: 1px solid var(--on-cream); opacity: .25; }
body[data-page-type="book"] .book-3d-wrapper { width: min(100%,300px); }
body[data-page-type="book"] .hero-visual { overflow: visible; }
#libros .ed-book { overflow: visible; }
#libros .botica-book-stage { width: min(100%,270px); margin: 0 auto; }
#libros .ed-book .book-object img { width: 100% !important; height: auto !important; object-position: center; }
@media (max-width: 480px) { .botica-book-stage { --book-depth: 14px; } .hero-stock .botica-book-stage, .ed-book:nth-child(2) .botica-book-stage { --book-depth: 7px; } }
@media (prefers-reduced-motion: reduce) { .book-object, .book-object img { animation: none !important; transition: none !important; } }

@media (min-width: 800px) { #libros .botica-book-stage { height: 480px; display: grid; align-items: center; } }

/* Presentación editorial: ejemplares verticales y texto en paralelo. */
#libros .ed-books { grid-template-columns: minmax(0,1fr) !important; gap: 24px; }
#libros .ed-book { align-items: center; gap: 32px; }
#libros .botica-book-stage { width: min(100%,250px); height: auto; padding: 24px 8px; }
#libros .ed-book h3 { font-size: clamp(32px,4vw,48px); max-width: 640px; }
#libros .ed-book p { max-width: 580px; }
@media (min-width: 800px) {
    #libros .ed-book { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); padding: 48px; gap: 56px; }
    #libros .botica-book-stage { width: min(100%,280px); }
    #libros .ed-book:nth-child(2) { grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); }
    #libros .ed-book:nth-child(2) .botica-book-stage { grid-column: 2; grid-row: 1; }
    #libros .ed-book:nth-child(2) > div:last-child { grid-column: 1; grid-row: 1; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .botica-book-stage:hover .book-object { transform: rotateY(22deg); }
}
@media (prefers-reduced-motion: reduce) { .book-object { transition: none !important; animation: none !important; } }
