/* Catálogo editorial · 20-X-2026 FkP */
.fp-catalog,.fp-home-hero,.fp-home-note{--fp-ink:#172c48;--fp-blue:#245b8e;--fp-muted:#526277;color:var(--fp-ink);box-sizing:border-box}
.fp-catalog *,.fp-home-hero *,.fp-home-note *{box-sizing:border-box}
.fp-home-hero{padding:clamp(18px,2vw,24px) clamp(20px,5vw,60px);background:linear-gradient(120deg,#edf3f8,#f7f5ef);border:1px solid #dde5ed;border-radius:12px;margin:4px 0 24px}
.fp-eyebrow{font-size:12px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;color:#476580;margin:0 0 14px}
.fp-home-hero h1{font-size:clamp(28px,3vw,46px);line-height:1.15;color:var(--fp-ink);font-weight:700;margin:0 0 12px;padding:0;max-width:none}
.fp-home-hero>p:not(.fp-eyebrow){font-size:18px;line-height:1.65;max-width:none;margin:0 0 16px}
.fp-hero-actions,.fp-book-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
a.fp-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #bacbd9;padding:10px 17px;border-radius:5px;color:#214f77;background:#fff;font-size:14px;line-height:1.45;font-weight:600;text-decoration:none;min-height:42px;transition:background-color .12s ease,color .12s ease,border-color .12s ease,box-shadow .12s ease}
a.fp-button--primary{background:#245b8e;border-color:#245b8e;color:white}
a.fp-button:hover,a.fp-button:focus-visible{background:#103c64;border-color:#103c64;color:#fff;text-decoration:none;box-shadow:0 0 0 3px #245b8e33,0 4px 9px #172c4833}
a.fp-button--primary:hover,a.fp-button--primary:focus-visible{background:#0b2d4e;border-color:#0b2d4e;color:#ffeb83}
a.fp-button:active,a.fp-button.fp-button--primary:active{background:#071e35;border-color:#071e35;color:#fff;box-shadow:inset 0 3px 6px #0006}
a.fp-button:focus-visible,.fp-catalog a:focus-visible{outline:3px solid #cc962f;outline-offset:3px}
.fp-section-heading{margin:0 0 18px}.fp-section-heading h2,.fp-home-note h2{font-size:25px;color:var(--fp-ink);padding:0;margin:0 0 6px}
.fp-section-heading p,.fp-catalog-heading p,.fp-home-note p{color:var(--fp-muted);font-size:16px;line-height:1.7}
.fp-books-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-bottom:36px}
.fp-book-card{display:grid;grid-template-columns:180px minmax(0,1fr);align-content:start;gap:18px 16px;padding:20px 12px;border:1px solid #dde5ed;border-radius:10px;background:white;min-width:0;align-items:flex-start}
.fp-book-card__cover{display:block;text-decoration:none!important;width:180px;max-width:100%}
.fp-book-cover{display:block;width:100%;height:auto;max-height:470px;object-fit:contain;box-shadow:3px 5px 12px #172c4826;margin:0!important}
.fp-book-card__body{min-width:0;flex:1}.fp-book-card h2{font-size:22px;font-weight:700;line-height:1.3;grid-column:1 / -1;text-align:center;width:100%;margin:0;padding:0}.fp-book-card h2 a{color:var(--fp-ink);text-decoration:none}.fp-book-card h2 a:hover{text-decoration:underline}
.fp-book-card__body>p{font-size:15px;line-height:1.6}.fp-book-edition{font-size:14px!important;color:var(--fp-muted);margin-bottom:12px}
.fp-book-badge{display:inline-block;font-size:12px;line-height:1.5;font-weight:700;padding:3px 9px;border-radius:4px;background:#e9f3ee;color:#246244}
.fp-book-badge--presale{background:#fff0d4;color:#7b510d}
.fp-book-status{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.fp-book-date{font-size:12px!important;color:#7b510d;margin:0!important;flex:1 1 180px}.fp-book-price{font-size:21px!important;font-weight:700;margin:10px 0!important}.fp-book-price small{display:block;font-size:12px;font-weight:400;color:var(--fp-muted)}
.fp-cover-placeholder{aspect-ratio:3/4;display:flex;flex-direction:column;justify-content:space-between;padding:16px;color:#fff;background:linear-gradient(150deg,#163b60,#267da0);box-shadow:3px 5px 12px #172c4826;border-left:6px solid #0f2b49}
.fp-cover-placeholder span{font-size:10px;line-height:1.4}.fp-cover-placeholder strong{font-size:21px;line-height:1.25;color:white}.fp-cover-placeholder small{font-size:10px;line-height:1.5;color:#deebf3}
.fp-home-note{padding:4.5px 30px;background:#f5f7fa;border-left:3px solid #245b8e;margin:12px 0 24px}.fp-home-note p{margin:0}
.fp-catalog-heading{margin:10px 0 30px}.fp-catalog h1{font-size:36px;line-height:1.2;color:var(--fp-ink);padding:0;margin:0 0 18px}.fp-intro{font-size:17px;line-height:1.65;margin-bottom:25px}
.fp-book-detail{display:grid;grid-template-columns:minmax(180px,300px) minmax(0,1fr);gap:24px 48px;margin:15px 0 36px}.fp-book-detail__cover{padding-top:0}.fp-book-detail .fp-cover-placeholder{max-width:300px}.fp-book-detail .fp-cover-placeholder strong{font-size:36px}.fp-book-detail .fp-cover-placeholder span,.fp-book-detail .fp-cover-placeholder small{font-size:14px}
.fp-back-link{display:block;font-size:13px;color:#245b8e;margin-bottom:22px}.fp-book-detail h1.fp-book-detail__title{grid-column:1 / -1;text-align:center;width:100%;margin:0}.fp-book-subtitle{font-size:20px;line-height:1.5;color:var(--fp-muted);margin:0 0 24px}
.fp-book-facts{display:flex;flex-wrap:wrap;gap:16px 30px;padding:18px 0;border-top:1px solid #dde5ed;border-bottom:1px solid #dde5ed;margin-bottom:24px}.fp-book-facts div{min-width:60px}.fp-book-facts dt{font-size:12px;color:var(--fp-muted);font-weight:400}.fp-book-facts dd{font-size:14px;font-weight:600;margin:4px 0 0}
.fp-book-description{font-size:16px;line-height:1.8}.fp-book-resource-links{flex-basis:100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;margin-top:10px}.fp-reader-link{font-size:16px;color:#245b8e}
@media(max-width:1000px){.fp-book-card{grid-template-columns:1fr}.fp-book-card__cover{flex-basis:auto;max-width:100%;width:180px;justify-self:center}.fp-book-detail{gap:28px;grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:620px){.fp-books-grid{grid-template-columns:1fr}.fp-book-card{padding:20px 12px}.fp-book-card__cover{width:200px}.fp-book-detail{grid-template-columns:1fr;gap:25px}.fp-book-detail__cover{max-width:230px;margin:0 auto;width:100%}.fp-catalog h1{font-size:28px}.fp-book-actions .fp-button{flex:1 1 100%}.fp-home-hero br{display:none}.fp-home-note{padding-inline:22px}.fp-book-facts{gap:16px 20px}}

/* Espaciado más compacto en la portada, conservando separación entre elementos. */
.home #header-text-nav-wrap{padding-top:10px;padding-bottom:10px}
.home #header-text{padding-top:4px}
.home #site-title{padding-bottom:4px;margin-bottom:4px}
.home #site-description{margin-bottom:8px}
.home #main{padding-top:24px}
.fp-section-heading p{margin-bottom:0}

/* Catálogo: entrada compacta y margen lateral para las tarjetas. */
body.post-type-archive-fp_libro #main{padding-top:10px}
body.post-type-archive-fp_libro #main .inner-wrap{width:calc(100% - 50px);max-width:1218px}
body.post-type-archive-fp_libro .fp-catalog-heading{margin:0 0 18px}
body.post-type-archive-fp_libro .fp-catalog-heading p{margin:0;color:var(--fp-ink)}
@media(max-width:620px){body.post-type-archive-fp_libro #main .inner-wrap{width:calc(100% - 32px)}}

/* Imágenes adaptables y alternancia de portada/contraportada · 08-X-2026 FkP */
.fp-book-gallery{width:100%;position:relative}
.fp-book-gallery__stage{display:block;position:relative;width:100%;aspect-ratio:var(--fp-image-ratio,3 / 4);overflow:hidden;box-shadow:3px 5px 12px #172c4826}
.fp-book-gallery__stage .fp-book-cover{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain;box-shadow:none;opacity:0;transition:opacity .25s ease}
.fp-book-gallery__stage .fp-book-cover.is-active{opacity:1}
.fp-book-detail .fp-book-gallery__stage{max-height:470px}
.fp-book-gallery .fp-gallery-controls{display:flex;height:24px;align-items:center;justify-content:center;gap:4px;margin-top:24px}
.fp-book-gallery .fp-gallery-controls[hidden]{display:flex;visibility:hidden}
.fp-book-gallery .fp-gallery-controls button{box-sizing:border-box;appearance:none;min-width:26px;min-height:24px;height:24px;padding:2px 4px;font-size:11px;line-height:1.4;font-weight:600;white-space:nowrap;border:1px solid #bacbd9;border-radius:4px;background:#fff;color:#214f77;cursor:pointer}
.fp-gallery-controls button.is-selected{background:#245b8e;border-color:#245b8e;color:#fff}
.fp-gallery-controls button:hover{background:#103c64;color:#fff;border-color:#103c64}
.fp-gallery-controls button:focus-visible{outline:3px solid #cc962f;outline-offset:2px}
.fp-gallery-pause svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}
.fp-gallery-pause .fp-icon-play{display:none}
.fp-gallery-pause.is-paused .fp-icon-play{display:block}
.fp-gallery-pause.is-paused .fp-icon-pause{display:none}
.fp-book-publication{font-size:12px;color:var(--fp-muted);flex:1 1 150px}
@media(prefers-reduced-motion:reduce){.fp-book-gallery__stage .fp-book-cover{transition:none}}

/* Ampliación a partir de la imagen principal, sin cargarla hasta pulsar. */
.fp-book-gallery--large .fp-book-gallery__stage{cursor:zoom-in}
.fp-image-dialog{border:0;border-radius:8px;padding:0;width:min(1000px,94vw);max-width:94vw;max-height:92dvh;box-shadow:0 15px 60px #0008;background:#fff;color:#172c48}
.fp-image-dialog::backdrop{background:#071626d9}
.fp-image-dialog__toolbar{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #d6dfe8;background:#f5f7fa}
.fp-image-dialog__caption{flex:1;min-width:0;font-size:13px;font-weight:600;line-height:1.4}
.fp-image-dialog button{min-height:28px;padding:4px 9px;border:1px solid #9bb2c6;border-radius:4px;background:#fff;color:#214f77;font-size:12px;line-height:1.4;cursor:pointer;white-space:nowrap}
.fp-image-dialog button:hover{background:#103c64;color:#fff}
.fp-image-dialog button:focus-visible{outline:3px solid #cc962f;outline-offset:2px}
.fp-image-dialog__viewport{max-height:calc(92dvh - 62px);overflow:auto;padding:12px;text-align:center;overscroll-behavior:contain}
.fp-image-dialog__image{display:block;margin:0 auto;width:auto;height:auto;max-width:100%;max-height:calc(92dvh - 90px);object-fit:contain}
.fp-image-dialog.is-native-size .fp-image-dialog__image{max-width:none;max-height:none;margin:0}
@media(max-width:620px){.fp-image-dialog__toolbar{flex-wrap:wrap;padding:8px 10px}.fp-image-dialog__caption{flex-basis:100%}.fp-image-dialog__viewport{max-height:calc(92dvh - 95px)}}
.fp-image-dialog[open]{display:flex;flex-direction:column}
.fp-image-dialog__viewport{min-height:0;flex-shrink:1}
