/* ==========================================================================
   Home — Librería Cristiana
   Solo layout/estructura: la tipografía y paleta las hereda de Storefront.
   ========================================================================== */

.libreria-home section {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
}

/* El hero rompe el contenedor: ocupa el ancho completo de la ventana */
.libreria-home section.libreria-hero {
	max-width: none;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 0;
}

/* Quitar el padding superior que Storefront aplica al contenido en la home.
   Storefront pone ~68px en .site-main (regla .home.blog .site-main), no en .site-content */
.home .site-content {
	padding-top: 0 !important;
}

.home .site-main {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

.libreria-section__titulo {
	font-size: 1.5rem;
	margin-bottom: 1.25rem;
	text-align: center;
}

/* Hero */
.libreria-hero {
	background-size: cover;
	background-position: center;
	min-height: 80vh;
	display: flex;
	align-items: center;
	position: relative;
}

.libreria-hero__overlay {
	background: linear-gradient(180deg, rgba(10, 15, 30, 0.55) 0%, rgba(10, 15, 30, 0.72) 100%) !important;
	width: 100%;
	min-height: 80vh;
	display: flex;
	align-items: center;
	padding: 80px 20px;
	position: relative;
}

.libreria-hero__contenido {
	max-width: 760px;
	margin: 0 auto;
	text-align: center;
	color: #fff;
	position: relative;
	z-index: 2;
}

/* Limitar tamaño del logo en el header (estático y fijo) */
#masthead .site-branding img,
#masthead .custom-logo {
	max-height: 64px;
	width: auto;
}

#masthead .site-branding .site-title {
	font-size: 1.5rem;
	margin: 0;
}

/* Ajuste de padding del header estático para que no sea tan alto */
#masthead {
	padding-top: 16px;
	padding-bottom: 16px;
}

#masthead > .col-full {
	padding-top: 0;
	padding-bottom: 0;
}

/* Hero carrusel (Swiper con fade) */
.libreria-hero--carrusel {
	background: #0a0f1e;
}

.libreria-hero__slide {
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
}

.libreria-hero__slide .libreria-hero__overlay {
	min-height: inherit;
	height: 100%;
}

.libreria-hero__paginacion {
	bottom: 24px !important;
	z-index: 5;
}

.libreria-hero__paginacion .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	background: rgba(255, 255, 255, 0.5);
	opacity: 1;
	transition: background 0.2s ease, transform 0.2s ease;
}

.libreria-hero__paginacion .swiper-pagination-bullet-active {
	background: #fff;
	transform: scale(1.25);
}

.libreria-hero__titulo {
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 700;
	line-height: 1.15;
	color: #fff !important;
	margin-bottom: 18px;
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.libreria-hero__subtitulo {
	font-size: clamp(1.05rem, 2vw, 1.3rem);
	line-height: 1.5;
	margin-bottom: 30px;
	color: rgba(255, 255, 255, 0.95) !important;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.libreria-hero__boton.button {
	display: inline-block;
	padding: 16px 42px;
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	border-radius: 50px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.libreria-hero__boton.button:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.libreria-hero__buscador {
	max-width: 560px;
	margin: 28px auto 0;
	text-align: left;
}

/* --- Hero responsive: ajustes para pantallas pequeñas --- */
@media screen and (max-width: 768px) {
	.libreria-hero,
	.libreria-hero__overlay {
		min-height: 75vh;
	}

	.libreria-hero__overlay {
		padding: 60px 20px;
		/* Overlay más oscuro en móvil: la imagen se recorta y el texto
		   se monta sobre la tipografía de la portada */
		background: linear-gradient(180deg, rgba(10, 15, 30, 0.72) 0%, rgba(10, 15, 30, 0.85) 100%) !important;
	}

	.libreria-hero__titulo {
		font-size: 1.75rem;
	}

	.libreria-hero__subtitulo {
		font-size: 1rem;
		margin-bottom: 22px;
	}

	.libreria-hero__boton.button {
		padding: 14px 32px;
		font-size: 1rem;
	}

	.libreria-hero__buscador {
		max-width: 100%;
		margin-top: 22px;
	}
}

/* Categorías */
.libreria-categorias__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 16px;
}

.libreria-categorias__item {
	text-align: center;
	text-decoration: none;
	color: inherit;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 16px;
	transition: box-shadow 0.2s ease;
}

.libreria-categorias__item:hover {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.libreria-categorias__item img {
	max-width: 100%;
	height: 90px;
	object-fit: contain;
	margin-bottom: 8px;
}

/* Productos: nuestra grid manda sobre las columnas float de Storefront/WooCommerce */
.libreria-productos ul.products.libreria-productos__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
}

.libreria-productos ul.products.libreria-productos__grid li.product {
	float: none;
	width: auto;
	margin: 0;
	padding: 16px;
	border: 1px solid #eaeaea;
	border-radius: 8px;
	text-align: center;
	background: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.libreria-productos ul.products.libreria-productos__grid li.product img {
	max-height: 240px;
	width: auto;
	margin-bottom: 12px;
}

.libreria-productos ul.products.libreria-productos__grid li.product .woocommerce-loop-product__title {
	font-size: 0.95rem;
	padding: 0;
	margin-bottom: 8px;
}

.libreria-productos ul.products.libreria-productos__grid li.product .price {
	color: #b22222;
	font-weight: 700;
	margin-bottom: 12px;
}

.libreria-productos ul.products.libreria-productos__grid li.product .button {
	margin-top: auto;
}

/* Editoriales */
.libreria-editoriales__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
}

.libreria-editoriales__item img {
	max-height: 60px;
	filter: grayscale(100%);
	opacity: 0.75;
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.libreria-editoriales__item:hover img {
	filter: none;
	opacity: 1;
}

/* Subtítulo de sección (debajo del H2) */
.libreria-section__subtitulo {
	text-align: center;
	color: #6b7280;
	margin: -0.75rem auto 1.5rem;
	font-size: 0.95rem;
}

/* Franja de confianza: banda oscura pegada al hero, elimina objeciones
   de compra en los primeros 5 segundos (envío, pago, devoluciones) */
.libreria-confianza {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px 48px;
	background: #1f2937;
	color: #f3f4f6;
	max-width: none !important;
	width: 100vw;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	padding: 22px 20px !important;
}

.libreria-confianza__item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.95rem;
	font-weight: 600;
}

.libreria-confianza__item .dashicons {
	font-size: 26px;
	width: 26px;
	height: 26px;
	color: #d8a53a;
}

/* Testimonios */
.libreria-testimonios__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
}

.libreria-testimonios__item {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 20px;
	margin: 0;
	font-style: italic;
}

.libreria-testimonios__rating {
	color: #d8a53a;
	margin-left: 8px;
}

/* Newsletter */
.libreria-newsletter {
	text-align: center;
	background: #f0ece1;
}

.libreria-newsletter__form {
	display: flex;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.libreria-newsletter__form input[type="email"] {
	min-width: 260px;
	padding: 10px 12px;
}

.libreria-newsletter__mensaje {
	margin-top: 12px;
	font-size: 0.9rem;
}

/* ==========================================================================
   Menú sticky (header fijo al hacer scroll)
   La clase .berea-sticky-active la agrega/quita el JS en functions-home.php
   ========================================================================== */
body.berea-sticky-active #masthead {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
	animation: berea-sticky-in 0.25s ease;
	padding-top: 8px;
	padding-bottom: 8px;
}

/* Modo compacto: logo y menú se adelgazan al fijarse */
body.berea-sticky-active #masthead .site-branding img,
body.berea-sticky-active #masthead .custom-logo {
	max-height: 42px !important;
	width: auto;
	transition: max-height 0.25s ease;
}

body.berea-sticky-active #masthead .site-branding .site-title {
	font-size: 1.25rem;
}

body.berea-sticky-active #masthead .main-navigation ul.menu > li > a {
	padding-top: 10px;
	padding-bottom: 10px;
}

/* Compatibilidad con la barra de administración de WordPress */
body.berea-sticky-active.admin-bar #masthead {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.berea-sticky-active.admin-bar #masthead {
		top: 46px;
	}
}

@keyframes berea-sticky-in {
	from {
		transform: translateY(-100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.berea-carrusel-seccion {
    padding: 50px 20px;
    background-color: #f9f9f9;
}
.seccion-header {
    text-align: center;
    margin-bottom: 30px;
}
.card-libro {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-libro:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.libro-portada {
    overflow: hidden;
}
.libro-portada img {
    max-height: 260px;
    width: auto;
    margin: 0 auto 15px;
    object-fit: contain;
    transition: transform 0.35s ease;
}
.card-libro:hover .libro-portada img {
    transform: scale(1.07);
}
.libro-titulo {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
}
.libro-precio {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #b22222;
    margin-bottom: 12px;
}