/* EPF Home · Propuesta A (Vitrina). Colores y tipografía del sitio:
   turquesa #1aa7b2 (texto en #0e6e76 por contraste), naranja #FD9927,
   precio en rojo, Nexa en títulos (WOFF2 de EPF Performance). */

@font-face { font-family: "EPF Nexa"; font-weight: 400; font-display: swap; src: url("../../epf-performance/assets/fonts/nexa-regular.woff2") format("woff2"); }
@font-face { font-family: "EPF Nexa"; font-weight: 700; font-display: swap; src: url("../../epf-performance/assets/fonts/nexa-bold.woff2") format("woff2"); }

.epf-home {
	--epf-tinta: #2b2b2b;
	--epf-texto: #434343;
	--epf-tenue: #5a5a5a;
	--epf-turquesa: #1aa7b2;
	--epf-turquesa-osc: #0e6e76;
	--epf-turquesa-claro: #cdeef0;
	--epf-naranja: #fd9927;
	--epf-naranja-osc: #b85a00;
	--epf-crema: #fff4e6;
	--epf-borde: #f4b766;
	--epf-precio: #c62828;
	--epf-titulos: "EPF Nexa", "Nexa Bold", "Open Sans", system-ui, sans-serif;
	--epf-cuerpo: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--epf-gutter: max(16px, env(safe-area-inset-left, 0px));
	font-family: var(--epf-cuerpo);
	color: var(--epf-texto);
	background: #fff;
}
.epf-home *, .epf-home *::before, .epf-home *::after { box-sizing: border-box; }

.epf-h-contenedor { max-width: 1280px; margin: 0 auto; padding-inline: var(--epf-gutter); display: flex; flex-direction: column; gap: 22px; }
@media (min-width: 768px) { .epf-h-contenedor { padding-inline: 24px; } }
@media (min-width: 1025px) { .epf-h-contenedor { padding-inline: 40px; } }

.epf-h-seccion { padding-block: 40px 44px; }
.epf-h-encabezado { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; }
.epf-h-encabezado > div { display: flex; flex-direction: column; gap: 6px; }
.epf-h-titulo { margin: 0; font-family: var(--epf-titulos); font-weight: 700; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; color: var(--epf-texto); text-wrap: balance; }
.epf-h-titulo--chico { font-size: clamp(20px, 2vw, 24px); }
.epf-h-etiqueta { font: 700 12px/1 var(--epf-titulos); letter-spacing: .12em; color: var(--epf-naranja-osc); }
.epf-h-ver-todo { font: 600 15px var(--epf-titulos); color: var(--epf-turquesa-osc); text-decoration: none; padding-block: 8px; }
.epf-h-ver-todo:hover { text-decoration: underline; }

.epf-home ul, .epf-home ol { list-style: none; margin: 0; padding: 0; }
.epf-home a:focus-visible, .epf-home button:focus-visible { outline: 3px solid var(--epf-turquesa); outline-offset: 2px; }

/* ── Categorías: una fila; si no caben, se desliza (con flechas en escritorio) ── */
.epf-h-categorias { padding-block: 28px 24px; }
.epf-h-cat-fila { display: flex; align-items: center; gap: 16px; }
.epf-h-cat-lista { flex: 1; min-width: 0; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 4px; }
.epf-h-cat-lista::-webkit-scrollbar { display: none; }
.epf-h-cat-lista > li { flex: 1 0 76px; max-width: 110px; scroll-snap-align: start; }
.epf-h-cat { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--epf-texto); }
.epf-h-cat-icono { width: 64px; height: 64px; border-radius: 50%; background: #fff; border: 2px solid var(--epf-turquesa-claro); display: flex; align-items: center; justify-content: center; transition: border-color .15s; }
.epf-h-cat-icono img { width: 46px; height: 46px; object-fit: contain; }
.epf-h-cat:hover .epf-h-cat-icono { border-color: var(--epf-turquesa); }
.epf-h-cat-nombre { font: 600 12px/1.2 var(--epf-titulos); text-align: center; }
@media (min-width: 1025px) {
	.epf-h-cat-lista > li { flex-basis: 98px; }
	.epf-h-cat-icono { width: 84px; height: 84px; }
	.epf-h-cat-icono img { width: 60px; height: 60px; }
}
.epf-h-flechas { display: none; gap: 8px; flex-shrink: 0; }
@media (min-width: 1025px) { .epf-h-flechas:not([hidden]) { display: flex; } }
.epf-h-flecha { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--epf-turquesa); background: #fff; color: var(--epf-turquesa-osc); display: grid; place-items: center; cursor: pointer; padding: 0; }
.epf-h-flecha--llena { background: var(--epf-turquesa-osc); border-color: var(--epf-turquesa-osc); color: #fff; }

/* ── Rejillas ── */
.epf-h-rejilla { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .epf-h-rejilla { gap: 20px; } .epf-h-rejilla--vendidos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1025px) { .epf-h-rejilla { gap: 22px; } .epf-h-rejilla--vendidos, .epf-h-rejilla--recetas { grid-template-columns: repeat(4, minmax(0, 1fr)); } .epf-h-rejilla--mes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ── Tarjeta de producto ── */
.epf-h-tarjeta { height: 100%; background: #fff; border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.epf-h-tarjeta--ranking { border: 2px solid var(--epf-borde); }
.epf-h-tarjeta-foto { position: relative; display: block; }
.epf-h-tarjeta-foto img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; display: block; }
.epf-h-tarjeta-info { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 0 4px 4px; }
.epf-h-tarjeta-nombre { margin: 0; font: 700 14px/1.25 var(--epf-cuerpo); color: var(--epf-tinta); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.epf-h-tarjeta-nombre a { color: inherit; text-decoration: none; }
.epf-h-precio { margin: 0; font: 700 15px/1.2 var(--epf-titulos); color: var(--epf-precio); }
.epf-h-precio strong { font-weight: 700; }
.epf-h-precio small { font: 600 12px var(--epf-cuerpo); color: #6b6b6b; }
.epf-h-precio del { color: #6b6b6b; font-weight: 400; margin-right: 4px; }
.epf-h-boton { margin-top: auto; align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; font: 600 14px var(--epf-titulos); text-decoration: none; }
.epf-h-boton--linea { color: var(--epf-turquesa-osc); border: 1.5px solid var(--epf-turquesa); background: #fff; }
.epf-h-boton--linea:hover { background: var(--epf-turquesa-osc); border-color: var(--epf-turquesa-osc); color: #fff; }
.epf-h-boton--lleno { color: #2b1600; background: var(--epf-naranja); }
.epf-h-boton--lleno:hover { background: #f08a10; }
.epf-h-rank { position: absolute; top: 8px; left: 8px; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; background: var(--epf-turquesa-osc); color: #fff; font: 700 13px var(--epf-titulos); display: flex; align-items: center; justify-content: center; }
.epf-h-agotado { position: absolute; top: 8px; left: 8px; padding: 4px 10px; border-radius: 999px; background: #434343; color: #fff; font: 700 11px var(--epf-titulos); letter-spacing: .08em; text-transform: uppercase; }
.epf-h-tarjeta.is-agotado { border-color: #d6dbdf; }
.epf-h-tarjeta.is-agotado .epf-h-tarjeta-foto img { opacity: .45; filter: grayscale(1); }
.epf-h-insignia { position: absolute; top: 8px; left: 8px; padding: 4px 9px; border-radius: 999px; background: var(--epf-naranja-osc); color: #fff; font: 700 10px var(--epf-titulos); letter-spacing: .08em; text-transform: uppercase; }
@media (min-width: 768px) {
	.epf-h-tarjeta { padding: 12px; border-radius: 16px; }
	.epf-h-tarjeta-nombre { font-size: 17px; }
	.epf-h-precio { font-size: 16px; }
}

/* ── Productos del Mes: franja crema; tarjeta horizontal desde tableta ── */
.epf-h-mes { background: var(--epf-crema); }
.epf-h-tarjeta--mes { box-shadow: 0 2px 10px rgba(179, 95, 0, .10); }
@media (min-width: 768px) {
	.epf-h-tarjeta--mes { flex-direction: row; align-items: center; gap: 16px; }
	.epf-h-tarjeta--mes .epf-h-tarjeta-foto { flex: 0 0 132px; }
	.epf-h-tarjeta--mes .epf-h-tarjeta-nombre { min-height: 0; }
	.epf-h-tarjeta--mes .epf-h-boton { margin-top: 0; }
	.epf-h-tarjeta--mes .epf-h-tarjeta-info { padding: 0; }
}

/* ── Recetas: franja turquesa; en el teléfono se desliza ── */
.epf-h-recetas { background: var(--epf-turquesa-osc); }
.epf-h-recetas .epf-h-titulo { color: #fff; }
.epf-h-recetas .epf-h-ver-todo { color: #fff; }
.epf-h-receta { height: 100%; background: #fff; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.epf-h-receta-foto { display: block; }
.epf-h-receta-foto img { width: 100%; height: 190px; object-fit: cover; display: block; }
.epf-h-receta-sin-foto { height: 190px; background: #e3f5f6; color: var(--epf-turquesa); display: flex; align-items: center; justify-content: center; }
.epf-h-receta-nombre { margin: 0; padding: 14px 16px 18px; font: 700 16px/1.3 var(--epf-titulos); }
.epf-h-receta-nombre a { color: var(--epf-tinta); text-decoration: none; }
@media (max-width: 767px) {
	.epf-h-rejilla--recetas { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--epf-gutter)); padding-inline: var(--epf-gutter); }
	.epf-h-rejilla--recetas > li { flex: 0 0 240px; scroll-snap-align: start; }
	.epf-h-receta-foto img, .epf-h-receta-sin-foto { height: 150px; }
}

@media (prefers-reduced-motion: reduce) { .epf-h-cat-lista { scroll-behavior: auto; } .epf-h-cat-icono { transition: none; } }
