Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
300 changes: 228 additions & 72 deletions client/src/components/Card/ItemCard/ItemCard.css
Original file line number Diff line number Diff line change
@@ -1,120 +1,276 @@
/* Base Card Styling - Modernized */
.product__card__card {
height: 450px;
width: 270px;
width: 100%;
width: 300px;
height: 400px;
border: none;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
border-radius: 20px;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
border-radius: 16px;
background: #fff;
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
margin: 8px auto 6px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.product__card__card:hover {
transform: translateY(-8px);
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.product__card {
height: 100%;
width: 100%;
position: relative;
transform: scale(1.03);
box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

/* Product Image Section - Enhanced */
.product__image {
height: 70%;
height: 80%;
height: 300px;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
position: relative;
overflow: hidden;
background: linear-gradient(145deg, #fafbfc 0%, #f1f3f6 100%);
background: linear-gradient(135deg, #fff9e6 0%, #fff5f0 100%);
padding: 10px;
transition: all 0.5s ease;
}

.product__card__card:hover .product__image {
background: linear-gradient(135deg, #fff5e6 0%, #fff0e6 100%);
}

.product__image>img {
.product__image > img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
transition: all 0.4s ease;
filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.product__card__card:hover .product__image>img {
transform: scale(1.05);
.product__card__card:hover .product__image > img {
transform: scale(1.08) translateY(-5px);
}

.product__card__detail {
height: 30%;
position: relative;
.product__card__detail > *:last-child {
margin-bottom: 0 !important;
}
/* Rating Overlay - Modernized */
.rating-overlay {
position: absolute;
bottom: 12px;
right: 12px;
background: rgba(255, 255, 255, 0.95);
padding: 6px 10px;
border-radius: 20px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
padding: 16px 16px 5px 16px;
box-sizing: border-box;
gap: 4px;
font-size: 0.8rem;
font-weight: 600;
color: #FF8C00;
backdrop-filter: blur(5px);
border: 1px solid rgba(255, 140, 0, 0.2);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
z-index: 2;
}

.product__card__card a {
color: #2d3748 !important;
text-decoration: none !important;
.rating-overlay .star {
color: #FFD700;
font-size: 1rem;
line-height: 1;
}

.product__name {
height: auto;
width: 100%;
display: flex;
justify-content: center;
/* Category Badge - Compact */
.category-badge {
display: inline-flex;
align-items: center;
font-size: 0.95rem;
align-self: flex-start;
background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
color: white;
padding: 2px 10px;
border-radius: 999px;
font-size: 0.62rem;
line-height: 1;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.35px;
box-shadow: 0 2px 6px rgba(255, 140, 0, 0.2);
margin-bottom: 4px;
position: static;
width: auto;
max-width: fit-content;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

/* Product Details Section - Enhanced */
.product__card__detail {
padding: 14px;
display: flex;
flex-direction: column;
background: white;
flex: 1;
position: relative;
gap: 4px;
}

/* Product Name - Compact */
.product__name {
font-size: 0.96rem;
font-weight: 600;
color: #2d3748;
margin-bottom: 6px;
letter-spacing: 0.3px;
margin: 0 0 2px 0;
line-height: 1.3;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
min-height: 2.4em;
transition: color 0.3s ease;
}

.product__description {
height: auto;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
font-size: 0.85rem;
text-align: center;
color: #64748b;
margin-bottom: 12px;
font-weight: 400;
.product__name a {
color: inherit;
text-decoration: none;
}

.product__name a:hover {
color: #FF8C00;
}

/* Price - Compact */
.product__price {
height: auto;
width: fit-content;
font-size: 1.08rem;
font-weight: 700;
color: #2d3748;
margin: 0 0 4px 0;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.2rem;
font-weight: 700;
color: #1a202c;
z-index: 600;
margin-bottom: 8px;
gap: 6px;
}

/* Action Buttons - Compact */
.product__card__action {
width: calc(100% - 20px);
height: 45px;
position: absolute;
bottom: 10px;
left: 10px;
right: 10px;
margin-top: 4px;
padding-top: 6px;
padding-bottom: 6px;
border-top: 1px solid #f3f3f3;
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
padding: 0 12px;
background: linear-gradient(135deg, #FFE26E 30%, #eff468 100%);
border-radius: 12px;
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
gap: 8px;
}

.action-button {
display: flex;
align-items: center;
justify-content: center;
border: none;
border-radius: 8px;
padding: 10px 16px;
font-size: 0.85rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
outline: none;
}

.wishlist-button {
background: #fff;
color: #FF8C00;
border: 1px solid #FFE0B2;
min-width: 38px;
height: 38px;
padding: 0;
border-radius: 50%;
margin-bottom: 0;
}

.wishlist-button:hover {
background: #FFF3E0;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(255, 140, 0, 0.15);
}

.cart-button {
flex: 1;
background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
color: white;
text-transform: uppercase;
letter-spacing: 0.5px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
height: 42px;
box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
font-size: 0.8rem;
padding: 0 12px;
margin-bottom: 0;
}

.cart-button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
background: linear-gradient(135deg, #FF8C00 0%, #FF6B00 100%);
}

.cart-button:active {
transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
.product__card__card {
max-width: 100%;
min-height: 380px;
margin: 6px 0 4px;
}

.product__image {
height: 48%;
min-height: 180px;
padding: 8px;
}

.product__card__detail {
padding: 12px;
gap: 4px;
}

.product__name {
font-size: 0.94rem;
min-height: 2.3em;
margin: 0 0 2px 0;
}

.product__price {
font-size: 1rem;
margin: 0 0 4px 0;
}

.cart-button {
height: 40px;
font-size: 0.78rem;
padding: 0 10px;
}

.product__card__action {
padding-top: 5px;
padding-bottom: 6px;
border-top: 1px solid #f4f4f4;
}
}

/* Animation for hover effect */
@keyframes float {
0% { transform: translateY(0px); }
50% { transform: translateY(-5px); }
100% { transform: translateY(0px); }
}

.product__card__card:hover {
animation: none;
transform: scale(1.03);
}
Loading