init: add initial project files for Mi Home smart home interface clone

This commit is contained in:
shenghuo2
2025-06-20 17:34:00 +08:00
commit 51962faa87
16 changed files with 3963 additions and 0 deletions

461
styles/mall.css Normal file
View File

@ -0,0 +1,461 @@
/* 商城页面专用样式 */
/* 顶部促销横幅 */
.promo-banner {
background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
padding: 12px 20px;
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
border-radius: 0 0 20px 20px;
margin-bottom: 15px;
}
.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 20px 20px;
}
.search-box {
background-color: #f5f5f5;
border-radius: 25px;
padding: 12px 16px;
display: flex;
align-items: center;
gap: 10px;
}
.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, #1a1a1a 0%, #2d2d2d 100%);
margin: 0 20px 20px;
border-radius: 16px;
padding: 25px;
color: white;
position: relative;
overflow: hidden;
}
.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, #ff1744 0%, #d50000 100%);
color: white;
border: none;
padding: 12px 20px;
border-radius: 25px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s;
}
.cta-button:hover {
transform: translateY(-2px);
}
.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: 20px;
padding: 20px;
margin-bottom: 10px;
}
.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: 50px;
height: 50px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 8px;
font-size: 20px;
color: white;
}
.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 20px 20px;
}
.promo-card.large {
background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
border-radius: 16px;
padding: 25px;
margin-bottom: 15px;
color: white;
position: relative;
overflow: hidden;
}
.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(0,0,0,0.2);
color: white;
border: none;
padding: 10px 20px;
border-radius: 20px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
}
.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: 15px;
margin-bottom: 20px;
}
.promo-card.small {
background: white;
border-radius: 12px;
padding: 20px;
text-align: center;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.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: 15px;
}
.promo-item {
background: white;
border-radius: 12px;
padding: 20px;
text-align: center;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.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;
}
}