From f017f7e9aa06a150d647f287899945189df97f9d Mon Sep 17 00:00:00 2001 From: Horacio Daniel Ros Date: Sun, 19 Jul 2026 20:11:01 -0300 Subject: [PATCH] feat: redesign CategoriesExplorer component with a modern card-based grid layout and dynamic palettes --- .../Home/CategoriesExplorer/page.tsx | 44 ++-- .../Home/CategoriesExplorer/style.module.css | 188 ++++++++++++------ txclient/src/app/landing/categories/page.tsx | 35 ++-- .../app/landing/categories/style.module.css | 138 +++++++++++++ 4 files changed, 315 insertions(+), 90 deletions(-) create mode 100644 txclient/src/app/landing/categories/style.module.css diff --git a/txclient/src/app/components/Home/CategoriesExplorer/page.tsx b/txclient/src/app/components/Home/CategoriesExplorer/page.tsx index 1b581b9..8fe8cc7 100644 --- a/txclient/src/app/components/Home/CategoriesExplorer/page.tsx +++ b/txclient/src/app/components/Home/CategoriesExplorer/page.tsx @@ -1,11 +1,20 @@ "use client"; import { motion } from "motion/react"; +import type { CSSProperties } from "react"; import categories from "@core/Models/Categories.type"; import { useNavigation } from "@core/app/hooks/goto"; import style from "./style.module.css"; import { useHeaderStore } from "@core/Store/Header.Store"; +const categoryPalette = [ + "var(--wine-red)", + "var(--wine-dark)", + "var(--orange)", + "var(--yellow)", + "var(--green-darkestX1)", +]; + export default function CategoriesExplorer() { const headerState = useHeaderStore(); const { goTo } = useNavigation(); @@ -13,22 +22,33 @@ export default function CategoriesExplorer() { <>
diff --git a/txclient/src/app/components/Home/CategoriesExplorer/style.module.css b/txclient/src/app/components/Home/CategoriesExplorer/style.module.css index 910fbc3..34787ff 100644 --- a/txclient/src/app/components/Home/CategoriesExplorer/style.module.css +++ b/txclient/src/app/components/Home/CategoriesExplorer/style.module.css @@ -1,80 +1,138 @@ .categoriesExplorer { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - text-align: center; - padding-left: 30px; - padding-right: 30px; - position: relative; /*esto evito que las animaciones pasen por encima*/ + width: 100%; + position: relative; z-index: 2; } -.categoriesExplorer li h3 { - font-size: 1.4rem; - color: var(--black); - text-shadow: 1px 1px 1px var(--white); +.categoriesExplorer ul { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 18px; + width: 100%; + margin: 0; + padding: 0; } -.categoriesExplorer li p { - margin-top: 10px; - font-size: 1rem; - font-weight: 400; - color: var(--black); +.categoriesExplorer li { + min-width: 0; + list-style-type: none; +} + +.categoryCard { + --category-color: #fee34a; + min-height: 212px; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; + gap: 22px; + position: relative; + overflow: hidden; + border: 1px solid rgba(148, 163, 184, 0.22); + border-radius: 24px; + padding: 24px; + background: + linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82)), + radial-gradient(circle at 12% 14%, color-mix(in srgb, var(--category-color) 32%, transparent), transparent 34%); + box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08); + color: #0f172a; + cursor: pointer; text-align: left; - text-shadow: 1px 1px 1px rgb(255, 241, 199); + transition: + border-color 180ms ease, + box-shadow 180ms ease, + transform 180ms ease; } -@media (max-width: 1099px) { +.categoryCard::after { + content: ""; + position: absolute; + inset: auto -44px -56px auto; + width: 150px; + height: 150px; + border-radius: 999px; + background: color-mix(in srgb, var(--category-color) 22%, transparent); + transition: transform 180ms ease; +} + +.categoryCard:hover, +.categoryCard:focus-visible { + border-color: color-mix(in srgb, var(--category-color) 54%, rgba(148, 163, 184, 0.4)); + box-shadow: 0 22px 44px rgba(15, 23, 42, 0.13); +} + +.categoryCard:hover::after, +.categoryCard:focus-visible::after { + transform: scale(1.16); +} + +.categoryCard:focus-visible { + outline: 3px solid color-mix(in srgb, var(--category-color) 62%, #ffffff); + outline-offset: 4px; +} + +.categoryAccent { + width: 54px; + height: 6px; + border-radius: 999px; + background: var(--category-color); + box-shadow: 0 8px 20px color-mix(in srgb, var(--category-color) 38%, transparent); +} + +.categoryContent { + display: flex; + flex-direction: column; + gap: 10px; + position: relative; + z-index: 1; +} + +.categoryLabel { + color: #64748b; + font-size: 0.77rem; + font-weight: 800; + letter-spacing: 0.08em; + text-transform: uppercase; +} + +.categoryCard h3 { + margin: 0; + color: #111827; + font-size: clamp(1.25rem, 2vw, 1.55rem); + line-height: 1.08; + letter-spacing: -0.03em; +} + +.categoryCard p { + margin: 0; + color: #475569; + font-size: 0.98rem; + font-weight: 500; + line-height: 1.55; +} + +.categoryAction { + width: fit-content; + position: relative; + z-index: 1; + border-radius: 999px; + padding: 8px 12px; + background: color-mix(in srgb, var(--category-color) 17%, #ffffff); + color: #0f172a; + font-size: 0.88rem; + font-weight: 800; +} + +@media (max-width: 760px) { .categoriesExplorer ul { - margin-left: auto; - margin-right: auto; - padding: 0px; - display: flex; - flex-direction: row; - justify-content: space-between; - gap: 20px; - width: 100%; - flex-wrap: wrap; - justify-content: flex-start; + grid-template-columns: 1fr; + gap: 14px; } - .categoriesExplorer li { - list-style-type: none; - margin-top: 20px; - margin-bottom: 0px; - border: solid 1px var(--gray-light); - border-radius: 8px; + .categoryCard { + min-height: 190px; + border-radius: 20px; padding: 20px; - width: 100%; - background-color: rgb(254, 227, 74); - cursor: pointer; - } -} - -@media (min-width: 1100px) { - .categoriesExplorer ul { - margin-left: auto; - margin-right: auto; - padding: 0px; - display: flex; - flex-direction: row; - justify-content: space-between; - gap: 20px; - width: 1030px; - flex-wrap: wrap; - justify-content: flex-start; - } - - .categoriesExplorer li { - list-style-type: none; - margin-top: 20px; - margin-bottom: 0px; - border: solid 1px var(--gray-light); - border-radius: 8px; - padding: 20px; - width: 500px; - background-color: rgb(254, 227, 74); - cursor: pointer; } } diff --git a/txclient/src/app/landing/categories/page.tsx b/txclient/src/app/landing/categories/page.tsx index 8ad5534..7eaf8eb 100644 --- a/txclient/src/app/landing/categories/page.tsx +++ b/txclient/src/app/landing/categories/page.tsx @@ -2,6 +2,7 @@ import AnimatedContainer from "@components/AnimatedConainer/AnimatedContainer"; import CategoriesExplorer from "@core/app/components/Home/CategoriesExplorer/page"; import DefaultLoginAction from "@core/app/components/LoginAction/DefaultLoginAction"; import { ScrollToTop } from "@core/app/components/ScrollTop"; +import style from "./style.module.css"; export default function CategoriesPage() { return ( @@ -19,19 +20,27 @@ export default function CategoriesPage() { > -
-

Explorar Categorías

-

- Explorá las categorías de servicios disponibles y encontrá fácilmente lo que - necesitás. Cada categoría agrupa servicios para que puedas sacar turnos de forma - rápida y organizada. Además, una vez que ingreses en una categoría, podrás - filtrar por tu ubicación para afinar la busqueda. -

-
-
- -
 
-
+
+
+ Servicios por rubro +

+ Explorá categorías y encontrá tu próximo turno +

+

+ Elegí el tipo de servicio que necesitás y después filtrá por ubicación para + encontrar opciones cercanas, rápidas y organizadas. +

+
+ +
+
+ Categorías disponibles + Seleccioná una para continuar +
+ +
+
+