/* CR Hair Finder — minimalismo de lujo, paleta CR. Usa los tokens del tema si existen. */
.crhf {
	--hf-marfil: var(--cr-marfil, #F4F0E8);
	--hf-tint: var(--cr-marfil-tint, #EBE5DA);
	--hf-grafito: var(--cr-grafito, #20201E);
	--hf-texto: var(--cr-texto, #4A4743);
	--hf-suave: var(--cr-texto-suave, #75695D);
	--hf-acento: var(--cr-grafito, #20201E);
	--hf-hover: var(--cr-laton-oscuro, #7E6644);
	--hf-laton: var(--cr-laton, #A4865D);
	--hf-linea: var(--cr-linea, rgba(32, 32, 30, .14));
	--hf-display: var(--cr-font-display, Georgia, serif);
	--hf-text: var(--cr-font-text, system-ui, sans-serif);
	--hf-ease: cubic-bezier(.2, .7, .2, 1);
	max-width: 68rem;
	margin-inline: auto;
	color: var(--hf-texto);
	font-family: var(--hf-text);
}

/* Progreso */
.crhf__progress { height: 1px; background: var(--hf-linea); overflow: hidden; }
.crhf__progress-bar { display: block; height: 100%; background: var(--hf-laton); transform: scaleX(.2); transform-origin: left; transition: transform .6s var(--hf-ease); }
.crhf__counter { margin: 1.1rem 0 0; text-align: center; font-size: .78rem; letter-spacing: .24em; color: var(--hf-suave); }
.crhf__counter span { color: var(--hf-grafito); }
.crhf.is-done .crhf__counter { visibility: hidden; }

/* Paso */
.crhf__form { margin: 0; }
.crhf__step { border: 0; padding: 0; margin: clamp(2rem, 1.5rem + 2vw, 3.5rem) 0 0; min-width: 0; }
.crhf__step.is-active { animation: crhf-in .6s var(--hf-ease) both; }
@keyframes crhf-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.crhf__question {
	display: block; width: 100%; padding: 0; margin: 0; border: 0; float: none; text-align: center;
	font-family: var(--hf-display); font-weight: 400; line-height: 1.08; letter-spacing: -.01em;
	font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem); color: var(--hf-grafito);
}
.crhf__hint { margin: .9rem auto 0; max-width: 30rem; text-align: center; color: var(--hf-suave); font-size: .98rem; }

/* Opciones */
.crhf__options { display: grid; gap: .75rem; margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 52rem; margin-inline: auto; }
.crhf__options--2 { grid-template-columns: repeat(2, minmax(0, 15rem)); justify-content: center; }
.crhf__options--7 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 64rem; }
.crhf__option {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem;
	padding: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem) 1rem; cursor: pointer;
	border: 1px solid var(--hf-linea); background: transparent; color: var(--hf-grafito);
	transition: border-color .35s var(--hf-ease), background-color .35s var(--hf-ease), color .35s var(--hf-ease);
}
.crhf__option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.crhf__icon { display: block; width: clamp(3.4rem, 3rem + 1.4vw, 4.4rem); color: inherit; transition: color .35s var(--hf-ease), transform .5s var(--hf-ease); }
.crhf__icon svg { display: block; width: 100%; height: auto; }
.crhf__label { font-size: .78rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; text-align: center; }
.crhf__option:hover { border-color: var(--hf-grafito); }
.crhf__option:hover .crhf__icon { transform: translateY(-3px); }
.crhf__option:has(input:checked) { background: var(--hf-acento); border-color: var(--hf-acento); color: var(--hf-marfil); }
.crhf__option:has(input:checked) .crhf__icon { color: #D9C29C; }
.crhf__option:has(input:focus-visible) { outline: 2px solid var(--hf-laton); outline-offset: 3px; }

.crhf__nav { display: flex; justify-content: center; min-height: 3rem; margin-top: 2rem; }
.crhf__back, .crhf-link {
	background: none; border: 0; padding: .4em 0; cursor: pointer; color: var(--hf-grafito);
	font-family: var(--hf-text); font-size: .78rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
	border-bottom: 1px solid var(--hf-laton); text-decoration: none;
}
.crhf__back:hover, .crhf-link:hover { color: var(--hf-hover); }

/* Botones */
.crhf-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: 1em 1.8em; border: 1px solid var(--hf-grafito); border-radius: 0; cursor: pointer;
	font-family: var(--hf-text); font-size: .74rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
	transition: background-color .35s var(--hf-ease), color .35s var(--hf-ease), border-color .35s var(--hf-ease);
}
.crhf-btn--solid { background: var(--hf-grafito); color: var(--hf-marfil); }
.crhf-btn--solid:hover { background: var(--hf-laton); border-color: var(--hf-laton); color: var(--hf-grafito); }
.crhf-btn--line { background: transparent; color: var(--hf-grafito); }
.crhf-btn--line:hover { background: var(--hf-grafito); color: var(--hf-marfil); }
.crhf-btn--light { background: var(--hf-marfil); color: var(--hf-grafito); border-color: var(--hf-marfil); }
.crhf-btn--light:hover { background: var(--hf-laton); border-color: var(--hf-laton); color: var(--hf-grafito); }
.crhf-btn:disabled { opacity: .6; cursor: default; }

/* Resultado */
.crhf__result { outline: none; animation: crhf-in .7s var(--hf-ease) both; }
.crhf-eyebrow { margin: 0 0 1rem; font-size: .76rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--hf-laton); }
.crhf-result__head { text-align: center; margin: clamp(2.5rem, 2rem + 2vw, 4rem) 0 clamp(2.5rem, 2rem + 2vw, 4rem); }
.crhf-result__title { margin: 0; font-family: var(--hf-display); font-weight: 400; font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.8rem); line-height: 1.06; color: var(--hf-grafito); }
.crhf-result__summary { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 0; margin: 1.4rem 0 0; padding: 0; color: var(--hf-suave); font-size: .92rem; }
.crhf-result__summary li + li::before { content: "·"; margin: 0 .7rem; color: var(--hf-laton); }
.crhf-result__loading, .crhf-result__empty { text-align: center; color: var(--hf-suave); margin: 3rem auto; max-width: 34rem; }

.crhf-result__grid { display: grid; gap: clamp(1rem, .5rem + 1.5vw, 2rem); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.crhf-result__grid--1 { grid-template-columns: minmax(0, 20rem); justify-content: center; }
.crhf-result__grid--2 { grid-template-columns: repeat(2, minmax(0, 20rem)); justify-content: center; }
.crhf-result__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.crhf-card { display: flex; flex-direction: column; border-top: 1px solid var(--hf-grafito); padding-top: 1rem; }
.crhf-card__step { display: flex; align-items: baseline; gap: .7rem; margin: 0 0 1rem; font-size: .76rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--hf-grafito); }
.crhf-card__step span { font-family: var(--hf-display); font-size: 1.6rem; letter-spacing: 0; color: var(--hf-laton); }
.crhf-card__media { display: block; aspect-ratio: 1; background: var(--hf-tint); overflow: hidden; }
.crhf-card__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform 1s var(--hf-ease); }
.crhf-card__media:hover img { transform: scale(1.04); }
.crhf-card__brand { margin: 1.1rem 0 .3rem; font-size: .72rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--hf-suave); }
.crhf-card__name { margin: 0; font-family: var(--hf-display); font-weight: 400; font-size: 1.3rem; line-height: 1.2; }
.crhf-card__name a { color: var(--hf-grafito); text-decoration: none; }
.crhf-card__why { margin: .6rem 0 1.2rem; font-size: .88rem; color: var(--hf-suave); line-height: 1.5; }
.crhf-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.crhf-card__price { font-weight: 500; color: var(--hf-grafito); letter-spacing: .02em; }
.crhf-card__foot .crhf-btn { padding: .8em 1.3em; }

.crhf-result__total { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); padding-top: 1.5rem; border-top: 1px solid var(--hf-linea); }
.crhf-result__total p { margin: 0; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; color: var(--hf-suave); }
.crhf-result__total strong { margin-left: .8rem; font-family: var(--hf-display); font-size: 1.7rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--hf-grafito); }

.crhf-service { margin-top: clamp(3rem, 2rem + 4vw, 5.5rem); padding: clamp(2.5rem, 2rem + 3vw, 4.5rem); background: var(--hf-tint); color: var(--hf-texto); text-align: center; border-top: 1px solid var(--hf-laton); }
.crhf-service .crhf-eyebrow { color: var(--hf-hover); }
.crhf-service__title { margin: 0; font-family: var(--hf-display); font-weight: 400; font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); color: var(--hf-grafito); }
.crhf-service__text { margin: 1rem auto 2rem; max-width: 34rem; color: var(--hf-texto); }
.crhf-service__ctas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem 1rem; }
.crhf-service .crhf-link { color: var(--hf-grafito); margin-left: .6rem; }

.crhf-result__restart { text-align: center; margin: 2.5rem 0 0; }
.crhf-result__status { text-align: center; min-height: 1.5em; margin: 1rem 0 0; font-size: .92rem; }
.crhf-result__status a { color: var(--hf-grafito); }

/* Móvil */
@media (max-width: 900px) {
	.crhf__options--7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.crhf-result__grid, .crhf-result__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.crhf__options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
	.crhf__options--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.crhf__options--7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.crhf__option { padding: 1.3rem .4rem; gap: .8rem; }
	.crhf__label { font-size: .66rem; letter-spacing: .12em; }
	.crhf-result__grid, .crhf-result__grid--2, .crhf-result__grid--3 { grid-template-columns: minmax(0, 1fr); }
	.crhf-result__total { justify-content: center; text-align: center; }
	.crhf-service__ctas .crhf-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.crhf *, .crhf { animation: none !important; transition: none !important; }
}
.crhf h2, .crhf h3, .crhf legend { text-transform: none; }
.crhf__icon { width: clamp(3.8rem, 3.2rem + 2vw, 5.2rem); }
.crhf .crhf__result:focus, .crhf .crhf__result:focus-visible { outline: none; }
.crhf a.crhf-btn, .crhf .crhf-card__name a, .crhf .crhf-card__media { text-decoration: none; }
.crhf .crhf-card__name a:hover { color: var(--hf-hover); }
.crhf__step:focus { outline: none; }
@media (max-width: 900px) {
	.crhf__options--7 .crhf__option:last-child { grid-column: 1 / -1; width: calc(50% - .25rem); justify-self: center; }
}

/* Compacto: pregunta + opciones visibles sin scroll ---------------------- */
.crhf__counter { margin-top: .6rem; font-size: .74rem; }
.crhf__step { margin-top: clamp(.8rem, .5rem + 1vw, 1.6rem); }
.crhf__question { font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.7rem); }
.crhf__hint { margin-top: .45rem; font-size: .94rem; }
.crhf__options { margin-top: clamp(1rem, .8rem + 1vw, 1.8rem); gap: .7rem; }
.crhf__option { padding: clamp(1.1rem, .8rem + 1vw, 1.8rem) .8rem; gap: .8rem; }
.crhf__icon { width: clamp(3rem, 2.6rem + 1.2vw, 4rem); }
.crhf__options--7 { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 60rem; }
.crhf__options--7 .crhf__option { padding: clamp(.9rem, .7rem + .8vw, 1.4rem) .6rem; }
.crhf__options--7 .crhf__icon { width: clamp(2.6rem, 2.3rem + 1vw, 3.4rem); }
.crhf__nav { margin-top: 1rem; min-height: 2.4rem; }
@media (max-height: 760px) and (min-width: 901px) {
	.crhf__hint { display: none; }
	.crhf__option { padding: 1rem .8rem; }
}
@media (max-width: 900px) {
	.crhf__options--7 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.crhf__options--7 .crhf__option:last-child { grid-column: 2; width: auto; }
}
@media (max-width: 600px) {
	.crhf__question { font-size: 1.6rem; }
	.crhf__hint { font-size: .86rem; }
	.crhf__options, .crhf__options--7 { gap: .45rem; }
	.crhf__option, .crhf__options--7 .crhf__option { padding: .95rem .3rem; gap: .55rem; }
	.crhf__icon, .crhf__options--7 .crhf__icon { width: 2.6rem; }
	.crhf__label { font-size: .62rem; letter-spacing: .1em; line-height: 1.3; }
}
/* 7 opciones: última fila centrada */
.crhf__options--7 { display: flex; flex-wrap: wrap; justify-content: center; }
.crhf__options--7 .crhf__option { flex: 0 0 calc((100% - 3 * .7rem) / 4); }
@media (max-width: 900px) {
	.crhf__options--7 .crhf__option, .crhf__options--7 .crhf__option:last-child { flex: 0 0 calc((100% - 2 * .45rem) / 3 - 1px); width: auto; grid-column: auto; }
}

/* V2: opciones de texto, campos, consentimiento */
.crhf__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.crhf__options--text { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 44rem; }
.crhf__options--text.crhf__options--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.crhf__options--text .crhf__option { padding: 1.15rem 1rem; min-height: 4.2rem; }
.crhf__options--text .crhf__label { font-size: .8rem; letter-spacing: .14em; line-height: 1.4; }
.crhf__options--text.crhf__options--6, .crhf__options--text.crhf__options--4 { display: grid; }
.crhf__options--text.crhf__options--6 .crhf__option, .crhf__options--text.crhf__options--4 .crhf__option { flex: none; }
.crhf__field { max-width: 26rem; margin: 1.6rem auto 0; }
.crhf__input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--hf-grafito); border-radius: 0; padding: .8rem .2rem; font-family: var(--hf-display); font-size: 1.6rem; color: var(--hf-grafito); text-align: center; }
.crhf__input:focus { outline: none; border-bottom-color: var(--hf-laton); }
.crhf__input::placeholder { color: var(--hf-suave); opacity: .6; }
.crhf__consent { display: flex; gap: .8rem; align-items: flex-start; max-width: 34rem; margin: 1.6rem auto 0; font-size: .95rem; line-height: 1.5; color: var(--hf-texto); cursor: pointer; text-align: left; }
.crhf__consent input { flex: none; width: 1.05rem; height: 1.05rem; margin-top: .2rem; accent-color: var(--hf-acento); }
.crhf__consent a { color: var(--hf-grafito); border-bottom: 1px solid var(--hf-laton); text-decoration: none; }
.crhf__cta { display: flex; justify-content: center; margin-top: 1.6rem; }
.crhf__error { text-align: center; color: #8A3B2E; font-size: .9rem; margin: .9rem 0 0; }
.crhf-result__lead { margin: .8rem 0 0; color: var(--hf-suave); }
@media (max-width: 600px) {
	.crhf__options--text, .crhf__options--text.crhf__options--3 { grid-template-columns: minmax(0, 1fr); gap: .45rem; }
	.crhf__options--text .crhf__option { min-height: 3.4rem; padding: .85rem .8rem; }
	.crhf__input { font-size: 1.35rem; }
}

/* "Anterior" y enlaces: siempre legibles (el tema pinta fondo oscuro en botones al pasar el ratón) */
.crhf .crhf__back, .crhf .crhf__back:hover, .crhf .crhf__back:focus, .crhf .crhf__back:active,
.crhf button.crhf-link, .crhf button.crhf-link:hover, .crhf button.crhf-link:focus {
	background: none !important; box-shadow: none !important; color: var(--hf-grafito) !important; border-bottom: 1px solid var(--hf-laton) !important;
}
.crhf .crhf__back:hover, .crhf button.crhf-link:hover { border-bottom-color: var(--hf-grafito) !important; }
.crhf-result__shop { text-align: center; margin: 1.75rem 0 0; }
