Geizkragen/assets/css/compcard.css

161 lines
3.5 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* ==========================================================
PRODUCT CARDS & SCROLL Modern 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: transform var(--transition-smooth),
box-shadow var(--transition-smooth),
border-color var(--transition-smooth);
display: flex;
flex-direction: column;
min-height: 260px;
text-decoration: none;
color: inherit;
}
.product-card:hover {
transform: translateY(-6px);
box-shadow: var(--shadow-md), var(--shadow-glow);
border-color: var(--border-strong);
}
.product-card:focus-visible {
outline: 2px solid var(--color-primary);
outline-offset: 3px;
}
/* ─── Card Image ─── */
.product-card img {
width: 100%;
height: 170px;
object-fit: contain;
object-position: center;
display: block;
flex: 0 0 auto;
background: rgba(255, 255, 255, 0.95);
padding: 12px;
border-bottom: 1px solid var(--border-subtle);
}
/* ─── Card Content ─── */
.product-card__content {
padding: 1rem 1.25rem 1.1rem;
flex: 1 1 auto;
display: flex;
flex-direction: column;
min-height: 0;
gap: 0.3rem;
}
.product-card__content h3 {
font-size: 0.95rem;
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;
}
.product-card__content p {
font-size: 0.82rem;
color: var(--text-secondary);
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: 1rem;
font-weight: 700;
color: var(--color-primary);
margin-top: auto;
padding-top: 0.5rem;
}
/* ─── Product Sections ─── */
.product-section {
padding: 1.75rem 0 0.5rem;
}
.product-section h2 {
margin-left: 2rem;
margin-bottom: 1rem;
font-size: 1.25rem;
font-weight: 700;
color: var(--text-primary);
letter-spacing: -0.3px;
position: relative;
padding-left: 0.75rem;
}
.product-section h2::before {
content: "";
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 3px;
height: 70%;
background: var(--color-primary);
border-radius: var(--radius-full);
}
/* ─── Horizontal Scroll ─── */
.product-scroll {
display: flex;
gap: 1.25rem;
padding: 0.5rem 2rem 2rem;
overflow-x: auto;
overflow-y: hidden;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
.product-scroll .product-card {
flex: 0 0 270px;
scroll-snap-align: start;
}
.product-scroll::-webkit-scrollbar {
display: none;
}
/* ─── Responsive ─── */
@media (max-width: 768px) {
.product-section h2 {
margin-left: 1rem;
font-size: 1.1rem;
}
.product-scroll {
padding: 0.5rem 1rem 1.5rem;
gap: 1rem;
}
.product-scroll .product-card {
flex: 0 0 240px;
}
}