4d434c9c67
Co-authored-by: Cursor <cursoragent@cursor.com>
429 lines
8.0 KiB
CSS
429 lines
8.0 KiB
CSS
/* 商品详情页 — 对齐 h5-user ProductDetailPage */
|
|
.product-detail-page {
|
|
background: var(--color-background);
|
|
}
|
|
|
|
.product-detail-main {
|
|
padding-bottom: 24px;
|
|
}
|
|
|
|
.product-detail-hero {
|
|
background: var(--color-card);
|
|
}
|
|
|
|
.detail-carousel-wrap {
|
|
position: relative;
|
|
width: 100%;
|
|
aspect-ratio: 1.33; /* 保持4:3的比例 */
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* adaptive 模式(方案 A):删除固定 1:1 比例与固定高度,
|
|
改用 swiper 原生 auto-height + image widthFix,海报有多高轮播就有多高,无裁切 */
|
|
.detail-carousel-wrap--adaptive {
|
|
/* aspect-ratio: auto; */
|
|
overflow: visible;
|
|
}
|
|
|
|
.detail-carousel-wrap--adaptive .detail-carousel,
|
|
.detail-carousel-wrap--adaptive .detail-carousel-item,
|
|
.detail-carousel-wrap--adaptive .detail-carousel-image {
|
|
height: 100%;
|
|
}
|
|
|
|
.detail-carousel {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.detail-carousel-item,
|
|
.detail-carousel-image,
|
|
.detail-carousel-placeholder {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.detail-carousel-placeholder {
|
|
background: var(--color-surface-container);
|
|
}
|
|
|
|
.detail-carousel-dots {
|
|
position: absolute;
|
|
bottom: 16px;
|
|
left: 0;
|
|
right: 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.detail-carousel-dot {
|
|
height: 4px;
|
|
width: 6px;
|
|
border-radius: 999px;
|
|
background: rgba(153, 153, 153, 0.3);
|
|
}
|
|
|
|
.detail-carousel-dot--active {
|
|
width: 24px;
|
|
background: var(--color-heritage-red);
|
|
}
|
|
|
|
.detail-carousel-counter {
|
|
position: absolute;
|
|
right: 12px;
|
|
bottom: 12px;
|
|
z-index: 2;
|
|
padding: 2px 10px;
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
color: #fff;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
border-radius: 999px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.product-detail-info {
|
|
padding: var(--space-md) var(--space-page) var(--space-lg);
|
|
}
|
|
|
|
.product-detail-price {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: 2px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.product-detail-price-symbol {
|
|
font-family: var(--font-headline);
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: var(--color-heritage-red);
|
|
}
|
|
|
|
.product-detail-price-value {
|
|
font-family: var(--font-headline);
|
|
font-size: 32px;
|
|
font-weight: 700;
|
|
line-height: 40px;
|
|
color: var(--color-heritage-red);
|
|
}
|
|
|
|
.product-detail-name {
|
|
display: block;
|
|
font-family: var(--font-headline);
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
line-height: 28px;
|
|
color: var(--color-ink-black);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.product-detail-subtitle {
|
|
display: block;
|
|
font-size: 14px;
|
|
line-height: 20px;
|
|
color: var(--color-on-surface-variant);
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.product-detail-promo {
|
|
position: relative;
|
|
margin-top: 8px;
|
|
padding: 16px;
|
|
border-radius: var(--radius-lg);
|
|
background: linear-gradient(135deg, #fff9e6 0%, #fff0c2 100%);
|
|
border: 1px solid rgba(255, 191, 0, 0.1);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.product-detail-promo-glow {
|
|
position: absolute;
|
|
top: -16px;
|
|
right: -16px;
|
|
width: 80px;
|
|
height: 80px;
|
|
border-radius: 50%;
|
|
background: rgba(166, 29, 36, 0.05);
|
|
}
|
|
|
|
.product-detail-promo-head {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 8px;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.product-detail-promo-icon {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 50%;
|
|
background: var(--color-heritage-red);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.product-detail-promo-icon-text {
|
|
color: #fff;
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.product-detail-promo-title {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 4px;
|
|
font-family: var(--font-headline);
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
line-height: 22px;
|
|
color: var(--color-on-secondary-container);
|
|
}
|
|
|
|
.product-detail-promo-amount {
|
|
color: var(--color-heritage-red);
|
|
font-weight: 700;
|
|
}
|
|
|
|
.product-detail-promo-desc {
|
|
display: block;
|
|
font-size: 14px;
|
|
line-height: 22px;
|
|
color: rgba(87, 69, 0, 0.8);
|
|
padding-left: 52px;
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
.product-detail-content {
|
|
background: var(--color-card);
|
|
border-radius: 24px 24px 0 0;
|
|
padding-top: var(--space-lg);
|
|
padding-bottom: 24px;
|
|
}
|
|
|
|
.product-detail-section-head {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 0 var(--space-page);
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.product-detail-section-bar {
|
|
width: 4px;
|
|
height: 20px;
|
|
border-radius: 999px;
|
|
background: var(--color-heritage-red);
|
|
}
|
|
|
|
.product-detail-section-title {
|
|
font-family: var(--font-headline);
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: var(--color-ink-black);
|
|
}
|
|
|
|
.product-detail-banner {
|
|
width: 100%;
|
|
display: block;
|
|
}
|
|
|
|
.product-detail-copy {
|
|
padding: var(--space-lg) var(--space-page);
|
|
}
|
|
|
|
.product-detail-story {
|
|
text-align: center;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.product-detail-story-title {
|
|
display: block;
|
|
font-family: var(--font-headline);
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: var(--color-heritage-red);
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.product-detail-story-text {
|
|
display: block;
|
|
font-size: 14px;
|
|
line-height: 22px;
|
|
color: var(--color-on-surface-variant);
|
|
}
|
|
|
|
.product-detail-features {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 16px;
|
|
}
|
|
|
|
.product-detail-feature {
|
|
width: calc(50% - 8px);
|
|
background: var(--color-surface-container-low);
|
|
border: 1px solid rgba(226, 190, 188, 0.3);
|
|
border-radius: var(--radius-lg);
|
|
padding: 16px;
|
|
text-align: center;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.product-detail-feature-icon {
|
|
display: block;
|
|
font-size: 20px;
|
|
color: var(--color-heritage-red);
|
|
}
|
|
|
|
.product-detail-feature-title {
|
|
display: block;
|
|
font-family: var(--font-headline);
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--color-ink-black);
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.product-detail-feature-desc {
|
|
display: block;
|
|
font-size: 12px;
|
|
color: var(--color-subtle-gray);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.product-detail-bar {
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 50;
|
|
padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
border-top: 1px solid rgba(226, 190, 188, 0.1);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.product-detail-bar-home {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
padding: 0 8px;
|
|
}
|
|
|
|
.product-detail-bar-home-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
}
|
|
|
|
.product-detail-bar-home-label {
|
|
font-size: 10px;
|
|
font-weight: 500;
|
|
color: var(--color-on-surface-variant);
|
|
}
|
|
|
|
.product-detail-pickup-btn {
|
|
flex: 1;
|
|
height: 48px;
|
|
border-radius: 999px;
|
|
background: transparent;
|
|
border: 1px solid var(--color-heritage-red);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.product-detail-pickup-btn-text {
|
|
color: var(--color-heritage-red);
|
|
font-family: var(--font-headline);
|
|
font-size: 15px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.product-detail-buy-btn {
|
|
flex: 1;
|
|
height: 48px;
|
|
border-radius: 999px;
|
|
background: var(--color-heritage-red);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: 0 8px 24px rgba(166, 29, 36, 0.2);
|
|
}
|
|
|
|
.product-detail-buy-btn--disabled {
|
|
background: #c4c4c4;
|
|
box-shadow: none;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.product-detail-buy-btn-text {
|
|
color: #fff;
|
|
font-family: var(--font-headline);
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.product-detail-specs {
|
|
margin: 16px 0 28px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.product-detail-spec-row {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.product-detail-spec-label {
|
|
font-size: 13px;
|
|
color: var(--color-on-surface-variant, #666);
|
|
}
|
|
|
|
.product-detail-spec-chips {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.product-detail-spec-chip {
|
|
padding: 6px 14px;
|
|
border-radius: 8px;
|
|
background: #f5f5f5;
|
|
border: 1px solid transparent;
|
|
}
|
|
|
|
.product-detail-spec-chip.is-active {
|
|
background: rgba(166, 29, 36, 0.08);
|
|
border-color: var(--color-heritage-red);
|
|
}
|
|
|
|
.product-detail-spec-chip.is-disabled {
|
|
opacity: 0.35;
|
|
}
|
|
|
|
.product-detail-spec-chip-text {
|
|
font-size: 13px;
|
|
color: #333;
|
|
}
|
|
|
|
.product-detail-spec-chip.is-active .product-detail-spec-chip-text {
|
|
color: var(--color-heritage-red);
|
|
font-weight: 600;
|
|
}
|