429 lines
10 KiB
CSS
429 lines
10 KiB
CSS
/* ==========================================================
|
||
PRODUCT CARDS & SCROLL – Animated Glass Cards
|
||
========================================================== */
|
||
|
||
/* ─── Product Grid ─── */
|
||
.product-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
||
gap: 1.5rem;
|
||
padding: 2rem;
|
||
}
|
||
|
||
/* ─── Product Card ─── */
|
||
.product-card {
|
||
background: var(--bg-card);
|
||
border: 1px solid var(--border-subtle);
|
||
border-radius: var(--radius-lg);
|
||
overflow: hidden;
|
||
box-shadow: var(--shadow-sm);
|
||
transition: all var(--transition-smooth);
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 270px;
|
||
text-decoration: none;
|
||
color: inherit;
|
||
position: relative;
|
||
animation: fadeInUp 0.5s ease both;
|
||
}
|
||
|
||
/* Gradient border glow on hover */
|
||
.product-card::before {
|
||
content: "";
|
||
position: absolute;
|
||
inset: -1px;
|
||
border-radius: var(--radius-lg);
|
||
padding: 1px;
|
||
background: linear-gradient(
|
||
135deg,
|
||
rgba(59, 130, 246, 0.3),
|
||
rgba(16, 185, 129, 0.2),
|
||
rgba(59, 130, 246, 0.1)
|
||
);
|
||
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
||
-webkit-mask-composite: xor;
|
||
mask-composite: exclude;
|
||
opacity: 0;
|
||
transition: opacity var(--transition-smooth);
|
||
z-index: 1;
|
||
pointer-events: none;
|
||
}
|
||
|
||
/* Inner glow effect on hover */
|
||
.product-card::after {
|
||
content: "";
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: 120px;
|
||
background: linear-gradient(180deg, rgba(59, 130, 246, 0.04), transparent);
|
||
opacity: 0;
|
||
transition: opacity var(--transition-smooth);
|
||
pointer-events: none;
|
||
z-index: 1;
|
||
}
|
||
|
||
.product-card:hover {
|
||
transform: translateY(-8px) scale(1.02);
|
||
box-shadow: var(--shadow-md), var(--shadow-glow-blue);
|
||
border-color: transparent;
|
||
}
|
||
|
||
.product-card:hover::before {
|
||
opacity: 1;
|
||
}
|
||
|
||
.product-card:hover::after {
|
||
opacity: 1;
|
||
}
|
||
|
||
.product-card:focus-visible {
|
||
outline: 2px solid var(--color-primary);
|
||
outline-offset: 3px;
|
||
}
|
||
|
||
/* Stagger cards in scroll */
|
||
.product-scroll .product-card:nth-child(1) { animation-delay: 0.05s; }
|
||
.product-scroll .product-card:nth-child(2) { animation-delay: 0.1s; }
|
||
.product-scroll .product-card:nth-child(3) { animation-delay: 0.15s; }
|
||
.product-scroll .product-card:nth-child(4) { animation-delay: 0.2s; }
|
||
.product-scroll .product-card:nth-child(5) { animation-delay: 0.25s; }
|
||
.product-scroll .product-card:nth-child(6) { animation-delay: 0.3s; }
|
||
.product-scroll .product-card:nth-child(7) { animation-delay: 0.35s; }
|
||
.product-scroll .product-card:nth-child(8) { animation-delay: 0.4s; }
|
||
|
||
/* ─── Card Image ─── */
|
||
.product-card img {
|
||
width: 100%;
|
||
height: 175px;
|
||
object-fit: contain;
|
||
object-position: center;
|
||
display: block;
|
||
flex: 0 0 auto;
|
||
background: rgba(255, 255, 255, 0.96);
|
||
padding: 16px;
|
||
border-bottom: 1px solid var(--border-subtle);
|
||
transition: transform var(--transition-smooth);
|
||
position: relative;
|
||
z-index: 2;
|
||
}
|
||
|
||
.product-card:hover img {
|
||
transform: scale(1.05);
|
||
}
|
||
|
||
/* ─── Card Content ─── */
|
||
.product-card__content {
|
||
padding: 1rem 1.25rem 1.15rem;
|
||
flex: 1 1 auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 0;
|
||
gap: 0.35rem;
|
||
position: relative;
|
||
z-index: 2;
|
||
}
|
||
|
||
.product-card__content h3 {
|
||
font-size: 0.92rem;
|
||
font-weight: 600;
|
||
color: var(--text-primary);
|
||
margin-bottom: 0;
|
||
overflow: hidden;
|
||
display: -webkit-box;
|
||
-webkit-line-clamp: 2;
|
||
-webkit-box-orient: vertical;
|
||
line-height: 1.4;
|
||
transition: color var(--transition-normal);
|
||
}
|
||
|
||
.product-card:hover .product-card__content h3 {
|
||
color: var(--text-invert);
|
||
}
|
||
|
||
.product-card__content p {
|
||
font-size: 0.8rem;
|
||
color: var(--text-muted);
|
||
margin-bottom: 0;
|
||
overflow: hidden;
|
||
display: -webkit-box;
|
||
-webkit-line-clamp: 3;
|
||
-webkit-box-orient: vertical;
|
||
word-break: break-word;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.product-card__content .price {
|
||
font-size: 1.05rem;
|
||
font-weight: 700;
|
||
color: var(--color-primary);
|
||
margin-top: auto;
|
||
padding-top: 0.5rem;
|
||
}
|
||
|
||
/* ─── Product Sections ─── */
|
||
.product-section {
|
||
padding: 2rem 0 0.5rem;
|
||
animation: fadeInUp 0.5s ease both;
|
||
}
|
||
|
||
.product-section h2 {
|
||
margin-left: 2rem;
|
||
margin-bottom: 1.25rem;
|
||
font-size: 1.3rem;
|
||
font-weight: 700;
|
||
color: var(--text-primary);
|
||
letter-spacing: -0.3px;
|
||
position: relative;
|
||
padding-left: 1rem;
|
||
display: inline-block;
|
||
}
|
||
|
||
/* Animated accent line */
|
||
.product-section h2::before {
|
||
content: "";
|
||
position: absolute;
|
||
left: 0;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
width: 3px;
|
||
height: 0;
|
||
background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
|
||
border-radius: var(--radius-full);
|
||
animation: lineGrow 0.6s ease 0.3s forwards;
|
||
}
|
||
|
||
@keyframes lineGrow {
|
||
to { height: 80%; }
|
||
}
|
||
|
||
/* Subtle glow behind section title */
|
||
.product-section h2::after {
|
||
content: "";
|
||
position: absolute;
|
||
left: -8px;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
width: 18px;
|
||
height: 18px;
|
||
background: var(--color-primary);
|
||
border-radius: 50%;
|
||
filter: blur(10px);
|
||
opacity: 0.3;
|
||
}
|
||
|
||
/* ─── Horizontal Scroll ─── */
|
||
.product-scroll {
|
||
display: flex;
|
||
gap: 1.25rem;
|
||
padding: 0.5rem 2rem 2.5rem;
|
||
overflow-x: auto;
|
||
overflow-y: hidden;
|
||
scroll-snap-type: x mandatory;
|
||
-webkit-overflow-scrolling: touch;
|
||
scrollbar-width: none;
|
||
/* Fade edges on scroll */
|
||
mask-image: linear-gradient(90deg, transparent, black 2rem, black calc(100% - 2rem), transparent);
|
||
-webkit-mask-image: linear-gradient(90deg, transparent, black 2rem, black calc(100% - 2rem), transparent);
|
||
}
|
||
|
||
.product-scroll .product-card {
|
||
flex: 0 0 270px;
|
||
scroll-snap-align: start;
|
||
}
|
||
|
||
.product-scroll::-webkit-scrollbar {
|
||
display: none;
|
||
}
|
||
|
||
/* ─── Responsive ─── */
|
||
@media (max-width: 768px) {
|
||
.product-grid {
|
||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
||
gap: 0.8rem;
|
||
padding: 1rem;
|
||
}
|
||
|
||
.product-section {
|
||
padding: 1.25rem 0 0.25rem;
|
||
}
|
||
|
||
.product-section h2 {
|
||
margin-left: 1rem;
|
||
font-size: 1.1rem;
|
||
}
|
||
|
||
.product-scroll {
|
||
padding: 0.5rem 1rem 1.5rem;
|
||
gap: 0.8rem;
|
||
mask-image: linear-gradient(90deg, transparent, black 1rem, black calc(100% - 1rem), transparent);
|
||
-webkit-mask-image: linear-gradient(90deg, transparent, black 1rem, black calc(100% - 1rem), transparent);
|
||
}
|
||
|
||
.product-scroll .product-card {
|
||
flex: 0 0 200px;
|
||
min-height: 230px;
|
||
}
|
||
|
||
.product-card img {
|
||
height: 130px;
|
||
padding: 10px;
|
||
}
|
||
|
||
.product-card__content {
|
||
padding: 0.75rem 0.9rem 0.85rem;
|
||
gap: 0.25rem;
|
||
}
|
||
|
||
.product-card__content h3 {
|
||
font-size: 0.82rem;
|
||
}
|
||
|
||
.product-card__content p {
|
||
font-size: 0.72rem;
|
||
-webkit-line-clamp: 2;
|
||
}
|
||
|
||
.product-card__content .price {
|
||
font-size: 0.92rem;
|
||
}
|
||
}
|
||
|
||
@media (max-width: 480px) {
|
||
.product-grid {
|
||
grid-template-columns: repeat(2, 1fr);
|
||
gap: 0.6rem;
|
||
padding: 0.75rem;
|
||
}
|
||
|
||
.product-scroll .product-card {
|
||
flex: 0 0 170px;
|
||
min-height: 210px;
|
||
}
|
||
|
||
.product-card img {
|
||
height: 110px;
|
||
padding: 8px;
|
||
}
|
||
|
||
.product-card__content {
|
||
padding: 0.6rem 0.7rem 0.7rem;
|
||
}
|
||
|
||
.product-card__content h3 {
|
||
font-size: 0.78rem;
|
||
-webkit-line-clamp: 1;
|
||
}
|
||
|
||
.product-card__content p {
|
||
display: none;
|
||
}
|
||
}
|
||
|
||
/* ==========================================================
|
||
WISHLIST – Vertical List Layout
|
||
========================================================== */
|
||
.wishlist-grid {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 1rem;
|
||
padding: 0.5rem 2rem 2.5rem;
|
||
max-width: 900px;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.wishlist-card.product-card {
|
||
flex-direction: row;
|
||
min-height: auto;
|
||
height: 120px;
|
||
}
|
||
|
||
.wishlist-card.product-card img {
|
||
width: 150px;
|
||
height: 100%;
|
||
flex: 0 0 150px;
|
||
border-bottom: none;
|
||
border-right: 1px solid var(--border-subtle);
|
||
border-radius: var(--radius-lg) 0 0 var(--radius-lg);
|
||
}
|
||
|
||
.wishlist-card.product-card .product-card__content {
|
||
justify-content: center;
|
||
padding: 1rem 1.5rem;
|
||
}
|
||
|
||
.wishlist-card.product-card:hover {
|
||
transform: translateX(6px) scale(1.01);
|
||
}
|
||
|
||
.wishlist-card.product-card:hover img {
|
||
transform: scale(1.05);
|
||
}
|
||
|
||
/* Stagger animation for wishlist items */
|
||
.wishlist-grid .wishlist-card:nth-child(1) { animation-delay: 0.05s; }
|
||
.wishlist-grid .wishlist-card:nth-child(2) { animation-delay: 0.1s; }
|
||
.wishlist-grid .wishlist-card:nth-child(3) { animation-delay: 0.15s; }
|
||
.wishlist-grid .wishlist-card:nth-child(4) { animation-delay: 0.2s; }
|
||
.wishlist-grid .wishlist-card:nth-child(5) { animation-delay: 0.25s; }
|
||
.wishlist-grid .wishlist-card:nth-child(6) { animation-delay: 0.3s; }
|
||
.wishlist-grid .wishlist-card:nth-child(7) { animation-delay: 0.35s; }
|
||
.wishlist-grid .wishlist-card:nth-child(8) { animation-delay: 0.4s; }
|
||
|
||
@media (max-width: 768px) {
|
||
.wishlist-grid {
|
||
padding: 0.5rem 1rem 1.5rem;
|
||
gap: 0.8rem;
|
||
}
|
||
|
||
.wishlist-card.product-card {
|
||
height: 100px;
|
||
}
|
||
|
||
.wishlist-card.product-card img {
|
||
width: 110px;
|
||
flex: 0 0 110px;
|
||
padding: 10px;
|
||
}
|
||
|
||
.wishlist-card.product-card .product-card__content {
|
||
padding: 0.75rem 1rem;
|
||
}
|
||
|
||
.wishlist-card .product-card__content h3 {
|
||
font-size: 0.85rem;
|
||
}
|
||
|
||
.wishlist-card .product-card__content p {
|
||
font-size: 0.72rem;
|
||
-webkit-line-clamp: 2;
|
||
}
|
||
}
|
||
|
||
@media (max-width: 480px) {
|
||
.wishlist-card.product-card {
|
||
height: 90px;
|
||
}
|
||
|
||
.wishlist-card.product-card img {
|
||
width: 90px;
|
||
flex: 0 0 90px;
|
||
padding: 8px;
|
||
}
|
||
|
||
.wishlist-card.product-card .product-card__content {
|
||
padding: 0.5rem 0.75rem;
|
||
}
|
||
|
||
.wishlist-card .product-card__content h3 {
|
||
font-size: 0.78rem;
|
||
-webkit-line-clamp: 1;
|
||
}
|
||
|
||
.wishlist-card .product-card__content p {
|
||
display: none;
|
||
}
|
||
}
|
||
|