/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
}

.nav-menu a:hover {
    color: #ff69b4;
}

/* Banner样式 */
.banner {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.banner-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* 商品展示样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 5%;
}

.product-item {
    text-align: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.product-item h3 {
    margin: 1rem 0;
    font-size: 1.2rem;
}

.price {
    color: #ff69b4;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.buy-btn {
    background-color: #ff69b4;
    color: #fff;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.buy-btn:hover {
    background-color: #ff1493;
}

/* 页脚样式 */
footer {
    background-color: #f8f8f8;
    padding: 2rem 5%;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.social-links img {
    width: 30px;
    margin-right: 1rem;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

/* 商品详情页样式 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem 5%;
}

.product-gallery {
    text-align: center;
}

.main-image {
    width: 100%;
    max-width: 500px;
    margin-bottom: 1rem;
}

.thumbnail-list img {
    width: 80px;
    margin: 0 0.5rem;
    cursor: pointer;
}

.product-info h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.quantity-selector button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
}

.quantity-selector input {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    margin: 0 0.5rem;
}

/* 购物车样式 */
.cart-container {
    padding: 2rem 5%;
}

.cart-item {
    display: grid;
    grid-template-columns: auto 2fr 1fr 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.cart-summary {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-total {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: #ff69b4;
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-top: 1rem;
    cursor: pointer;
}

/* 关于我们页面样式 */
.about-container {
    padding: 2rem 5%;
}

.about-header {
    text-align: center;
    margin-bottom: 3rem;
}

.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: center;
}

.about-section img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.section-text h2 {
    margin-bottom: 1rem;
    color: #333;
}

.section-text p {
    color: #666;
    line-height: 1.8;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-item {
    text-align: center;
    padding: 2rem;
    background: #f8f8f8;
    border-radius: 8px;
    transition: transform 0.3s;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.info-item img {
    width: 50px;
    margin-bottom: 1rem;
}

.info-item h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

/* 商品详情页按钮样式补充 */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.buy-now,
.add-to-cart {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.buy-now {
    background-color: #ff69b4;
    color: #fff;
}

.buy-now:hover {
    background-color: #ff1493;
}

.add-to-cart {
    background-color: #fff;
    color: #ff69b4;
    border: 1px solid #ff69b4;
}

.add-to-cart:hover {
    background-color: #fff5f8;
}

/* 购物车删除按钮样式 */
.remove-btn {
    padding: 0.5rem 1rem;
    background-color: #fff;
    color: #ff4444;
    border: 1px solid #ff4444;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.remove-btn:hover {
    background-color: #ff4444;
    color: #fff;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #f8f8f8;
}

.pagination a.active {
    background-color: #ff69b4;
    color: #fff;
    border-color: #ff69b4;
}

/* 商品选项样式补充 */
.product-options {
    margin: 2rem 0;
}

.product-options select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #333;
}

.price-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 1rem;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .about-section {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }
    
    .cart-item .quantity-selector,
    .cart-item .item-price,
    .cart-item .remove-btn {
        grid-column: 2;
    }
    
    .nav-menu {
        display: none;
    }
}

/* 视频展示区域样式 */
.product-video {
    margin: 2rem 0;
    padding: 2rem;
    background: #f8f8f8;
    border-radius: 8px;
}

.product-video h3 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    height: 0;
    overflow: hidden;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.video-desc {
    text-align: center;
    color: #666;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* 视频播放器控件样式 */
video::-webkit-media-controls {
    background-color: rgba(255, 255, 255, 0.8);
}

video::-webkit-media-controls-play-button {
    background-color: #ff69b4;
    border-radius: 50%;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .product-video {
        padding: 1rem;
    }
}

/* 商品列表页样式优化 */
.products-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    padding: 2rem 5%;
}

.products-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.sort-options select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
}

.filter-sidebar {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tags a {
    padding: 0.5rem 1rem;
    background: #f8f8f8;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.category-tags a.active,
.category-tags a:hover {
    background: #ff69b4;
    color: #fff;
}

.price-slider {
    padding: 0 1rem;
}

.price-slider input[type="range"] {
    width: 100%;
    margin: 1rem 0;
}

.price-range {
    display: flex;
    justify-content: space-between;
    color: #666;
}

.purpose-tags {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.purpose-tags label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    cursor: pointer;
}

.product-item {
    position: relative;
}

.product-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ff69b4;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.sales {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* 响应式优化 */
@media (max-width: 992px) {
    .products-container {
        grid-template-columns: 1fr;
    }
    
    .filter-sidebar {
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
    }
}

/* 商品网格布局优化 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.product-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.product-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 1rem;
}

.price-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price {
    color: #ff69b4;
    font-size: 1.3rem;
    font-weight: bold;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.delivery {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.product-btns {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cart-btn,
.buy-btn {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.cart-btn {
    background: #fff;
    color: #ff69b4;
    border: 1px solid #ff69b4;
}

.cart-btn:hover {
    background: #fff5f8;
}

.buy-btn {
    background: #ff69b4;
    color: #fff;
}

.buy-btn:hover {
    background: #ff1493;
}

/* 响应式优化补充 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }
    
    .product-item img {
        height: 220px;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-btns {
        flex-direction: column;
    }
}

/* 首页布局优化 */
.hot-products,
.new-arrivals {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1rem;
}

.hot-products {
    padding-bottom: 2rem;
}

/* 首页标题样式优化 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #ff69b4, #ff1493);
    border-radius: 3px;
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
    padding-left: 1.8rem;
}

.title-wrapper h2 {
    font-size: 1.6rem;
    color: #333;
    position: relative;
    display: inline-block;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.title-wrapper h2::before {
    content: '❀';
    color: #ff69b4;
    position: absolute;
    left: -1.8rem;
    top: 50%;
    transform: translateY(-50%);
    animation: floatFlower 2s ease-in-out infinite;
    font-size: 1rem;
}

.subtitle {
    color: #666;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.03em;
}

.view-more {
    color: #ff69b4;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 20px;
}

.view-more:hover {
    border-color: #ff69b4;
    background: #fff5f8;
}

.view-more .arrow {
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.view-more:hover .arrow {
    transform: translateX(5px);
}

@keyframes floatFlower {
    0%, 100% {
        transform: translateY(-50%);
    }
    50% {
        transform: translateY(-60%);
    }
}

/* 响应式适配优化 */
@media (max-width: 768px) {
    .hot-products,
    .new-arrivals {
        padding: 3rem 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        margin-bottom: 2rem;
    }
    
    .title-wrapper h2 {
        font-size: 1.4rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .view-more {
        margin-top: 0.5rem;
        padding: 0.4rem 0.8rem;
    }
}