/**
 * Home Libros — estilos de las plantillas basadas en Home Libros
 * (templates/home-libros*.php; se cargan para las tres variantes).
 *
 * Port de los estilos inline de flat-shop-lite-child/pages-templates/tpl-index.php.
 * Prefijo de clases: hl-
 *
 * @package Reykjavik_Child
 */

/* El padre limita .content-area a 58.744% con "has-widgets-sidebar":
   en esta plantilla el contenido es de ancho completo. */
.home-libros-template .site-content .content-area {
	float: none;
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

/* El padding inferior de .site-content-inner (var(--content_padding):
   ~80–129px) dejaba un hueco blanco entre la última sección a sangre y
   las bandas del pie. El superior se conserva como separación del menú. */
.home-libros-template .site-content-inner {
	padding-bottom: 0;
}

/*======= Contenedor principal =======*/

.hl-home {
	width: 100%;
	margin: 0 auto;
}

.hl-home__main {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	gap: 48px;
	align-items: start;
}

@media (max-width: 991px) {
	.hl-home__main {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}

.hl-home__heading {
	margin: 0 0 30px;
	color: #232324;
	font-family: var(--typography_fonts_headings);
	line-height: 1.2;
}

/*======= Tarjeta de catálogo (columna izquierda) =======*/

.hl-card {
	background: #fbfbfb;
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.hl-card--catalogo {
	padding: 20px;
}

.hl-card--catalogo .widget {
	margin-bottom: 1.5em;
}

.hl-card--catalogo .widget:last-child {
	margin-bottom: 0;
}

.hl-card--catalogo .widget-title,
.hl-card--catalogo .wp-block-heading {
	font-size: 1.05em;
	margin: 0 0 0.75em;
	color: #232324;
}

.hl-card--catalogo ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hl-card--catalogo li {
	margin: 0 0 0.5em;
}

/* Post destacado del catálogo */
.hl-destacado {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	text-decoration: none;
	color: #333;
}

.hl-destacado img {
	width: 90px;
	max-height: 60px;
	height: auto;
	flex: 0 0 auto;
	object-fit: contain;
}

.hl-destacado span {
	font-size: 14px;
	line-height: 1.3;
}

.hl-destacado:hover span {
	color: #a85400;
}

/* Lista de categorías de productos (fallback del bloque Catálogo) */
.hl-cat-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hl-cat-list__item + .hl-cat-list__item {
	margin-top: 12px;
}

.hl-cat-list__item a {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #333;
	font-size: 14px;
	line-height: 1.35;
	text-decoration: none;
}

.hl-cat-list__item a:hover .hl-cat-list__name,
.hl-cat-list__item a:focus .hl-cat-list__name {
	color: #a85400;
	text-decoration: underline;
}

.hl-cat-list__img {
	flex: 0 0 64px;
}

.hl-cat-list__img img {
	display: block;
	width: 64px;
	height: auto;
	object-fit: contain;
}

.hl-cat-list__name {
	flex: 1 1 auto;
}

/*======= Novedades editoriales (columna derecha) =======*/

.hl-carousel {
	position: relative;
}

.hl-slide__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

@media (min-width: 992px) {
	.hl-slide__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.hl-card--producto {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	height: 450px;
	padding: 40px 15px 20px;
	text-align: center;
	overflow: hidden;
}

/* Imagen + título comparten un único enlace (evita enlaces repetidos). */
.hl-card--producto .hl-card__media {
	display: block;
	margin-bottom: 10px;
	text-decoration: none;
}

.hl-card__img {
	display: block;
	width: 150px;
	max-height: 190px;
	height: auto;
	margin: 0 auto 15px;
	object-fit: contain;
}

.hl-card__formato {
	position: absolute;
	top: 1.25rem;
	left: 15%;
	margin: 0;
	padding: 5px 10px;
	background-color: #b85c0e; /* Blanco sobre este naranja: 4.59:1 (WCAG AA) */
	color: #fff;
	font-size: 0.8em;
	line-height: 1.2;
}

.hl-card__titulo {
	display: block;
	margin: 0;
	color: #a85400; /* Sobre #fbfbfb: 5.16:1 (WCAG AA) */
	font-size: 1em;
	line-height: 1.3;
	text-decoration: underline;
}

.hl-card__media:hover .hl-card__titulo,
.hl-card__media:focus .hl-card__titulo {
	color: #8a4400;
}

/* "Me interesa" va dentro del mismo enlace que la imagen y el título. */
.hl-card__media .hl-btn {
	margin-top: 10px;
}

.hl-card__precio {
	margin: 0 0 15px;
	color: #000;
	font-size: 0.95em;
}

.hl-btn {
	display: inline-block;
	padding: 10px 22px;
	border: 1px solid #b85c0e;
	border-radius: 3px;
	background-color: #b85c0e; /* Blanco sobre este naranja: 4.59:1 (WCAG AA) */
	color: #fff;
	font-size: 0.95em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease-in-out;
}

.hl-btn:hover,
.hl-btn:focus {
	background-color: #944a0a;
	border-color: #944a0a;
	color: #fff;
}

/* Navegación del carrusel de novedades (sobre el título, como en la plantilla original) */
#hl-novedades .owl-nav {
	position: absolute;
	top: -75px;
	right: 0;
	left: auto;
	margin: 0;
}

@media (max-width: 991px) {
	#hl-novedades .owl-nav {
		position: static;
		margin-top: 10px;
		text-align: right;
	}
}

/*======= Secciones inferiores (ancho completo) =======*/

.hl-section {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 40px 0;
}

.hl-section--info {
	background-color: #f3f3f3;
}

.hl-section--ventas {
	background-color: #ebebeb;
}

.hl-section__inner {
	width: 88%;
	margin: 0 auto;
}

.hl-cols {
	display: grid;
	gap: 30px;
}

.hl-cols--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 880px) {
	.hl-cols--3 {
		grid-template-columns: 1fr;
	}
}

.hl-section__title {
	margin: 0 0 20px;
	color: #a85400; /* Sobre #f3f3f3: 4.81:1 (WCAG AA) */
	font-family: var(--typography_fonts_headings);
	font-size: 1.4em;
	font-weight: 400;
	line-height: 1.3;
	text-align: center;
}

.hl-section__title--coral {
	font-size: 1.8em;
	font-weight: 100;
	color: #c2611a; /* Sobre #ebebeb: 3.51:1, válido para texto grande (WCAG AA) */
}

.hl-col--center {
	text-align: center;
}

.hl-section__text {
	color: #676767;
	font-size: 13px;
	line-height: 1.6;
	text-align: left;
}

.hl-section__logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 15px;
	padding-bottom: 20px;
}

.hl-section__logos img {
	max-height: 60px;
	width: auto;
	padding: 5px;
}

/* Noticias */
.hl-news {
	margin: 0;
	padding: 0 0 0 25px;
	list-style: none;
}

.hl-news li {
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	line-height: 1.2;
}

.hl-news a {
	color: #676767;
	font-size: 13px;
	text-decoration: none;
}

.hl-news a:hover,
.hl-news a:focus {
	color: #a85400;
}

.hl-more {
	display: block;
	margin-top: 10px;
	color: #676767;
	font-size: 13px;
	text-align: center;
	text-decoration: none;
}

.hl-more:hover,
.hl-more:focus {
	color: #a85400;
}

/* Puntos de venta */
.hl-slide--punto a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 90px;
}

.hl-slide--punto img {
	max-height: 90px;
	width: auto;
	padding: 15px;
}
