:root {
    --brand-color: #DD1A32;
    --max-width: 1200px;
    --padding: 15px;
    --transition: all 0.3s ease;
    --border-color: #eee;
    --text-color: #333;
    --text-light: #999;
    --font-size-small: 12px;
    --font-size-base: 14px;
    --font-size-large: 16px;
    --radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    font-size: var(--font-size-base);
}

/* 通用布局容器 */
.search-wrapper,
.nav-wrapper,
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--padding);
}

/* 头部样式 */
header {
    border-bottom: 1px solid var(--border-color);
}

/* 搜索区域样式 */
.search-container {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.search-wrapper {
    display: flex;
    align-items: center;
}

.logo {
    margin-right: 2rem;
    transition: var(--transition);
}

.logo a {
    text-decoration: none;
    color: var(--brand-color);
    font-size: 24px;
    font-weight: bold;
}

.logo:hover {
    opacity: 0.8;
}

.search-box {
    flex: 1;
    max-width: 600px;
}

.search-input-wrapper {
    display: flex;
    border: 2px solid var(--brand-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    outline: none;
    font-size: var(--font-size-base);
    transition: var(--transition);
}

.search-input:focus {
    background: #f9f9f9;
}

.search-btn {
    background: var(--brand-color);
    color: white;
    border: none;
    padding: 0 2rem;
    cursor: pointer;
    font-size: var(--font-size-base);
    transition: var(--transition);
}

.search-btn:hover {
    background: #c41528;
}

.hot-search {
    margin-top: 0.5rem;
    font-size: var(--font-size-small);
}

.hot-search a {
    color: var(--text-light);
    text-decoration: none;
    margin-right: 1rem;
    transition: var(--transition);
}

.hot-search a:hover {
    color: var(--brand-color);
}

.shopping-cart {
    margin-left: 2rem;
}

.cart-btn {
    position: relative;
    display: inline-block;
    padding: 0.625rem;
    text-decoration: none;
    transition: var(--transition);
}

.cart-btn:hover {
    opacity: 0.8;
}

.cart-btn i {
    font-size: 24px;
    color: var(--text-color);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--brand-color);
    color: white;
    font-size: var(--font-size-small);
    padding: 0.125rem 0.375rem;
    border-radius: 0.625rem;
    min-width: 1rem;
    text-align: center;
}

/* 导航栏样式 */
.nav-container {
    border-bottom: 1px solid var(--border-color);
}

.nav-list {
    display: flex;
    list-style: none;
    padding: 1rem 0;
}

.nav-list li {
    margin: 0 1rem;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem 0;
    transition: var(--transition);
    position: relative;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--brand-color);
}

.nav-list a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--brand-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.nav-list a:hover:after,
.nav-list a.active:after {
    transform: scaleX(1);
}

.menu-btn {
    display: none;
    cursor: pointer;
    padding: 1rem;
}

/* 主内容区样式 */
.container {
    max-width: var(--max-width);
    margin: 1.25rem auto;
    padding: 0 var(--padding);
}

/* 轮播图样式 */
.carousel {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 450px;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: #fff;
    transform: scale(1.2);
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.5);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.arrow {
    line-height: 1;
}

/* 下载提示样式 */
.download-tip {
    text-align: center;
    padding: 1rem 0;
}

.download-tip h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.download-tip p {
    font-size: var(--font-size-base);
    color: var(--text-light);
}

/* 新品首发区域 */
.new-products {
    margin: 2rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.header-left h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.subtitle {
    font-size: var(--font-size-base);
    color: var(--text-light);
}

.more-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: var(--font-size-base);
    transition: var(--transition);
}

.more-link:hover {
    color: var(--brand-color);
}

/* 商品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* 商品卡片 */
.product-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    padding-top: 100%; /* 1:1 宽高比 */
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: var(--font-size-base);
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price-info {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.current-price {
    color: var(--brand-color);
    font-size: 1.25rem;
    font-weight: bold;
}

.original-price {
    color: var(--text-light);
    text-decoration: line-through;
    font-size: var(--font-size-small);
}

/* 响应式布局 */
@media screen and (max-width: 48rem) {
    html {
        font-size: 14px;
    }

    /* 导航响应式 */
    .nav-list {
        display: none;
    }
    
    .menu-btn {
        display: block;
    }

    /* 搜索区域响应式 */
    .search-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .logo {
        width: 6.25rem;
        margin: 0 auto 1rem;
    }
    
    .search-box {
        margin-bottom: 1rem;
    }
    
    .shopping-cart {
        margin: 0;
        text-align: center;
    }

    /* 主内容区响应式 */
    .container {
        flex-direction: column;
    }
    
    .category {
        width: 100%;
        margin-bottom: 1.25rem;
    }
    
    .app-download {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .download-info {
        margin: 1.25rem 0 0 0;
    }

    .download-info h2 {
        font-size: 1.5rem;
    }

    .carousel-inner {
        height: 200px;
    }
    
    .carousel-control {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }

    .download-tip h2 {
        font-size: 1.25rem;
    }
    
    .download-tip p {
        font-size: var(--font-size-small);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .header-left h2 {
        font-size: 1.25rem;
    }

    .subtitle {
        display: none;
    }

    .product-title {
        font-size: var(--font-size-small);
    }

    .current-price {
        font-size: 1rem;
    }
} 

/* 人气推荐区域 */
.popular-products {
    margin: 2rem 0;
    padding: 2rem 0;
    background: #f5f5f5;
}

.popular-products .section-header {
    padding: 0 var(--padding);
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-left: 2rem;
}

.tab-btn {
    border: none;
    background: none;
    padding: 0.5rem 1rem;
    font-size: var(--font-size-base);
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.tab-btn.active {
    color: var(--text-color);
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--brand-color);
}

.popular-products .product-grid {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 var(--padding);
    margin-top: 2rem;
}

.popular-products .product-card {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.popular-products .product-image {
    padding-top: 75%; /* 4:3 宽高比 */
}

/* 响应式调整 */
@media screen and (max-width: 48rem) {
    .popular-products {
        margin: 1rem 0;
        padding: 1rem 0;
    }

    .tab-buttons {
        margin-left: 1rem;
    }

    .tab-btn {
        padding: 0.25rem 0.5rem;
        font-size: var(--font-size-small);
    }

    .popular-products .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 1rem;
    }
} 

/* 页脚样式 */
.footer {
    margin-top: 3rem;
    background: #f5f5f5;
}

/* 服务特色 */
.footer-service {
    background: #fff;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.service-wrapper {
    width: 1090px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.service-item {
    display: flex;
    align-items: center;
}

.service-item i {
    font-size: 28px;
    color: #b4a078;
    margin-right: 10px;
}

.service-item span {
    font-size: 16px;
    color: #333;
}

/* 主要链接区域 */
.footer-main {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.footer-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--padding);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.link-group h3 {
    font-size: var(--font-size-large);
    margin-bottom: 1rem;
    color: var(--text-color);
}

.link-group ul {
    list-style: none;
}

.link-group li {
    margin-bottom: 0.5rem;
}

.link-group a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.link-group a:hover {
    color: var(--brand-color);
}

/* 底部版权区域 */
.footer-bottom {
    padding: 1.5rem 0;
    background: #f0f0f0;
}

.bottom-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--text-light);
    font-size: var(--font-size-small);
}

.copyright p {
    margin-bottom: 0.5rem;
}

.friend-links {
    display: flex;
    gap: 1.5rem;
}

.friend-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: var(--font-size-small);
    transition: var(--transition);
}

.friend-links a:hover {
    color: var(--brand-color);
}

/* 响应式调整 */
@media screen and (max-width: 48rem) {
    .service-wrapper {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .service-item {
        width: calc(50% - 0.5rem);
        justify-content: center;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .bottom-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .friend-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
} 