/*
 * Menú de categorías anidadas del catálogo.
 *
 * Vive dentro de la plantilla del tema, así que hereda su tipografía y su
 * fondo; sólo el acento es nuestro y viene de la paleta del popup. Los cuatro
 * estilos comparten estas variables y sólo cambian navegación y comportamiento.
 */
.notiwoo-catalog {
	--nwcat-accent: #2563eb;
	--nwcat-accent-text: #ffffff;
	/*
	 * Líneas, fondos suaves y texto atenuado se derivan del color de texto que
	 * hereda del tema, no de `prefers-color-scheme`. La preferencia del sistema
	 * no dice de qué color es la página: un tema claro en un equipo en modo
	 * oscuro dejaba el texto atenuado en blanco sobre blanco.
	 */
	--nwcat-line: color-mix(in srgb, currentColor 14%, transparent);
	--nwcat-soft: color-mix(in srgb, currentColor 6%, transparent);
	--nwcat-muted: color-mix(in srgb, currentColor 66%, transparent);
	--nwcat-radius: 14px;
	--nwcat-sticky-top: 0px;
	container-type: inline-size;
}

/* `hidden` debe ganar a los `display: flex` de los carriles y paneles. */
.notiwoo-catalog [hidden] {
	display: none !important;
}

/*
 * Cuando el tema ignora la compuerta `woocommerce_product_loop`, el loop nativo
 * se ejecuta igual y nuestro catálogo se imprime justo antes. El marcador y la
 * rejilla nativa quedan como hermanos, así que se oculta lo que viene después.
 *
 * Se hace con el marcador y no con una clase en el body a propósito: el
 * marcador sólo existe si de verdad pintamos la carta, de modo que un fallo
 * nuestro nunca puede dejar la tienda sin productos.
 */
.notiwoo-catalog-replaces-loop ~ ul.products,
.notiwoo-catalog-replaces-loop ~ .woocommerce-pagination,
.notiwoo-catalog-replaces-loop ~ .woocommerce-result-count,
.notiwoo-catalog-replaces-loop ~ .woocommerce-ordering,
.notiwoo-catalog-replaces-loop ~ nav.woocommerce-pagination {
	display: none !important;
}

.notiwoo-catalog *,
.notiwoo-catalog *::before,
.notiwoo-catalog *::after {
	box-sizing: border-box;
}

/* ---------- Navegación: base común ---------- */

.notiwoo-catalog__nav {
	margin: 0 0 28px;
}

.notiwoo-catalog__link {
	align-items: center;
	border-radius: 999px;
	color: inherit;
	display: inline-flex;
	gap: 8px;
	line-height: 1.3;
	text-decoration: none;
	transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.notiwoo-catalog__link:hover,
.notiwoo-catalog__link:focus-visible {
	text-decoration: none;
}

.notiwoo-catalog__link-image {
	border-radius: 50%;
	flex: 0 0 auto;
	height: 26px;
	object-fit: cover;
	width: 26px;
}

.notiwoo-catalog__link-count {
	background: var(--nwcat-soft);
	border-radius: 999px;
	font-size: 0.78em;
	font-variant-numeric: tabular-nums;
	line-height: 1.6;
	min-width: 1.9em;
	padding: 0 6px;
	text-align: center;
}

/* Sobre el acento el contador se aclara respecto a SU propio color de texto,
   que puede ser blanco o casi negro según el acento elegido. */
.notiwoo-catalog__link.is-active .notiwoo-catalog__link-count {
	background: color-mix(in srgb, var(--nwcat-accent-text) 22%, transparent);
}

.notiwoo-catalog__link:focus-visible {
	outline: 2px solid var(--nwcat-accent);
	outline-offset: 2px;
}

/* Modo menú: sin enlaces ni botón, la tarjeta no debe parecer pulsable. */
.notiwoo-catalog.is-menu-mode ul.products li.product,
.notiwoo-catalog.is-menu-mode ul.products li.product * {
	cursor: default;
}

/* El enlace del título que pinta el propio tema (Astra) no sale de ningún
   hook que podamos quitar: se deja como texto. */
.notiwoo-catalog.is-menu-mode ul.products li.product a:not(.notiwoo-options-trigger) {
	pointer-events: none;
	color: inherit;
}

/* Contenedores vacíos que algunos temas dejan donde iba el botón. */
.notiwoo-catalog.is-menu-mode ul.products li.product .ast-on-card-button,
.notiwoo-catalog.is-menu-mode ul.products li.product .added_to_cart {
	display: none !important;
}

/* ---------- Detalles de la tarjeta ---------- */

/*
 * Etiqueta destacada: píldora con borde y texto en degradado dorado. Los
 * colores son variables para que cada tema la ajuste a su fondo; el dorado
 * de fábrica mantiene contraste tanto sobre claro como sobre oscuro.
 */
.notiwoo-catalog {
	--nwcat-badge-from: #8a6424;
	--nwcat-badge-mid: #d8b567;
	--nwcat-badge-to: #9c7430;
}

.notiwoo-badge {
	align-items: center;
	align-self: flex-start;
	border-radius: 999px;
	display: inline-flex;
	gap: 6px;
	line-height: 1;
	margin: 0 0 8px;
	max-width: 100%;
	padding: 6px 12px 6px 13px;
	position: relative;
}

/* El borde en degradado se recorta con una máscara: así el interior queda
   transparente sobre cualquier fondo, sin tener que adivinar su color. */
.notiwoo-badge::before {
	background: linear-gradient(100deg, var(--nwcat-badge-from), var(--nwcat-badge-mid) 45%, var(--nwcat-badge-to));
	border-radius: inherit;
	content: "";
	inset: 0;
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	padding: 1.5px;
	pointer-events: none;
	position: absolute;
}

.notiwoo-badge__label {
	background: linear-gradient(100deg, var(--nwcat-badge-from), var(--nwcat-badge-mid) 45%, var(--nwcat-badge-to));
	-webkit-background-clip: text;
	background-clip: text;
	color: var(--nwcat-badge-from);
	-webkit-text-fill-color: transparent;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: -0.01em;
	overflow: hidden;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.notiwoo-badge__icon {
	color: var(--nwcat-badge-to);
	flex: 0 0 auto;
	height: 11px;
	width: 11px;
}

.notiwoo-card__description {
	color: var(--nwcat-muted);
	font-size: 0.9em;
	line-height: 1.55;
	margin: 6px 0 10px;
}

.notiwoo-card__description p {
	margin: 0 0 0.5em;
}

.notiwoo-card__description p:last-child {
	margin-bottom: 0;
}

.notiwoo-card__description strong,
.notiwoo-card__description b {
	color: currentColor;
	font-weight: 700;
}

/* ---------- Secciones ---------- */

/* Deja hueco tanto para la barra del tema como para la nuestra, o el título
   de la sección queda escondido detrás del menú al saltar con un ancla. */
.notiwoo-catalog__section {
	scroll-margin-top: calc(var(--nwcat-sticky-top) + var(--nwcat-nav-height, 0px) + 20px);
}

.notiwoo-catalog__section--depth-1 + .notiwoo-catalog__section--depth-1 {
	margin-top: 48px;
}

.notiwoo-catalog__section--depth-2 {
	margin-top: 32px;
}

.notiwoo-catalog__section-head {
	margin-bottom: 18px;
}

.notiwoo-catalog__section-title {
	letter-spacing: -0.01em;
	margin: 0;
}

.notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head {
	align-items: baseline;
	border-bottom: 1px solid var(--nwcat-line);
	padding-bottom: 10px;
}

.notiwoo-catalog__section-description {
	color: var(--nwcat-muted);
	font-size: 0.94em;
	margin-top: 6px;
}

.notiwoo-catalog__section-description p:last-child {
	margin-bottom: 0;
}

/* El grid de productos lo sigue pintando el tema (ul.products): sólo nos
   aseguramos de que respire entre secciones. */
.notiwoo-catalog__panel > ul.products {
	margin-bottom: 0;
}

/* ---------- Estilo 1: fichas horizontales ---------- */

.notiwoo-catalog--chips .notiwoo-catalog__rail {
	display: flex;
	gap: 8px;
	margin: 0;
	overflow-x: auto;
	padding: 4px 2px 10px;
	scroll-behavior: smooth;
	scrollbar-width: thin;
}

.notiwoo-catalog--chips .notiwoo-catalog__rail::-webkit-scrollbar {
	height: 4px;
}

.notiwoo-catalog--chips .notiwoo-catalog__rail::-webkit-scrollbar-thumb {
	background: var(--nwcat-line);
	border-radius: 999px;
}

.notiwoo-catalog--chips .notiwoo-catalog__link {
	background: var(--nwcat-soft);
	border: 1px solid transparent;
	flex: 0 0 auto;
	font-size: 0.95em;
	font-weight: 600;
	padding: 9px 15px;
}

.notiwoo-catalog--chips .notiwoo-catalog__link:hover {
	border-color: var(--nwcat-line);
}

.notiwoo-catalog--chips .notiwoo-catalog__link.is-active {
	background: var(--nwcat-accent);
	color: var(--nwcat-accent-text);
}

.notiwoo-catalog--chips .notiwoo-catalog__rail--sub {
	padding-top: 0;
}

.notiwoo-catalog--chips .notiwoo-catalog__rail--sub .notiwoo-catalog__link {
	background: none;
	border-color: var(--nwcat-line);
	font-size: 0.88em;
	font-weight: 500;
	padding: 6px 13px;
}

.notiwoo-catalog--chips .notiwoo-catalog__rail--sub .notiwoo-catalog__link.is-active {
	background: none;
	border-color: var(--nwcat-accent);
	color: var(--nwcat-accent);
}

/* ---------- Estilo 2: menú lateral ---------- */

.notiwoo-catalog--sidebar {
	display: grid;
	gap: 36px;
	grid-template-columns: 240px minmax(0, 1fr);
}

.notiwoo-catalog--sidebar .notiwoo-catalog__nav {
	margin: 0;
}

.notiwoo-catalog--sidebar .notiwoo-catalog__tree {
	list-style: none;
	margin: 0;
	padding: 0;
}

.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-1 > .notiwoo-catalog__tree-item + .notiwoo-catalog__tree-item {
	margin-top: 2px;
}

.notiwoo-catalog--sidebar .notiwoo-catalog__link {
	border-radius: 10px;
	display: flex;
	font-size: 0.95em;
	font-weight: 600;
	justify-content: space-between;
	padding: 9px 12px;
	width: 100%;
}

.notiwoo-catalog--sidebar .notiwoo-catalog__link-label {
	min-width: 0;
}

.notiwoo-catalog--sidebar .notiwoo-catalog__link:hover {
	background: var(--nwcat-soft);
}

.notiwoo-catalog--sidebar .notiwoo-catalog__link.is-active {
	background: var(--nwcat-accent);
	color: var(--nwcat-accent-text);
}

/* La jerarquía se marca con una guía vertical, no con sangría a ciegas. */
.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-2 {
	border-left: 2px solid var(--nwcat-line);
	margin: 2px 0 6px 12px;
	padding-left: 10px;
}

.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-2 .notiwoo-catalog__link,
.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-3 .notiwoo-catalog__link {
	font-size: 0.89em;
	font-weight: 500;
	padding: 6px 10px;
}

.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-2 .notiwoo-catalog__link.is-active {
	background: none;
	color: var(--nwcat-accent);
}

.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-3 {
	border-left: 2px solid var(--nwcat-line);
	list-style: none;
	margin: 2px 0 4px 10px;
	padding-left: 8px;
}

/* ---------- Estilo 3: pestañas ---------- */

.notiwoo-catalog--tabs .notiwoo-catalog__rail {
	border-bottom: 1px solid var(--nwcat-line);
	display: flex;
	gap: 4px;
	overflow-x: auto;
	scrollbar-width: none;
}

.notiwoo-catalog--tabs .notiwoo-catalog__rail::-webkit-scrollbar {
	display: none;
}

.notiwoo-catalog--tabs .notiwoo-catalog__link {
	border-bottom: 2px solid transparent;
	border-radius: 8px 8px 0 0;
	color: var(--nwcat-muted);
	flex: 0 0 auto;
	font-size: 0.97em;
	font-weight: 600;
	margin-bottom: -1px;
	padding: 11px 16px;
}

.notiwoo-catalog--tabs .notiwoo-catalog__link:hover {
	color: inherit;
}

.notiwoo-catalog--tabs .notiwoo-catalog__link.is-active {
	border-bottom-color: var(--nwcat-accent);
	color: var(--nwcat-accent);
}

.notiwoo-catalog--tabs .notiwoo-catalog__rail--sub {
	border-bottom: 0;
	gap: 8px;
	padding: 12px 0 0;
}

.notiwoo-catalog--tabs .notiwoo-catalog__rail--sub .notiwoo-catalog__link {
	background: var(--nwcat-soft);
	border-bottom: 0;
	border-radius: 999px;
	font-size: 0.87em;
	margin-bottom: 0;
	padding: 6px 13px;
}

.notiwoo-catalog--tabs .notiwoo-catalog__rail--sub .notiwoo-catalog__link.is-active {
	background: var(--nwcat-accent);
	color: var(--nwcat-accent-text);
}

/* En pestañas sólo se muestra la sección activa: no se hace scroll, se filtra. */
.notiwoo-catalog--tabs .notiwoo-catalog__section--depth-1[hidden] {
	display: none;
}

.notiwoo-catalog--tabs .notiwoo-catalog__section--depth-1 {
	margin-top: 0;
}

.notiwoo-catalog--tabs .notiwoo-catalog__section--depth-1 + .notiwoo-catalog__section--depth-1 {
	margin-top: 0;
}

/* ---------- Estilo 4: acordeón ---------- */

.notiwoo-catalog--accordion {
	display: grid;
	gap: 32px;
	grid-template-columns: 240px minmax(0, 1fr);
}

.notiwoo-catalog--accordion .notiwoo-catalog__nav {
	margin: 0;
}

.notiwoo-catalog--accordion .notiwoo-catalog__tree {
	list-style: none;
	margin: 0;
	padding: 0;
}

.notiwoo-catalog--accordion .notiwoo-catalog__link {
	display: flex;
	font-size: 0.94em;
	justify-content: space-between;
	padding: 7px 10px;
	width: 100%;
}

.notiwoo-catalog--accordion .notiwoo-catalog__link:hover {
	background: var(--nwcat-soft);
}

.notiwoo-catalog--accordion .notiwoo-catalog__link.is-active {
	color: var(--nwcat-accent);
	font-weight: 700;
}

.notiwoo-catalog--accordion .notiwoo-catalog__tree--depth-2 {
	border-left: 2px solid var(--nwcat-line);
	margin: 0 0 6px 10px;
	padding-left: 8px;
}

.notiwoo-catalog--accordion .notiwoo-catalog__section--depth-1 {
	background: var(--nwcat-soft);
	border-radius: var(--nwcat-radius);
	overflow: hidden;
}

.notiwoo-catalog--accordion .notiwoo-catalog__section--depth-1 + .notiwoo-catalog__section--depth-1 {
	margin-top: 12px;
}

.notiwoo-catalog--accordion .notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head {
	border-bottom: 0;
	margin: 0;
	padding: 0;
}

.notiwoo-catalog__toggle {
	align-items: center;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: flex;
	font: inherit;
	gap: 12px;
	justify-content: space-between;
	padding: 16px 20px;
	text-align: left;
	width: 100%;
}

.notiwoo-catalog__toggle:focus-visible {
	outline: 2px solid var(--nwcat-accent);
	outline-offset: -2px;
}

.notiwoo-catalog__toggle-icon {
	border-bottom: 2px solid currentColor;
	border-right: 2px solid currentColor;
	flex: 0 0 auto;
	height: 9px;
	transform: rotate(45deg);
	transition: transform 160ms ease;
	width: 9px;
}

.notiwoo-catalog__toggle[aria-expanded="false"] .notiwoo-catalog__toggle-icon {
	transform: rotate(-45deg);
}

.notiwoo-catalog--accordion .notiwoo-catalog__panel {
	padding: 0 20px 20px;
}

/* La descripción va fuera del botón, así que hay que igualar su sangría a la
   del texto del toggle o queda desalineada respecto al título. */
.notiwoo-catalog--accordion .notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head .notiwoo-catalog__section-description {
	margin-top: -4px;
	padding: 0 20px 12px;
}

.notiwoo-catalog--accordion .notiwoo-catalog__panel[hidden] {
	display: none;
}

.notiwoo-catalog--accordion .notiwoo-catalog__section--depth-2 > .notiwoo-catalog__section-head {
	margin-bottom: 12px;
}

/* ---------- Fijado ---------- */

.notiwoo-catalog.is-sticky.notiwoo-catalog--chips .notiwoo-catalog__nav,
.notiwoo-catalog.is-sticky.notiwoo-catalog--tabs .notiwoo-catalog__nav {
	backdrop-filter: blur(10px);
	/* El JS mide el fondo real del tema y lo escribe en --nwcat-sticky-bg. */
	background: var(--nwcat-sticky-bg, transparent);
	/* Sangrado simétrico y generoso: con 8px la barra sobresalía apenas del
	   contenido y se leía como un desalineado, no como una barra. */
	margin-left: -15px;
	margin-right: -15px;
	padding: 10px 15px;
	position: sticky;
	top: var(--nwcat-sticky-top);
	transition: box-shadow 160ms ease, border-color 160ms ease;
	z-index: 40;
}

/* Solo al quedarse pegada aparece la separación. Flotando sin borde, los
   productos parecían cortarse en una línea invisible al pasar por debajo. */
.notiwoo-catalog.is-sticky.is-stuck .notiwoo-catalog__nav {
	box-shadow: 0 10px 20px -14px rgba(0, 0, 0, 0.55), 0 1px 0 0 var(--nwcat-line);
}

.notiwoo-catalog.is-sticky.notiwoo-catalog--tabs.is-stuck .notiwoo-catalog__nav {
	/* En pestañas la línea inferior ya la dibuja el propio carril. */
	box-shadow: 0 10px 20px -14px rgba(0, 0, 0, 0.55);
}

/* El carril deja de tener padding inferior propio: ahora lo pone la barra. */
.notiwoo-catalog.is-sticky.notiwoo-catalog--chips .notiwoo-catalog__rail {
	padding-bottom: 0;
}

/* «Todos» encabeza la navegación y se distingue del resto. */
.notiwoo-catalog__link--all {
	font-weight: 700;
}

.notiwoo-catalog--chips .notiwoo-catalog__link--all,
.notiwoo-catalog--tabs .notiwoo-catalog__rail--sub .notiwoo-catalog__link--all {
	position: relative;
}

.notiwoo-catalog--sidebar .notiwoo-catalog__link--all,
.notiwoo-catalog--accordion .notiwoo-catalog__link--all {
	margin-bottom: 6px;
}

.notiwoo-catalog.is-sticky.notiwoo-catalog--sidebar .notiwoo-catalog__nav {
	align-self: start;
	max-height: calc(100vh - var(--nwcat-sticky-top) - 32px);
	overflow-y: auto;
	position: sticky;
	top: calc(var(--nwcat-sticky-top) + 16px);
}

/* ---------- Responsive ---------- */

@container (max-width: 860px) {
	.notiwoo-catalog--sidebar,
	.notiwoo-catalog--accordion {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

@media (max-width: 860px) {
	.notiwoo-catalog--sidebar,
	.notiwoo-catalog--accordion {
		display: block;
	}

	.notiwoo-catalog--sidebar .notiwoo-catalog__nav,
	.notiwoo-catalog--accordion .notiwoo-catalog__nav {
		margin-bottom: 24px;
		max-height: none;
		position: static;
	}

	/* En móvil el árbol lateral se convierte en un carril deslizable: un menú
	   vertical largo empujaría el catálogo fuera de la primera pantalla. */
	.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-1 {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		padding-bottom: 8px;
	}

	.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-1 > .notiwoo-catalog__tree-item {
		flex: 0 0 auto;
	}

	.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-1 > .notiwoo-catalog__tree-item > .notiwoo-catalog__link {
		background: var(--nwcat-soft);
		white-space: nowrap;
	}

	.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-2,
	.notiwoo-catalog--sidebar .notiwoo-catalog__tree--depth-3 {
		display: none;
	}

	.notiwoo-catalog__section--depth-1 + .notiwoo-catalog__section--depth-1 {
		margin-top: 36px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.notiwoo-catalog__link,
	.notiwoo-catalog__toggle-icon {
		transition: none;
	}

	.notiwoo-catalog--chips .notiwoo-catalog__rail {
		scroll-behavior: auto;
	}
}

/* Las tarjetas usan la imagen de ficha (más nítida); se recorta cuadrada como la miniatura. */
.notiwoo-catalog li.product img.attachment-woocommerce_single {
	aspect-ratio: 1 / 1;
	height: auto;
	object-fit: cover;
	width: 100%;
}

/* =====================================================================
 * Diseño de la carta (opciones de «Diseño» en el panel)
 *
 * Todo cuelga de clases que el PHP sólo pone si la opción está encendida,
 * así que con los valores de fábrica nada de esto se aplica. Colores y
 * tipografía salen de variables: el acento de la paleta del popup, la
 * familia de `--nwcat-heading-font` (sólo con `.has-heading-font`) y el
 * resto se hereda del tema.
 * ===================================================================== */

.notiwoo-catalog {
	--nwcat-list-columns: 2;
}

/* ---------- Navegación subrayada ---------- */

.notiwoo-catalog--nav-underline .notiwoo-catalog__nav {
	border-bottom: 1px solid var(--nwcat-line);
	margin-bottom: 48px;
}

.notiwoo-catalog.is-sticky.notiwoo-catalog--nav-underline .notiwoo-catalog__nav {
	padding-bottom: 0;
	padding-top: 0;
}

/* Se desliza con el dedo o la rueda, sin barra: el desvanecido del borde
   derecho ya avisa de que hay más. */
.notiwoo-catalog--nav-underline .notiwoo-catalog__rail {
	gap: 6px 34px;
	justify-content: center;
	padding: 0;
	scrollbar-width: none;
}

.notiwoo-catalog--nav-underline .notiwoo-catalog__rail::-webkit-scrollbar {
	display: none;
}

.notiwoo-catalog--nav-underline .notiwoo-catalog__link {
	background: none;
	border: 0;
	border-radius: 0;
	white-space: nowrap;
}

.notiwoo-catalog--nav-underline .notiwoo-catalog__rail:not(.notiwoo-catalog__rail--sub) .notiwoo-catalog__link {
	box-shadow: inset 0 -2px 0 transparent;
	color: inherit;
	font-size: 0.82em;
	font-weight: 600;
	letter-spacing: 0.14em;
	opacity: 0.75;
	padding: 18px 0 16px;
	text-transform: uppercase;
	transition: opacity 160ms ease, box-shadow 160ms ease;
}

.notiwoo-catalog--nav-underline .notiwoo-catalog__rail:not(.notiwoo-catalog__rail--sub) .notiwoo-catalog__link:hover {
	border-color: transparent;
	opacity: 1;
}

.notiwoo-catalog--nav-underline .notiwoo-catalog__rail:not(.notiwoo-catalog__rail--sub) .notiwoo-catalog__link.is-active {
	background: none;
	box-shadow: inset 0 -2px 0 var(--nwcat-accent);
	color: var(--nwcat-accent);
	opacity: 1;
}

.notiwoo-catalog--nav-underline .notiwoo-catalog__rail--sub {
	border-top: 1px solid var(--nwcat-line);
	gap: 8px;
	padding: 12px 0 14px;
}

.notiwoo-catalog--nav-underline .notiwoo-catalog__rail--sub .notiwoo-catalog__link {
	border: 0;
	border-radius: 999px;
	color: var(--nwcat-muted);
	font-size: 0.88em;
	font-weight: 500;
	padding: 6px 14px;
}

.notiwoo-catalog--nav-underline .notiwoo-catalog__rail--sub .notiwoo-catalog__link:hover {
	background: var(--nwcat-soft);
	color: inherit;
}

.notiwoo-catalog--nav-underline .notiwoo-catalog__rail--sub .notiwoo-catalog__link.is-active {
	background: var(--nwcat-accent);
	color: var(--nwcat-accent-text);
}

/* ---------- Títulos decorados ---------- */

.notiwoo-catalog__kicker {
	color: var(--nwcat-accent);
	font-size: 0.76em;
	font-weight: 700;
	letter-spacing: 0.2em;
	margin: 0 0 10px;
	text-transform: uppercase;
}

/* Fuente propia de los títulos, sólo si se eligió una: sin ella cada título
   conserva la del tema. Se repite la clase del catálogo para ganar a los
   `h2` de los kits (`.elementor-kit-N h2`). */
.notiwoo-catalog.has-heading-font .notiwoo-catalog__section-title,
.notiwoo-catalog.has-heading-font.notiwoo-catalog--nav-underline .notiwoo-catalog__rail:not(.notiwoo-catalog__rail--sub) .notiwoo-catalog__link,
.notiwoo-catalog.has-heading-font.notiwoo-catalog--layout-list ul.products li.product .woocommerce-loop-product__title,
.notiwoo-catalog.has-heading-font.notiwoo-catalog--layout-list ul.products li.product .price {
	font-family: var(--nwcat-heading-font);
}

.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head {
	border: 0;
	margin-bottom: 48px;
	padding: 0;
	text-align: center;
}

.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head .notiwoo-catalog__section-title {
	align-items: center;
	display: inline-flex;
	font-size: clamp(2rem, 5vw, 3.25rem);
	gap: 22px;
	line-height: 1.1;
}

.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head .notiwoo-catalog__section-title::before,
.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head .notiwoo-catalog__section-title::after {
	background: var(--nwcat-accent);
	content: "";
	display: block;
	height: 1px;
	width: 48px;
}

.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-1 + .notiwoo-catalog__section--depth-1 {
	margin-top: 96px;
}

.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-2 {
	margin: 0 0 64px;
}

.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-2 > .notiwoo-catalog__section-head {
	align-items: center;
	display: flex;
	gap: 20px;
	margin-bottom: 8px;
}

.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-2 > .notiwoo-catalog__section-head::after {
	background: linear-gradient(90deg, var(--nwcat-accent), transparent);
	content: "";
	flex: 1;
	height: 1px;
}

.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-2 .notiwoo-catalog__section-title {
	font-size: 1.45em;
}

/* Los temas suelen capitalizar cada palabra de los títulos («Calientes Y
   Café»); el nombre de la categoría ya viene escrito como debe leerse. */
.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section-title {
	text-transform: none;
}

/* ---------- Imágenes de relleno ---------- */

.notiwoo-catalog.hides-placeholder li.product img.woocommerce-placeholder {
	display: none !important;
}

/* ---------- Desglose de precios ---------- */

.notiwoo-price-option {
	white-space: nowrap;
}

.notiwoo-price-options__sep {
	opacity: 0.6;
}

/* ---------- Carta clásica ---------- */

/*
 * Cada producto es una rejilla: nombre, puntos guía y precio en la primera
 * fila; descripción, presentaciones y botón debajo. Los envoltorios que
 * meten los temas (Astra, el enlace de WooCommerce) se aplanan con
 * `display: contents` para que sus hijos sean celdas de la rejilla.
 */
.notiwoo-catalog.notiwoo-catalog--layout-list ul.products {
	column-gap: 72px !important;
	display: grid !important;
	grid-template-columns: repeat(var(--nwcat-list-columns), minmax(0, 1fr)) !important;
	margin: 0 !important;
	padding: 0 !important;
	row-gap: 0 !important;
}

.notiwoo-catalog.notiwoo-catalog--layout-list ul.products::before,
.notiwoo-catalog.notiwoo-catalog--layout-list ul.products::after {
	display: none !important;
}

.notiwoo-catalog.notiwoo-catalog--layout-list ul.products li.product {
	align-content: start;
	align-items: start;
	background: none !important;
	border: 0;
	border-bottom: 1px solid var(--nwcat-line);
	border-radius: 0 !important;
	box-shadow: none !important;
	display: grid !important;
	float: none !important;
	grid-template-areas:
		"badge  badge  badge"
		"title  leader price"
		"desc   desc   desc"
		"action action action";
	grid-template-columns: minmax(0, auto) minmax(24px, 1fr) auto;
	margin: 0 !important;
	padding: 22px 0 !important;
	text-align: left;
	transform: none !important;
	width: auto !important;
}

.notiwoo-catalog--layout-list ul.products li.product .astra-shop-thumbnail-wrap,
.notiwoo-catalog--layout-list ul.products li.product .astra-shop-summary-wrap,
.notiwoo-catalog--layout-list ul.products li.product a.woocommerce-LoopProduct-link {
	display: contents;
}

/* Lo que el tema añada sin área propia ocupa una fila entera al final, en
   vez de colarse en el hueco de los puntos o del precio. */
.notiwoo-catalog--layout-list ul.products li.product > *,
.notiwoo-catalog--layout-list ul.products li.product > .astra-shop-thumbnail-wrap > *,
.notiwoo-catalog--layout-list ul.products li.product > .astra-shop-summary-wrap > *,
.notiwoo-catalog--layout-list ul.products li.product > a.woocommerce-LoopProduct-link > * {
	grid-column: 1 / -1;
}

.notiwoo-catalog--layout-list ul.products li.product::before {
	align-self: start;
	border-bottom: 1px dotted color-mix(in srgb, currentColor 35%, transparent);
	content: "";
	grid-area: leader;
	height: 19px;
	margin: 0 14px;
}

/* La carta no usa fotos: ni la del producto ni el botón flotante del tema. */
.notiwoo-catalog--layout-list ul.products li.product img,
.notiwoo-catalog--layout-list ul.products li.product .ast-woo-product-category,
.notiwoo-catalog--layout-list ul.products li.product .ast-on-card-button,
.notiwoo-catalog--layout-list ul.products li.product .onsale {
	display: none !important;
}

.notiwoo-catalog--layout-list ul.products li.product .notiwoo-badge {
	grid-area: badge;
	justify-self: start;
}

.notiwoo-catalog--layout-list ul.products li.product .ast-loop-product__link,
.notiwoo-catalog--layout-list ul.products li.product .woocommerce-loop-product__title {
	grid-area: title;
	min-width: 0;
}

.notiwoo-catalog.notiwoo-catalog--layout-list ul.products li.product .woocommerce-loop-product__title {
	font-size: 1.12em;
	font-weight: 600;
	line-height: 26px;
	margin: 0;
	padding: 0;
	text-transform: none;
}

.notiwoo-catalog.notiwoo-catalog--layout-list ul.products li.product .price {
	color: var(--nwcat-accent);
	font-size: 1.05em;
	font-weight: 700;
	grid-area: price;
	line-height: 26px;
	margin: 0;
	padding: 0;
	white-space: nowrap;
}

.notiwoo-catalog.notiwoo-catalog--layout-list ul.products li.product .price * {
	color: inherit;
	font-weight: inherit;
}

.notiwoo-catalog--layout-list ul.products li.product .notiwoo-card__description {
	grid-area: desc;
	margin: 4px 0 0;
	max-width: 92%;
}

.notiwoo-catalog--layout-list ul.products li.product .button,
.notiwoo-catalog--layout-list ul.products li.product .added_to_cart {
	grid-area: action;
	justify-self: start;
	margin: 12px 0 0;
}

/* Con presentaciones el precio es una lista: va bajo la descripción, y los
   puntos guía sobran porque ya no hay un único precio al que llevar. */
.notiwoo-catalog--layout-list ul.products li.product.notiwoo-has-price-options {
	grid-template-areas:
		"badge  badge  badge"
		"title  title  title"
		"desc   desc   desc"
		"price  price  price"
		"action action action";
}

.notiwoo-catalog--layout-list ul.products li.product.notiwoo-has-price-options::before {
	display: none;
}

.notiwoo-catalog.notiwoo-catalog--layout-list ul.products li.product.notiwoo-has-price-options .price {
	font-size: 0.95em;
	line-height: 1.5;
	margin-top: 6px;
	white-space: normal;
}

/* ---------- Diseño en pantallas estrechas ---------- */

/* Se mide el propio catálogo, no la ventana: puede vivir en una columna
   estrecha de un constructor aunque la pantalla sea ancha. */
@container (max-width: 760px) {
	.notiwoo-catalog.notiwoo-catalog--layout-list ul.products {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

@container (max-width: 600px) {
	.notiwoo-catalog.notiwoo-catalog--layout-list ul.products li.product {
		grid-template-columns: minmax(0, auto) minmax(14px, 1fr) auto;
		padding: 16px 0 !important;
	}

	.notiwoo-catalog--layout-list ul.products li.product::before {
		height: 17px;
		margin: 0 8px;
	}

	.notiwoo-catalog.notiwoo-catalog--layout-list ul.products li.product .woocommerce-loop-product__title {
		font-size: 1em;
		line-height: 22px;
	}

	.notiwoo-catalog.notiwoo-catalog--layout-list ul.products li.product .price {
		font-size: 0.92em;
		line-height: 22px;
	}

	.notiwoo-catalog--layout-list ul.products li.product .notiwoo-card__description {
		font-size: 0.86em;
		max-width: 100%;
	}

	.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head {
		margin-bottom: 28px;
	}

	.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head .notiwoo-catalog__section-title {
		font-size: 2rem;
		gap: 14px;
	}

	.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head .notiwoo-catalog__section-title::before,
	.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-1 > .notiwoo-catalog__section-head .notiwoo-catalog__section-title::after {
		width: 28px;
	}

	.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-1 + .notiwoo-catalog__section--depth-1 {
		margin-top: 64px;
	}

	.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-2 {
		margin-bottom: 40px;
	}

	.notiwoo-catalog.has-decorated-headings .notiwoo-catalog__section--depth-2 .notiwoo-catalog__section-title {
		font-size: 1.25em;
	}

	.notiwoo-catalog__kicker {
		font-size: 0.68em;
		margin-bottom: 6px;
	}
}

/* El contenedor no puede consultarse a sí mismo, así que la barra se ajusta
   por ventana. */
@media (max-width: 1024px) {
	.notiwoo-catalog--nav-underline .notiwoo-catalog__rail {
		flex-wrap: nowrap;
		justify-content: flex-start;
		-webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
		mask-image: linear-gradient(90deg, #000 85%, transparent);
		overflow-x: auto;
		padding-right: 32px;
	}

	.notiwoo-catalog--nav-underline .notiwoo-catalog__link {
		flex: 0 0 auto;
	}

	/* «Volver arriba» del tema tapaba los precios; con el menú fijo sobra. */
	body:has(.notiwoo-catalog.hides-scroll-top) :is(#ast-scroll-top, #scroll-top, #back-to-top, .scroll-to-top, .back-to-top, .elementor-scroll-to-top) {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.notiwoo-catalog--nav-underline .notiwoo-catalog__nav {
		margin-bottom: 32px;
	}

	.notiwoo-catalog--nav-underline .notiwoo-catalog__rail:not(.notiwoo-catalog__rail--sub) {
		gap: 0 22px;
	}

	.notiwoo-catalog--nav-underline .notiwoo-catalog__rail:not(.notiwoo-catalog__rail--sub) .notiwoo-catalog__link {
		font-size: 0.72em;
		letter-spacing: 0.1em;
		padding: 14px 0 12px;
	}

	.notiwoo-catalog--nav-underline .notiwoo-catalog__rail--sub {
		gap: 4px;
		padding: 8px 32px 10px 0;
	}

	.notiwoo-catalog--nav-underline .notiwoo-catalog__rail--sub .notiwoo-catalog__link {
		font-size: 0.8em;
		padding: 5px 12px;
	}
}

/* ---------- Carta de una sede ---------- */

/*
 * La cabecera dice de qué sede es la carta antes que cualquier producto: el
 * mismo plato cuesta distinto en cada sede, así que confundirse de carta es
 * confundirse de precio. El color de la sede tiñe el acento de toda la carta.
 */
.notiwoo-catalog__sede {
	align-items: center;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--nwcat-accent) 14%, transparent), transparent 62%),
		var(--nwcat-soft);
	border: 1px solid color-mix(in srgb, var(--nwcat-accent) 38%, transparent);
	border-radius: calc(var(--nwcat-radius) + 6px);
	display: flex;
	flex-wrap: wrap;
	gap: 20px 32px;
	justify-content: space-between;
	margin: 0 0 32px;
	padding: 26px 30px;
	position: relative;
}

.notiwoo-catalog__sede::before {
	background: var(--nwcat-accent);
	border-radius: 999px;
	content: "";
	inset: 22px auto 22px 0;
	position: absolute;
	width: 4px;
}

.notiwoo-catalog__sede-brand {
	align-items: center;
	display: flex;
	flex: 1 1 320px;
	gap: 20px;
	min-width: 0;
}

.notiwoo-catalog .notiwoo-catalog__sede-logo {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.45);
	flex: 0 0 auto;
	height: 72px;
	object-fit: contain;
	padding: 8px 12px;
	width: auto;
	max-width: 160px;
}

.notiwoo-catalog__sede-text {
	min-width: 0;
}

.notiwoo-catalog .notiwoo-catalog__sede-kicker {
	color: var(--nwcat-accent);
	font-size: 0.74em;
	font-weight: 700;
	letter-spacing: 0.2em;
	margin: 0 0 6px;
	text-transform: uppercase;
}

/* Sin `color`: toma el de los títulos del tema, igual que las secciones. */
.notiwoo-catalog .notiwoo-catalog__sede-name {
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
	line-height: 1.1;
	margin: 0;
}

.notiwoo-catalog.has-heading-font .notiwoo-catalog__sede-name {
	font-family: var(--nwcat-heading-font);
}

.notiwoo-catalog .notiwoo-catalog__sede-description {
	color: var(--nwcat-muted);
	font-size: 0.95em;
	line-height: 1.5;
	margin: 8px 0 0;
	max-width: 56ch;
}

.notiwoo-catalog__sedes {
	display: flex;
	flex: 0 1 auto;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.notiwoo-catalog__sedes-label {
	color: var(--nwcat-muted);
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.notiwoo-catalog__sedes-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.notiwoo-catalog .notiwoo-catalog__sede-link {
	border: 1px solid var(--nwcat-line);
	border-radius: 999px;
	color: inherit;
	font-size: 0.88em;
	font-weight: 600;
	line-height: 1.2;
	padding: 9px 16px;
	text-decoration: none;
	transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
	white-space: nowrap;
}

.notiwoo-catalog .notiwoo-catalog__sede-link:hover,
.notiwoo-catalog .notiwoo-catalog__sede-link:focus-visible {
	border-color: var(--nwcat-accent);
	color: inherit;
	text-decoration: none;
}

.notiwoo-catalog .notiwoo-catalog__sede-link:focus-visible {
	outline: 2px solid var(--nwcat-accent);
	outline-offset: 2px;
}

.notiwoo-catalog .notiwoo-catalog__sede-link.is-current {
	background: var(--nwcat-accent);
	border-color: var(--nwcat-accent);
	color: var(--nwcat-accent-text);
	pointer-events: none;
}

/*
 * Al bajar, la cabecera se pierde de vista; la barra fija recuerda la sede
 * con una etiqueta que sólo aparece cuando la barra está pegada.
 */
.notiwoo-catalog.has-sede .notiwoo-catalog__nav {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	column-gap: 18px;
}

.notiwoo-catalog.has-sede .notiwoo-catalog__nav > .notiwoo-catalog__rail {
	flex: 1 1 0;
	min-width: 0;
}

.notiwoo-catalog.has-sede .notiwoo-catalog__nav > .notiwoo-catalog__rail--sub,
.notiwoo-catalog.has-sede .notiwoo-catalog__nav > .notiwoo-catalog__tree {
	flex-basis: 100%;
}

.notiwoo-catalog__nav-sede {
	background: var(--nwcat-accent);
	border-radius: 999px;
	color: var(--nwcat-accent-text);
	display: none;
	flex: 0 0 auto;
	font-size: 0.74em;
	font-weight: 700;
	letter-spacing: 0.08em;
	padding: 5px 12px;
	text-transform: uppercase;
	white-space: nowrap;
}

.notiwoo-catalog.is-sticky.is-stuck .notiwoo-catalog__nav-sede {
	display: inline-flex;
}

.notiwoo-catalog--empty .notiwoo-catalog__empty {
	color: var(--nwcat-muted);
	margin: 0;
	padding: 24px 0;
	text-align: center;
}

.notiwoo-sede-note strong {
	font-weight: 700;
}

@media (max-width: 767px) {
	.notiwoo-catalog__sede {
		gap: 18px;
		margin-bottom: 24px;
		padding: 20px 18px 20px 22px;
	}

	.notiwoo-catalog__sede::before {
		inset: 18px auto 18px 0;
	}

	/* Logo arriba y texto debajo: lado a lado, el nombre quedaba en una
	   columna de una palabra por línea. */
	.notiwoo-catalog__sede-brand {
		align-items: flex-start;
		flex-basis: 100%;
		flex-direction: column;
		gap: 14px;
	}

	.notiwoo-catalog .notiwoo-catalog__sede-logo {
		height: 52px;
		max-width: 150px;
		padding: 6px 10px;
	}

	.notiwoo-catalog__sedes {
		flex-basis: 100%;
	}

	/* En el móvil las sedes se deslizan en una fila, como las categorías. */
	.notiwoo-catalog__sedes-list {
		flex-wrap: nowrap;
		margin: 0 -18px 0 -22px;
		overflow-x: auto;
		padding: 0 18px 2px 22px;
		scrollbar-width: none;
	}

	.notiwoo-catalog__sedes-list::-webkit-scrollbar {
		display: none;
	}

	.notiwoo-catalog.is-sticky.is-stuck .notiwoo-catalog__nav-sede {
		flex-basis: auto;
		margin: 6px 0 0;
	}
}

/* ---------- Elementor ---------- */

/* Dentro de un contenedor flex de Elementor el widget del shortcode no ocupa
   el ancho: su altura se calcula como si fuera más estrecho y, en el móvil,
   la carta reservaba el doble de alto, dejando miles de píxeles en blanco al
   final mientras el menú fijo seguía pegado sin contenido debajo. */
:is(.e-con, .e-con-inner) > .elementor-widget:has(.notiwoo-catalog) {
	width: 100%;
}

/* ---------- Horarios ---------- */

/* Horarios de servicio de la sede: una fila propia bajo la marca y el
   selector de sedes, para no competir con ellos en el ancho. */
.notiwoo-catalog__hours {
	border-top: 1px solid color-mix(in srgb, var(--nwcat-accent) 24%, transparent);
	flex: 1 1 100%;
	order: 3;
	padding-top: 18px;
}

.notiwoo-catalog .notiwoo-catalog__hours-title {
	color: var(--nwcat-muted);
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.16em;
	margin: 0 0 10px;
	text-transform: uppercase;
}

.notiwoo-catalog .notiwoo-catalog__hours-list {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	margin: 0;
}

.notiwoo-catalog__hours-row {
	background: color-mix(in srgb, #fff 70%, transparent);
	border: 1px solid color-mix(in srgb, var(--nwcat-accent) 18%, transparent);
	border-radius: var(--nwcat-radius);
	padding: 10px 14px;
}

.notiwoo-catalog .notiwoo-catalog__hours-row dt {
	font-size: 0.9em;
	font-weight: 600;
	margin: 0 0 2px;
}

.notiwoo-catalog .notiwoo-catalog__hours-row dd {
	color: var(--nwcat-accent);
	font-size: 0.88em;
	font-weight: 600;
	margin: 0;
}

/* Horario propio de una categoría, bajo su título. */
.notiwoo-catalog .notiwoo-catalog__section-hours {
	align-items: center;
	background: color-mix(in srgb, var(--nwcat-accent) 10%, transparent);
	border-radius: 999px;
	color: var(--nwcat-accent);
	display: inline-flex;
	font-size: 0.86em;
	font-weight: 600;
	gap: 6px;
	margin: 10px 0 0;
	padding: 5px 14px;
}

.notiwoo-catalog__section-hours-label {
	color: var(--nwcat-muted);
	font-weight: 500;
}

@media (max-width: 767px) {
	.notiwoo-catalog .notiwoo-catalog__hours-list {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.notiwoo-catalog__hours-row {
		padding: 9px 14px;
	}
}
