/*
 * Cahnos · tienda: landings, listados, ficha, carrito, checkout, cuenta, búsqueda y 404.
 * Usa los tokens de base.css. Contraste AA (tinta sobre blanco 14:1, acento sobre blanco 4,9:1).
 */

/* Foco visible en toda la tienda. */
.cn-main a:focus-visible,
.cn-main button:focus-visible,
.cn-main input:focus-visible,
.cn-main select:focus-visible,
.cn-main textarea:focus-visible,
.cn-main summary:focus-visible {
	outline: 3px solid var(--cn-ink);
	outline-offset: 2px;
}

.cn-btn--ghost {
	background: var(--cn-surface);
	color: var(--cn-accent);
	border: 2px solid var(--cn-accent);
}

.cn-btn--ghost:hover {
	background: var(--cn-accent-soft);
	color: #0a5f66;
}

/* Migas */
.woocommerce-breadcrumb {
	margin: 0 0 12px;
	color: var(--cn-muted);
	font-size: .85rem;
}

.woocommerce-breadcrumb a {
	color: var(--cn-muted);
}

/* Landing: cabecera fotográfica (como `.lhero` de la maqueta) */
.cn-main--land {
	padding-top: 0;
}

.cn-land__head {
	position: relative;
	margin-bottom: 18px;
	padding-bottom: 14px;
	background: #eef6fa;
	overflow: hidden;
}

.cn-land__photo {
	position: absolute;
	inset-block: 0;
	inset-inline: 45% 0;
	background-position: center;
	background-size: cover;
	filter: saturate(.9) brightness(1.05);
}

.cn-land__photo::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, #f4f8fb 0%, rgba(244, 248, 251, .8) 30%, rgba(244, 248, 251, .1) 75%);
}

.cn-land__txt {
	position: relative;
}

.cn-land__txt .woocommerce-breadcrumb {
	margin: 0;
	padding-top: 20px;
}

.cn-land__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 18px;
	align-items: end;
	max-width: 900px;
	margin-top: 14px;
}

.cn-land__head h1 {
	margin: 0 0 8px;
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 800;
	line-height: 1.04;
}

.cn-land__desc {
	max-width: 62ch;
	font-size: 1.05rem;
	color: var(--cn-ink);
}

.cn-land__desc.is-clamped {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.cn-land__desc > :last-child {
	margin-bottom: 0;
}

.cn-land__desc > * + * {
	margin-top: .6em;
}

.cn-land__more {
	margin-top: 0;
	padding: 2px 0;
	border: 0;
	background: none;
	color: #0a6a70;
	font: 800 .9rem var(--cn-body);
	text-decoration: underline;
	cursor: pointer;
}

.cn-land__stats {
	display: flex;
	gap: 10px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.cn-land__stats div {
	padding: 8px 14px;
	border: 1px solid var(--cn-line);
	border-radius: 10px;
	background: rgba(255, 255, 255, .9);
	box-shadow: var(--cn-shadow);
}

.cn-land__stats b {
	display: block;
	color: #0d2647;
	font: 800 1.4rem/1.1 var(--cn-display);
}

.cn-land__stats span {
	color: #4d6177;
	font-size: .78rem;
}

.cn-land__ctx {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px;
	border: 1px solid var(--cn-line);
	border-radius: 12px;
	background: var(--cn-surface);
	box-shadow: var(--cn-shadow);
}

.cn-land__ctx svg {
	flex: none;
	width: 18px;
	height: 18px;
	margin-inline-start: 10px;
	color: var(--cn-accent);
}

.cn-land__ctx input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 11px 6px;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: var(--cn-ink);
	font: 600 1rem var(--cn-body);
}

.cn-land__h {
	margin: 34px 0 14px;
	font-size: 1.4rem;
	font-weight: 800;
}

.cn-land__featured {
	margin-bottom: 28px;
}

.cn-land__featured h2,
.related > h2,
.upsells > h2,
.cross-sells > h2 {
	font-size: 1.3rem;
}

.cn-land__seo {
	margin-top: 36px;
	padding: 24px;
	border: 1px solid var(--cn-line);
	border-radius: var(--cn-radius);
	background: var(--cn-surface);
}

.cn-land__seo > :last-child {
	margin-bottom: 0;
}

/* Listado con filtros */
.cn-shop {
	display: block;
}

.cn-shop.has-filters {
	display: block;
}

.cn-shop__filters {
	margin-top: 18px;
}

.cn-filters__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 8px 24px;
}

.cn-filters {
	padding: 14px 16px;
	border: 1px solid var(--cn-line);
	border-radius: var(--cn-radius);
	background: var(--cn-surface);
}

.cn-filters > summary {
	cursor: pointer;
	font: 800 1rem var(--cn-display);
}

.cn-filters .widget {
	margin-top: 16px;
}

.cn-filters .widget-title {
	font-size: .92rem;
}

.cn-filters ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cn-filters li {
	padding: 3px 0;
}

.woocommerce-result-count {
	float: inline-start;
	margin: 0 0 16px;
	color: var(--cn-muted);
	font-size: .9rem;
}

.woocommerce-ordering {
	float: inline-end;
	margin: 0 0 16px;
}

.woocommerce-ordering select,
.woocommerce select,
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="password"],
.woocommerce input[type="number"],
.woocommerce textarea,
.woocommerce-page input.input-text {
	padding: 9px 12px;
	border: 1px solid #8196ab;
	border-radius: 8px;
	background: var(--cn-surface);
	color: var(--cn-ink);
	font: inherit;
}

.woocommerce ul.products,
.woocommerce-page ul.products {
	clear: both;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}

.cn-shop ul.products {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 14px;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	content: none;
}

.woocommerce ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product,
.woocommerce-page ul.products[class*="columns-"] li.product {
	position: relative;
	float: none;
	clear: none;
	width: auto;
	margin: 0;
	padding: 12px 12px 16px;
	border: 1px solid var(--cn-line);
	border-radius: var(--cn-radius);
	background: var(--cn-surface);
}

.woocommerce ul.products li.product img {
	width: 100%;
	aspect-ratio: 1;
	margin: 0 0 10px;
	object-fit: contain;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	padding: 0;
	font: 700 .95rem/1.3 var(--cn-display);
	color: var(--cn-ink);
}

.woocommerce ul.products li.product a {
	color: inherit;
	text-decoration: none;
}

.woocommerce ul.products li.product .button {
	margin-top: 10px;
}

.woocommerce .price,
.woocommerce ul.products li.product .price {
	color: var(--cn-ink);
	font-weight: 800;
}

.woocommerce .price del {
	color: var(--cn-muted);
	font-weight: 400;
}

.woocommerce .price ins {
	background: none;
	text-decoration: none;
}

.woocommerce span.onsale {
	position: absolute;
	top: 10px;
	inset-inline-start: 10px;
	z-index: 2;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 6px 9px;
	border-radius: 999px;
	background: var(--cn-signal);
	color: #fff;
	font: 800 .7rem/1 var(--cn-body);
	letter-spacing: .06em;
	text-transform: uppercase;
}

.woocommerce-pagination {
	clear: both;
	text-align: center;
}

.woocommerce-pagination ul {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.woocommerce-pagination li {
	border: 0;
	overflow: visible;
}

.woocommerce-pagination .page-numbers {
	display: block;
	min-width: 40px;
	padding: 9px 12px;
	border: 1px solid var(--cn-line);
	border-radius: 8px;
	background: var(--cn-surface);
	color: var(--cn-ink);
	text-decoration: none;
}

.woocommerce-pagination .page-numbers.current {
	background: var(--cn-accent);
	border-color: var(--cn-accent);
	color: #fff;
}

/* Ficha de producto */
.single-product div.product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: 28px 36px;
	align-items: start;
}

.single-product div.product > .woocommerce-tabs,
.single-product div.product > .related,
.single-product div.product > .upsells {
	grid-column: 1 / -1;
}

.single-product div.product div.images {
	float: none;
	width: auto;
	padding: 16px;
	border: 1px solid var(--cn-line);
	border-radius: 16px;
	background: linear-gradient(160deg, #fff, #eaf3f8);
	box-shadow: var(--cn-shadow);
}

.single-product div.product div.summary {
	float: none;
	width: auto;
}

.single-product .product_title {
	font-size: clamp(1.5rem, 3vw, 2.1rem);
	font-weight: 800;
	line-height: 1.15;
}

.single-product div.summary .price {
	font-size: 1.5rem;
}

.single-product form.cart {
	margin-block: 16px;
}

.cn-ficha {
	margin: 14px 0;
}

.cn-meta-list {
	display: grid;
	gap: 6px;
	margin: 16px 0 0;
	font-size: .92rem;
}

.cn-meta-list > div {
	display: flex;
	gap: 8px;
}

.cn-meta-list dt {
	min-width: 90px;
	color: var(--cn-muted);
	font-weight: 700;
}

.cn-meta-list dd {
	margin: 0;
}

.cn-also {
	margin-top: 20px;
	padding-top: 14px;
	border-top: 1px solid var(--cn-line);
}

.cn-also h2 {
	font-size: 1rem;
}

.cn-also ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cn-also a {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--cn-accent-soft);
	color: #0a5f66;
	font-size: .88rem;
	font-weight: 700;
	text-decoration: none;
}

.woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 16px;
	padding: 0;
	border-bottom: 1px solid var(--cn-line);
	list-style: none;
}

.woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 10px 16px;
	color: var(--cn-muted);
	font-weight: 700;
	text-decoration: none;
}

.woocommerce-tabs ul.tabs li.active a {
	border-bottom: 3px solid var(--cn-accent);
	color: var(--cn-ink);
}

/* Carrito */
.cn-freeship {
	margin-bottom: 20px;
	padding: 14px 18px;
	border: 1px solid var(--cn-line);
	border-radius: var(--cn-radius);
	background: var(--cn-surface);
}

.cn-freeship p {
	margin: 0 0 8px;
	font-weight: 700;
}

.cn-freeship__nota {
	display: block;
	margin-top: 6px;
	color: var(--cn-muted);
	font-size: .75rem;
}

.cn-freeship.is-voluminoso {
	border-color: #f0c36d;
	background: #fff8e8;
}

.cn-freeship__bar {
	height: 10px;
	border-radius: 999px;
	background: var(--cn-sunk);
	overflow: hidden;
}

.cn-freeship__bar span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--cn-accent);
}

.cn-freeship.is-ok {
	background: var(--cn-accent-soft);
}

.woocommerce table.shop_table {
	width: 100%;
	border: 1px solid var(--cn-line);
	border-radius: var(--cn-radius);
	border-collapse: separate;
	border-spacing: 0;
	background: var(--cn-surface);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 12px 14px;
	border-top: 1px solid var(--cn-line);
	text-align: start;
	vertical-align: middle;
}

.woocommerce table.shop_table thead th {
	border-top: 0;
}

.woocommerce-cart-form img {
	width: 72px;
	height: auto;
}

.woocommerce .quantity .qty {
	width: 4.5em;
}

.cart-collaterals {
	margin-top: 24px;
}

.cart_totals {
	max-width: 480px;
	margin-inline-start: auto;
}

.wc-proceed-to-checkout .checkout-button {
	display: block;
	text-align: center;
}

/* Checkout */
.woocommerce-checkout form.checkout {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 8px 32px;
	align-items: start;
}

.woocommerce-checkout #customer_details {
	grid-column: 1;
	grid-row: 1 / span 3;
}

.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
	grid-column: 2;
}

.woocommerce form .form-row {
	margin: 0 0 14px;
}

.woocommerce form .form-row label {
	display: block;
	margin-bottom: 4px;
	font-weight: 700;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	width: 100%;
}

.woocommerce-checkout #payment {
	padding: 16px;
	border: 1px solid var(--cn-line);
	border-radius: var(--cn-radius);
	background: var(--cn-surface);
}

.woocommerce-checkout #payment ul.payment_methods {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

.woocommerce-checkout #payment .payment_box {
	margin-top: 8px;
	padding: 10px 14px;
	border-radius: 8px;
	background: var(--cn-sunk);
}

/* Mi cuenta */
.woocommerce-account .woocommerce {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.woocommerce-account:not(.logged-in) .woocommerce {
	display: block;
}

.woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0;
	border: 1px solid var(--cn-line);
	border-radius: var(--cn-radius);
	background: var(--cn-surface);
	list-style: none;
	overflow: hidden;
}

.woocommerce-MyAccount-navigation a {
	display: block;
	padding: 11px 16px;
	border-bottom: 1px solid var(--cn-line);
	color: var(--cn-ink);
	font-weight: 700;
	text-decoration: none;
}

.woocommerce-MyAccount-navigation .is-active a {
	background: var(--cn-accent-soft);
	color: #0a5f66;
}

.woocommerce-form-login,
.woocommerce-form-register {
	max-width: 460px;
	padding: 20px;
	border: 1px solid var(--cn-line);
	border-radius: var(--cn-radius);
	background: var(--cn-surface);
}

/* Búsqueda y 404 */
.search-no-results .woocommerce-info,
.error404 .cn-entry {
	text-align: center;
}

.error404 .cn-entry form {
	max-width: 420px;
	margin: 16px auto;
}

/* Avisos */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
}

@media (max-width: 1020px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.cn-shop.has-filters,
	.single-product div.product,
	.woocommerce-checkout form.checkout,
	.woocommerce-account .woocommerce {
		display: block;
	}

	.cn-shop__filters {
		margin-bottom: 18px;
	}

	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.cart_totals {
		max-width: none;
	}

	.woocommerce-MyAccount-navigation {
		margin-bottom: 18px;
	}

	.cn-land__photo {
		inset: 0;
		opacity: .3;
	}

	.cn-land__row {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Tabla del carrito: una fila por producto. */
	.woocommerce table.shop_table_responsive thead {
		display: none;
	}
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt {
	background: var(--cn-accent);
	color: var(--cn-accent-ink);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
	background: #0a5f66;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--cn-ink);
}

.woocommerce div.product p.stock {
	color: var(--cn-signal);
	font-weight: 700;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	position: relative;
	padding-inline-start: 44px !important;
}

.woocommerce-error li {
	padding-inline-start: 0;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
	inset-inline-start: 14px;
}

.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
	float: none;
	width: 100%;
	max-width: none;
}

.woocommerce-checkout #payment div.payment_box {
	background: var(--cn-sunk);
	color: var(--cn-ink);
}

.woocommerce-checkout #payment div.payment_box::before {
	border-bottom-color: var(--cn-sunk);
}

.woocommerce-checkout form.checkout > .woocommerce-NoticeGroup,
.woocommerce-checkout form.checkout > .woocommerce-form-coupon-toggle {
	grid-column: 1 / -1;
}

/* Resultados de búsqueda (FIX001 4.5): cabecera, categorías del árbol y chips de familia, como la maqueta */
.cn-sr-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 18px;
	align-items: end;
	margin: 14px 0 16px;
}

.cn-sr-head .page-title {
	margin: 0;
	font-size: clamp(2rem, 4vw, 3rem);
	line-height: 1.04;
	font-weight: 800;
	overflow-wrap: anywhere;
}

.cn-sr-stats {
	display: flex;
	gap: 10px;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.cn-sr-stats div {
	padding: 8px 14px;
	border: 1px solid var(--cn-line);
	border-radius: 10px;
	background: var(--cn-surface);
	box-shadow: var(--cn-shadow);
}

.cn-sr-stats b {
	display: block;
	color: var(--cn-ink);
	font: 800 1.4rem/1.1 var(--cn-display);
}

.cn-sr-stats span {
	color: var(--cn-muted);
	font-size: .78rem;
}

.cn-sr-where {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin-top: 2px;
	padding: 8px 6px;
	border-top: 1px dashed var(--cn-line);
	font-size: .82rem;
}

.cn-sr-where > span {
	color: var(--cn-muted);
	font-weight: 700;
}

.cn-sr-where a,
.cn-sr-facets a {
	border: 1px solid var(--cn-line);
	border-radius: 999px;
	background: var(--cn-surface);
	color: var(--cn-ink);
	font-weight: 600;
	text-decoration: none;
}

.cn-sr-where a {
	padding: 3px 11px;
}

.cn-sr-where a:hover,
.cn-sr-facets a:hover {
	border-color: var(--cn-accent);
	color: var(--cn-accent);
}

.cn-sr-where a i,
.cn-sr-facets a i {
	color: var(--cn-muted);
	font-size: .74rem;
	font-style: normal;
	font-weight: 500;
}

.cn-sr-h {
	margin: 24px 0 12px;
	font-size: 1.4rem;
	font-weight: 800;
}

.cn-sr-facets {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 4px 0 14px;
}

.cn-sr-facets a {
	padding: 6px 13px;
	font-size: .84rem;
}

.cn-sr-facets a[aria-current="true"] {
	border-color: var(--cn-accent);
	background: var(--cn-accent);
	color: var(--cn-accent-ink);
}

.cn-sr-facets a[aria-current="true"] i {
	color: inherit;
	opacity: .85;
}

@media (max-width: 640px) {
	.cn-sr-head {
		grid-template-columns: minmax(0, 1fr);
	}

	/* IMP002 F11: etiquetas más largas que en español (fr, de, ar) no ensanchan la página a 390 px. */
	.cn-sr-stats {
		flex-wrap: wrap;
		white-space: normal;
	}
}

.cn-sr-where a,
.cn-sr-facets a {
	max-width: 100%;
	overflow-wrap: anywhere;
}

/*
 * Rejilla de los listados principales sin huérfanos (EVO002 fase 12): 4 / 3 / 2 columnas y 24 productos por página
 * (24 es múltiplo de 4, 3 y 2).
 */
.cn-shop__list ul.products,
.archive .cn-main > .cn-wrap > ul.products {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

@media (max-width: 1139px) {
	.cn-shop__list ul.products,
	.archive .cn-main > .cn-wrap > ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 559px) {
	.cn-shop__list ul.products,
	.archive .cn-main > .cn-wrap > ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
}

/* ---- Tarjeta de producto: columna flexible, botón siempre abajo, título acotado y sin negrita ---- */
.woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	min-height: 3.9em;
	margin: 0 0 8px;
	overflow: hidden;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	font: 500 .92rem/1.3 var(--cn-display);
	overflow-wrap: anywhere;
}

.woocommerce ul.products li.product .price {
	margin-top: auto;
}

.woocommerce ul.products li.product .button {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 10px 8px;
	overflow: hidden;
	box-sizing: border-box;
	font-size: .88rem;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.woocommerce ul.products li.product .added_to_cart {
	display: block;
	margin-top: 8px;
	font-size: .85rem;
	text-align: center;
}

.woocommerce ul.products li.product a.button {
	color: var(--cn-accent-ink);
}

.woocommerce ul.products li.product a.cn-btn-presupuesto {
	border: 2px solid var(--cn-accent);
	background: var(--cn-surface);
	color: var(--cn-accent);
}

.woocommerce ul.products li.product a.cn-btn-presupuesto:hover {
	background: var(--cn-accent-soft);
	color: #0a5f66;
}

/* Datos para la vista de tabla: ocultos en la cuadrícula (siguen en el HTML), cantidad solo en la tabla. */
.cn-card__meta,
.cn-card__stock,
.cn-qty {
	display: none;
}

/* ---- Precio en cápsula ---- */
.woocommerce .price,
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 2px 8px;
	align-self: flex-start;
	width: fit-content;
	max-width: 100%;
	padding: 4px 12px;
	border: 1px solid #b9dfe2;
	border-radius: 999px;
	background: var(--cn-accent-soft);
	color: #0a4f55;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1.25;
}

.woocommerce .price .woocommerce-Price-amount {
	font-size: 1.05em;
}

.woocommerce .price del {
	order: 1;
	color: #5b6f84;
	font-size: .82em;
	font-weight: 500;
	opacity: 1;
}

.woocommerce .price del .woocommerce-Price-amount {
	font-size: 1em;
}

.woocommerce .price ins {
	order: 0;
	color: #8a3d00;
	font-weight: 800;
}

.woocommerce .price:has(ins) {
	border-color: #f1c89b;
	background: var(--cn-signal-soft);
}

.cn-precio-presupuesto {
	color: var(--cn-ink);
	font-size: .88em;
	font-weight: 700;
}

.woocommerce .price:has(.cn-precio-presupuesto) {
	border-color: #8196ab;
	border-style: dashed;
	background: var(--cn-sunk);
}

.single-product div.summary .price {
	margin-block: 6px 12px;
	padding: 8px 20px;
	font-size: 1.6rem;
}

/* ---- Aviso de producto pesado / voluminoso (lo imprime el mu-plugin cahnos-bulky-shipping) ---- */
.cn-main .cahnos-bulky-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	margin: 6px 0 0;
	padding: 3px 10px;
	border: 1px solid #f1c89b;
	border-radius: 999px;
	background: #fff3dc;
	color: #7a4a00;
	font: 700 .74rem/1.3 var(--cn-body);
}

.cn-main .cahnos-bulky-notice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 12px 0 16px;
	padding: 10px 16px;
	border: 1px solid #f1c89b;
	border-inline-start: 4px solid #e8a33d;
	border-radius: 14px;
	background: #fff3dc;
	color: #5c3a00;
	font-size: .92rem;
	line-height: 1.45;
}

.cn-main .cahnos-bulky-icon {
	font-size: 1.25em;
	line-height: 1.2;
}

/* ---- Conmutador cuadrícula / tabla ---- */
.cn-vista {
	display: inline-flex;
	padding: 3px;
	border: 1px solid #8196ab;
	border-radius: 999px;
	background: var(--cn-surface);
}

.cn-vista[hidden] {
	display: none;
}

.cn-vista button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--cn-ink);
	font: 700 .85rem var(--cn-body);
	cursor: pointer;
}

.cn-vista button svg {
	width: 16px;
	height: 16px;
}

.cn-vista button[aria-pressed="true"] {
	background: var(--cn-accent);
	color: var(--cn-accent-ink);
}

.cn-vista button:focus-visible {
	outline: 3px solid var(--cn-ink);
	outline-offset: 2px;
}

/* ---- Vista de tabla: una línea por producto ---- */
.cn-shop[data-vista="tabla"] ul.products {
	display: block;
	border: 1px solid var(--cn-line);
	border-radius: var(--cn-radius);
	background: var(--cn-surface);
	overflow: hidden;
}

.cn-shop[data-vista="tabla"] ul.products li.product {
	display: grid;
	/* Columnas fijas y estrechas (estado, precio, compra con icono): el título se queda con el resto. */
	grid-template-columns: 36px minmax(0, 1fr) 72px 132px 84px 28px;
	gap: 0 10px;
	align-items: center;
	padding: 4px 12px;
	border: 0;
	border-top: 1px solid var(--cn-line);
	border-radius: 0;
}

.cn-shop[data-vista="tabla"] ul.products li.product:first-child {
	border-top: 0;
}

.cn-shop[data-vista="tabla"] ul.products li.product:hover {
	background: #f7fbfc;
}

/* El enlace de la tarjeta deja de ser caja: sus hijos (foto, título, precio…) se colocan en la rejilla de la fila. */
.cn-shop[data-vista="tabla"] ul.products li.product > a.woocommerce-LoopProduct-link {
	display: contents;
}

.cn-shop[data-vista="tabla"] ul.products li.product img {
	grid-column: 1;
	grid-row: 1 / span 3;
	width: 36px;
	height: 36px;
	margin: 0;
	border-radius: 6px;
}

.cn-shop[data-vista="tabla"] ul.products li.product .woocommerce-loop-product__title {
	grid-column: 2;
	grid-row: 1;
	min-height: 0;
	margin: 0;
	-webkit-line-clamp: 1;
	font-size: .88rem;
	font-weight: 400;
	line-height: 1.3;
}

.cn-shop[data-vista="tabla"] .cn-card__meta {
	display: flex;
	flex-wrap: wrap;
	grid-column: 2;
	grid-row: 2;
	gap: 0 14px;
	min-width: 0;
	margin-top: 0;
	color: var(--cn-muted);
	font-size: .74rem;
}

.cn-shop[data-vista="tabla"] .cn-card__meta > span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cn-shop[data-vista="tabla"] .cn-card__meta > span::before {
	content: attr(data-etq) ": ";
	font-weight: 600;
}

.cn-shop[data-vista="tabla"] .cn-card__sku {
	font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.cn-shop[data-vista="tabla"] ul.products li.product .cahnos-bulky-tag {
	display: none;
}

/* Chip compacto de producto voluminoso, junto a la referencia (camión ámbar). */
.cn-shop[data-vista="tabla"] .cn-card__meta > .cn-card__vol {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 20px;
	height: 18px;
	border: 1px solid #f1c89b;
	border-radius: 999px;
	background: #fff3dc;
	color: #7a4a00;
	overflow: visible;
}

.cn-shop[data-vista="tabla"] .cn-card__meta > .cn-card__vol::before {
	content: none;
}

.cn-card__vol svg {
	width: 14px;
	height: 14px;
}

/* Chevron y detalle de la fila: solo en la tabla. */
.cn-row__toggle,
.cn-row__detalle {
	display: none;
}

.cn-shop[data-vista="tabla"] .cn-row__toggle {
	display: inline-flex;
	grid-column: 6;
	grid-row: 1 / span 3;
	align-items: center;
	justify-content: center;
	justify-self: end;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	color: var(--cn-muted);
	cursor: pointer;
}

.cn-shop[data-vista="tabla"] .cn-row__toggle:hover {
	border-color: var(--cn-line);
	background: var(--cn-surface);
	color: var(--cn-ink);
}

.cn-shop[data-vista="tabla"] .cn-row__toggle:focus-visible {
	outline: 3px solid var(--cn-ink);
	outline-offset: 1px;
}

.cn-row__toggle svg {
	width: 18px;
	height: 18px;
	transition: transform .2s ease;
}

.cn-row__toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

.cn-shop[data-vista="tabla"] .cn-row__detalle {
	display: block;
	grid-column: 1 / -1;
	grid-row: 4;
	margin: 4px -12px 0;
	padding: 10px 14px 12px 62px;
	border-top: 1px dashed var(--cn-line);
	background: #f4f9fa;
	font-size: .84rem;
	line-height: 1.45;
	animation: cn-det-in .18s ease;
}

.cn-shop[data-vista="tabla"] .cn-row__detalle[hidden] {
	display: none;
}

.cn-row__detalle p {
	margin: 0 0 8px;
}

.cn-row__vol {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	padding: 6px 10px;
	border: 1px solid #f1c89b;
	border-radius: 8px;
	background: #fff3dc;
	color: #7a4a00;
}

.cn-row__desc {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	color: var(--cn-ink);
}

.cn-row__datos {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 24px;
	margin: 0 0 8px;
}

.cn-row__datos dt {
	display: inline;
	color: var(--cn-muted);
	font-weight: 600;
}

.cn-row__datos dt::after {
	content: ": ";
}

.cn-row__datos dd {
	display: inline;
	margin: 0;
}

.cn-row__ficha {
	font-weight: 700;
	text-decoration: underline;
}

@keyframes cn-det-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cn-shop[data-vista="tabla"] .cn-row__detalle {
		animation: none;
	}

	.cn-row__toggle svg {
		transition: none;
	}
}

.cn-shop[data-vista="tabla"] .cn-card__stock,
.cn-shop[data-vista="tabla"] ul.products li.product .price,
.cn-shop[data-vista="tabla"] .cn-qty,
.cn-shop[data-vista="tabla"] ul.products li.product .button,
.cn-shop[data-vista="tabla"] ul.products li.product .added_to_cart {
	grid-row: 1 / span 3;
}

.cn-shop[data-vista="tabla"] .cn-card__stock {
	display: block;
	grid-column: 3;
	font-size: .76rem;
	font-weight: 700;
	line-height: 1.2;
}

.cn-shop[data-vista="tabla"] .cn-card__stock.is-stock {
	color: #0d6a35;
}

.cn-shop[data-vista="tabla"] .cn-card__stock.is-bajo-pedido {
	color: #8a4b00;
}

.cn-shop[data-vista="tabla"] .cn-card__stock.is-sin-stock {
	color: #a12626;
}

.cn-shop[data-vista="tabla"] ul.products li.product .price {
	flex-direction: column;
	align-items: flex-end;
	grid-column: 4;
	align-self: center;
	justify-self: end;
	gap: 0;
	margin: 0;
	padding: 2px 9px;
	border-radius: 10px;
	font-size: .86rem;
	line-height: 1.25;
	white-space: nowrap;
}

/* Precio por unidad con la caja («0,0770 €/ud. · Caja de 600 uds.: 46,2 €»): parte en líneas dentro de su columna
   en vez de desbordarse sobre el título. */
.cn-shop[data-vista="tabla"] ul.products li.product .price .cahnos-fiab-price {
	display: block;
	min-width: 0;
	max-width: 100%;
	font-size: .78rem;
	line-height: 1.25;
	text-align: right;
	text-wrap: balance;
	white-space: normal;
	overflow-wrap: anywhere;
}

/* Rango «desde – hasta» en dos líneas, sin una tercera solo para el guion. */
.cn-shop[data-vista="tabla"] ul.products li.product .price > span[aria-hidden="true"]:not(.amount) {
	display: none;
}

.cn-shop[data-vista="tabla"] ul.products li.product .price > span:not(.amount) + .amount::before {
	content: "– ";
	font-weight: 400;
}

.cn-shop[data-vista="tabla"] .cn-qty {
	display: block;
	grid-column: 5;
	justify-self: start;
	width: 44px;
}

.cn-shop[data-vista="tabla"] .cn-qty__in {
	width: 100%;
	height: 30px;
	min-height: 0;
	padding: 0 2px;
	text-align: center;
}

.cn-shop[data-vista="tabla"] ul.products li.product .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	grid-column: 5;
	justify-self: end;
	max-width: 100%;
	width: 34px;
	height: 30px;
	margin: 0;
	padding: 0;
	font-size: 0;
	line-height: 0;
}

/* Botones de icono en la tabla: el texto sigue en el DOM (nombre accesible) y en el title (tooltip). */
.cn-shop[data-vista="tabla"] ul.products li.product .button::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--cn-ico-btn) center / contain no-repeat;
	mask: var(--cn-ico-btn) center / contain no-repeat;
}

.cn-shop[data-vista="tabla"] ul.products li.product .button::after {
	content: none;
}

.cn-shop[data-vista="tabla"] ul.products li.product .button.add_to_cart_button {
	--cn-ico-btn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2 3h3l2.7 12.4a2 2 0 0 0 2 1.6h7.6a2 2 0 0 0 2-1.6L21 8H6'/%3E%3Cpath d='M13 10v5M10.5 12.5h5'/%3E%3C/svg%3E");
}

.cn-shop[data-vista="tabla"] ul.products li.product .button.product_type_variable,
.cn-shop[data-vista="tabla"] ul.products li.product .button:not(.add_to_cart_button):not(.cn-btn-presupuesto) {
	--cn-ico-btn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h10M18 6h2M4 12h4M12 12h8M4 18h12M20 18h0'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Ccircle cx='18' cy='18' r='2'/%3E%3C/svg%3E");
}

.cn-shop[data-vista="tabla"] ul.products li.product a.cn-btn-presupuesto {
	--cn-ico-btn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E");
}

/* «Pedir presupuesto»: botón con icono y texto en el hueco que dejan precio, cantidad y carrito (misma altura que el carrito).
   Si la fila enseña un precio real, el botón vuelve al icono solo (el texto sigue en el title y el aria-label). */
.cn-shop[data-vista="tabla"] ul.products li.product a.cn-btn-presupuesto .cn-btn__txt {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (min-width: 720px) {
	.cn-shop[data-vista="tabla"] ul.products li.product a.cn-btn-presupuesto {
		height: 30px;
		min-height: 0;
	}

	.cn-shop[data-vista="tabla"] ul.products li.product:has(.cn-precio-presupuesto) .price {
		display: none;
	}

	.cn-shop[data-vista="tabla"] ul.products li.product:has(.cn-precio-presupuesto) a.cn-btn-presupuesto {
		grid-column: 4 / 6;
		justify-self: end;
		gap: 8px;
		width: auto;
		min-width: 0;
		padding: 0 14px;
		font-size: .84rem;
		font-weight: 600;
		line-height: 1;
		white-space: nowrap;
	}

	.cn-shop[data-vista="tabla"] ul.products li.product:has(.cn-precio-presupuesto) a.cn-btn-presupuesto .cn-btn__txt {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip-path: none;
	}
}

.cn-shop[data-vista="tabla"] ul.products li.product .button.added {
	--cn-ico-btn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
}

.cn-shop[data-vista="tabla"] ul.products li.product .button.loading::before {
	opacity: .4;
}

.cn-shop[data-vista="tabla"] ul.products li.product .onsale {
	display: none;
}

/* Tablet estrecho: sin columna de disponibilidad. */
@media (max-width: 899px) and (min-width: 720px) {
	.cn-shop[data-vista="tabla"] ul.products li.product {
		grid-template-columns: 36px minmax(0, 1fr) 132px 84px 28px;
	}

	.cn-shop[data-vista="tabla"] .cn-card__stock {
		display: none;
	}

	.cn-shop[data-vista="tabla"] ul.products li.product .price {
		grid-column: 3;
	}

	.cn-shop[data-vista="tabla"] .cn-qty,
	.cn-shop[data-vista="tabla"] ul.products li.product .button {
		grid-column: 4;
	}
}

/* Móvil: filas apiladas legibles (miniatura, nombre y datos arriba; precio y compra debajo). */
@media (max-width: 719px) {
	.cn-shop[data-vista="tabla"] ul.products li.product {
		grid-template-columns: 56px minmax(0, 1fr) auto;
		gap: 4px 12px;
		padding: 12px;
	}

	.cn-shop[data-vista="tabla"] ul.products li.product img {
		grid-row: 1 / span 3;
		width: 56px;
		height: 56px;
	}

	.cn-shop[data-vista="tabla"] ul.products li.product .woocommerce-loop-product__title {
		grid-column: 2;
		font-size: .95rem;
	}

	.cn-shop[data-vista="tabla"] .cn-card__meta {
		grid-column: 2 / -1;
	}

	.cn-shop[data-vista="tabla"] .cn-card__stock {
		grid-column: 2 / -1;
		grid-row: 3;
	}

	.cn-shop[data-vista="tabla"] .cn-row__toggle {
		grid-column: 3;
		grid-row: 1;
		align-self: start;
	}

	.cn-shop[data-vista="tabla"] .cn-row__detalle {
		grid-row: 7;
		margin: 6px -12px -12px;
		padding: 10px 12px 12px;
	}

	.cn-shop[data-vista="tabla"] ul.products li.product .price {
		grid-column: 1 / 3;
		grid-row: 5;
		margin-top: 6px;
	}

	.cn-shop[data-vista="tabla"] ul.products li.product .cn-qty {
		grid-column: 3;
		grid-row: 5;
		margin-top: 6px;
	}

	.cn-shop[data-vista="tabla"] ul.products li.product .button,
	.cn-shop[data-vista="tabla"] ul.products li.product .cn-qty + a.button {
		grid-column: 1 / -1;
		grid-row: 6;
		width: 100%;
		height: auto;
		margin-top: 6px;
		padding: 10px 8px;
		font-size: .88rem;
		line-height: 1.2;
	}

	/* En móvil el botón ocupa la fila entera: vuelve el texto y sobra el icono. */
	.cn-shop[data-vista="tabla"] ul.products li.product .button::before {
		content: none;
	}

	.cn-shop[data-vista="tabla"] ul.products li.product a.cn-btn-presupuesto .cn-btn__txt {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip-path: none;
	}
}

/* ---- Galería de la ficha: la lupa y los botones quedan por debajo de la cabecera, el mega menú y los modales ---- */
.single-product div.product div.images {
	position: relative;
	z-index: 1;
	isolation: isolate;
}

.woocommerce-product-gallery {
	position: relative;
}

.woocommerce-product-gallery .woocommerce-product-gallery__trigger {
	z-index: 2;
}

.woocommerce-product-gallery .zoomImg {
	z-index: 1;
}

/* Tira ligera de miniaturas: una fila, sin desvaído. */
.woocommerce div.product div.images .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.woocommerce div.product div.images .flex-control-thumbs li {
	float: none;
	width: 56px;
	margin: 0;
}

.woocommerce div.product div.images .flex-control-thumbs img {
	display: block;
	width: 56px;
	height: 56px;
	padding: 2px;
	border: 2px solid var(--cn-line);
	border-radius: 8px;
	background: var(--cn-surface);
	object-fit: contain;
	opacity: 1;
	cursor: pointer;
}

.woocommerce div.product div.images .flex-control-thumbs img:hover {
	border-color: #8196ab;
}

.woocommerce div.product div.images .flex-control-thumbs img.flex-active {
	border-color: var(--cn-accent);
}

/* ---- Modo ancho completo (EVO008): solo escritorio; sin la clase html.cn-ancho-completo todo queda como antes ---- */
@media (min-width: 1280px) {
	/* Listados: la cuadrícula suma columnas según el ancho (tarjetas de 220 px como mínimo). */
	html.cn-ancho-completo .cn-shop.cn-shop--facetas ul.products,
	html.cn-ancho-completo .cn-shop ul.products,
	html.cn-ancho-completo .cn-land__featured ul.products {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	}

	html.cn-ancho-completo .cn-flist.is-loading .cn-skel {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	}

	/* Vista de tabla: el ancho extra va al título (la columna 1fr); las demás columnas siguen fijas. */
	html.cn-ancho-completo .cn-shop[data-vista="tabla"] ul.products {
		display: block;
	}

	/* Cabecera de categoría y rejilla de subcategorías «Destacados»: tesela de unos 240 px, no de 450. */
	html.cn-ancho-completo .cn-land__row {
		max-width: min(100%, 1100px);
	}

	html.cn-ancho-completo .cnt__big {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	}

	html.cn-ancho-completo .cnt__small {
		grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	}

	/* Buscador interno de la categoría: llena el ancho disponible. */
	html.cn-ancho-completo .cn-land__ctx {
		width: 100%;
	}

	/* Ficha de producto: galería algo menor que los datos y texto con medida de línea cómoda. */
	html.cn-ancho-completo.single-product div.product,
	html.cn-ancho-completo .single-product div.product {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
	}

	html.cn-ancho-completo .single-product div.product div.summary > p,
	html.cn-ancho-completo .single-product div.product div.summary .woocommerce-product-details__short-description {
		max-width: 80ch;
	}
}
