/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 30px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.nav-left {
    flex: 1;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-divider {
    color: #ccc;
    margin: 0 8px;
    font-size: 14px;
}

.nav-link:hover {
    color: #4285f4;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-select {
    padding: 8px 12px;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.lang-select:hover {
    border-color: #bbb;
}

.lang-select:focus {
    border-color: #4285f4;
}

/* 首页主体 */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 120px;
}

.search-section {
    text-align: center;
    width: 100%;
    max-width: 660px;
}

.logo-area {
    margin-bottom: 35px;
}

.logo {
    width: 280px;
    height: auto;
}

.search-box {
    display: flex;
    max-width: 640px;
    margin: 0 auto;
    border: 1px solid #b8b8b8;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.search-box:focus-within {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-color: #4d90fe;
}

.search-input {
    flex: 1;
    padding: 13px 15px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-btn {
    padding: 0 30px;
    background: #4d90fe;
    color: white;
    border: none;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #357ae8;
}

.help-link {
    margin-top: 20px;
}

.help {
    color: #666;
    text-decoration: none;
    font-size: 13px;
}

.help:hover {
    text-decoration: underline;
}

/* 搜索结果页搜索栏 */
.search-bar {
    background: #f8f9fa;
    padding: 15px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.search-container {
    display: flex;
    max-width: 650px;
    margin: 0 auto;
}

.search-input-top {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input-top:focus {
    border-color: #4285f4;
}

.search-btn-top {
    padding: 12px 24px;
    margin-left: 10px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn-top:hover {
    background: #3367d6;
}

/* Tab导航 */
.tab-container {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 30px;
}

.tabs {
    display: flex;
    gap: 5px;
    max-width: 1200px;
    margin: 0 auto;
}

.tab {
    padding: 14px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    color: #333;
}

.tab.active {
    color: #4285f4;
    border-bottom-color: #4285f4;
}

/* 商品展示区 */
.products-section {
    flex: 1;
    padding: 30px;
    background: #f8f9fa;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #f44;
}

.product-brief {
    font-size: 12px;
    color: #999;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px 120px;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    position: relative;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
}

/* 图片轮播 */
.carousel-container {
    position: relative;
    width: 100%;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #f8f9fa;
}

.carousel {
    position: relative;
    width: 100%;
    height: 400px;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease;
}

.carousel-track img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-btn:hover {
    background: #fff;
}

.carousel-btn.prev {
    left: 15px;
}

.carousel-btn.next {
    right: 15px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-dots .dot.active {
    background: #4285f4;
}

/* 商品详情信息 */
.product-detail-info {
    padding: 25px;
}

.product-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.product-price {
    font-size: 28px;
    font-weight: 700;
    color: #f44;
    margin-bottom: 15px;
}

.product-brief {
    font-size: 14px;
    color: #666;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
}

.product-description {
    margin-bottom: 20px;
}

.product-description h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.product-description p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.product-specs {
    list-style: none;
    padding: 0;
}

.product-specs li {
    padding: 8px 0;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.product-specs li:last-child {
    border-bottom: none;
}

.product-specs strong {
    color: #333;
    font-weight: 500;
    display: inline-block;
    width: 70px;
}

/* 底部购买按钮 */
.buy-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 15px 30px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    z-index: 1001;
}

.buy-btn {
    width: 100%;
    max-width: 660px;
    padding: 14px;
    background: #f44;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.buy-btn:hover {
    background: #dd3333;
}

/* 底部信息 */
.footer {
    background: #f8f9fa;
    padding: 25px 30px;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #4285f4;
}

.icp {
    font-size: 12px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 12px 15px;
    }
    
    .logo {
        width: 200px;
    }
    
    .search-box {
        border-radius: 20px;
    }
    
    .search-input {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .search-btn {
        padding: 8px 16px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .carousel {
        height: 280px;
    }
    
    .modal.show {
        padding: 20px 10px 100px;
    }
    
    .product-detail-info {
        padding: 15px;
    }
    
    .product-title {
        font-size: 18px;
    }
    
    .product-price {
        font-size: 22px;
    }
}

/* 多语言提示样式 */
.lang-notice {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s;
}

.lang-notice.show {
    opacity: 1;
}
