feat: polish remaining storefront sections

This commit is contained in:
2026-03-08 20:47:40 +08:00
parent b0c9c193aa
commit 045ae62373
10 changed files with 1623 additions and 1028 deletions

View File

@@ -1,128 +1,228 @@
.categories {
padding: 30px 20px;
max-width: 1200px;
margin: 0 auto;
}
.categories-container {
position: relative;
}
.categories-scroll {
display: flex;
gap: 16px;
overflow-x: auto;
padding: 10px 0;
scrollbar-width: none;
-ms-overflow-style: none;
}
.categories-scroll::-webkit-scrollbar {
display: none;
}
.category-card {
flex-shrink: 0;
width: 170px;
border-radius: 12px;
overflow: hidden;
background: white;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
cursor: pointer;
transition: all 0.3s ease;
animation: fadeInUp 0.6s ease forwards;
animation-delay: var(--delay);
opacity: 0;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.category-card:hover {
transform: translateY(-8px);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
.category-image {
height: 170px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.category-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: center;
}
.category-icon {
font-size: 80px;
color: white;
font-weight: 700;
text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}
.category-info {
padding: 12px 16px;
display: flex;
justify-content: space-between;
align-items: center;
}
.category-name {
font-size: 16px;
font-weight: 600;
color: #333;
}
.category-count {
font-size: 12px;
color: #999;
}
.scroll-btn {
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 10;
background: white;
border: none;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
width: 40px;
height: 40px;
}
.scroll-btn:hover {
background: #ff5a5a !important;
color: white !important;
}
.scroll-btn-right {
right: -10px;
}
@media (max-width: 768px) {
.category-card {
width: 160px;
}
.category-image {
height: 100px;
}
}
.categories {
padding: 20px;
}
.categories-panel {
max-width: 1400px;
margin: 0 auto;
padding: 30px;
border-radius: 32px;
background: rgba(255, 255, 255, 0.9);
border: 1px solid rgba(233, 221, 212, 0.92);
box-shadow: 0 22px 48px rgba(66, 42, 26, 0.08);
}
.categories-header {
display: flex;
justify-content: space-between;
gap: 24px;
align-items: flex-end;
margin-bottom: 24px;
}
.categories-copy {
max-width: 760px;
}
.categories-kicker {
display: inline-flex;
margin-bottom: 12px;
padding: 7px 12px;
border-radius: 999px;
background: rgba(239, 106, 91, 0.1);
color: #d84e3f;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
}
.categories-copy h2 {
margin: 0;
color: #221d18;
font-size: clamp(26px, 4vw, 36px);
line-height: 1.15;
}
.categories-copy p {
margin: 12px 0 0;
color: #766c61;
line-height: 1.85;
}
.categories-actions {
display: flex;
align-items: center;
gap: 14px;
flex-wrap: wrap;
justify-content: flex-end;
}
.categories-summary {
padding: 10px 14px;
border-radius: 999px;
background: #fff8f2;
border: 1px solid rgba(236, 223, 213, 0.94);
color: #63574b;
font-size: 13px;
font-weight: 600;
}
.categories-controls {
display: flex;
gap: 10px;
}
.scroll-btn.ant-btn {
width: 42px;
height: 42px;
border-radius: 16px;
border-color: rgba(224, 208, 197, 0.95);
background: #fffaf5;
color: #66594d;
}
.scroll-btn.ant-btn:hover {
color: #ef6a5b !important;
border-color: rgba(239, 106, 91, 0.4) !important;
background: #fff4ef !important;
}
.categories-scroll {
display: grid;
grid-auto-flow: column;
grid-auto-columns: minmax(250px, 1fr);
gap: 16px;
overflow-x: auto;
padding-bottom: 4px;
scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar {
display: none;
}
.category-card {
border: 1px solid rgba(233, 221, 212, 0.92);
border-radius: 24px;
overflow: hidden;
background: linear-gradient(180deg, #fffdfb, #f8f2eb);
text-align: left;
cursor: pointer;
padding: 0;
transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
animation: fadeIn 0.6s ease-out;
animation-delay: var(--delay);
animation-fill-mode: both;
}
.category-card:hover {
transform: translateY(-6px);
border-color: rgba(239, 106, 91, 0.28);
box-shadow: 0 18px 36px rgba(66, 42, 26, 0.12);
}
.category-card-top {
min-height: 140px;
padding: 20px;
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.category-icon-wrap {
width: 54px;
height: 54px;
border-radius: 18px;
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.24);
display: grid;
place-items: center;
color: #fff;
font-size: 24px;
backdrop-filter: blur(10px);
}
.category-pill {
padding: 7px 12px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.18);
border: 1px solid rgba(255, 255, 255, 0.24);
color: #fff;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.04em;
}
.category-body {
padding: 18px 18px 20px;
display: flex;
flex-direction: column;
gap: 16px;
}
.category-name {
margin: 0 0 8px;
color: #281f18;
font-size: 20px;
}
.category-description {
margin: 0;
color: #7b6f63;
line-height: 1.7;
font-size: 14px;
}
.category-footer {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding-top: 14px;
border-top: 1px solid rgba(237, 227, 217, 0.95);
}
.category-count {
color: #67594d;
font-size: 13px;
font-weight: 600;
}
.category-link {
display: inline-flex;
align-items: center;
gap: 6px;
color: #ef6a5b;
font-size: 13px;
font-weight: 700;
}
@media (max-width: 900px) {
.categories-header {
flex-direction: column;
align-items: flex-start;
}
.categories-actions {
justify-content: flex-start;
}
}
@media (max-width: 768px) {
.categories {
padding: 12px;
}
.categories-panel {
padding: 20px 18px;
border-radius: 26px;
}
.categories-scroll {
grid-auto-columns: minmax(220px, 1fr);
}
.category-card-top {
min-height: 120px;
}
}