508 lines
9.4 KiB
CSS
508 lines
9.4 KiB
CSS
/* 商城页面专用样式 - 小米风格设计 */
|
|
|
|
/* 页面整体样式 */
|
|
#mall-page {
|
|
background-color: #f5f5f5;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
#mall-page .container {
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
/* 顶部促销横幅 - 小米风格 */
|
|
.promo-banner {
|
|
background: linear-gradient(135deg, #ff6900 0%, #ff8f00 100%);
|
|
padding: 10px 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
position: relative;
|
|
margin-bottom: 12px;
|
|
box-shadow: 0 2px 8px rgba(255, 105, 0, 0.2);
|
|
}
|
|
|
|
.promo-content {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.promo-text {
|
|
color: white;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.promo-icon {
|
|
background-color: rgba(255,255,255,0.2);
|
|
border-radius: 50%;
|
|
width: 30px;
|
|
height: 30px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: white;
|
|
}
|
|
|
|
.notification-badge {
|
|
background-color: #ff4444;
|
|
color: white;
|
|
border-radius: 50%;
|
|
width: 20px;
|
|
height: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* 搜索框样式 - 小米风格 */
|
|
.search-section {
|
|
padding: 0 16px 16px;
|
|
}
|
|
|
|
.search-box {
|
|
background-color: #f8f8f8;
|
|
border-radius: 20px;
|
|
padding: 10px 16px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
border: 1px solid #e0e0e0;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.search-box:focus-within {
|
|
border-color: #ff6900;
|
|
box-shadow: 0 0 0 2px rgba(255, 105, 0, 0.1);
|
|
}
|
|
|
|
.search-box i {
|
|
color: #999;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.search-box input {
|
|
flex: 1;
|
|
border: none;
|
|
background: transparent;
|
|
outline: none;
|
|
font-size: 14px;
|
|
color: #333;
|
|
}
|
|
|
|
.search-box input::placeholder {
|
|
color: #999;
|
|
}
|
|
|
|
/* 主要产品展示区域 - 小米风格 */
|
|
.main-product-section {
|
|
background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
|
|
margin: 0 16px 16px;
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
color: white;
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.featured-product {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.product-content {
|
|
flex: 1;
|
|
}
|
|
|
|
.product-title {
|
|
font-size: 28px;
|
|
font-weight: 700;
|
|
margin: 0 0 8px 0;
|
|
color: white;
|
|
}
|
|
|
|
.product-subtitle {
|
|
font-size: 14px;
|
|
color: #ccc;
|
|
margin: 0 0 8px 0;
|
|
}
|
|
|
|
.product-description {
|
|
font-size: 14px;
|
|
color: #aaa;
|
|
margin: 0 0 20px 0;
|
|
}
|
|
|
|
.cta-button {
|
|
background: linear-gradient(135deg, #ff6900 0%, #ff8f00 100%);
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 18px;
|
|
border-radius: 20px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 2px 8px rgba(255, 105, 0, 0.3);
|
|
}
|
|
|
|
.cta-button:active {
|
|
transform: scale(0.98);
|
|
box-shadow: 0 1px 4px rgba(255, 105, 0, 0.4);
|
|
}
|
|
|
|
.product-images {
|
|
display: flex;
|
|
gap: 15px;
|
|
align-items: center;
|
|
}
|
|
|
|
.phone-mockup {
|
|
width: 60px;
|
|
height: 120px;
|
|
border-radius: 12px;
|
|
position: relative;
|
|
}
|
|
|
|
.phone-1 {
|
|
background: linear-gradient(135deg, #4a4a4a 0%, #2a2a2a 100%);
|
|
transform: rotate(-5deg);
|
|
}
|
|
|
|
.phone-2 {
|
|
background: linear-gradient(135deg, #6a8a6a 0%, #4a6a4a 100%);
|
|
transform: rotate(5deg);
|
|
}
|
|
|
|
/* 产品卡片组 */
|
|
.product-cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 15px;
|
|
}
|
|
|
|
.product-card {
|
|
background: rgba(255,255,255,0.1);
|
|
border-radius: 12px;
|
|
padding: 15px;
|
|
text-align: center;
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.card-image {
|
|
width: 50px;
|
|
height: 50px;
|
|
margin: 0 auto 10px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.kpad-image {
|
|
background: linear-gradient(135deg, #a8d8ff 0%, #7bb3ff 100%);
|
|
}
|
|
|
|
.mix-flip-image {
|
|
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
|
|
}
|
|
|
|
.smart-device-image {
|
|
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
|
|
}
|
|
|
|
.card-content h3 {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
margin: 0 0 5px 0;
|
|
color: white;
|
|
}
|
|
|
|
.card-content p {
|
|
font-size: 10px;
|
|
color: #ccc;
|
|
margin: 0;
|
|
}
|
|
|
|
/* 分类导航网格 - 小米风格 */
|
|
.category-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(5, 1fr);
|
|
gap: 16px;
|
|
padding: 16px;
|
|
margin-bottom: 8px;
|
|
background: white;
|
|
}
|
|
|
|
.category-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
text-align: center;
|
|
cursor: pointer;
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.category-item:hover {
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.category-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 6px;
|
|
font-size: 18px;
|
|
color: white;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.category-item:active .category-icon {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.phone-icon {
|
|
background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
|
|
}
|
|
|
|
.tv-icon {
|
|
background: linear-gradient(135deg, #8e44ad 0%, #6c3483 100%);
|
|
}
|
|
|
|
.grid-icon {
|
|
background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
|
|
}
|
|
|
|
.percent-icon {
|
|
background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
|
|
}
|
|
|
|
.smart-icon {
|
|
background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
|
|
}
|
|
|
|
.clock-icon {
|
|
background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
|
|
}
|
|
|
|
.home-icon {
|
|
background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
|
|
}
|
|
|
|
.filter-icon {
|
|
background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
|
|
}
|
|
|
|
.xiaomi-icon {
|
|
background: linear-gradient(135deg, #ff6900 0%, #e55100 100%);
|
|
font-weight: bold;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.shirt-icon {
|
|
background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
|
|
}
|
|
|
|
.category-item span {
|
|
font-size: 12px;
|
|
color: #333;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 促销活动区域 - 小米风格 */
|
|
.promotion-section {
|
|
padding: 0 16px 16px;
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
.promo-card.large {
|
|
background: linear-gradient(135deg, #ff6900 0%, #ff8f00 100%);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
margin-bottom: 12px;
|
|
color: white;
|
|
position: relative;
|
|
overflow: hidden;
|
|
box-shadow: 0 3px 15px rgba(255, 105, 0, 0.25);
|
|
}
|
|
|
|
.promo-header {
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.promo-badge {
|
|
background-color: rgba(255,255,255,0.2);
|
|
padding: 6px 12px;
|
|
border-radius: 20px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
display: inline-block;
|
|
}
|
|
|
|
.promo-card h3 {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
margin: 0 0 8px 0;
|
|
}
|
|
|
|
.promo-card p {
|
|
font-size: 14px;
|
|
margin: 0 0 20px 0;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.promo-btn {
|
|
background-color: rgba(255,255,255,0.2);
|
|
color: white;
|
|
border: 1px solid rgba(255,255,255,0.3);
|
|
padding: 8px 16px;
|
|
border-radius: 16px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.promo-btn:active {
|
|
transform: scale(0.98);
|
|
background-color: rgba(255,255,255,0.3);
|
|
}
|
|
|
|
.tech-icon {
|
|
position: absolute;
|
|
right: 20px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 60px;
|
|
height: 60px;
|
|
background: rgba(255,255,255,0.1);
|
|
border-radius: 50%;
|
|
}
|
|
|
|
/* 促销卡片网格 - 小米风格 */
|
|
.promo-cards-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 12px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.promo-card.small {
|
|
background: white;
|
|
border-radius: 10px;
|
|
padding: 16px;
|
|
text-align: center;
|
|
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
|
|
.promo-card.small:active {
|
|
transform: scale(0.98);
|
|
box-shadow: 0 1px 6px rgba(0,0,0,0.12);
|
|
}
|
|
|
|
.speaker-visual,
|
|
.card-visual {
|
|
width: 50px;
|
|
height: 50px;
|
|
margin: 0 auto 15px;
|
|
border-radius: 8px;
|
|
background: linear-gradient(135deg, #333 0%, #666 100%);
|
|
}
|
|
|
|
.promo-card.small h4 {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
margin: 0 0 8px 0;
|
|
color: #333;
|
|
}
|
|
|
|
.promo-card.small p {
|
|
font-size: 12px;
|
|
color: #666;
|
|
margin: 0;
|
|
}
|
|
|
|
/* 底部促销网格 - 小米风格 */
|
|
.bottom-promo-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 12px;
|
|
}
|
|
|
|
.promo-item {
|
|
background: white;
|
|
border-radius: 10px;
|
|
padding: 16px;
|
|
text-align: center;
|
|
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
|
|
.promo-item:active {
|
|
transform: scale(0.98);
|
|
box-shadow: 0 1px 6px rgba(0,0,0,0.12);
|
|
}
|
|
|
|
.item-visual {
|
|
width: 40px;
|
|
height: 40px;
|
|
margin: 0 auto 12px;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.appliance-visual {
|
|
background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
|
|
}
|
|
|
|
.quality-visual {
|
|
background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
|
|
}
|
|
|
|
.shopping-visual {
|
|
background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
|
|
}
|
|
|
|
.lifestyle-visual {
|
|
background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
|
|
}
|
|
|
|
.promo-item h5 {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
margin: 0 0 6px 0;
|
|
color: #333;
|
|
}
|
|
|
|
.promo-item p {
|
|
font-size: 12px;
|
|
color: #666;
|
|
margin: 0;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 480px) {
|
|
.category-grid {
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 15px;
|
|
padding: 15px;
|
|
}
|
|
|
|
.product-cards {
|
|
grid-template-columns: 1fr 1fr;
|
|
}
|
|
|
|
.bottom-promo-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
} |