/* NH Módulos de Productos */

.nhm {
	--nhm-gap: 20px;
	--nhm-ink: var(--nh-ink, #0F1E33);
	--nhm-muted: var(--nh-muted, #5B6878);
	--nhm-blue: var(--nh-blue, #0054A6);
	--nhm-orange: var(--nh-orange, #F26822);
	--nhm-line: var(--nh-line, #E2E8F0);
	--nhm-radius: var(--nh-radius-lg, 22px);
	position: relative;
	min-width: 0;
}

/* Encabezado */
.nhm__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.nhm__titles { min-width: 0; }
.nhm__title { margin: 0; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.1; }
.nhm__sub { margin: 8px 0 0; color: var(--nhm-muted); font-size: 15.5px; max-width: 640px; }
.nhm__tools { display: flex; align-items: center; gap: 16px; flex: none; }
.nhm__all { font-weight: 700; font-size: 14.5px; text-decoration: none; color: var(--nhm-blue); white-space: nowrap; }
.nhm__all:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Flechas */
.nhm__arrows { display: inline-flex; gap: 8px; }
.nhm__arrow {
	width: 42px; height: 42px; border-radius: 50%;
	display: inline-grid; place-items: center; padding: 0;
	border: 1px solid var(--nhm-line); background: #fff; color: var(--nhm-ink);
	cursor: pointer; transition: background .15s, color .15s, opacity .15s;
}
.nhm__arrow:hover:not(:disabled) { background: var(--nhm-ink); color: #fff; border-color: var(--nhm-ink); }
.nhm__arrow:disabled { opacity: .35; cursor: default; }
.nhm__arrow:focus-visible { outline: 3px solid var(--nh-teal, #00AEEF); outline-offset: 2px; }
.nhm--static .nhm__arrows { display: none; }

/* Cuadrícula */
.nhm.nhm--grid .woocommerce ul.products { grid-template-columns: repeat(var(--nhm-cols, 4), minmax(0, 1fr)); }

/* Carrusel */
.nhm.nhm--carousel .woocommerce ul.products {
	display: grid;
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--nhm-cols, 4) - 1) * var(--nhm-gap)) / var(--nhm-cols, 4));
	column-gap: var(--nhm-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: 4px;
}
.nhm.nhm--carousel .woocommerce ul.products::-webkit-scrollbar { display: none; }
.nhm.nhm--carousel .woocommerce ul.products li.product { scroll-snap-align: start; }

/* Sin botón de carrito */
.nhm--no-button .woocommerce ul.products li.product .button,
.nhm--no-button .woocommerce ul.products li.product .added_to_cart { display: none; }

/* Franjas con texto al lado */
.nhm--panel {
	display: grid;
	grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
	gap: 40px;
	align-items: center;
	padding: 48px;
	border-radius: 32px;
}
.nhm--panel .nhm__aside { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.nhm--panel .nhm__title { font-size: clamp(28px, 3vw, 42px); }
.nhm--panel .nhm__sub { margin: 0; font-size: 16px; }
.nhm--panel .nhm__arrows { margin-top: 6px; }
.nhm__btn {
	box-sizing: border-box;
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 12px 24px; border-radius: 999px;
	background: var(--nhm-orange); color: #fff; font-weight: 700; text-decoration: none;
}
.nhm__btn:hover { background: var(--nh-orange-dark, #D9571A); color: #fff; }

.nhm--dark { background: var(--nhm-ink); color: #fff; }
.nhm--blue { background: var(--nhm-blue); color: #fff; }
.nhm--sky { background: var(--nh-sky, #E6F2FC); }
.nhm--peach { background: var(--nh-peach, #FFEDE3); }

.nhm--dark .nhm__title, .nhm--blue .nhm__title { color: #fff; }
.nhm--dark .nhm__sub { color: #B9C6D8; }
.nhm--blue .nhm__sub { color: #D6E6F7; }
.nhm--dark .nhm__all, .nhm--blue .nhm__all { color: #fff; }
.nhm--dark .nhm__arrow, .nhm--blue .nhm__arrow { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.nhm--dark .nhm__arrow:hover:not(:disabled), .nhm--blue .nhm__arrow:hover:not(:disabled) { background: #fff; color: var(--nhm-ink); }

/* Las tarjetas del tema son blancas: en fondos oscuros se mantienen blancas y sin borde. */
.nhm--dark .woocommerce ul.products li.product,
.nhm--blue .woocommerce ul.products li.product { border-color: transparent; }
.nhm--sky .woocommerce ul.products li.product,
.nhm--peach .woocommerce ul.products li.product { border-color: transparent; }

.nhm__empty { color: var(--nhm-muted); margin: 0; }
.nhm--dark .nhm__empty, .nhm--blue .nhm__empty { color: #B9C6D8; }

/* Tableta */
@media (max-width: 1024px) {
	.nhm.nhm--grid .woocommerce ul.products { grid-template-columns: repeat(min(var(--nhm-cols, 4), 3), minmax(0, 1fr)); }
	.nhm.nhm--carousel .woocommerce ul.products { grid-auto-columns: calc((100% - 2 * var(--nhm-gap)) / 3); }
	.nhm--panel { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 36px; }
	.nhm--panel .nhm__aside { max-width: 620px; }
}

/* Celular */
@media (max-width: 767px) {
	.nhm { --nhm-gap: 12px; }
	.nhm__head { align-items: center; margin-bottom: 16px; }
	.nhm__sub { font-size: 14.5px; }
	.nhm__head .nhm__arrows { display: none; }
	.nhm.nhm--grid .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nhm.nhm--carousel .woocommerce ul.products { grid-auto-columns: 44%; }
	.nhm--panel { padding: 28px 20px; border-radius: 24px; gap: 22px; }
	.nhm--panel .nhm__arrows { display: none; }
	.nhm--panel .nhm__btn { width: 100%; }
}
