/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 30px;
    margin-right: 10px;
}

.search-bar {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 15px;
    width: 40%;
    background-color: #f9f9f9;
}

.search-category {
    display: flex;
    align-items: center;
    margin-right: 10px;
    padding-right: 10px;
    border-right: 1px solid #ddd;
    position: relative;
    cursor: pointer;
}

.search-category i {
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.search-category.active i {
    transform: rotate(180deg);
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 120px;
    z-index: 10;
    display: none;
    margin-top: 5px;
}

.search-category.active .category-dropdown {
    display: block;
}

.category-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-dropdown li {
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.category-dropdown li:hover {
    background-color: #f5f5f5;
}

.category-dropdown li:first-child {
    border-radius: 8px 8px 0 0;
}

.category-dropdown li:last-child {
    border-radius: 0 0 8px 8px;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 5px;
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
}

.user-actions {
    display: flex;
    align-items: center;
}

.user-actions a {
    margin-left: 20px;
    font-size: 14px;
}

.cart {
    font-size: 20px;
}

/* 面包屑导航 */
.breadcrumb {
    margin: 20px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #333;
}

.breadcrumb a:hover {
    color: #00cc44;
}

.breadcrumb span {
    color: #999;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 主横幅区域 */
.hero-banner {
    background: linear-gradient(120deg, #9de89f 0%, #c0f2a6 100%);
    padding: 40px 0;
    border-radius: 15px;
    margin: 20px auto;
    max-width: 1200px;
    overflow: hidden;
    position: relative;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    position: relative;
}

.banner-text {
    z-index: 2;
}

.banner-text h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.slogan {
    font-size: 32px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.spacer {
    width: 50px;
    display: inline-block;
}

.cta-button {
    display: inline-block;
    background-color: #fff;
    color: #333;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.banner-images {
    position: relative;
    z-index: 1;
}

.product-img {
    position: absolute;
}

.headphone {
    width: 120px;
    left: -150px;
    top: -50px;
}

.controller {
    width: 100px;
    top: -100px;
    left: -300px;
}

.speaker {
    width: 150px;
    right: 300px;
    bottom: -160px;
}

/* 今日推荐区域 */
.todays-picks {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-header {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.icon-text {
    display: flex;
    align-items: center;
    background-color: #d1ffab;
    padding: 10px 20px;
    border-radius: 20px;
}

.icon-text i {
    margin-right: 10px;
    color: #3e7b2f;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    flex-direction: column;
}

.feature-tag {
    background-color: #d1ffab;
    padding: 8px 15px;
    border-radius: 15px;
    width: fit-content;
    margin: 15px;
    font-size: 14px;
}

.daily-pick {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    margin: 10px 15px;
    padding: 10px;
}

.daily-pick > span {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.rating-icons {
    display: flex;
    gap: 5px;
}

.rating-icons span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 50%;
    font-size: 12px;
}

.emotion-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: #ffcc00;
    margin: 0 auto;
}

.product-info {
    padding: 15px;
    text-align: center;
}

.product-name {
    font-weight: bold;
    margin-bottom: 10px;
}

.product-price {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.price-tag {
    margin-right: 5px;
    font-size: 14px;
    color: #777;
}

.price-value {
    font-weight: bold;
    color: #ff4d4d;
}

.product-image {
    margin: 15px 0;
}

.product-image img {
    max-width: 100%;
    height: 120px;
    object-fit: contain;
}

.add-to-cart {
    background-color: #d1ffab;
    color: #333;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background-color: #b5e68f;
}

/* 促销区域 */
.promotions {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
}

.promo-card {
    flex: 1;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.phone-card {
    background-color: #e6f3ff;
}

.discount-card {
    background-color: #ffeb3b;
}

.promo-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.promo-content p {
    font-size: 14px;
    margin-bottom: 5px;
}

.discount {
    font-size: 36px;
    font-weight: bold;
    margin: 15px 0;
}

.claim-btn {
    background-color: #fff;
    color: #333;
    padding: 8px 25px;
    border-radius: 25px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.claim-btn:hover {
    background-color: #f0f0f0;
}

.promo-image {
    max-width: 40%;
    height: auto;
}

/* iPad推荐区域 */
.ipad-showcase {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.ipad-card {
    background-color: #fff9e6;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.ipad-card.reverse {
    flex-direction: row-reverse;
}

.ipad-info {
    flex: 1;
    padding: 0 20px;
}

.ipad-info h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.ipad-info p {
    color: #777;
    margin-bottom: 20px;
}

.ipad-image {
    flex: 1;
    text-align: center;
}

.ipad-image img {
    max-width: 100%;
    height: auto;
}

/* 侧边导航 */
.side-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 10px;
    z-index: 90;
}

.side-nav-btn {
    background: transparent;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.side-nav-btn.active {
    background-color: #00cc44;
    color: #fff;
}

.side-nav-btn:hover:not(.active) {
    background-color: #f0f0f0;
}

/* 页脚样式 */
footer {
    background-color: #f8f8f8;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
}

.footer-logo {
    width: 25%;
    padding-right: 30px;
}

.footer-logo img {
    height: 25px;
    margin-bottom: 15px;
}

.footer-logo p {
    font-size: 14px;
    color: #777;
    line-height: 1.6;
}

.footer-links {
    width: 75%;
    display: flex;
    justify-content: space-between;
}

.link-column {
    flex: 1;
    padding: 0 15px;
}

.link-column h4 {
    margin-bottom: 20px;
    font-size: 16px;
}

.link-column li {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.link-column a:hover {
    color: #00cc44;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #777;
}

.policy-links a {
    margin-left: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-logo, .footer-links {
        width: 100%;
    }
    
    .footer-logo {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .search-bar {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .slogan {
        justify-content: center;
    }
    
    .promotions {
        flex-direction: column;
    }
    
    .ipad-card, .ipad-card.reverse {
        flex-direction: column;
    }
    
    .ipad-info {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .footer-links {
        flex-wrap: wrap;
    }
    
    .link-column {
        width: 50%;
        margin-bottom: 30px;
    }
    
    .side-nav {
        display: none;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .link-column {
        width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .policy-links {
        margin-top: 15px;
    }
    
    .policy-links a {
        margin: 0 10px;
    }
} 