@@ -124,13 +124,13 @@ export default function WeeklyRankingCards({
124
124
< div className = "flex justify-between items-center" >
125
125
< h2 className = "text-xl font-bold" > 주간 랭킹 - { getSellerTypeLabel ( sellerType ) } </ h2 >
126
126
</ div >
127
- < div className = "md:grid md:grid-cols-4 md:gap-6 flex md:block overflow-x-auto md:overflow-visible space-x- 4 md:space-x- 0 pb-4 md:pb-0 scrollbar-hide" >
127
+ < div className = "md:grid md:grid-cols-4 md:gap-6 flex md:block overflow-x-auto md:overflow-visible gap- 4 md:gap- 0 pb-4 md:pb-0 scrollbar-hide px-2 md:px-0 " >
128
128
{ Array . from ( { length : limit } ) . map ( ( _ , index ) => (
129
- < div key = { index } className = "bg-white rounded-xl border p-4 animate-pulse min- w-[200px ] md:min-w-0 flex-shrink-0 md:flex-shrink" >
130
- < div className = "w-full h-96 bg-gray-300 rounded-lg mb-4" > </ div >
131
- < div className = "h-4 bg-gray-300 rounded mb-2" > </ div >
132
- < div className = "h-3 bg-gray-300 rounded w-2/3 mb-2" > </ div >
133
- < div className = "h-3 bg-gray-300 rounded w-1/2" > </ div >
129
+ < div key = { index } className = "bg-white rounded-xl border p-3 md:p- 4 animate-pulse w-[280px ] md:w-auto flex-shrink-0 md:flex-shrink" >
130
+ < div className = "w-full h-64 md:h- 96 bg-gray-300 rounded-lg mb-3 md: mb-4" > </ div >
131
+ < div className = "h-3 md:h- 4 bg-gray-300 rounded mb-2" > </ div >
132
+ < div className = "h-2 md:h- 3 bg-gray-300 rounded w-2/3 mb-1 md: mb-2" > </ div >
133
+ < div className = "h-2 md:h- 3 bg-gray-300 rounded w-1/2" > </ div >
134
134
</ div >
135
135
) ) }
136
136
</ div >
@@ -172,22 +172,22 @@ export default function WeeklyRankingCards({
172
172
</ div >
173
173
174
174
{ /* Mobile: Horizontal scroll, Desktop: Grid */ }
175
- < div className = "md:grid md:grid-cols-4 md:gap-6 flex md:block overflow-x-auto md:overflow-visible space-x- 4 md:space-x- 0 pb-4 md:pb-0 scrollbar-hide" >
175
+ < div className = "md:grid md:grid-cols-4 md:gap-6 flex md:block overflow-x-auto md:overflow-visible gap- 4 md:gap- 0 pb-4 md:pb-0 scrollbar-hide px-2 md:px-0 " >
176
176
{ rankings . map ( ( product , index ) => (
177
177
< Link
178
178
key = { product . product_id }
179
179
href = { `/products/${ product . product_id } ` }
180
180
onClick = { ( ) => handleProductClick ( product . product_id ) }
181
181
className = "block group"
182
182
>
183
- < div className = "bg-white rounded-xl border-2 border-gray-100 p-5 hover:shadow-xl hover:border-blue-200 transition-all duration-300 relative min- w-[200px ] md:min-w-0 flex-shrink-0 md:flex-shrink" >
183
+ < div className = "bg-white rounded-xl border-2 border-gray-100 p-3 md:p- 5 hover:shadow-xl hover:border-blue-200 transition-all duration-300 relative w-[280px ] md:w-auto flex-shrink-0 md:flex-shrink" >
184
184
{ showRankNumbers && (
185
- < div className = { `absolute -top-2 -left-2 px-3 py-1 rounded-full flex items-center justify-center text-xs font-bold ${ getRankBadgeColor ( index + 1 ) } transform rotate-3` } >
185
+ < div className = { `absolute -top-2 -left-2 px-2 py-1 md:px-3 md: py-1 rounded-full flex items-center justify-center text-xs font-bold ${ getRankBadgeColor ( index + 1 ) } transform rotate-3` } >
186
186
{ getRankLabel ( index + 1 ) }
187
187
</ div >
188
188
) }
189
189
190
- < div className = "relative w-full h-96 mb-4 overflow-hidden rounded-xl bg-gray-100 shadow-md" >
190
+ < div className = "relative w-full h-64 md:h- 96 mb-3 md: mb-4 overflow-hidden rounded-xl bg-gray-100 shadow-md" >
191
191
{ product . product_image ? (
192
192
< Image
193
193
src = { product . product_image }
@@ -206,23 +206,23 @@ export default function WeeklyRankingCards({
206
206
< div className = "absolute inset-0 bg-black bg-opacity-0 group-hover:bg-opacity-10 transition-all duration-300 rounded-xl" > </ div >
207
207
</ div >
208
208
209
- < div className = "space-y-2" >
210
- < h3 className = "font-bold text-gray-900 text-base mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors leading-tight" >
209
+ < div className = "space-y-1 md:space-y- 2" >
210
+ < h3 className = "font-bold text-gray-900 text-sm md:text- base mb-1 md: mb-2 line-clamp-2 group-hover:text-blue-600 transition-colors leading-tight" >
211
211
{ product . product_name }
212
212
</ h3 >
213
213
214
214
< div className = "space-y-1" >
215
- < p className = "text-gray-700 text-sm font-medium" >
215
+ < p className = "text-gray-700 text-xs md:text- sm font-medium" >
216
216
{ product . seller_name . includes ( '샘플' ) ? `창작자 ${ String . fromCharCode ( 65 + index ) } ` : product . seller_name }
217
217
</ p >
218
218
219
- < p className = "text-gray-500 text-xs leading-relaxed" >
219
+ < p className = "text-gray-500 text-xs leading-relaxed hidden md:block " >
220
220
{ getCreatorDescription ( product . seller_name , index + 1 ) }
221
221
</ p >
222
222
</ div >
223
223
224
- < div className = "pt-2 border-t border-gray-100" >
225
- < span className = "font-bold text-blue-600 text-lg" >
224
+ < div className = "pt-1 md:pt- 2 border-t border-gray-100" >
225
+ < span className = "font-bold text-blue-600 text-base md:text- lg" >
226
226
{ formatPrice ( product . product_price ) }
227
227
</ span >
228
228
< span className = "text-xs text-gray-500 ml-1" > 부터</ span >
0 commit comments