/* Ajustes exclusivos para tablet. Móvil y escritorio conservan su diseño. */
@media (min-width:480px) and (max-width:1100px) {
	html,
	body,
	#page-container {
		max-width:100%;
		overflow-x:hidden !important;
	}

	/* Las filas de la cabecera tenían anchos fijos superiores al dispositivo. */
	.et-l--header,
	.et-l--header .et_builder_inner_content,
	.et-l--header .et_pb_section {
		max-width:100% !important;
		overflow:visible !important;
	}

	.et-l--header .et_pb_row {
		box-sizing:border-box !important;
		width:90% !important;
		max-width:900px !important;
		margin-left:auto !important;
		margin-right:auto !important;
		padding-left:0 !important;
		padding-right:0 !important;
		transform:none !important;
	}

	.et-l--header .et_pb_column,
	.et-l--header .et_pb_module,
	.et-l--header .et_pb_text_inner,
	.et-l--header .et_pb_text_inner h1,
	.et-l--header .et_pb_text_inner p {
		box-sizing:border-box;
		max-width:100% !important;
	}

	.et-l--header img,
	.et_pb_image img,
	.woocommerce img {
		max-width:100% !important;
		height:auto !important;
	}

	/* Evita que las diapositivas contiguas de WooCommerce salgan por los lados. */
	.woocommerce div.product div.images,
	.woocommerce-page div.product div.images,
	.woocommerce div.product .woocommerce-product-gallery {
		box-sizing:border-box !important;
		float:none !important;
		width:100% !important;
		max-width:540px !important;
		margin-left:auto !important;
		margin-right:auto !important;
		overflow:hidden !important;
	}

	.woocommerce div.product div.summary,
	.woocommerce-page div.product div.summary {
		box-sizing:border-box !important;
		float:none !important;
		width:100% !important;
		max-width:700px !important;
		margin-left:auto !important;
		margin-right:auto !important;
	}

	.woocommerce-product-gallery__image,
	.woocommerce-product-gallery__image a,
	.woocommerce-product-gallery__image img {
		max-width:540px !important;
	}

	.woocommerce-product-gallery__wrapper:after {
		content:"";
		display:table;
		clear:both;
	}

	/* Cuadrículas de tienda centradas, incluso cuando solo hay uno o dos productos. */
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		display:grid !important;
		grid-template-columns:repeat(auto-fit,minmax(180px,240px)) !important;
		justify-content:center !important;
		align-items:start !important;
		gap:24px !important;
		width:100% !important;
	}

	.woocommerce ul.products:before,
	.woocommerce ul.products:after,
	.woocommerce-page ul.products:before,
	.woocommerce-page ul.products:after {
		display:none !important;
	}

	.woocommerce ul.products li.product,
	.woocommerce-page ul.products li.product {
		box-sizing:border-box !important;
		float:none !important;
		width:100% !important;
		max-width:240px !important;
		margin:0 !important;
	}

	.woocommerce ul.products li.product a img,
	.woocommerce-page ul.products li.product a img {
		display:block !important;
		width:100% !important;
		height:auto !important;
		aspect-ratio:1 / 1;
		object-fit:contain !important;
	}

	.woocommerce div.product .related.products ul.products {
		grid-template-columns:repeat(auto-fit,minmax(160px,220px)) !important;
	}

	/* Protege las tarjetas y módulos personalizados frente a anchos heredados. */
	.et-l--body .et_pb_row,
	.et-l--body .et_pb_column,
	.et-l--body .et_pb_module,
	.ebdlt-escudos,
	.ebdlt-certamenes,
	.ebdlt-pg {
		box-sizing:border-box;
		max-width:100%;
	}

	/* Cuatro accesos de producto compactos por fila en tablet. */
	.ebdlt-cat-grid {
		display:-webkit-flex !important;
		display:flex !important;
		-webkit-flex-wrap:wrap !important;
		flex-wrap:wrap !important;
		grid-template-columns:repeat(4,minmax(0,1fr)) !important;
		gap:12px !important;
	}

	.ebdlt-cat-card {
		-webkit-box-sizing:border-box !important;
		box-sizing:border-box !important;
		-webkit-flex:0 0 23.5% !important;
		flex:0 0 23.5% !important;
		width:23.5% !important;
		margin:0 0.75% 12px !important;
		padding-bottom:10px !important;
	}

	.ebdlt-cat-card .ebdlt-cat-name {
		font-size:15px !important;
		line-height:1.2 !important;
		padding-left:5px !important;
		padding-right:5px !important;
	}

	.ebdlt-cat-card .ebdlt-cat-cta {
		font-size:12px !important;
	}

	/* Área táctil fiable y menú siempre por delante del contenido. */
	.et-l--header,
	.et-l--header .et_pb_menu {
		position:relative !important;
		z-index:2147483646 !important;
	}

	.et-l--header .et_pb_menu__wrap,
	.et-l--header .et_mobile_nav_menu,
	.et-l--header .mobile_nav {
		z-index:2147483646 !important;
	}

	.et-l--header .mobile_menu_bar {
		display:block !important;
		box-sizing:border-box !important;
		width:48px !important;
		height:48px !important;
		min-width:48px !important;
		min-height:48px !important;
		cursor:pointer !important;
		pointer-events:auto !important;
		touch-action:manipulation !important;
		z-index:2147483647 !important;
	}

	.et-l--header .et_mobile_menu {
		box-sizing:border-box !important;
		left:0 !important;
		right:0 !important;
		width:100% !important;
		max-height:calc(100vh - 100px) !important;
		overflow-y:auto !important;
		background:#fff8ee !important;
		border-top:3px solid #5c2735 !important;
		box-shadow:0 12px 24px rgba(55,25,30,.18) !important;
		z-index:2147483647 !important;
		pointer-events:auto !important;
	}

	.et-l--header .et_mobile_menu li a {
		display:block !important;
		color:#542532 !important;
		background:transparent !important;
	}
}

/* En las tablets más estrechas centramos los dos botones de la portada. */
@media (min-width:700px) and (max-width:850px) {
	body.home .et-l--header .et_pb_section .et_pb_row.et_pb_row_2_tb_header {
		display:flex !important;
		align-items:center !important;
		justify-content:center !important;
		gap:20px !important;
		left:50% !important;
		right:auto !important;
		margin-left:0 !important;
		margin-right:0 !important;
		transform:translateX(-50%) !important;
	}

	body.home .et_pb_row_2_tb_header .et_pb_column_3_tb_header,
	body.home .et_pb_row_2_tb_header .et_pb_column_4_tb_header {
		float:none !important;
		width:auto !important;
		margin:0 !important;
		transform:translateX(-37vw) !important;
	}

	body.home .et_pb_row_2_tb_header .et_pb_column_5_tb_header {
		display:none !important;
	}

	body.home .et_pb_row_2_tb_header .et_pb_button_module_wrapper {
		width:auto !important;
		margin:0 !important;
		text-align:center !important;
	}
}


/* Correccin de prioridad para las tarjetas WooCommerce en tablet. *//* Ajustes exclusivos para tablet. Móvil y escritorio conservan su diseño. */
@media (min-width:480px) and (max-width:1100px) {
	html,
	body,
	#page-container {
		max-width:100%;
		overflow-x:hidden !important;
	}

	/* Las filas de la cabecera tenían anchos fijos superiores al dispositivo. */
	.et-l--header,
	.et-l--header .et_builder_inner_content,
	.et-l--header .et_pb_section {
		max-width:100% !important;
		overflow:visible !important;
	}

	.et-l--header .et_pb_row {
		box-sizing:border-box !important;
		width:90% !important;
		max-width:900px !important;
		margin-left:auto !important;
		margin-right:auto !important;
		padding-left:0 !important;
		padding-right:0 !important;
		transform:none !important;
	}

	.et-l--header .et_pb_column,
	.et-l--header .et_pb_module,
	.et-l--header .et_pb_text_inner,
	.et-l--header .et_pb_text_inner h1,
	.et-l--header .et_pb_text_inner p {
		box-sizing:border-box;
		max-width:100% !important;
	}

	.et-l--header img,
	.et_pb_image img,
	.woocommerce img {
		max-width:100% !important;
		height:auto !important;
	}

	/* Evita que las diapositivas contiguas de WooCommerce salgan por los lados. */
	.woocommerce div.product div.images,
	.woocommerce-page div.product div.images,
	.woocommerce div.product .woocommerce-product-gallery {
		box-sizing:border-box !important;
		float:none !important;
		width:100% !important;
		max-width:540px !important;
		margin-left:auto !important;
		margin-right:auto !important;
		overflow:hidden !important;
	}

	.woocommerce div.product div.summary,
	.woocommerce-page div.product div.summary {
		box-sizing:border-box !important;
		float:none !important;
		width:100% !important;
		max-width:700px !important;
		margin-left:auto !important;
		margin-right:auto !important;
	}

	.woocommerce-product-gallery__image,
	.woocommerce-product-gallery__image a,
	.woocommerce-product-gallery__image img {
		max-width:540px !important;
	}

	.woocommerce-product-gallery__wrapper:after {
		content:"";
		display:table;
		clear:both;
	}

	/* Cuadrículas de tienda centradas, incluso cuando solo hay uno o dos productos. */
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		display:grid !important;
		grid-template-columns:repeat(auto-fit,minmax(180px,240px)) !important;
		justify-content:center !important;
		align-items:start !important;
		gap:24px !important;
		width:100% !important;
	}

	.woocommerce ul.products:before,
	.woocommerce ul.products:after,
	.woocommerce-page ul.products:before,
	.woocommerce-page ul.products:after {
		display:none !important;
	}

	.woocommerce ul.products li.product,
	.woocommerce-page ul.products li.product {
		box-sizing:border-box !important;
		float:none !important;
		width:100% !important;
		min-width:180px !important;
		max-width:240px !important;
		margin:0 !important;
		justify-self:stretch !important;
	}

	/* Divi asigna por módulo un porcentaje muy estrecho a cada artículo.
	 * Esta variante más específica evita que vuelva a imponerse en tablet. */
	body.woocommerce-page #page-container #et-boc .et-l .woocommerce ul.products li.product,
	body.archive #page-container #et-boc .et-l .woocommerce ul.products li.product {
		width:100% !important;
		min-width:180px !important;
		max-width:240px !important;
	}

	.woocommerce ul.products li.product a img,
	.woocommerce-page ul.products li.product a img {
		display:block !important;
		width:100% !important;
		height:auto !important;
		aspect-ratio:1 / 1;
		object-fit:contain !important;
	}

	.woocommerce div.product .related.products ul.products {
		grid-template-columns:repeat(auto-fit,minmax(160px,220px)) !important;
	}

	/* Protege las tarjetas y módulos personalizados frente a anchos heredados. */
	.et-l--body .et_pb_row,
	.et-l--body .et_pb_column,
	.et-l--body .et_pb_module,
	.ebdlt-escudos,
	.ebdlt-certamenes,
	.ebdlt-pg {
		box-sizing:border-box;
		max-width:100%;
	}

	/* Cuatro accesos de producto compactos por fila en tablet. */
	.ebdlt-cat-grid {
		display:-webkit-flex !important;
		display:flex !important;
		-webkit-flex-wrap:wrap !important;
		flex-wrap:wrap !important;
		grid-template-columns:repeat(4,minmax(0,1fr)) !important;
		gap:12px !important;
	}

	.ebdlt-cat-card {
		-webkit-box-sizing:border-box !important;
		box-sizing:border-box !important;
		-webkit-flex:0 0 23.5% !important;
		flex:0 0 23.5% !important;
		width:23.5% !important;
		margin:0 0.75% 12px !important;
		padding-bottom:10px !important;
	}

	.ebdlt-cat-card .ebdlt-cat-name {
		font-size:15px !important;
		line-height:1.2 !important;
		padding-left:5px !important;
		padding-right:5px !important;
	}

	.ebdlt-cat-card .ebdlt-cat-cta {
		font-size:12px !important;
	}

	/* Área táctil fiable y menú siempre por delante del contenido. */
	.et-l--header,
	.et-l--header .et_pb_menu {
		position:relative !important;
		z-index:2147483646 !important;
	}

	.et-l--header .et_pb_menu__wrap,
	.et-l--header .et_mobile_nav_menu,
	.et-l--header .mobile_nav {
		z-index:2147483646 !important;
	}

	.et-l--header .mobile_menu_bar {
		display:block !important;
		box-sizing:border-box !important;
		width:48px !important;
		height:48px !important;
		min-width:48px !important;
		min-height:48px !important;
		cursor:pointer !important;
		pointer-events:auto !important;
		touch-action:manipulation !important;
		z-index:2147483647 !important;
	}

	.et-l--header .et_mobile_menu {
		box-sizing:border-box !important;
		left:0 !important;
		right:0 !important;
		width:100% !important;
		max-height:calc(100vh - 100px) !important;
		overflow-y:auto !important;
		background:#fff8ee !important;
		border-top:3px solid #5c2735 !important;
		box-shadow:0 12px 24px rgba(55,25,30,.18) !important;
		z-index:2147483647 !important;
		pointer-events:auto !important;
	}

	.et-l--header .et_mobile_menu li a {
		display:block !important;
		color:#542532 !important;
		background:transparent !important;
	}
}

/* En las tablets más estrechas centramos los dos botones de la portada. */
@media (min-width:700px) and (max-width:850px) {
	body.home .et-l--header .et_pb_section .et_pb_row.et_pb_row_2_tb_header {
		display:flex !important;
		align-items:center !important;
		justify-content:center !important;
		gap:20px !important;
		left:50% !important;
		right:auto !important;
		margin-left:0 !important;
		margin-right:0 !important;
		transform:translateX(-50%) !important;
	}

	body.home .et_pb_row_2_tb_header .et_pb_column_3_tb_header,
	body.home .et_pb_row_2_tb_header .et_pb_column_4_tb_header {
		float:none !important;
		width:auto !important;
		margin:0 !important;
		transform:translateX(-37vw) !important;
	}

	body.home .et_pb_row_2_tb_header .et_pb_column_5_tb_header {
		display:none !important;
	}

	body.home .et_pb_row_2_tb_header .et_pb_button_module_wrapper {
		width:auto !important;
		margin:0 !important;
		text-align:center !important;
	}
}

