/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 客服按钮样式 */
.service-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FBAF34 0%, #FF9E42 100%);
    color: white;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
}

.service-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(251,175,52,0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .service-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .service-btn {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 顶部搜索栏样式 */
header {
    background: linear-gradient(135deg, #FBAF34 0%, #FF9E42 100%);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.logo-container {
}

.logo {
    height: 44px;
    width: auto;
    border-radius: 8px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px 0 0 25px;
    font-size: 16px;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) inset;
}

.search-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #FD0001 0%, #FF6666 100%);
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #FF6666 0%, #FD0001 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(253,0,1,0.3);
}

.publish-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #FBAF34 0%, #FF9E42 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.publish-btn:hover {
    background: linear-gradient(135deg, #FF9E42 0%, #FBAF34 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(251,175,52,0.3);
}

/* 瀑布流容器样式 */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.masonry-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* 商品卡片样式 */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image-container {
    overflow: hidden;
    position: relative;
}

.product-tags {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.tag.wechat {
    background-color: #07C160;
}

.tag.qq {
    background-color: #12B7F5;
}

.product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #ff6b6b;
    margin: 5px 0;
}

.buy-btn {
    margin-top: auto;
    padding: 12px;
    background: linear-gradient(135deg, #FBAF34 0%, #FF9E42 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    background: linear-gradient(135deg, #FF9E42 0%, #FBAF34 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(251,175,52,0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .masonry-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .search-container {
        flex-direction: row;
        gap: 0;
        padding: 0 15px;
        align-items: center;
    }
    
    .logo-container {

    }
    
    .logo {
        height: 40px;
    }
    
    .search-input {
        border-radius: 25px 0 0 25px;
        font-size: 14px;
        padding: 10px 16px;
        flex: 1;
    }
    
    .search-btn {
        border-radius: 0 25px 25px 0;
        width: auto;
        font-size: 14px;
        padding: 10px 15px;
        flex-shrink: 0;
        margin-right: 8px;
    }
    
    .publish-btn {
        padding: 10px 15px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-name {
        font-size: 13px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .buy-btn {
        font-size: 13px;
        padding: 10px;
    }
    
    .product-info {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .masonry-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px 0;
    }
    
    header {
        padding: 12px 0;
    }
    
    main {
        margin: 15px auto;
        padding: 0 15px;
    }
    
    .logo-container {
        margin-top:5px;
    }
    
    .logo {
        height: 44px;
    }
    
    .search-input {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .search-btn {
        padding: 12px 15px;
        font-size: 14px;
        margin-right: 6px;
    }
    
    .publish-btn {
        padding: 12px 12px;
        font-size: 13px;
    }
    
    .product-image {
        height: 130px;
    }
    
    .product-name {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .product-price {
        font-size: 15px;
        margin: 8px 0;
    }
    
    .buy-btn {
        font-size: 12px;
        padding: 8px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    /* 优化触摸交互 */
    .buy-btn {
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .search-btn {
        min-height: 44px;
    }
    
    .search-input {
        min-height: 44px;
    }
}