@@ -11,10 +11,10 @@ function ProductCard({ slug, brand, category, name, price, image }: Product) {
1111 className = "overflow-hidden group flex flex-col h-full"
1212 >
1313 < div
14- className = "aspect-square p-12 bg-stone-100/75 group-hover:bg-stone-200/75 transition-colors rounded-t-lg"
14+ className = "w-full aspect-square p-12 bg-stone-100/75 group-hover:bg-stone-200/75 transition-colors rounded-t-lg"
1515 style = { { viewTransitionName : `product-image-${ slug } ` } }
1616 >
17- < img src = { image } alt = { name } className = "object-cover w-full h-full" />
17+ < img src = { image } alt = { name } className = "object-contain w-full h-full" />
1818 </ div >
1919 < div className = "p-4 bg-stone-100/75 rounded-b-lg group-hover:bg-stone-200/75 transition-colors flex-1 flex flex-col justify-between" >
2020 < div className = "text-sm text-neutral-400/75" >
@@ -78,11 +78,11 @@ function SortSelect({
7878 onChange : ( value : string ) => void ;
7979} ) {
8080 return (
81- < div className = "relative inline-flex items-center cursor-pointer" >
81+ < div className = "relative flex md: inline-flex items-center cursor-pointer w-full md:w-auto " >
8282 < select
8383 value = { value }
8484 onChange = { ( e ) => onChange ( e . target . value ) }
85- className = "appearance-none bg-transparent text-sm text-neutral-500 pr-4 cursor-pointer hover:text-neutral-900 focus:outline-none text-right"
85+ className = "appearance-none bg-transparent text-sm text-neutral-500 pr-4 cursor-pointer hover:text-neutral-900 focus:outline-none text-left md:text- right w-full md:w-auto "
8686 >
8787 { sortOptions . map ( ( opt ) => (
8888 < option key = { opt . value } value = { opt . value } >
@@ -150,14 +150,14 @@ export function HomePage() {
150150 go star the repo to increase our chances of becoming a billion dollar
151151 company.
152152 </ p >
153- < div className = "flex items-center gap-3" >
153+ < div className = "flex items-center gap-3 overflow-x-auto flex-nowrap -mx-6 px-6 md:mx-0 md:px-0 " >
154154 < button
155155 onClick = { ( ) =>
156156 document
157157 . getElementById ( "products" )
158158 ?. scrollIntoView ( { behavior : "smooth" } )
159159 }
160- className = "bg-black text-white px-3 text-sm font-medium py-2 rounded-xl hover:bg-neutral-800 transition-colors shadow-sm cursor-pointer"
160+ className = "bg-black text-white px-3 text-sm font-medium py-2 rounded-xl hover:bg-neutral-800 transition-colors shadow-sm cursor-pointer whitespace-nowrap flex-shrink-0 "
161161 >
162162 Start shopping →
163163 </ button >
@@ -166,7 +166,7 @@ export function HomePage() {
166166 </ div >
167167
168168 < div
169- className = "flex items-center justify-between py-6 scroll-mt-16"
169+ className = "flex flex-col md:flex-row md: items-center md: justify-between gap-4 py-6 scroll-mt-16"
170170 id = "products"
171171 >
172172 < CategoryFilter
0 commit comments