@@ -11,7 +11,6 @@ import { useThemeSettings } from "@weaverse/hydrogen";
1111import clsx from "clsx" ;
1212import { useEffect , useState } from "react" ;
1313import { useFetcher , Link } from "react-router" ;
14- import { Button } from "~/components/button" ;
1514import { AddToCartButton } from "~/components/product/add-to-cart-button" ;
1615import { ProductMedia } from "~/components/product/product-media" ;
1716import { QuickShopVariants } from "~/components/product/quick-shop-variants" ;
@@ -340,19 +339,35 @@ export function QuickShopTrigger({ productHandle }: { productHandle: string }) {
340339 < button
341340 type = "button"
342341 className = { clsx (
343- "absolute inset-x-4 bottom-4 !opacity-0 -translate-y-1.5 -translate-x-2 lg:group-hover:!opacity-100 lg:group-hover:translate-x-0 lg:group-hover:translate-y-2 !transition-all duration-500" ,
344- "border px-4 py-2" ,
345- "text-(--btn-secondary-text)" ,
346- "bg-(--btn-secondary-bg)" ,
347- "border-(--btn-secondary-bg)" ,
348- "hover:bg-(--btn-secondary-text)" ,
349- "hover:text-(--btn-secondary-bg)" ,
350- "hover:border-(--btn-secondary-text)" ,
351- "inline-flex items-center justify-center rounded-none" ,
352- "text-base leading-tight font-normal whitespace-nowrap" ,
342+ // Mobile/Tablet: Always visible circular button at bottom right
343+ "absolute bottom-4 right-4 w-12 h-12 md:opacity-100" ,
344+ "bg-white rounded-full" ,
345+ "flex items-center justify-center p-0" ,
346+ // Desktop: Hide initially, show on hover with text
347+ "lg:opacity-0 lg:inset-x-4 lg:w-auto lg:h-auto lg:rounded-none" ,
348+ "lg:px-6 lg:py-3" ,
349+ "lg:text-(--btn-secondary-text) lg:bg-(--btn-secondary-bg) lg:border-(--btn-secondary-bg)" ,
350+ "lg:-translate-y-1.5 lg:-translate-x-2" ,
351+ "lg:group-hover:opacity-100 lg:group-hover:translate-x-0 lg:group-hover:translate-y-2" ,
352+ "lg:font-normal lg:whitespace-nowrap" ,
353353 ) }
354354 >
355- Quick shop
355+ { /* Shopping bag icon for mobile/tablet */ }
356+ < svg
357+ className = "w-5 h-5 text-[#29231E] lg:hidden"
358+ fill = "none"
359+ stroke = "currentColor"
360+ viewBox = "0 0 24 24"
361+ >
362+ < path
363+ strokeLinecap = "round"
364+ strokeLinejoin = "round"
365+ strokeWidth = { 1.5 }
366+ d = "M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125 1.125 0 015.513 7.5h12.974c.576 0 1.059.435 1.119 1.007zM8.625 10.5a.375.375 0 11-.75 0 .375.375 0 01.75 0zm7.5 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"
367+ />
368+ </ svg >
369+ { /* Text for desktop */ }
370+ < span className = "hidden lg:inline uppercase" > Quick shop</ span >
356371 </ button >
357372 </ Dialog . Trigger >
358373 < Dialog . Portal >
0 commit comments