/**
 * Catálogo WooCommerce: ancho amplio, rejilla tipo carrusel de productos, barra de filtros/orden.
 */

/* Migas y avisos */
.pv-shop-layout .wc-block-breadcrumbs,
.pv-shop-layout .woocommerce-breadcrumb {
	margin-bottom: 1rem;
	font-size: 0.9rem;
	color: #5a6a66;
}

.pv-shop-layout .woocommerce-store-notice {
	margin-bottom: 1rem;
}

/*
 * El <main> del catálogo replica page.html: layout constrained + solo padding vertical.
 * No forzar max-width/márgenes en main para que header y footer se comporten igual que en el resto del sitio.
 */
.pv-shop-layout {
	box-sizing: border-box;
}

/* Contenedor del bloque «Todos los productos»: usa todo el ancho disponible */
.pv-shop-layout .wp-block-woocommerce-all-products,
.pv-shop-layout .wc-block-all-products {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: auto;
	margin-right: auto;
}

.pv-shop-layout .wc-block-grid {
	width: 100% !important;
	max-width: none !important;
}

/* Título de archivo + descripción de categoría */
.pv-shop-title-wrap .wp-block-query-title {
	color: #0d6154;
	margin-top: 0;
	margin-bottom: 0.35rem;
}

.pv-shop-title-wrap .wp-block-term-description {
	text-align: center;
	color: #767676;
	font-size: 0.95rem;
	line-height: 1.45;
	margin: 0.5rem auto 0;
	max-width: 42rem;
}

.pv-shop-title-wrap .wp-block-term-description p {
	margin: 0;
}

/* Barra: resultados + ordenación */
.pv-shop-toolbar {
	background: #ffffff;
	border: 1px solid rgba(0, 169, 157, 0.18);
	border-left: 4px solid #00a99d;
	border-radius: 14px;
	box-shadow: 0 6px 18px -14px rgba(0, 0, 0, 0.25);
	margin-bottom: 1.75rem !important;
	width: 100%;
	box-sizing: border-box;
}

.pv-shop-toolbar.is-layout-flex {
	gap: 1rem !important;
	align-items: center !important;
	width: calc(100% - 2rem);
    margin: 0 auto;
}

.pv-shop-toolbar .wp-block-woocommerce-product-results-count {
	padding-left: 1rem;
}

/* "Mostrando los 9 resultados" */
.pv-shop-toolbar .wp-block-woocommerce-product-results-count,
.pv-shop-toolbar .wp-block-woocommerce-product-results-count p {
	margin: 0 !important;
	color: #0d6154;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
}

.pv-shop-toolbar .wp-block-woocommerce-catalog-sorting {
	margin: 0 !important;
}

/* Ordenación WooCommerce Blocks (select / dropdown) */
.pv-shop-toolbar .wc-block-catalog-sorting,
.pv-shop-toolbar .wc-block-components-dropdown,
.pv-shop-toolbar .catalog-sorting {
	width: auto;
	max-width: 100%;
}

/* Wrap del select: añadimos label "Ordenar:" delante */
.pv-shop-toolbar .wc-block-catalog-sorting,
.pv-shop-toolbar form.woocommerce-ordering {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 !important;
}

.pv-shop-toolbar .wc-block-catalog-sorting::before,
.pv-shop-toolbar form.woocommerce-ordering::before {
	content: "Ordenar:";
	color: #0d6154;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.pv-shop-toolbar select,
.pv-shop-toolbar .wc-block-components-select__container select,
.pv-shop-toolbar .wc-block-components-select select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding: 0.55rem 2.5rem 0.55rem 1.1rem !important;
	border: 2px solid #00a99d !important;
	border-radius: 999px !important;
	background-color: #ffffff !important;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%2300a99d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/></svg>") !important;
	background-repeat: no-repeat !important;
	background-position: right 1rem center !important;
	background-size: 12px 8px !important;
	color: #0d6154 !important;
	font-family: inherit !important;
	font-size: 0.9rem !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	min-width: min(100%, 240px);
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: background-color 0.18s ease, border-color 0.18s ease,
		box-shadow 0.18s ease, transform 0.18s ease;
}

.pv-shop-toolbar select:hover,
.pv-shop-toolbar .wc-block-components-select__container select:hover,
.pv-shop-toolbar .wc-block-components-select select:hover {
	background-color: rgba(0, 169, 157, 0.06) !important;
}

.pv-shop-toolbar select:focus,
.pv-shop-toolbar select:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.25);
}

/* Filtros adicionales si los añades en la plantilla */
.pv-shop-layout .wp-block-woocommerce-filter-wrapper,
.pv-shop-layout .wp-block-woocommerce-active-filters {
	margin-bottom: 1rem;
}

/* Cuadrícula de productos: 3 → 2 → 1 */
.pv-shop-layout ul.wc-block-grid__products {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: clamp(1.1rem, 2.2vw, 1.75rem) !important;
	list-style: none !important;
	margin: 0 0 2rem !important;
	padding: 0 !important;
	width: 100% !important;
	align-items: stretch !important;
}

.pv-shop-layout li.wc-block-grid__product {
	margin: 0 !important;
	min-width: 0 !important;
	width: auto !important;
	max-width: none !important;
	flex: none !important;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #f4f3ef;
	border-radius: 28px;
	padding: 17px 17px 16px;
	box-sizing: border-box;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.07);
}

.pv-shop-layout .wc-block-grid__product-link {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	height: 100%;
	min-height: 0;
	text-decoration: none !important;
	color: inherit;
	align-items: stretch;
	text-align: left;
}

/* Quitar subrayado de enlaces en título */
.pv-shop-layout .wc-block-grid__product-title a,
.pv-shop-layout .wc-block-components-product-title a {
	text-decoration: none !important;
	color: inherit;
}

.pv-shop-layout .wc-block-grid__product-image {
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #ffffff;
	border-radius: 2px;
	overflow: hidden;
	margin: 0;
	display: block;
}

.pv-shop-layout .wc-block-grid__product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pv-shop-layout .wc-block-grid__product-title,
.pv-shop-layout .wc-block-components-product-title {
	margin: 14px 0 7px;
	color: #00a99d;
	font-size: clamp(1.15rem, 1.45vw, 1.55rem);
	line-height: 1.15;
	font-weight: 700;
	text-align: left;
}

.pv-shop-layout .wc-block-grid__product-price,
.pv-shop-layout .wc-block-components-product-price {
	margin: 0 0 6px;
	color: #767676;
	font-size: clamp(0.88rem, 0.95vw, 1rem);
}

.pv-shop-layout .wc-block-components-product-summary {
	margin: 0 0 8px;
	color: #767676;
	font-size: clamp(0.82rem, 0.9vw, 0.98rem);
	line-height: 1.32;
	text-align: justify;
}

.pv-shop-layout .wc-block-grid__product-add-to-cart {
	margin-top: auto;
	padding-top: 10px;
	display: flex;
	justify-content: center;
	width: 100%;
}

.pv-shop-layout .wc-block-grid__product-add-to-cart .wp-block-button__link,
.pv-shop-layout .wc-block-grid__product-add-to-cart .wc-block-components-button,
.pv-shop-layout .wc-block-grid__product-add-to-cart button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 23px 7px !important;
	border-radius: 999px !important;
	border: 2px solid #00a99d !important;
	color: #00a99d !important;
	background: transparent !important;
	font-weight: 600 !important;
	font-size: clamp(0.95rem, 1.05vw, 1.1rem) !important;
	line-height: 1 !important;
	text-decoration: none !important;
	transition: background 0.2s ease, transform 0.2s ease;
}

.pv-shop-layout .wc-block-grid__product-add-to-cart .wp-block-button__link:hover {
	background: rgba(0, 169, 157, 0.08) !important;
	transform: translateY(-1px);
}

/* Product Collection (WooCommerce 9+; sustituye a «Todos los productos») */
.pv-shop-layout .wp-block-woocommerce-product-collection {
	width: 100% !important;
	max-width: 100% !important;
}

.pv-shop-layout .wp-block-woocommerce-product-collection .wc-block-product,
.pv-shop-layout .wp-block-post-template .wc-block-product {
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 18px;
	padding: 20px;
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.09), 0 2px 12px rgba(0, 0, 0, 0.05);
	height: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	min-width: 0;
	align-items: stretch;
}

.pv-shop-layout .wp-block-post-template.is-flex-container {
	gap: clamp(1.1rem, 2.2vw, 1.75rem) !important;
}

.pv-shop-layout .wp-block-woocommerce-product-image,
.pv-shop-layout .wc-block-components-product-image {
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #f6f6f4;
	border-radius: 10px;
	overflow: hidden;
	margin: 0 0 0.25rem;
}

.pv-shop-layout .wp-block-woocommerce-product-image img,
.pv-shop-layout .wc-block-components-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Título: alineado a la izquierda, más aire respecto a la imagen */
.pv-shop-layout .wp-block-post-template .wp-block-post-title.pv-catalog-product-title,
.pv-shop-layout .wp-block-post-template .wp-block-post-title.pv-catalog-product-title a {
	color: #00a99d;
	font-size: clamp(1.5rem, 1.85vw, 2.2rem) !important;
	font-weight: 700;
	line-height: 1.1;
	text-decoration: none;
	text-align: left !important;
	margin-top: 1.65rem !important;
	margin-bottom: 0.5rem !important;
}

.pv-shop-layout .wp-block-post-template .wp-block-woocommerce-product-price {
	color: #767676;
}

/* Resumen / descripción corta entre título y botón */
.pv-shop-layout .wp-block-woocommerce-product-summary,
.pv-shop-layout .wp-block-post-template .wp-block-woocommerce-product-summary {
	margin: 0 0 0.65rem !important;
	flex: 1 1 auto;
	min-height: 0;
}

.pv-shop-layout .wp-block-woocommerce-product-summary .wc-block-components-product-summary,
.pv-shop-layout .wc-block-components-product-summary {
	margin: 0 !important;
	color: #767676 !important;
	font-size: clamp(0.88rem, 0.95vw, 1.08rem) !important;
	line-height: 1.4 !important;
	text-align: left !important;
	text-align-last: auto !important;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pv-shop-layout .wc-block-components-product-summary p {
	margin: 0 0 0.35rem !important;
}

.pv-shop-layout .wc-block-components-product-summary p:last-child {
	margin-bottom: 0 !important;
}

/* Ocultar enlace «Leer más» del resumen si Woo lo añade (el CTA es el botón) */
.pv-shop-layout .wc-block-components-product-summary .wc-block-components-read-more {
	display: none !important;
}

/* CTA al pie: «Conoce más» centrado, estilo contorno */
.pv-shop-layout .wp-block-post-template .wp-block-woocommerce-product-button,
.pv-shop-layout .wp-block-post-template .pv-catalog-product-cta,
.pv-shop-layout .wp-block-post-template .pv-catalog-conoce-mas {
	margin-top: auto !important;
	padding-top: 0.5rem;
	display: flex !important;
	justify-content: center !important;
	width: 100% !important;
	align-self: center !important;
}

.pv-shop-layout .wp-block-post-template .wp-block-button__link,
.pv-shop-layout .wp-block-post-template .wc-block-components-button,
.pv-shop-layout .wp-block-post-template .pv-catalog-conoce-mas a {
	border-radius: 999px !important;
	border: 2px solid #00a99d !important;
	color: #00a99d !important;
	background: #fff !important;
	font-weight: 600 !important;
	font-size: clamp(0.95rem, 1.05vw, 1.15rem) !important;
	padding: 8px 24px 9px !important;
	line-height: 1 !important;
	transition: background 0.2s ease, transform 0.2s ease;
	text-decoration: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
}

.pv-shop-layout .wp-block-post-template .wp-block-button__link:hover,
.pv-shop-layout .wp-block-post-template .wc-block-components-button:hover,
.pv-shop-layout .wp-block-post-template .pv-catalog-conoce-mas a:hover {
	background: rgba(0, 169, 157, 0.08) !important;
	transform: translateY(-1px);
	color: #00a99d !important;
}

.pv-shop-layout .wp-block-query-pagination {
	margin-top: 2.25rem;
	gap: 0.5rem;
	align-items: center;
	justify-content: center;
}

.pv-shop-layout .wp-block-query-pagination .wp-block-query-pagination-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}

/* Botones base: page numbers, prev y next. */
.pv-shop-layout .wp-block-query-pagination a,
.pv-shop-layout .wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	height: 2.4rem;
	padding: 0 0.85rem;
	border: 2px solid #00a99d;
	border-radius: 999px;
	color: #00a99d;
	background: transparent;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1;
	transition: background-color 0.18s ease, color 0.18s ease,
		transform 0.18s ease, box-shadow 0.18s ease;
}

.pv-shop-layout .wp-block-query-pagination a:hover,
.pv-shop-layout .wp-block-query-pagination a:focus-visible {
	background: rgba(0, 169, 157, 0.08);
	color: #00a99d;
	transform: translateY(-1px);
	outline: none;
}

/* Página actual: relleno turquesa. */
.pv-shop-layout .wp-block-query-pagination .page-numbers.current {
	background: #00a99d;
	color: #ffffff;
	box-shadow: 0 4px 12px -4px rgba(0, 169, 157, 0.5);
	border-color: #00a99d;
}

/* Puntos suspensivos: sin botón. */
.pv-shop-layout .wp-block-query-pagination .page-numbers.dots {
	border: none;
	background: transparent;
	color: #00a99d;
	min-width: auto;
	padding: 0 0.25rem;
	box-shadow: none;
}

/* Prev / Next: flecha por contenido + buen padding. */
.pv-shop-layout .wp-block-query-pagination-previous,
.pv-shop-layout .wp-block-query-pagination-next {
	gap: 0.4rem;
}

.pv-shop-layout .wp-block-query-pagination-previous .wp-block-query-pagination-previous-arrow,
.pv-shop-layout .wp-block-query-pagination-next .wp-block-query-pagination-next-arrow {
	font-weight: 700;
	line-height: 1;
}

@media (max-width: 600px) {
	.pv-shop-layout .wp-block-query-pagination a,
	.pv-shop-layout .wp-block-query-pagination .page-numbers {
		min-width: 2.2rem;
		height: 2.2rem;
		padding: 0 0.7rem;
		font-size: 0.875rem;
	}
}

@media (max-width: 991px) {
	.pv-shop-toolbar.is-layout-flex {
		flex-direction: column !important;
		align-items: stretch !important;
	}

	.pv-shop-toolbar .wp-block-woocommerce-catalog-sorting {
		width: 100%;
	}

	.pv-shop-toolbar select,
	.pv-shop-toolbar .wc-block-components-select select {
		width: 100%;
		min-width: 0;
	}

	.pv-shop-layout ul.wc-block-grid__products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 600px) {
	.pv-shop-layout ul.wc-block-grid__products {
		grid-template-columns: 1fr !important;
	}

	.pv-shop-layout li.wc-block-grid__product {
		border-radius: 16px;
		padding: 14px 14px 13px;
	}
}

/* Contenido de la página Tienda (bloques) antes del catálogo */
.wc-shop-page-editor-content {
	margin-bottom: 2rem;
}

.wc-shop-page-editor-content > *:first-child {
	margin-top: 0;
}
