From 1befb80e9c7849828706f5b39e0799c75be54619 Mon Sep 17 00:00:00 2001 From: Lucas Siconeli <151700777+siconeli1@users.noreply.github.com> Date: Fri, 27 Mar 2026 18:50:57 -0300 Subject: [PATCH 1/6] Refactor home hero, catalog UI, product fallback Simplify and tidy up home hero styles and markup, improve responsiveness, and add a product image fallback. - CSS: remove some heavy hero/brand-card styles, introduce .home-hero-logo and .home-store-name, adjust layout/positioning for category count and padding for better responsive behavior. - app/page.js: update hero copy, replace branded card + metrics with a single decorative hero image (aria-hidden) and remove the proof list; remove category icon initial rendering from category cards. - components/catalog-page-content.js: shorten the search placeholder, remove unused TransitionLink import and the contact link. - components/product-card.js: add imageSrc fallback logic and use it for product images to avoid broken/empty image sources. These changes aim to streamline the home hero presentation, tighten the catalog UI, and make product images more robust. --- app/globals.css | 55 ++++++++++++------------------ app/page.js | 38 ++++++--------------- components/catalog-page-content.js | 6 +--- components/product-card.js | 6 +++- 4 files changed, 37 insertions(+), 68 deletions(-) diff --git a/app/globals.css b/app/globals.css index 650f4fd..9d79dc7 100644 --- a/app/globals.css +++ b/app/globals.css @@ -6238,7 +6238,6 @@ body.modal-open { } .home-hero-copy, -.home-hero-panel, .home-process-card, .home-highlight-card, .home-category-card, @@ -6286,6 +6285,10 @@ body.modal-open { max-width: 11ch; } +.home-store-name { + white-space: nowrap; +} + .home-hero-copy p { max-width: 58ch; color: #586174; @@ -6330,28 +6333,15 @@ body.modal-open { } .home-hero-panel { - border-radius: 28px; - padding: 1.25rem; - display: grid; - gap: 1rem; - background: - linear-gradient(160deg, #0c1220 0%, #111a2d 52%, #17233b 100%); -} - -.home-brand-card { - min-height: 270px; - border-radius: 22px; display: flex; align-items: center; justify-content: center; - background: - radial-gradient(circle at 10% 10%, rgba(227, 25, 55, 0.18), transparent 35%), - rgba(255, 255, 255, 0.98); - padding: 2rem; + padding: 0.5rem; } -.home-brand-card img { - width: min(100%, 360px); +.home-hero-logo { + width: min(100%, 520px); + max-height: 360px; object-fit: contain; } @@ -6454,24 +6444,13 @@ body.modal-open { padding: 1.25rem; display: grid; gap: 0.8rem; + position: relative; } .home-category-top { - display: flex; - align-items: center; - justify-content: space-between; -} - -.home-category-icon { - width: 42px; - height: 42px; - border-radius: 14px; - display: inline-flex; - align-items: center; - justify-content: center; - background: rgba(227, 25, 55, 0.08); - color: var(--brand); - font-weight: 800; + position: absolute; + top: 1.25rem; + right: 1.25rem; } .home-category-count { @@ -6484,6 +6463,7 @@ body.modal-open { font-family: var(--font-display), sans-serif; font-size: 1.35rem; line-height: 1.02; + padding-right: 5.5rem; } .home-category-description { @@ -6912,13 +6892,20 @@ body.modal-open { } .home-hero-copy, - .home-hero-panel, .home-process-card, .cart-summary-card { padding: 1.25rem; border-radius: 22px; } + .home-hero-panel { + padding: 0; + } + + .home-hero-logo { + max-height: 260px; + } + .home-hero-copy h1 { max-width: 9ch; font-size: clamp(2rem, 12vw, 3rem); diff --git a/app/page.js b/app/page.js index 89894e0..2319987 100644 --- a/app/page.js +++ b/app/page.js @@ -27,8 +27,10 @@ export default function HomePage() {
Catálogo Li Rilko -

Encontre seu produto e finalize pelo WhatsApp.

-

Categorias claras, carrinho rápido e atendimento direto com a loja.

+

+ Novidades Li Rilko para renovar seu estilo. +

+

Escolhas selecionadas da loja para você comprar com praticidade e atendimento próximo.

@@ -39,32 +41,14 @@ export default function HomePage() {
-
- Categorias organizadas - Carrinho simples - Pedido no WhatsApp -
-
-
- Logo Li Rilko Imports -
- -
-
- {publicProducts.length} - produtos ativos -
-
- {categories.length} - categorias organizadas -
-
- WhatsApp - atendimento direto -
-
+
@@ -78,11 +62,9 @@ export default function HomePage() {
{categoryCards.map((category) => { - const capLetter = category.name.charAt(0).toUpperCase(); return (
- {capLetter} {category.count} itens
diff --git a/components/catalog-page-content.js b/components/catalog-page-content.js index 700f457..951b022 100644 --- a/components/catalog-page-content.js +++ b/components/catalog-page-content.js @@ -5,7 +5,6 @@ import { usePathname, useRouter, useSearchParams } from "next/navigation"; import { IconSearch } from "@/components/icons"; import ProductCard from "@/components/product-card"; import { useCatalog } from "@/components/providers/catalog-provider"; -import TransitionLink from "@/components/transition-link"; const SORT_OPTIONS = [ { value: "relevancia", label: "Destaques" }, @@ -197,7 +196,7 @@ export default function CatalogPageContent({ setSearchTerm(event.target.value)} /> @@ -296,9 +295,6 @@ export default function CatalogPageContent({ : `Mostrando itens de ${selectedCategory}${selectedSub ? ` / ${selectedSub}` : ""}.`}

- - Atendimento -
{filteredProducts.length === 0 ? ( diff --git a/components/product-card.js b/components/product-card.js index d497eef..595bef4 100644 --- a/components/product-card.js +++ b/components/product-card.js @@ -15,6 +15,10 @@ export default function ProductCard({ product, highlight = false }) { const isAvailable = product.isAvailable !== false; const qtyInCart = getItemQty(product.id); const priceCash = Number(product.priceCash ?? product.price ?? 0); + const imageSrc = + typeof product.image === "string" && product.image.trim() + ? product.image.trim() + : "/li-rilko-icon-page.png"; function handleAddToCart() { const added = addItem(product.id, 1); @@ -81,7 +85,7 @@ export default function ProductCard({ product, highlight = false }) { {product.name} Date: Fri, 27 Mar 2026 18:59:25 -0300 Subject: [PATCH 2/6] Add back button to product page Introduce a back button to the product detail page and associated styles. Import useRouter and add handleBack which uses router.back() when history exists, falling back to router.push('/catalogo') otherwise. Add button markup ("Voltar" with left arrow) inside a vg-product-back-row and new CSS for .vg-product-back-btn (.vg-product-back-row hidden by default and displayed in the responsive/mobile rules). This improves navigation for users landing directly on product pages or navigating from within the app. --- app/globals.css | 22 ++++++++++++++++++++++ app/produto/[id]/page.js | 19 ++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/app/globals.css b/app/globals.css index 9d79dc7..34b162b 100644 --- a/app/globals.css +++ b/app/globals.css @@ -4898,6 +4898,23 @@ body.modal-open { margin-top: 5rem; } +.vg-product-back-row { + display: none; +} + +.vg-product-back-btn { + border: 1px solid rgba(20, 22, 31, 0.14); + border-radius: 999px; + background: #ffffff; + color: var(--ink); + font-weight: 700; + font-size: 0.92rem; + padding: 0.52rem 0.9rem; + display: inline-flex; + align-items: center; + gap: 0.45rem; +} + .vg-product-grid { display: grid; grid-template-columns: 1fr; @@ -6946,6 +6963,11 @@ body.modal-open { max-height: 360px; } + .vg-product-back-row { + display: flex; + margin-bottom: 0.9rem; + } + .vg-action-row { grid-template-columns: 1fr; } diff --git a/app/produto/[id]/page.js b/app/produto/[id]/page.js index e39444e..cd4dede 100644 --- a/app/produto/[id]/page.js +++ b/app/produto/[id]/page.js @@ -1,7 +1,7 @@ "use client"; import { useEffect, useMemo, useState } from "react"; -import { useParams } from "next/navigation"; +import { useParams, useRouter } from "next/navigation"; import ProductDetailActions from "@/components/product-detail-actions"; import { useCatalog } from "@/components/providers/catalog-provider"; import TransitionLink from "@/components/transition-link"; @@ -9,6 +9,7 @@ import { formatCurrency } from "@/lib/store-utils"; export default function ProductPage() { const params = useParams(); + const router = useRouter(); const { publicProductMap, isAdmin, openEditModal } = useCatalog(); const id = Array.isArray(params?.id) ? params.id[0] : params?.id; const product = publicProductMap.get(id); @@ -24,6 +25,15 @@ export default function ProductPage() { setSelectedImage(gallery[0] || ""); }, [gallery, product]); + function handleBack() { + if (typeof window !== "undefined" && window.history.length > 1) { + router.back(); + return; + } + + router.push("/catalogo"); + } + if (!product) { return (
@@ -43,6 +53,13 @@ export default function ProductPage() { return (
+
+ +
+
From a69496db6b201615bf0d1625ceccb5755c672fd9 Mon Sep 17 00:00:00 2001 From: Lucas Siconeli <151700777+siconeli1@users.noreply.github.com> Date: Fri, 27 Mar 2026 19:09:56 -0300 Subject: [PATCH 3/6] =?UTF-8?q?Aumentando=20bot=C3=A3o=20de=20Menu=20no=20?= =?UTF-8?q?Mobile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/globals.css | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/globals.css b/app/globals.css index 34b162b..582dcfc 100644 --- a/app/globals.css +++ b/app/globals.css @@ -633,8 +633,8 @@ input:focus-visible { .menu-trigger { display: none; - width: 44px; - height: 44px; + width: 50px; + height: 50px; border: 0; background: transparent; color: var(--text); @@ -644,8 +644,8 @@ input:focus-visible { } .menu-trigger .icon { - width: 24px; - height: 24px; + width: 22px; + height: 22px; } .header-cart { @@ -3799,13 +3799,13 @@ body.modal-open { @media (max-width: 420px) { .menu-trigger { - width: 44px; - height: 44px; + width: 50px; + height: 50px; } .menu-trigger .icon { - width: 16px; - height: 16px; + width: 22px; + height: 22px; } .header-cart { From 170faf17a17ea0d530b9117d2f98d1befc813729 Mon Sep 17 00:00:00 2001 From: Lucas Siconeli <151700777+siconeli1@users.noreply.github.com> Date: Fri, 27 Mar 2026 19:14:55 -0300 Subject: [PATCH 4/6] Refactor vg action row & add button CSS Rework layout and sizing for product action controls: prevent wrapping in modal, set fixed icon size (.vg-add-btn .icon), convert .vg-action-row to a two-column grid with gap and alignment, make .vg-qty-selector width auto, and add compact sizing (min-width, font-size, gap, padding-inline) for .vg-add-btn to improve responsive spacing and alignment. --- app/globals.css | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/app/globals.css b/app/globals.css index 582dcfc..2b9e092 100644 --- a/app/globals.css +++ b/app/globals.css @@ -5163,6 +5163,12 @@ body.modal-open { align-items: center; justify-content: center; gap: 0.5rem; + white-space: nowrap; +} + +.vg-add-btn .icon { + width: 18px; + height: 18px; } .vg-in-cart-msg { @@ -6969,14 +6975,24 @@ body.modal-open { } .vg-action-row { - grid-template-columns: 1fr; + display: grid; + grid-template-columns: minmax(124px, 34%) minmax(0, 1fr); + gap: 0.75rem; + align-items: stretch; } .vg-qty-selector { - width: 100%; + width: auto; justify-content: space-between; } + .vg-add-btn { + min-width: 0; + font-size: 1rem; + gap: 0.42rem; + padding-inline: 0.72rem; + } + .vg-whatsapp-widget { right: 1rem; bottom: calc(5.2rem + env(safe-area-inset-bottom)); From 8dca3797f8c35b454e7acdb4a4196e0ec059cd92 Mon Sep 17 00:00:00 2001 From: Lucas Siconeli <151700777+siconeli1@users.noreply.github.com> Date: Fri, 27 Mar 2026 19:27:49 -0300 Subject: [PATCH 5/6] Update page.js --- app/produto/[id]/page.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/app/produto/[id]/page.js b/app/produto/[id]/page.js index cd4dede..9342686 100644 --- a/app/produto/[id]/page.js +++ b/app/produto/[id]/page.js @@ -141,9 +141,6 @@ export default function ProductPage() { -
@@ -155,7 +152,7 @@ export default function ProductPage() { {activeTab === "shipping" && ( <>

- Finalize pelo WhatsApp. A loja confirma disponibilidade, entrega ou retirada e conclui o pedido com você. + Finalize pelo WhatsApp. A loja confirma disponibilidade e conclui o pedido com você.

  • Confirmação de disponibilidade antes do fechamento
  • @@ -164,14 +161,6 @@ export default function ProductPage() {
)} - {activeTab === "specs" && ( - <> -

Principais destaques do produto:

-
    - {product.highlights?.map((item) =>
  • {item}
  • )} -
- - )}
From 4fab9590dbb0b14d9c414611fa025eb32867b4c2 Mon Sep 17 00:00:00 2001 From: Lucas Siconeli <151700777+siconeli1@users.noreply.github.com> Date: Fri, 27 Mar 2026 19:31:06 -0300 Subject: [PATCH 6/6] Return fallback instead of throwing in useCatalog --- components/providers/catalog-provider.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/components/providers/catalog-provider.js b/components/providers/catalog-provider.js index 6f0b0c6..d4213a5 100644 --- a/components/providers/catalog-provider.js +++ b/components/providers/catalog-provider.js @@ -632,7 +632,23 @@ export function CatalogProvider({ children, initialCatalog, isAdmin = false }) { export function useCatalog() { const context = useContext(CatalogContext); if (!context) { - throw new Error("useCatalog precisa ser usado dentro de CatalogProvider."); + console.warn("useCatalog foi chamado fora de CatalogProvider. Usando fallback."); + return { + adminCategories: [], + attendants: [], + categories: [], + contactChannels: [], + homeHighlights: [], + products: [], + publicProducts: [], + productMap: new Map(), + publicProductMap: new Map(), + isAdmin: false, + isHydrated: false, + addItem: () => false, + openEditModal: () => {}, + openWhatsAppPicker: () => {}, + }; } return context; }