/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 页头样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo h1 {
    font-size: 24px;
    color: #ff6700;
}

.logo p {
    font-size: 14px;
    color: #666;
}

/* 导航栏样式 */
nav {
    background-color: #333;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

/* 面包屑导航 */
.breadcrumb {
    background: #f5f5f5;
    padding: 10px 0;
    margin-bottom: 20px;
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb span {
    color: #ff6700;
}

/* 内容区样式 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 商品详情布局 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* 商品图片展示 */
.product-gallery {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-image {
    margin-bottom: 20px;
}

.main-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.thumbnail-list img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.thumbnail-list img:hover {
    opacity: 0.8;
}

/* 商品信息 */
.product-info {
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.product-info h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.price-box {
    margin-bottom: 20px;
}

.price {
    font-size: 28px;
    color: #ff6700;
    font-weight: bold;
}

.original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.product-meta {
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.product-meta p {
    color: #666;
    margin-bottom: 5px;
}

/* 商品选项 */
.product-options {
    margin-bottom: 30px;
}

.option-group {
    margin-bottom: 20px;
}

.option-group h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.options {
    display: flex;
    gap: 10px;
}

.option {
    position: relative;
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option input {
    position: absolute;
    opacity: 0;
}

.option.active {
    border-color: #ff6700;
    color: #ff6700;
}

/* 购买操作 */
.purchase-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.quantity {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.quantity button {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
}

.quantity input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.btn-buy,
.btn-cart {
    padding: 10px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.btn-buy {
    background: #ff6700;
    color: #fff;
}

.btn-buy:hover {
    background: #f25807;
}

.btn-cart {
    background: #fef0e5;
    color: #ff6700;
}

.btn-cart:hover {
    background: #fde4d0;
}

/* 商品详情内容 */
.product-content {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #eee;
}

.tab-nav a {
    padding: 15px 30px;
    font-size: 16px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-nav a.active {
    color: #ff6700;
    border-bottom-color: #ff6700;
}

.tab-content {
    padding: 30px;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 20px;
}

.feature-item img {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
}

.feature-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-item p {
    color: #666;
}

/* 页脚样式 */
footer {
    background-color: #f5f5f5;
    padding: 40px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-nav {
    margin-bottom: 20px;
}

.copyright {
    color: #666;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    .user-menu {
        margin-top: 10px;
    }

    nav ul {
        flex-direction: column;
    }

    nav li {
        width: 100%;
        text-align: center;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .purchase-actions {
        flex-direction: column;
    }

    .btn-buy,
    .btn-cart {
        width: 100%;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }
} 