/* =========================================================================
   elturco.es — Ajustes móviles de todo el sitio (1.3.1)
   Solo pantallas estrechas. Medido en 375 px (iPhone) el 23-11-2026.
   ========================================================================= */

@media (max-width: 980px) {
	/* iOS amplía la página al tocar un campo de menos de 16 px
	   (cantidad del producto, «Ordenar por», buscador, cupón del carrito lateral). */
	input[type="text"],
	input[type="email"],
	input[type="tel"],
	input[type="number"],
	input[type="search"],
	input[type="password"],
	input.qty,
	select,
	textarea {
		font-size: 16px !important;
	}
}

@media (max-width: 767px) {
	/* Cabecera: el importe del carrito se salía por la derecha (cortado).
	   Queda el icono con el número de artículos. */
	.et-l--header .cpops-launcher__total {
		display: none !important;
	}

	/* Categorías y tienda: dos productos por fila en vez de uno
	   (107 productos = una pantalla por producto). */
	body.tax-product_cat ul.products,
	body.post-type-archive-product ul.products,
	body.tax-product_tag ul.products {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 16px 12px;
	}
	body.tax-product_cat ul.products::before,
	body.tax-product_cat ul.products::after,
	body.post-type-archive-product ul.products::before,
	body.post-type-archive-product ul.products::after,
	body.tax-product_tag ul.products::before,
	body.tax-product_tag ul.products::after {
		display: none !important;
	}
	body.tax-product_cat ul.products li.product,
	body.post-type-archive-product ul.products li.product,
	body.tax-product_tag ul.products li.product {
		width: auto !important;
		float: none !important;
		margin: 0 !important;
		clear: none !important;
		padding: 8px !important;
	}
	/* «IVA incluido» en su propia línea, más pequeño. */
	body.tax-product_cat ul.products li.product .price small,
	body.post-type-archive-product ul.products li.product .price small,
	body.tax-product_tag ul.products li.product .price small {
		display: block;
		font-size: 11px !important;
	}
	/* El preset de Divi usa «.et-db #et-boc .et-l …» con !important: hace falta más especificidad. */
	body.tax-product_cat.et-db #et-boc .et-l .et_pb_shop .woocommerce ul.products li.product h2.woocommerce-loop-product__title,
	body.post-type-archive-product.et-db #et-boc .et-l .et_pb_shop .woocommerce ul.products li.product h2.woocommerce-loop-product__title,
	body.tax-product_tag.et-db #et-boc .et-l .et_pb_shop .woocommerce ul.products li.product h2.woocommerce-loop-product__title,
	body.tax-product_cat ul.products li.product h2.woocommerce-loop-product__title,
	body.post-type-archive-product ul.products li.product h2.woocommerce-loop-product__title,
	body.tax-product_tag ul.products li.product h2.woocommerce-loop-product__title {
		font-size: 14px !important;
		line-height: 1.3 !important;
	}
	body.tax-product_cat ul.products li.product .price,
	body.post-type-archive-product ul.products li.product .price,
	body.tax-product_tag ul.products li.product .price {
		font-size: 15px !important;
	}
	body.tax-product_cat ul.products li.product .button,
	body.post-type-archive-product ul.products li.product .button,
	body.tax-product_tag ul.products li.product .button {
		font-size: 13px !important;
		padding: 10px 8px !important;
		white-space: normal;
		text-align: center;
	}

	/* Título grande de la categoría (50 px): partía «Alimentaci-ón». */
	body.tax-product_cat .et_pb_text_1_tb_body p,
	body.post-type-archive-product .et_pb_text_1_tb_body p {
		font-size: clamp(30px, 9vw, 50px) !important;
		overflow-wrap: normal !important;
		word-break: normal !important;
		hyphens: auto;
	}

	/* Portada: botones «Comprar» de las colecciones (11 px). */
	html body #page-container .et_pb_button.molti-collection-card-content.molti-collection-card-content {
		font-size: 14px !important;
	}

	/* Ficha de producto: botón de compra y datos (SKU, categorías). */
	html body.single-product #page-container .single_add_to_cart_button.button.button {
		font-size: 16px !important;
		min-height: 48px;
	}
	body.single-product #page-container .product_meta,
	body.single-product #page-container .product_meta a,
	body.single-product #page-container .product_meta span {
		font-size: 13px !important;
	}
}
