/* products_en.css - 英文版产品页面样式 */

/* 页面特有样式 */
.hero-bg {
    background-image: url('../images/productbj.webp');
    background-size: cover;
    background-position: center;
    height: 35vh;
    position: relative;
}

.highlight {
    color: #1e3a8a;
    font-weight: 700;
    font-size: 45px;
}

/* 产品展示区域样式 */
.product-section {
    background: white;
    padding: 60px 0;
}

.product-container {
    display: flex;
    gap: 24px;
}

.category-menu {
    width: 250px;
    flex-shrink: 0;
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1e293b;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.category-item {
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #475569;
}

.category-item:hover, .category-item.active {
    background: #e2e8f0;
    color: #1e40af;
}

.category-item i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

.product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    min-height: 900px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

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

.product-image {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.product-info {
    padding: 16px;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.product-category {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 8px;
}

.search-container {
    margin-bottom: 24px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.5);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 8px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover, .page-btn.active {
    background: #3b82f6;
    color: white;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 移动端分类导航 */
.mobile-category-nav {
    display: none;
    margin-bottom: 16px;
    position: relative;
}

.mobile-category-btn {
    width: 100%;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.mobile-category-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 300px;
    overflow-y: auto;
}

.mobile-category-dropdown.open {
    display: block;
}

.mobile-category-item {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-category-item:last-child {
    border-bottom: none;
}

.mobile-category-item:hover, .mobile-category-item.active {
    background: #e2e8f0;
    color: #1e40af;
}

.mobile-category-item i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 优化顶部背景图高度 */
    .hero-bg {
        height: 40vh !important;
    }
    
    /* 统一标题下方文字字体大小 */
    .hero-bg .text-xl {
        font-size: 1rem !important;
    }
    
    /* 小屏幕产品展示区域 */
    .product-container {
        flex-direction: column;
    }
    .category-menu {
        display: none;
    }
    .mobile-category-nav {
        display: block;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 小屏幕产品卡片文字大小 */
    h4.product-name {
        font-size: 0.9rem;
    }
    p.product-category {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}