diff --git a/mvp/b2c/public/b2b.html b/mvp/b2c/public/b2b.html index 21a2773..cd026cb 100644 --- a/mvp/b2c/public/b2b.html +++ b/mvp/b2c/public/b2b.html @@ -1472,8 +1472,8 @@ h3, h4, h5, h6 { overflow: hidden; border: 1px solid var(--surface-border); } - .step .ba figure { position: relative; margin: 0; aspect-ratio: 4 / 3; } - .step .ba img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; } + .step .ba figure { position: relative; margin: 0; aspect-ratio: 1 / 1; } + .step .ba img { width: 100%; height: 100%; object-fit: cover; display: block; } .step .ba figcaption { position: absolute; top: 6px; left: 6px; background: rgba(0, 0, 0, 0.6); color: #fff; @@ -1482,34 +1482,6 @@ h3, h4, h5, h6 { } .step .ba figure.after figcaption { background: var(--color-primary-600); } - /* Galería de ejemplos (apaisada, ampliable) */ - .gallery-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); margin-top: var(--space-8); } - @media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } } - @media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); } } - .gcard { - position: relative; margin: 0; border-radius: 14px; overflow: hidden; - border: 1px solid var(--surface-border); cursor: zoom-in; - background: var(--color-neutral-100, #f4f4f5); - } - .gcard img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; transition: transform .45s ease; } - .gcard:hover img { transform: scale(1.04); } - .gcard figcaption { - position: absolute; left: 10px; bottom: 10px; - background: rgba(0, 0, 0, 0.62); color: #fff; - font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; - padding: 3px 8px; border-radius: 6px; - } - - /* Lightbox */ - #lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(8, 12, 20, 0.92); } - #lightbox.open { display: flex; } - #lightbox .lb-img { max-width: min(1100px, 94vw); max-height: 86vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); } - #lightbox .lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.85); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; padding: 0 16px; } - #lightbox .lb-close { position: absolute; top: 16px; right: 18px; width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; } - #lightbox .lb-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; } - #lightbox .lb-prev { left: 18px; } #lightbox .lb-next { right: 18px; } - #lightbox .lb-close:hover, #lightbox .lb-btn:hover { background: rgba(255, 255, 255, 0.26); } - /* Bajo reduced-motion: mostrar todo sin animar */ @media (prefers-reduced-motion: reduce) { html.js .reveal, @@ -1536,6 +1508,7 @@ h3, h4, h5, h6 { Preguntas
+ Entrar Empezar gratis
@@ -1732,8 +1705,8 @@ h3, h4, h5, h6 {

Se genera un render orientativo

A partir de las fotos del cliente, Reformix devuelve 3 propuestas visuales con calidades básica, media y premium. Ya tienes de qué hablar en la visita.

-
Cocina antes de la reforma
ANTES
-
Render de la cocina reformada
DESPUÉS
+
Cocina antes de la reforma
ANTES
+
Render de la cocina reformada
DESPUÉS
⌁ Render IA
@@ -1753,33 +1726,6 @@ h3, h4, h5, h6 { - -
-
-
-

Ejemplos reales

-

El «después» que tu cliente ve antes de que vayas.

-

Una foto del espacio y Reformix devuelve el render orientativo. Toca cualquiera para ampliarla.

-
- -
-
- @@ -2214,66 +2160,4 @@ h3, h4, h5, h6 { })(); - - - - \ No newline at end of file diff --git a/mvp/b2c/src/app/[slug]/page.tsx b/mvp/b2c/src/app/[slug]/page.tsx index 2b9d7f2..c8b9806 100644 --- a/mvp/b2c/src/app/[slug]/page.tsx +++ b/mvp/b2c/src/app/[slug]/page.tsx @@ -46,7 +46,7 @@ export default async function FunnelPage({ params }: { params: Promise<{ slug: s className={theme.heading === 'serif' ? 'theme-serif' : undefined} style={themeStyle(tenant.themePreset, tenant.themeColor)} > - +
diff --git a/mvp/b2c/src/components/funnel/GaleriaTrabajos.tsx b/mvp/b2c/src/components/funnel/GaleriaTrabajos.tsx index a54b375..772439c 100644 --- a/mvp/b2c/src/components/funnel/GaleriaTrabajos.tsx +++ b/mvp/b2c/src/components/funnel/GaleriaTrabajos.tsx @@ -1,3 +1,6 @@ +'use client'; + +import { useCallback, useEffect, useState } from 'react'; import type { PublicGaleriaFoto } from '@/lib/funnel/public-queries'; type GaleriaTrabajosProps = { @@ -5,11 +8,37 @@ type GaleriaTrabajosProps = { nombreEmpresa: string; }; -// Galería de trabajos del reformista en su landing pública. Solo se muestra si -// el reformista ha subido fotos desde su panel. +// Galería de trabajos del reformista en su landing pública. Solo se muestra si el reformista ha +// subido fotos desde su panel. Formato apaisado y, al pulsar una foto, se amplía en un lightbox +// con navegación entre todas las imágenes. export default function GaleriaTrabajos({ fotos, nombreEmpresa }: GaleriaTrabajosProps) { + const [idx, setIdx] = useState(null); + + const cerrar = useCallback(() => setIdx(null), []); + const mover = useCallback( + (d: number) => setIdx((cur) => (cur === null ? cur : (cur + d + fotos.length) % fotos.length)), + [fotos.length], + ); + + useEffect(() => { + if (idx === null) return; + const onKey = (e: KeyboardEvent) => { + if (e.key === 'Escape') cerrar(); + else if (e.key === 'ArrowRight') mover(1); + else if (e.key === 'ArrowLeft') mover(-1); + }; + document.addEventListener('keydown', onKey); + document.body.style.overflow = 'hidden'; + return () => { + document.removeEventListener('keydown', onKey); + document.body.style.overflow = ''; + }; + }, [idx, cerrar, mover]); + if (fotos.length === 0) return null; + const actual = idx !== null ? fotos[idx] : null; + return (
@@ -24,24 +53,31 @@ export default function GaleriaTrabajos({ fotos, nombreEmpresa }: GaleriaTrabajo Reformas que ya hemos hecho

- Una muestra real del trabajo de {nombreEmpresa}. Calidad de acabados, plazos cumplidos. + Una muestra real del trabajo de {nombreEmpresa}. Toca cualquier imagen para verla en grande.

-
- {fotos.map((f) => ( +
+ {fotos.map((f, i) => (
- {/* eslint-disable-next-line @next/next/no-img-element */} - {f.titulo + {f.titulo && ( -
+
{f.titulo}
)} @@ -49,6 +85,67 @@ export default function GaleriaTrabajos({ fotos, nombreEmpresa }: GaleriaTrabajo ))}
+ + {actual && ( +
+ + + {fotos.length > 1 && ( + + )} + + {/* eslint-disable-next-line @next/next/no-img-element */} + {actual.titulo e.stopPropagation()} + className="max-h-[86vh] max-w-[94vw] w-auto rounded-lg shadow-2xl" + /> + + {fotos.length > 1 && ( + + )} + + {actual.titulo && ( +
+ {actual.titulo} +
+ )} +
+ )}
); }