/**
 * Yanuba — overrides mínimos post-yanuba.css
 *
 * Menú móvil: 100% yanuba.css (780px / 580px), igual que yanubaold.local.
 * Solo se corrigen conflictos Underscores (style.css @ 600px).
 */

/* Underscores oculta .menu-toggle desde 600px; Yanuba mobile = 780px */
@media screen and (min-width: 37.5em) and (max-width: 780px) {
	header.site-header .header-bot .menu-toggle {
		display: flex !important;
	}

	header.site-header .header-bot .flex-app {
		display: flex !important;
	}
}

@media (max-width: 780px) {
	header.site-header .header-bot .menu-toggle {
		display: flex !important;
	}

	/* style.css: .main-navigation ul { display: none } */
	header.site-header .header-bot .container.menuToggle .main-navigation ul#primary-menu {
		display: flex !important;
	}
}

/*
 * WooCommerce 8.6+: header duplicado sin imagen de fondo
 */
.woocommerce-products-header:not([style*="background-image"]) {
	display: none !important;
}

/* ------------------------------------------------------------------
   YITH Wishlist link-style — solo icono en cards
   ------------------------------------------------------------------ */
.producto .wishlist .yith-wcwl-add-to-wishlist--link-style a.add_to_wishlist,
.producto .wishlist .yith-wcwl-add-to-wishlist--link-style a.delete_item,
ul.products li.product .wishlist .yith-wcwl-add-to-wishlist--link-style a.add_to_wishlist,
.productos-populares .producto .wishlist .yith-wcwl-add-to-wishlist--link-style a.add_to_wishlist,
.productos-relacionados .producto .wishlist .yith-wcwl-add-to-wishlist--link-style a.add_to_wishlist {
	font-size: 0 !important;
	line-height: 0 !important;
	gap: 0 !important;
}

.producto .wishlist .yith-wcwl-add-to-wishlist--link-style .yith-wcwl-add-button,
.productos-populares .producto .wishlist .yith-wcwl-add-to-wishlist--link-style .yith-wcwl-add-button {
	line-height: 0;
}

.producto .wishlist .yith-wcwl-add-to-wishlist--link-style svg.yith-wcwl-icon-svg,
.productos-populares .producto .wishlist .yith-wcwl-add-to-wishlist--link-style svg.yith-wcwl-icon-svg {
	width: 24px !important;
	height: 24px !important;
}

@media (max-width: 580px) {
	.producto .wishlist .yith-wcwl-add-to-wishlist--link-style svg.yith-wcwl-icon-svg,
	.productos-populares .producto .wishlist .yith-wcwl-add-to-wishlist--link-style svg.yith-wcwl-icon-svg {
		width: 20px !important;
		height: 20px !important;
	}
}

/* ------------------------------------------------------------------
   Blog móvil — paridad yanubaold + sin scroll lateral
   ------------------------------------------------------------------ */
@media (max-width: 780px) {
	html,
	body.blog {
		overflow-x: clip;
		max-width: 100%;
	}

	body.blog #page,
	body.blog #content,
	body.blog main.site-main {
		overflow-x: clip;
		max-width: 100%;
		width: 100%;
		box-sizing: border-box;
	}

	/* yanuba.css usa background-size:100% 100% — provoca desborde en móvil */
	body.blog .header-section {
		width: 100%;
		max-width: 100%;
		overflow: hidden;
		background-size: cover !important;
		background-position: center;
		box-sizing: border-box;
	}

	body.blog .header-section .info-title {
		width: 100%;
		max-width: 100%;
		padding: 0 0.5rem;
		box-sizing: border-box;
	}

	body.blog .flex-blog {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		overflow-x: clip;
		box-sizing: border-box;
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	body.blog .flex-blog .left,
	body.blog .flex-blog .right,
	body.blog .flex-blog .left .main-content,
	body.blog .flex-blog .left .posts-section,
	body.blog .flex-blog .left .posts-section .grid {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}

	/* Una columna en móvil (2 cols + gap 30px desbordaba en ~375px) */
	body.blog .flex-blog .left .posts-section .grid {
		grid-template-columns: 1fr !important;
		column-gap: 0 !important;
	}

	body.blog .flex-blog .left .posts-section .post {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
	}

	body.blog .flex-blog .left .posts-section .post .imagen {
		width: 100%;
		max-width: 100%;
		overflow: hidden;
	}

	body.blog .flex-blog .left .posts-section .post .imagen img {
		display: block;
		width: 100%;
		max-width: 100%;
		height: 100%;
		object-fit: cover;
	}

	body.blog .flex-blog .left .posts-section .post .contenido {
		width: 100%;
		max-width: 100%;
	}

	body.blog .flex-blog .left .posts-section .post .contenido h2,
	body.blog .flex-blog .left .posts-section .post .contenido h2 a,
	body.blog .flex-blog .left .posts-section .post .contenido p {
		overflow-wrap: anywhere;
		word-break: break-word;
		max-width: 100%;
	}

	body.blog .flex-blog .right .sidebar-form,
	body.blog .flex-blog .right .sidebar-form form,
	body.blog .flex-blog .right .sidebar-form form input,
	body.blog .flex-blog .right .sidebar-form form input[type="submit"] {
		max-width: 100%;
		box-sizing: border-box;
	}

	body.blog .flex-blog .right .categories-section ul,
	body.blog .flex-blog .right .recent-posts-section ul {
		max-width: 100%;
		box-sizing: border-box;
	}

	body.blog .flex-blog .right .categories-section ul li a {
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	body.blog .flex-blog .right .recent-posts-section ul li a {
		min-width: 0;
		max-width: 100%;
	}

	body.blog .flex-blog .right .recent-posts-section ul li a .post-title {
		width: auto;
		flex: 1;
		min-width: 0;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	body.blog .pagination {
		flex-wrap: wrap;
		max-width: 100%;
		overflow-x: clip;
		padding-left: 1rem;
		padding-right: 1rem;
		box-sizing: border-box;
	}

	body.blog img,
	body.blog svg,
	body.blog iframe,
	body.blog video {
		max-width: 100%;
	}
}

@media (max-width: 580px) {
	body.blog .flex-blog {
		padding-left: 0.875rem !important;
		padding-right: 0.875rem !important;
	}
}

@media (min-width: 781px) and (max-width: 1025px) {
	body.blog .flex-blog .left .posts-section .grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.blog .flex-blog .left .posts-section .post {
		width: 100% !important;
		max-width: 100%;
		min-width: 0;
	}
}
