/**
 * Biblioteca Digital Rojeka Libros — estilos del frontal.
 *
 * Los colores, las tipografías y los redondeos llegan como variables CSS
 * desde inc/enqueue.php, de modo que cambiar de estilo en el Personalizador
 * no necesita tocar este archivo.
 *
 * @package RojekaLibros
 */

/* ------------------------------------------------------------------ Base */

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

body {
	margin: 0;
	background: var(--rjk-bg);
	color: var(--rjk-text);
	font-family: var(--rjk-font-body);
	font-size: var(--rjk-font-size);
	line-height: var(--rjk-line-height);
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

body.rjk-locked { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--rjk-font-heading);
	font-weight: var(--rjk-heading-weight);
	color: var(--rjk-heading);
	line-height: 1.2;
	margin: 0 0 .5em;
}

h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, var(--rjk-h1)); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 1rem + .7vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; }

a {
	color: var(--rjk-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
}
a:hover,
a:focus { color: var(--rjk-primary-hover); }

img,
svg,
video { max-width: 100%; height: auto; }

img { vertical-align: middle; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--rjk-accent);
	outline-offset: 2px;
	border-radius: 3px;
}

/*
 * El atributo hidden debe ganar siempre. Varios elementos del tema declaran
 * display (paneles, ventana de vista rápida, velo, botón de volver arriba) y
 * eso anula la regla por defecto del navegador: sin esto, un panel cerrado
 * sigue ocupando la pantalla y se come los clics de toda la página.
 */
[hidden] { display: none !important; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap; border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 10px; left: 10px;
	z-index: 1000;
	width: auto; height: auto;
	clip: auto; clip-path: none;
	padding: 12px 18px;
	background: var(--rjk-primary);
	color: var(--rjk-on-primary);
	border-radius: var(--rjk-btn-radius);
	font-weight: 600;
	text-decoration: none;
}

/* ------------------------------------------------------------------ Estructura */

.rjk-container {
	width: min(100% - 32px, var(--rjk-container));
	margin-inline: auto;
}

.rjk-main { display: block; }

.rjk-wrap {
	display: grid;
	gap: 40px;
	padding-block: 40px 64px;
	align-items: start;
}

.rjk-content { min-width: 0; }

.rjk-sidebar {
	min-width: 0;
	font-size: .94rem;
}

/* Utilidad para plantillas que no llevan barra lateral, sea cual sea el ajuste */
.rjk-wrap.rjk-sidebar-none { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 900px) {
	.rjk-sidebar-right .rjk-wrap { grid-template-columns: minmax(0, 1fr) 280px; }
	.rjk-sidebar-left  .rjk-wrap { grid-template-columns: 280px minmax(0, 1fr); }
	.rjk-sidebar-left  .rjk-wrap > .rjk-content { order: 2; }
	.rjk-sidebar-left  .rjk-wrap > .rjk-sidebar { order: 1; }
	.rjk-sidebar-right .rjk-wrap.rjk-sidebar-none,
	.rjk-sidebar-left  .rjk-wrap.rjk-sidebar-none { grid-template-columns: minmax(0, 1fr); }
}

.rjk-layout-boxed .rjk-content { }

/* ------------------------------------------------------------------ Botones */

.rjk-btn,
.woocommerce .button,
button.rjk-btn,
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border: 1px solid var(--rjk-primary);
	border-radius: var(--rjk-btn-radius);
	background: var(--rjk-primary);
	color: var(--rjk-on-primary);
	font-family: inherit;
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background .18s ease, border-color .18s ease, transform .12s ease;
}

.rjk-btn:hover,
.rjk-btn:focus,
.woocommerce .button:hover,
input[type="submit"]:hover {
	background: var(--rjk-primary-hover);
	border-color: var(--rjk-primary-hover);
	color: var(--rjk-on-primary);
}

.rjk-btn:active { transform: translateY(1px); }

.rjk-btn-upper .rjk-btn,
.rjk-btn-upper .woocommerce .button {
	text-transform: uppercase;
	letter-spacing: .06em;
	font-size: .85rem;
}

.rjk-btn-ghost {
	background: transparent;
	color: var(--rjk-primary);
	border-color: currentColor;
}
.rjk-btn-ghost:hover,
.rjk-btn-ghost:focus {
	background: var(--rjk-primary-soft);
	color: var(--rjk-primary-hover);
}

.rjk-btn-sm { padding: 7px 14px; font-size: .85rem; }
.rjk-btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* ------------------------------------------------------------------ Formularios */

input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="date"],
select,
textarea {
	width: 100%;
	max-width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--rjk-border);
	border-radius: var(--rjk-btn-radius);
	background: var(--rjk-surface);
	color: var(--rjk-text);
	font-family: inherit;
	font-size: .95rem;
}

input::placeholder,
textarea::placeholder { color: var(--rjk-text-muted); opacity: 1; }

input:focus,
select:focus,
textarea:focus { border-color: var(--rjk-primary); }

/* ------------------------------------------------------------------ Barra superior */

.rjk-topbar {
	background: var(--rjk-primary-soft);
	color: var(--rjk-text);
	font-size: .84rem;
	border-bottom: 1px solid var(--rjk-border);
}

.rjk-topbar-in {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	align-items: center;
	justify-content: space-between;
	min-height: 38px;
	padding-block: 6px;
}

.rjk-topbar p { margin: 0; }
.rjk-topbar a { color: inherit; }

.rjk-topbar-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 680px) {
	.rjk-topbar-r,
	.rjk-topbar-nav { display: none; }
	.rjk-topbar-in { justify-content: center; text-align: center; }
}

/* ------------------------------------------------------------------ Cabecera */

.rjk-header {
	position: relative;
	z-index: 50;
	background: var(--rjk-surface);
	border-bottom: 1px solid var(--rjk-border);
}

.rjk-sticky-header .rjk-header {
	position: sticky;
	top: 0;
}

.rjk-header.is-stuck {
	background: rgba(var(--rjk-surface-rgb), var(--rjk-header-alpha));
	backdrop-filter: blur(10px);
	box-shadow: 0 2px 18px rgba(0, 0, 0, .09);
}

.rjk-header-in {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: var(--rjk-header-h);
	padding-block: 10px;
}

.rjk-brand { flex: 0 0 auto; }

.rjk-brand img,
.rjk-brand .custom-logo {
	width: auto;
	max-width: var(--rjk-logo-w);
	max-height: calc(var(--rjk-header-h) - 24px);
	object-fit: contain;
}

.rjk-site-title {
	margin: 0;
	font-size: clamp(1.1rem, .9rem + .7vw, 1.5rem);
	line-height: 1.15;
}
.rjk-site-title a { color: var(--rjk-heading); text-decoration: none; }
.rjk-site-desc {
	margin: 2px 0 0;
	font-size: .78rem;
	color: var(--rjk-text-muted);
}

.rjk-header-search { flex: 1 1 auto; min-width: 0; }

.rjk-header-izquierda .rjk-nav { flex: 1 1 auto; }
.rjk-header-centro .rjk-header-in { flex-direction: column; text-align: center; }
.rjk-header-centro .rjk-actions { justify-content: center; }

.rjk-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-inline-start: auto;
	flex: 0 0 auto;
}

.rjk-act {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 6px 10px;
	border: 0;
	background: none;
	color: var(--rjk-text);
	font: inherit;
	font-size: .72rem;
	text-decoration: none;
	cursor: pointer;
	border-radius: var(--rjk-radius);
}
.rjk-act:hover,
.rjk-act:focus { background: var(--rjk-bg-alt); color: var(--rjk-primary); }

.rjk-act-i { position: relative; display: block; line-height: 0; }

.rjk-count {
	position: absolute;
	top: -7px; inset-inline-end: -10px;
	min-width: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--rjk-accent);
	color: var(--rjk-on-accent);
	font-size: .66rem;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}
.rjk-count.is-zero { display: none; }

@media (max-width: 760px) {
	.rjk-act-t { display: none; }
}

.rjk-burger {
	display: none;
	padding: 8px;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	border-radius: var(--rjk-radius);
}

@media (max-width: 980px) {
	.rjk-burger { display: inline-flex; }
	.rjk-header .rjk-nav { display: none; }
	.rjk-navbar { display: none; }
}

@media (max-width: 640px) {
	.rjk-header-search { order: 10; flex-basis: 100%; }
	.rjk-header-in { flex-wrap: wrap; }
}

/* Buscador */

.rjk-search { position: relative; display: flex; }

.rjk-search-input {
	padding-inline-end: 48px;
	border-radius: var(--rjk-btn-radius);
}

.rjk-search-btn {
	position: absolute;
	inset-inline-end: 4px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	padding: 8px;
	border: 0;
	background: none;
	color: var(--rjk-text-muted);
	cursor: pointer;
	border-radius: 50%;
}
.rjk-search-btn:hover { color: var(--rjk-primary); }

.rjk-live {
	position: absolute;
	top: calc(100% + 6px);
	inset-inline: 0;
	z-index: 60;
	max-height: 70vh;
	overflow: auto;
	padding: 6px;
	background: var(--rjk-surface);
	border: 1px solid var(--rjk-border);
	border-radius: var(--rjk-radius);
	box-shadow: 0 16px 40px rgba(0, 0, 0, .14);
}

.rjk-live-list { margin: 0; padding: 0; list-style: none; }

.rjk-live-list a {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 8px;
	border-radius: calc(var(--rjk-radius) - 4px);
	color: inherit;
	text-decoration: none;
}
.rjk-live-list a:hover,
.rjk-live-list a:focus { background: var(--rjk-bg-alt); }

.rjk-live-list img {
	width: 40px; height: 60px;
	object-fit: cover;
	border-radius: 3px;
	flex: 0 0 auto;
}

.rjk-live-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rjk-live-title { font-weight: 600; font-size: .9rem; }
.rjk-live-author { font-size: .8rem; color: var(--rjk-text-muted); }
.rjk-live-price { font-size: .82rem; color: var(--rjk-primary); font-weight: 600; }

.rjk-live-empty,
.rjk-live-all { margin: 0; padding: 10px; font-size: .88rem; text-align: center; }
.rjk-live-all { border-top: 1px solid var(--rjk-border); }

/* Navegación */

.rjk-navbar {
	background: var(--rjk-bg-alt);
	border-top: 1px solid var(--rjk-border);
}

.rjk-nav-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rjk-nav-list li { position: relative; }

.rjk-nav-list > li > a {
	display: block;
	padding: 13px 14px;
	color: var(--rjk-text);
	font-size: .93rem;
	font-weight: 600;
	text-decoration: none;
	border-radius: var(--rjk-radius);
}
.rjk-nav-list > li > a:hover,
.rjk-nav-list > li > a:focus,
.rjk-nav-list > li.current-menu-item > a { color: var(--rjk-primary); background: var(--rjk-primary-soft); }

.rjk-nav-list .sub-menu {
	position: absolute;
	top: 100%; inset-inline-start: 0;
	z-index: 70;
	min-width: 230px;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--rjk-surface);
	border: 1px solid var(--rjk-border);
	border-radius: var(--rjk-radius);
	box-shadow: 0 14px 34px rgba(0, 0, 0, .13);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.rjk-nav-list li:hover > .sub-menu,
.rjk-nav-list li:focus-within > .sub-menu,
.rjk-nav-list li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.rjk-nav-list .sub-menu a {
	display: block;
	padding: 9px 12px;
	border-radius: calc(var(--rjk-radius) - 4px);
	color: var(--rjk-text);
	font-size: .9rem;
	text-decoration: none;
}
.rjk-nav-list .sub-menu a:hover,
.rjk-nav-list .sub-menu a:focus { background: var(--rjk-bg-alt); color: var(--rjk-primary); }

.rjk-sub-toggle {
	position: absolute;
	top: 50%; inset-inline-end: 0;
	transform: translateY(-50%);
	width: 34px; height: 34px;
	border: 0;
	background: none;
	cursor: pointer;
}
.rjk-sub-toggle::after {
	content: "";
	display: block;
	width: 7px; height: 7px;
	margin: auto;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px);
}
.rjk-nav-list .sub-menu .rjk-sub-toggle { display: none; }

@media (min-width: 981px) {
	.rjk-nav-list > li > .rjk-sub-toggle { display: none; }
}

/* ------------------------------------------------------------------ Paneles laterales */

.rjk-overlay {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(0, 0, 0, .45);
	opacity: 0;
	transition: opacity .24s ease;
}
.rjk-overlay.is-on { opacity: 1; }

.rjk-drawer {
	position: fixed;
	top: 0; bottom: 0;
	z-index: 100;
	display: flex;
	flex-direction: column;
	width: min(400px, 92vw);
	background: var(--rjk-surface);
	box-shadow: 0 0 50px rgba(0, 0, 0, .25);
	transition: transform .24s ease;
}

.rjk-drawer-right { inset-inline-end: 0; transform: translateX(105%); }
.rjk-drawer-left  { inset-inline-start: 0; transform: translateX(-105%); }
.rjk-drawer.is-open { transform: none; }

.rjk-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--rjk-border);
}

.rjk-drawer-title {
	font-family: var(--rjk-font-heading);
	font-size: 1.05rem;
	font-weight: var(--rjk-heading-weight);
	color: var(--rjk-heading);
}

.rjk-drawer-close {
	display: inline-flex;
	padding: 8px;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	border-radius: 50%;
}
.rjk-drawer-close:hover { background: var(--rjk-bg-alt); }

.rjk-drawer-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 20px;
}

.rjk-drawer-sub {
	margin: 20px 0 6px;
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--rjk-text-muted);
}

.rjk-nav-mobile {
	margin: 0; padding: 0;
	list-style: none;
}
.rjk-nav-mobile li { position: relative; border-bottom: 1px solid var(--rjk-border); }
.rjk-nav-mobile a {
	display: block;
	padding: 13px 40px 13px 0;
	color: var(--rjk-text);
	font-weight: 600;
	text-decoration: none;
}
.rjk-nav-mobile .sub-menu {
	display: none;
	margin: 0 0 8px;
	padding-inline-start: 16px;
	list-style: none;
}
.rjk-nav-mobile li.is-open > .sub-menu { display: block; }
.rjk-nav-mobile .sub-menu li { border: 0; }
.rjk-nav-mobile .sub-menu a { padding: 9px 0; font-weight: 400; font-size: .92rem; }

/* Lista de deseos */

.rjk-wish-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }

.rjk-wish-item {
	display: grid;
	grid-template-columns: 56px 1fr auto;
	gap: 12px;
	align-items: start;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--rjk-border);
}

.rjk-wish-img img { width: 56px; height: 84px; object-fit: cover; border-radius: 3px; }
.rjk-wish-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rjk-wish-title { font-weight: 600; font-size: .92rem; color: var(--rjk-heading); text-decoration: none; }
.rjk-wish-price { font-size: .88rem; color: var(--rjk-primary); }

.rjk-wish-del {
	padding: 4px;
	border: 0;
	background: none;
	color: var(--rjk-text-muted);
	cursor: pointer;
	border-radius: 50%;
}
.rjk-wish-del:hover { color: var(--rjk-accent); background: var(--rjk-bg-alt); }

/* Vista rápida */

.rjk-modal {
	position: fixed;
	inset: 0;
	z-index: 110;
	display: grid;
	place-items: center;
	padding: 20px;
	opacity: 0;
	transition: opacity .2s ease;
}
.rjk-modal.is-open { opacity: 1; }

.rjk-modal-box {
	position: relative;
	width: min(880px, 100%);
	max-height: 88vh;
	overflow: auto;
	padding: 28px;
	background: var(--rjk-surface);
	border-radius: var(--rjk-radius);
	box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
}

.rjk-modal-close {
	position: absolute;
	top: 12px; inset-inline-end: 12px;
	padding: 8px;
	border: 0;
	background: var(--rjk-bg-alt);
	color: inherit;
	cursor: pointer;
	border-radius: 50%;
}

.rjk-qv-grid { display: grid; gap: 26px; }
@media (min-width: 680px) { .rjk-qv-grid { grid-template-columns: 240px 1fr; } }

.rjk-qv-img img { width: 100%; border-radius: calc(var(--rjk-radius) - 4px); box-shadow: 0 10px 26px rgba(0, 0, 0, .18); }
.rjk-qv-title { font-size: 1.4rem; margin-bottom: .15em; }
.rjk-qv-title a { color: inherit; text-decoration: none; }
.rjk-qv-author { color: var(--rjk-text-muted); margin-bottom: .6em; }
.rjk-qv-price { font-size: 1.3rem; font-weight: 700; color: var(--rjk-primary); margin-bottom: .6em; }
.rjk-qv-text { font-size: .94rem; }
.rjk-qv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.rjk-qv-sheet { display: grid; gap: 4px; margin: 14px 0; font-size: .88rem; }
.rjk-qv-sheet > div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.rjk-qv-sheet dt { color: var(--rjk-text-muted); }
.rjk-qv-sheet dd { margin: 0; }

/* Aviso flotante */

.rjk-toast {
	position: fixed;
	inset-inline: 0;
	bottom: 24px;
	z-index: 120;
	width: fit-content;
	max-width: calc(100% - 32px);
	margin-inline: auto;
	padding: 12px 20px;
	background: var(--rjk-heading);
	color: var(--rjk-bg);
	border-radius: var(--rjk-btn-radius);
	font-size: .9rem;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
	opacity: 0;
	transform: translateY(14px);
	pointer-events: none;
	transition: opacity .22s ease, transform .22s ease;
}
.rjk-toast.is-on { opacity: 1; transform: none; }

/* Volver arriba */

.rjk-top {
	position: fixed;
	inset-inline-end: 20px;
	bottom: 20px;
	z-index: 80;
	display: inline-flex;
	padding: 12px;
	border: 1px solid var(--rjk-border);
	background: var(--rjk-surface);
	color: var(--rjk-text);
	cursor: pointer;
	border-radius: 50%;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
}
.rjk-top:hover { background: var(--rjk-primary); color: var(--rjk-on-primary); border-color: var(--rjk-primary); }

/* ------------------------------------------------------------------ Cabecera de página */

.rjk-page-head {
	padding-block: 34px 26px;
	background: var(--rjk-bg-alt);
	border-bottom: 1px solid var(--rjk-border);
}

.rjk-page-title { margin: 0; }
.rjk-page-sub { margin-top: .6em; color: var(--rjk-text-muted); max-width: 70ch; }
.rjk-page-sub p:last-child { margin-bottom: 0; }

.rjk-crumbs { margin-bottom: 10px; font-size: .82rem; color: var(--rjk-text-muted); }
.rjk-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rjk-crumbs li + li::before { content: "/"; margin-inline-end: 6px; opacity: .6; }
.rjk-crumbs a { color: inherit; }

/* ------------------------------------------------------------------ Tarjetas y rejillas */

.rjk-grid { display: grid; gap: 26px; }
.rjk-grid-blog { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

@media (min-width: 900px) {
	.rjk-grid-blog { grid-template-columns: repeat(var(--rjk-blog-cols), minmax(0, 1fr)); }
}

.rjk-card {
	display: flex;
	flex-direction: column;
	background: var(--rjk-surface);
	border: 1px solid var(--rjk-border);
	border-radius: var(--rjk-radius);
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease;
}
.rjk-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .1); }

.rjk-card-img img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; display: block; }
.rjk-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.rjk-card-meta { margin: 0; font-size: .78rem; color: var(--rjk-text-muted); }
.rjk-card-title { margin: 0; font-size: 1.12rem; }
.rjk-card-title a { color: var(--rjk-heading); text-decoration: none; }
.rjk-card-title a:hover { color: var(--rjk-primary); }
.rjk-card-text { margin: 0; font-size: .92rem; color: var(--rjk-text-muted); }
.rjk-link-more { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: .9rem; }

/* ------------------------------------------------------------------ Contenido */

.rjk-prose { max-width: 72ch; }
.rjk-layout-full .rjk-prose { max-width: none; }

.rjk-prose > * + * { margin-top: 1.1em; }
.rjk-prose h2 { margin-top: 1.8em; }
.rjk-prose h3 { margin-top: 1.5em; }
.rjk-prose ul,
.rjk-prose ol { padding-inline-start: 1.3em; }
.rjk-prose li + li { margin-top: .35em; }

.rjk-prose blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 20px;
	border-inline-start: 3px solid var(--rjk-accent);
	font-style: italic;
	color: var(--rjk-text-muted);
}

.rjk-prose img { border-radius: var(--rjk-radius); }

.rjk-prose table { width: 100%; border-collapse: collapse; }
.rjk-prose th,
.rjk-prose td { padding: 10px 12px; border: 1px solid var(--rjk-border); text-align: start; }
.rjk-prose th { background: var(--rjk-bg-alt); }

.rjk-entry-img { margin: 0 0 24px; }
.rjk-entry-img img { width: 100%; border-radius: var(--rjk-radius); }
.rjk-entry-meta { margin: 0; color: var(--rjk-text-muted); font-size: .9rem; }
.rjk-entry-tags { margin-top: 2em; font-size: .88rem; color: var(--rjk-text-muted); }

.rjk-post-nav { margin-top: 44px; display: grid; gap: 16px; }
@media (min-width: 700px) { .rjk-post-nav { grid-template-columns: 1fr 1fr; } }
.rjk-post-nav a {
	display: block;
	padding: 16px 20px;
	border: 1px solid var(--rjk-border);
	border-radius: var(--rjk-radius);
	text-decoration: none;
	color: var(--rjk-heading);
	font-weight: 600;
}
.rjk-post-nav .nav-next { text-align: end; }
.rjk-navlabel { display: block; font-size: .76rem; font-weight: 400; color: var(--rjk-text-muted); text-transform: uppercase; letter-spacing: .07em; }

.rjk-empty,
.rjk-empty-box { color: var(--rjk-text-muted); }
.rjk-empty-box {
	max-width: 560px;
	padding: 30px;
	background: var(--rjk-bg-alt);
	border-radius: var(--rjk-radius);
}
.rjk-404-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ------------------------------------------------------------------ Paginación */

.rjk-pagination { margin-top: 40px; }
.rjk-pagination ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rjk-pagination a,
.rjk-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--rjk-border);
	border-radius: var(--rjk-btn-radius);
	color: var(--rjk-text);
	text-decoration: none;
	font-size: .92rem;
}
.rjk-pagination a:hover { border-color: var(--rjk-primary); color: var(--rjk-primary); }
.rjk-pagination .current { background: var(--rjk-accent); border-color: var(--rjk-accent); color: var(--rjk-on-accent); font-weight: 700; }

/* ------------------------------------------------------------------ Widgets */

.widget + .widget { margin-top: 30px; }
.widget-title {
	margin: 0 0 12px;
	font-size: .95rem;
	letter-spacing: .02em;
}
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li + li { margin-top: 7px; }
.widget a { color: var(--rjk-text); text-decoration: none; }
.widget a:hover { color: var(--rjk-primary); }

/* Filtros */

.rjk-f-block + .rjk-f-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rjk-border); }
.rjk-f-clear { margin-bottom: 18px; }

.rjk-f-list { display: grid; gap: 2px; }

.rjk-f-item {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 6px 8px;
	border-radius: calc(var(--rjk-radius) - 4px);
	font-size: .9rem;
	text-decoration: none;
	color: var(--rjk-text);
}
.rjk-f-item:hover { background: var(--rjk-bg-alt); }
.rjk-f-item.is-on { background: var(--rjk-primary-soft); color: var(--rjk-primary); font-weight: 600; }

.rjk-f-box {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px; height: 18px;
	border: 1px solid var(--rjk-border);
	border-radius: 4px;
	background: var(--rjk-surface);
}
.rjk-f-item.is-on .rjk-f-box { background: var(--rjk-primary); border-color: var(--rjk-primary); color: var(--rjk-on-primary); }

.rjk-f-name { flex: 1 1 auto; min-width: 0; }
.rjk-f-count { flex: 0 0 auto; font-size: .78rem; color: var(--rjk-text-muted); }

.rjk-f-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rjk-f-price label { flex: 1 1 80px; min-width: 0; }
.rjk-f-price input { padding: 8px 10px; }
.rjk-f-dash { color: var(--rjk-text-muted); }
.rjk-f-price button { flex: 1 1 100%; }

/* ------------------------------------------------------------------ Listas escolares */

.rjk-lists-find { margin-bottom: 30px; }
.rjk-lists-find-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.rjk-lists-find-row input { flex: 1 1 240px; }

.rjk-lists-grid {
	display: grid;
	gap: 18px;
	margin: 0; padding: 0;
	list-style: none;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.rjk-list-card { padding: 20px 22px; }
.rjk-list-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.rjk-list-card h3 a { color: var(--rjk-heading); text-decoration: none; }
.rjk-list-card-sub { margin: 0; font-size: .88rem; color: var(--rjk-text-muted); }
.rjk-list-card-n { margin: 8px 0 0; font-size: .82rem; color: var(--rjk-primary); font-weight: 600; }

.rjk-list-head {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 36px;
	margin: 0 0 24px;
	padding: 16px 20px;
	background: var(--rjk-bg-alt);
	border-radius: var(--rjk-radius);
}
.rjk-list-head dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rjk-text-muted); }
.rjk-list-head dd { margin: 2px 0 0; font-weight: 600; }

.rjk-list-code { margin: 0; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; color: var(--rjk-text-muted); }

.rjk-list-table { width: 100%; border-collapse: collapse; }
.rjk-list-table th,
.rjk-list-table td { padding: 12px 10px; border-bottom: 1px solid var(--rjk-border); text-align: start; vertical-align: top; }
.rjk-list-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--rjk-text-muted); }
.rjk-list-table tfoot td { border-bottom: 0; font-weight: 700; padding-top: 16px; }
.rjk-list-total-l { text-align: end; }
.rjk-list-total,
.rjk-list-price { text-align: end; white-space: nowrap; }
.rjk-list-qty { text-align: center; }
.rjk-list-check { width: 36px; }
.rjk-list-check input { width: 20px; height: 20px; }

.rjk-list-name { display: block; font-weight: 600; }
.rjk-list-name a { color: var(--rjk-heading); text-decoration: none; }
.rjk-list-sub,
.rjk-list-note { display: block; font-size: .83rem; color: var(--rjk-text-muted); }
.rjk-list-note { font-style: italic; }

.rjk-list-table tr.is-optional { background: rgba(var(--rjk-bg-alt-rgb), .55); }

.rjk-list-warn {
	margin-top: 18px;
	padding: 12px 16px;
	border-inline-start: 3px solid var(--rjk-accent);
	background: var(--rjk-bg-alt);
	font-size: .9rem;
}

.rjk-list-actions { margin-top: 24px; }

@media (max-width: 640px) {
	.rjk-list-table thead { display: none; }
	.rjk-list-table tr { display: grid; grid-template-columns: 36px 1fr auto; gap: 4px 10px; padding-block: 10px; border-bottom: 1px solid var(--rjk-border); }
	.rjk-list-table td { border: 0; padding: 2px 0; }
	.rjk-list-table .rjk-list-check { grid-row: span 2; }
	.rjk-list-table .rjk-list-qty { grid-column: 2; text-align: start; font-size: .85rem; color: var(--rjk-text-muted); }
	.rjk-list-table .rjk-list-price { grid-column: 3; grid-row: 1; }
	.rjk-list-table tfoot tr { grid-template-columns: 1fr auto; }
	.rjk-list-table tfoot .rjk-list-total-l { grid-column: 1; text-align: start; }
}

/* ------------------------------------------------------------------ Distintivos */

.rjk-badges {
	position: absolute;
	top: 10px; inset-inline-start: 10px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 5px;
}

.rjk-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: .02em;
}
.rjk-badge-sale { background: var(--rjk-accent); color: var(--rjk-on-accent); }
.rjk-badge-new  { background: var(--rjk-primary); color: var(--rjk-on-primary); }
.rjk-badge-out  { background: var(--rjk-bg-alt); color: var(--rjk-text-muted); border: 1px solid var(--rjk-border); }
.rjk-badge-opt  { background: var(--rjk-primary-soft); color: var(--rjk-primary); border: 1px solid currentColor; margin-inline-start: 6px; }

/* ------------------------------------------------------------------ Pie */

.rjk-footer {
	margin-top: 60px;
	padding-block: 50px 26px;
	background: var(--rjk-bg-alt);
	border-top: 1px solid var(--rjk-border);
	font-size: .92rem;
}

.rjk-foot-cols { display: grid; gap: 32px; }
@media (min-width: 720px) {
	.rjk-foot-2 { grid-template-columns: repeat(2, 1fr); }
	.rjk-foot-3 { grid-template-columns: repeat(3, 1fr); }
	.rjk-foot-4 { grid-template-columns: repeat(4, 1fr); }
}

.rjk-foot-menu li + li,
.rjk-legal-list li + li { margin-top: 7px; }

.rjk-news { display: grid; gap: 8px; }
.rjk-news-msg { margin: 0; font-size: .85rem; min-height: 1.2em; }
.rjk-news-msg.is-ok { color: var(--rjk-primary); }
.rjk-news-msg.is-bad { color: var(--rjk-accent); }

.rjk-foot-bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	align-items: center;
	justify-content: space-between;
	margin-top: 40px;
	padding-top: 22px;
	border-top: 1px solid var(--rjk-border);
	font-size: .85rem;
	color: var(--rjk-text-muted);
}
.rjk-copy { margin: 0; }
.rjk-legal-list { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 0; list-style: none; }
.rjk-legal-list li + li { margin-top: 0; }
.rjk-foot-pay { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.rjk-pay {
	padding: 3px 9px;
	border: 1px solid var(--rjk-border);
	border-radius: 4px;
	background: var(--rjk-surface);
	font-size: .72rem;
	letter-spacing: .02em;
}

/* ------------------------------------------------------------------ Matices de cada estilo */

/* Infantil: más juego, trazos gruesos */
.rjk-style-infantil .rjk-card { border-width: 2px; }
.rjk-style-infantil .rjk-page-head { border-bottom-width: 2px; }
.rjk-style-infantil .rjk-badge { padding: 4px 11px; }
.rjk-style-infantil .rjk-btn { font-weight: 700; }

/* Librería clásica: filetes y versalitas */
.rjk-style-clasica .rjk-page-head {
	border-bottom: 3px double var(--rjk-border);
	background: var(--rjk-bg);
}
.rjk-style-clasica .widget-title {
	text-transform: uppercase;
	letter-spacing: .1em;
	font-size: .8rem;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--rjk-border);
}
.rjk-style-clasica .rjk-prose { font-size: 1.03rem; }

/* Moderno: aire y sombras suaves */
.rjk-style-moderno .rjk-card { box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.rjk-style-moderno .rjk-page-head { background: var(--rjk-bg); border-bottom: 0; padding-bottom: 6px; }
.rjk-style-moderno .rjk-wrap { padding-top: 26px; }

/* Educativo: todo muy legible y tabular */
.rjk-style-educativo .rjk-list-table th,
.rjk-style-educativo .rjk-list-table td { padding-block: 14px; }
.rjk-style-educativo .widget-title { font-size: 1rem; }

/* Poesía: mucho blanco, versalitas y líneas largas */
.rjk-style-poesia .rjk-page-head {
	background: var(--rjk-bg);
	border-bottom: 1px solid var(--rjk-border);
	padding-block: 56px 40px;
	text-align: center;
}
.rjk-style-poesia .rjk-crumbs ol { justify-content: center; }
.rjk-style-poesia .rjk-page-sub { margin-inline: auto; }
.rjk-style-poesia .rjk-prose { font-size: 1.06rem; line-height: 1.8; }
.rjk-style-poesia .widget-title { font-variant: small-caps; letter-spacing: .06em; font-size: 1.05rem; }
.rjk-style-poesia .rjk-card { box-shadow: none; }
.rjk-style-poesia .rjk-card:hover { transform: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .07); }

/* ------------------------------------------------------------------ Impresión */

@media print {
	.rjk-header,
	.rjk-footer,
	.rjk-topbar,
	.rjk-drawer,
	.rjk-overlay,
	.rjk-top,
	.rjk-sidebar,
	.rjk-list-actions,
	.rjk-list-check { display: none !important; }

	body { background: #fff; color: #000; font-size: 11pt; }
	.rjk-wrap { display: block; padding: 0; }
	a { text-decoration: underline; }
	.rjk-list-table th,
	.rjk-list-table td { border-bottom: 1px solid #999; }
}

/* ------------------------------------------------------------------ Widgets de Elementor */

.rjk-ew { --rjk-ew-gap: 26px; }

.rjk-ew-kicker {
	margin: 0 0 .5em;
	color: var(--rjk-accent);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.rjk-ew-title { margin: 0 0 .4em; }
.rjk-ew-text { margin: 0 0 1.2em; color: var(--rjk-text-muted); max-width: 62ch; }
.rjk-ew-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.rjk-ew-hero { padding: clamp(28px, 5vw, 64px) 0; }
.rjk-ew-hero .rjk-ew-title { font-size: clamp(1.9rem, 1.1rem + 3vw, var(--rjk-h1)); }
.rjk-ew-search { max-width: 540px; margin: 0 0 22px; }
.rjk-ew-hero[style*="center"] .rjk-ew-search { margin-inline: auto; }

.rjk-ew-head {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 22px;
}
.rjk-ew-head .rjk-ew-title { margin: 0; }

ul.rjk-ew-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 28px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rjk-ew-item { display: flex; flex-direction: column; gap: 5px; }
.rjk-ew-item .rjk-cover { margin-bottom: 8px; }

/* Buscar por edad */

.rjk-edades-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.rjk-edades-list a {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 20px 18px;
	background: var(--rjk-primary-soft);
	border: 1px solid var(--rjk-border);
	border-radius: var(--rjk-radius);
	color: var(--rjk-primary);
	text-decoration: none;
	text-align: center;
	transition: transform .16s ease, background .16s ease;
}
.rjk-edades-list a:hover,
.rjk-edades-list a:focus {
	transform: translateY(-3px);
	background: var(--rjk-primary);
	color: var(--rjk-on-primary);
}
.rjk-edad-n { font-weight: 700; font-size: 1.02rem; }
.rjk-edad-c { font-size: .8rem; opacity: .8; }

/* Autor destacado */

.rjk-ew-autor {
	padding: clamp(24px, 4vw, 40px);
	background: var(--rjk-bg-alt);
	border-radius: var(--rjk-radius);
}
.rjk-autor-top { display: grid; gap: 26px; align-items: start; }
@media (min-width: 680px) { .rjk-autor-top { grid-template-columns: 160px minmax(0, 1fr); } }
.rjk-autor-foto { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; }
.rjk-autor-libros { margin-top: 30px; }

/* Cifras */

.rjk-ew-cifras {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 20px;
	margin: 0;
	padding: clamp(22px, 4vw, 34px);
	list-style: none;
	background: var(--rjk-bg-alt);
	border-radius: var(--rjk-radius);
	text-align: center;
}
.rjk-ew-cifras li { display: flex; flex-direction: column; gap: 4px; }
.rjk-ew-cifras strong {
	font-family: var(--rjk-font-heading);
	font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem);
	font-weight: var(--rjk-heading-weight);
	line-height: 1;
	color: var(--rjk-accent);
}
.rjk-ew-cifras span { font-size: .9rem; color: var(--rjk-text-muted); }

/* Bloque destacado y boletín */

.rjk-ew-cta,
.rjk-ew-boletin {
	padding: clamp(24px, 4vw, 40px);
	background: var(--rjk-primary-soft);
	border-radius: var(--rjk-radius);
}
.rjk-ew-boletin .rjk-news { max-width: 460px; }
.rjk-ew-boletin[style*="center"] .rjk-news { margin-inline: auto; }

.rjk-ew-listas .rjk-ew-title { margin-bottom: .6em; }

/* Libros en modo biblioteca */

.rjk-ew-item.is-biblioteca { gap: 7px; }
.rjk-ew-excerpt {
	margin: 0;
	font-size: .86rem;
	color: var(--rjk-text-muted);
	line-height: 1.5;
}
.rjk-ew-access { align-self: flex-start; margin-top: 4px; }

/* Planes de suscripción */

.rjk-ew-planes { text-align: center; }
.rjk-ew-planes .rjk-ew-text { margin-inline: auto; }

.rjk-planes-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
	text-align: start;
}

.rjk-plan {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 26px 24px 28px;
	background: var(--rjk-surface);
	border: 1px solid var(--rjk-border);
	border-radius: var(--rjk-radius);
}
.rjk-plan.is-destacado {
	border-color: var(--rjk-primary);
	box-shadow: 0 10px 28px rgba(var(--rjk-primary-rgb), .16);
}

.rjk-plan-img { width: 100%; max-height: 140px; object-fit: contain; margin-bottom: 8px; }
.rjk-plan-n { margin: 0; font-size: 1.12rem; }
.rjk-plan-p { margin: 0; color: var(--rjk-primary); font-weight: 700; font-size: 1.05rem; }
.rjk-plan-d { margin: 0; color: var(--rjk-text-muted); font-size: .92rem; }
.rjk-plan-b { margin-top: auto; align-self: flex-start; }

/* Enlaces con logotipo */

.rjk-ew-logos { text-align: center; }
.rjk-logos-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 18px 34px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}
.rjk-logos-row img {
	max-height: 64px;
	width: auto;
	filter: grayscale(1);
	opacity: .75;
	transition: filter .18s ease, opacity .18s ease;
}
.rjk-logos-row a:hover img,
.rjk-logos-row a:focus img { filter: none; opacity: 1; }
.rjk-logo-txt {
	display: inline-block;
	padding: 10px 18px;
	border: 1px solid var(--rjk-border);
	border-radius: var(--rjk-radius);
	color: var(--rjk-text);
	font-weight: 600;
	font-size: .92rem;
}
.rjk-logos-row a { text-decoration: none; }
.rjk-logos-row a:hover .rjk-logo-txt { border-color: var(--rjk-primary); color: var(--rjk-primary); }

/* Datos de contacto */

.rjk-contacto-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 18px 28px;
	margin: 20px 0 0;
}
.rjk-contacto-list > div { display: flex; flex-direction: column; gap: 3px; }
.rjk-contacto-list dt {
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--rjk-text-muted);
}
.rjk-contacto-list dd { margin: 0; font-size: 1.02rem; font-weight: 600; }
.rjk-contacto-list a { color: var(--rjk-primary); text-decoration: none; }
.rjk-contacto-list a:hover { text-decoration: underline; }
.rjk-contacto-list dd.rjk-contacto-todo {
	font-size: .88rem;
	font-weight: 500;
	font-style: italic;
	color: var(--rjk-text-muted);
	border: 1px dashed var(--rjk-border);
	border-radius: calc(var(--rjk-radius) * .5);
	padding: 4px 8px;
}
