/**
 * Category and shop archives — diseno-nuevo/categoria-producto
 * Stays inside Shoptimizer's .col-full. Home loop cards are not restyled.
 */

body.tax-product_cat,
body.tax-product_tag,
body.post-type-archive-product {
	--teo-negro: #120a04;
	--teo-cacao: #2a1509;
	--teo-chocolate: #573016;
	--teo-caramelo: #b8712a;
	--teo-dorado: #d4a44e;
	--teo-crema: #f3e8d2;
	--teo-blanco: #fdf8f0;
	--teo-gris: #897769;
	--teo-gris-c: #e5d9c8;
	--teo-display: "Libre Baskerville", Georgia, serif;
	--teo-body: "Outfit", system-ui, sans-serif;
	background: var(--teo-blanco);
	color: var(--teo-cacao);
}

body.tax-product_cat .site-content,
body.tax-product_tag .site-content,
body.post-type-archive-product .site-content,
body.tax-product_cat #content,
body.tax-product_tag #content,
body.post-type-archive-product #content {
	background: var(--teo-blanco);
}

body.tax-product_cat h1.entry-title,
body.tax-product_tag h1.entry-title,
body.post-type-archive-product h1.entry-title,
body.tax-product_cat .site-header h1,
body.tax-product_tag .site-header h1,
body.post-type-archive-product .site-header h1 {
	display: none !important;
}

body.tax-product_cat .woocommerce-breadcrumb,
body.tax-product_tag .woocommerce-breadcrumb,
body.post-type-archive-product .woocommerce-breadcrumb {
	font-family: var(--teo-body);
	font-size: 12px;
	font-weight: 400;
	color: var(--teo-gris);
	background: transparent;
	border-bottom: 1px solid var(--teo-gris-c);
	padding: 14px 0;
	margin: 0 0 28px;
}

body.tax-product_cat .woocommerce-breadcrumb a,
body.tax-product_tag .woocommerce-breadcrumb a,
body.post-type-archive-product .woocommerce-breadcrumb a {
	color: var(--teo-gris);
	text-decoration: none;
}

body.tax-product_cat .woocommerce-products-header,
body.tax-product_tag .woocommerce-products-header,
body.post-type-archive-product .woocommerce-products-header {
	max-width: 760px;
	margin: 0 0 28px;
	padding: 0;
}

/* Category image: the header itself leaves the column and spans the viewport. */
body.tax-product_cat .woocommerce-products-header:has(.cg-cat-image),
body.tax-product_tag .woocommerce-products-header:has(.cg-cat-image) {
	display: block;
	max-width: none;
	width: 100vw;
	margin: 0 0 32px;
	margin-left: calc(50% - 50vw);
	overflow: visible;
}

body.tax-product_cat .woocommerce-products-header .cg-cat-image,
body.tax-product_tag .woocommerce-products-header .cg-cat-image {
	display: block;
	width: 100% !important;
	max-width: none !important;
	height: clamp(220px, 34vw, 460px);
	margin: 0;
	flex: none;
	object-fit: cover;
	object-position: center center;
}

body.tax-product_cat .woocommerce-products-header__title,
body.tax-product_tag .woocommerce-products-header__title,
body.post-type-archive-product .woocommerce-products-header__title,
body.tax-product_cat .woocommerce-products-header h1,
body.tax-product_tag .woocommerce-products-header h1,
body.post-type-archive-product .woocommerce-products-header h1 {
	font-family: var(--teo-display);
	font-size: 38px;
	font-weight: 700;
	line-height: 1.15;
	color: var(--teo-negro);
	margin: 0 0 14px;
}

body.tax-product_cat .term-description,
body.tax-product_tag .term-description,
body.post-type-archive-product .page-description,
body.tax-product_cat .term-description p,
body.tax-product_tag .term-description p {
	font-family: var(--teo-body);
	font-size: 14px;
	font-weight: 300;
	line-height: 1.6;
	color: var(--teo-gris);
	margin: 0;
}

/* Full content column: the mockup has no filter sidebar. */
body.tax-product_cat #secondary,
body.tax-product_tag #secondary,
body.post-type-archive-product #secondary,
body.tax-product_cat .shoptimizer-archive .widget-area,
body.post-type-archive-product .shoptimizer-archive .widget-area {
	display: none !important;
}

body.tax-product_cat #primary,
body.tax-product_tag #primary,
body.post-type-archive-product #primary,
body.tax-product_cat .content-area,
body.tax-product_tag .content-area,
body.post-type-archive-product .content-area {
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	margin: 0 !important;
}

body.tax-product_cat .teo-archive-toolbar,
body.tax-product_tag .teo-archive-toolbar,
body.post-type-archive-product .teo-archive-toolbar {
	display: block;
	width: 100%;
}

body.tax-product_cat .shoptimizer-sorting:not(.sorting-end),
body.tax-product_tag .shoptimizer-sorting:not(.sorting-end),
body.post-type-archive-product .shoptimizer-sorting:not(.sorting-end) {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	border-bottom: 2px solid var(--teo-negro);
	padding-bottom: 20px;
	margin: 0 0 36px;
}

body.tax-product_cat .shoptimizer-sorting.sorting-end,
body.tax-product_tag .shoptimizer-sorting.sorting-end,
body.post-type-archive-product .shoptimizer-sorting.sorting-end {
	display: none !important;
}

body.tax-product_cat .woocommerce-result-count,
body.tax-product_tag .woocommerce-result-count,
body.post-type-archive-product .woocommerce-result-count {
	float: none !important;
	font-family: var(--teo-body);
	font-size: 12px;
	font-weight: 500;
	color: var(--teo-gris);
	margin: 0;
}

body.tax-product_cat .woocommerce-ordering,
body.tax-product_tag .woocommerce-ordering,
body.post-type-archive-product .woocommerce-ordering {
	float: none !important;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
}

body.tax-product_cat .woocommerce-ordering::before,
body.tax-product_tag .woocommerce-ordering::before,
body.post-type-archive-product .woocommerce-ordering::before {
	content: "Ordenar por";
	font-family: var(--teo-body);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--teo-gris);
	white-space: nowrap;
}

body.tax-product_cat .shoptimizer-sorting:not(.sorting-end) .woocommerce-ordering,
body.tax-product_tag .shoptimizer-sorting:not(.sorting-end) .woocommerce-ordering,
body.post-type-archive-product .shoptimizer-sorting:not(.sorting-end) .woocommerce-ordering {
	display: flex;
}

body.tax-product_cat .mobile-filter,
body.tax-product_tag .mobile-filter,
body.post-type-archive-product .mobile-filter {
	display: none !important;
}

body.tax-product_cat .woocommerce-ordering select,
body.tax-product_tag .woocommerce-ordering select,
body.post-type-archive-product .woocommerce-ordering select {
	height: 38px;
	border: 1.5px solid var(--teo-gris-c) !important;
	border-radius: 0 !important;
	background: var(--teo-blanco) !important;
	color: var(--teo-cacao) !important;
	font-family: var(--teo-body);
	font-size: 13px;
	padding: 0 12px;
	box-shadow: none !important;
}

/* Toolbar sits on the woocommerce wrapper's first row of tools. */
body.tax-product_cat ul.products,
body.tax-product_tag ul.products,
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products.columns-2,
body.tax-product_cat ul.products.columns-3,
body.tax-product_cat ul.products.columns-4,
body.tax-product_tag ul.products.columns-2,
body.tax-product_tag ul.products.columns-3,
body.tax-product_tag ul.products.columns-4,
body.post-type-archive-product ul.products.columns-2,
body.post-type-archive-product ul.products.columns-3,
body.post-type-archive-product ul.products.columns-4 {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 44px 40px !important;
}

body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product,
body.post-type-archive-product ul.products li.product {
	background: transparent;
	overflow: visible;
	box-shadow: none !important;
}

body.tax-product_cat ul.products li.product:hover,
body.tax-product_tag ul.products li.product:hover,
body.post-type-archive-product ul.products li.product:hover {
	box-shadow: none !important;
	transform: none !important;
}

body.tax-product_cat ul.products li.product:hover img,
body.tax-product_tag ul.products li.product:hover img,
body.post-type-archive-product ul.products li.product:hover img {
	filter: brightness(1.06);
}

body.tax-product_cat ul.products li.product .woocommerce-image__wrapper,
body.tax-product_tag ul.products li.product .woocommerce-image__wrapper,
body.post-type-archive-product ul.products li.product .woocommerce-image__wrapper {
	flex: none !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	aspect-ratio: 4 / 3;
	margin-bottom: 0 !important;
	border-radius: 2px 2px 0 0;
}

body.tax-product_cat ul.products li.product .woocommerce-card__header,
body.tax-product_tag ul.products li.product .woocommerce-card__header,
body.post-type-archive-product ul.products li.product .woocommerce-card__header {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 16px;
	row-gap: 0;
	align-items: baseline;
	min-height: 0 !important;
	padding: 16px 16px 8px !important;
	background: transparent;
	box-sizing: border-box;
}

body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title a,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title a,
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title a {
	grid-column: 1 / -1;
	font-size: 20px;
	margin: 0 0 8px;
	min-height: 0;
	max-height: none;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

body.tax-product_cat ul.products li.product:hover .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product:hover .woocommerce-loop-product__title a,
body.tax-product_tag ul.products li.product:hover .woocommerce-loop-product__title a,
body.post-type-archive-product ul.products li.product:hover .woocommerce-loop-product__title a {
	color: var(--teo-chocolate);
}

body.tax-product_cat ul.products li.product .teo-loop-excerpt,
body.tax-product_tag ul.products li.product .teo-loop-excerpt,
body.post-type-archive-product ul.products li.product .teo-loop-excerpt {
	grid-column: 1 / -1;
	font-size: 12.5px;
	margin: 0 0 16px;
	min-height: 39px;
	max-height: none;
}

body.tax-product_cat ul.products li.product .price,
body.tax-product_tag ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price {
	grid-column: 1;
	font-size: 15px;
	margin: 0;
}

body.tax-product_cat ul.products li.product .teo-price-from,
body.tax-product_tag ul.products li.product .teo-price-from,
body.post-type-archive-product ul.products li.product .teo-price-from {
	font-family: var(--teo-display);
	font-weight: 700;
}

body.tax-product_cat ul.products li.product .teo-archive-more,
body.tax-product_tag ul.products li.product .teo-archive-more,
body.post-type-archive-product ul.products li.product .teo-archive-more {
	grid-column: 2;
	justify-self: end;
	font-family: var(--teo-body);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--teo-caramelo);
	white-space: nowrap;
}

body.tax-product_cat ul.products li.product a.button,
body.tax-product_tag ul.products li.product a.button,
body.post-type-archive-product ul.products li.product a.button {
	display: none !important;
}

body.tax-product_cat .woocommerce-pagination,
body.tax-product_tag .woocommerce-pagination,
body.post-type-archive-product .woocommerce-pagination {
	margin-top: 48px;
	font-family: var(--teo-body);
}

body.tax-product_cat .woocommerce-pagination ul.page-numbers,
body.tax-product_tag .woocommerce-pagination ul.page-numbers,
body.post-type-archive-product .woocommerce-pagination ul.page-numbers {
	border: 0;
}

body.tax-product_cat .woocommerce-pagination a,
body.tax-product_cat .woocommerce-pagination span,
body.tax-product_tag .woocommerce-pagination a,
body.tax-product_tag .woocommerce-pagination span,
body.post-type-archive-product .woocommerce-pagination a,
body.post-type-archive-product .woocommerce-pagination span {
	font-family: var(--teo-body);
	color: var(--teo-cacao);
	background: transparent;
	border: 0;
	border-radius: 0;
}

body.tax-product_cat .woocommerce-pagination span.current,
body.tax-product_tag .woocommerce-pagination span.current,
body.post-type-archive-product .woocommerce-pagination span.current {
	background: var(--teo-caramelo);
	color: var(--teo-negro);
}

body.tax-product_cat .woocommerce-info,
body.tax-product_tag .woocommerce-info,
body.post-type-archive-product .woocommerce-info {
	background: var(--teo-crema) !important;
	color: var(--teo-cacao) !important;
	border: 0 !important;
	border-left: 3px solid var(--teo-caramelo) !important;
	border-radius: 0 !important;
	font-family: var(--teo-body);
}

@media (max-width: 1024px) {
	body.tax-product_cat .woocommerce-products-header__title,
	body.tax-product_tag .woocommerce-products-header__title,
	body.post-type-archive-product .woocommerce-products-header__title,
	body.tax-product_cat .woocommerce-products-header h1,
	body.tax-product_tag .woocommerce-products-header h1,
	body.post-type-archive-product .woocommerce-products-header h1 {
		font-size: 30px;
	}

	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products,
	body.post-type-archive-product ul.products,
	body.tax-product_cat ul.products.columns-3,
	body.tax-product_cat ul.products.columns-4,
	body.tax-product_tag ul.products.columns-3,
	body.tax-product_tag ul.products.columns-4,
	body.post-type-archive-product ul.products.columns-3,
	body.post-type-archive-product ul.products.columns-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 28px 20px !important;
	}
}

@media (max-width: 640px) {
	body.tax-product_cat ul.products,
	body.tax-product_tag ul.products,
	body.post-type-archive-product ul.products,
	body.tax-product_cat ul.products.columns-2,
	body.tax-product_cat ul.products.columns-3,
	body.tax-product_cat ul.products.columns-4,
	body.tax-product_tag ul.products.columns-2,
	body.tax-product_tag ul.products.columns-3,
	body.tax-product_tag ul.products.columns-4,
	body.post-type-archive-product ul.products.columns-2,
	body.post-type-archive-product ul.products.columns-3,
	body.post-type-archive-product ul.products.columns-4 {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 28px !important;
	}

	body.tax-product_cat .shoptimizer-sorting:not(.sorting-end),
	body.tax-product_tag .shoptimizer-sorting:not(.sorting-end),
	body.post-type-archive-product .shoptimizer-sorting:not(.sorting-end) {
		flex-wrap: wrap;
		align-items: flex-start;
	}

	body.tax-product_cat .woocommerce-ordering,
	body.tax-product_tag .woocommerce-ordering,
	body.post-type-archive-product .woocommerce-ordering {
		width: 100%;
		margin-top: 12px;
	}
}
