/* ============================================
   完整样式表 - 电子元器件外贸网站
   包含三级菜单字体缩小、不加粗优化
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: #f5f7fa;
    color: #1e2a3a;
    line-height: 1.5;
}
:root {
    --primary-dark: #0a2540;
    --primary-blue: #0055a5;
    --accent: #f0b90b;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-header {
    background: var(--primary-dark);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
}
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}
.nav-links a:hover {
    color: var(--accent);
}
.compare-nav-item {
    margin-left: 0.5rem;
}
.compare-link {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #1e2a3a !important;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    gap: 6px;
}
.compare-link:hover {
    background: #e0a800;
}
.compare-count {
    background: #1e2a3a;
    color: white;
    border-radius: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    min-width: 22px;
    text-align: center;
}
/* 一级菜单 */
.dropdown {
    position: relative;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #0a2540;
    min-width: 220px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.3);
    z-index: 1000;
    border-radius: 6px;
    list-style: none;
    padding: 0;
    top: 100%;
    left: 0;
}
.dropdown:hover > .dropdown-content {
    display: block;
}
.dropdown-content li {
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dropdown-content li:last-child {
    border-bottom: none;
}
.dropdown-content > li > a {
    display: block;
    padding: 12px 18px;
    color: white;
    text-decoration: none;
    font-weight: 500;
}
.dropdown-content > li > a:hover {
    background-color: #0055a5;
    padding-left: 24px;
}
/* 二级及以上菜单容器 */
.dropdown-content .dropdown-content {
    top: 0;
    left: 100%;
    margin-left: 0;
    min-width: 200px;
}
/* 带子菜单的父项箭头 */
.dropdown-content li:has(> .dropdown-content) > a::after {
    content: " ▶";
    font-size: 0.8rem;
    float: right;
}
/* 二级、三级菜单链接样式：缩小、不加粗 */
.dropdown-content .dropdown-content a,
.dropdown-content .submenu a {
    font-size: 0.85rem !important;
    font-weight: normal !important;
}
.dropdown-content .dropdown-content .dropdown-content a {
    font-size: 0.8rem !important;
}
/* 悬停显示子菜单 */
.dropdown-content li:hover > .dropdown-content {
    display: block;
}
/* 移动端 */
.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }
    .nav-links.active {
        display: flex;
    }
    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: #1e3a5f;
        display: none;
        width: 100%;
    }
    .dropdown.open > .dropdown-content {
        display: block;
    }
    .dropdown-content .dropdown-content {
        left: 0;
        margin-left: 1rem;
        background-color: #2a4a6f;
    }
    .dropdown-content li:has(> .dropdown-content) > a::after {
        float: none;
        margin-left: 8px;
    }
    .compare-nav-item {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}
/* 其他常用样式 */
.btn {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
}
.btn-accent {
    background: var(--accent);
    color: #1e2a3a;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}
.product-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.product-img {
    height: 160px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 8px;
}
.product-model {
    font-weight: 700;
    font-size: 1.1rem;
}

 
/* ========== 品牌展示区（推荐品牌） ========== */
.brands-section {
    margin: 3rem 0;
}
.brands-header {
    text-align: center;
    margin-bottom: 2rem;
}
.brands-header h2 {
    font-size: 2rem;
    color: #1e2a3a;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}
.brands-header h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 3px;
    background: #f0b90b;
    border-radius: 2px;
}
.brands-header p {
    color: #4a5b6e;
    margin-top: 0.5rem;
}
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}
.brand-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f6;
    display: block;
}
.brand-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.12);
    border-color: #f0b90b;
}
.brand-logo-wrapper {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.brand-logo {
    max-height: 70px;
    max-width: 120px;
    object-fit: contain;
    transition: transform 0.2s;
}
.brand-card:hover .brand-logo {
    transform: scale(1.02);
}
.brand-placeholder {
    font-size: 3rem;
    color: #cbd5e0;
}
.brand-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1e2a3a;
    margin-top: 0.5rem;
    letter-spacing: -0.3px;
}
.brand-card:hover .brand-name {
    color: #f0b90b;
}
@media (max-width: 768px) {
    .brands-grid {
        gap: 1rem;
    }
    .brand-card {
        padding: 1rem;
    }
    .brand-logo-wrapper {
        height: 60px;
    }
    .brand-name {
        font-size: 0.95rem;
    }
}

/* ========== 新闻列表样式（一行一条） ========== */
.news-list {
    margin: 2rem 0;
}
.news-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s;
}
.news-item:hover {
    background-color: #fafbfc;
    padding-left: 0.5rem;
}
.news-item-date {
    flex-shrink: 0;
    width: 80px;
    font-weight: 600;
    color: #f0b90b;
    font-size: 0.9rem;
}
.news-item-content {
    flex: 1;
}
.news-item-content h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.2rem;
}
.news-item-content h3 a {
    color: #0a2540;
    text-decoration: none;
}
.news-item-content h3 a:hover {
    color: #0055a5;
    text-decoration: underline;
}
.news-item-content p {
    margin: 0;
    color: #4a5b6e;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem 0;
    }
    .news-item-date {
        width: auto;
        font-size: 0.8rem;
    }
    .news-item-content h3 {
        font-size: 1rem;
    }
}



/* ========== 新闻列表样式（首页和新闻页） ========== */
.news-list {
    margin: 2rem 0;
}
.news-item {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 0;
    transition: background 0.2s;
}
.news-item:first-child {
    padding-top: 0;
}
.news-item-meta {
    margin-bottom: 0.5rem;
}
.news-date {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.news-item-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.3rem;
}
.news-item-title a {
    color: #1e2a3a;
    text-decoration: none;
    transition: color 0.2s;
}
.news-item-title a:hover {
    color: #f0b90b;
}
.news-item-summary {
    color: #4a5b6e;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}
.news-read-more {
    color: #0055a5;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}
.news-read-more:hover {
    text-decoration: underline;
}
.news-subtitle {
    color: #4a5b6e;
    margin-bottom: 2rem;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}
.pagination-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-decoration: none;
    color: #1e2a3a;
    transition: all 0.2s;
}
.pagination-link:hover,
.pagination-link.active {
    background: #f0b90b;
    color: #1e2a3a;
}

@media (max-width: 768px) {
    .news-item-title {
        font-size: 1.1rem;
    }
    .news-item-summary {
        font-size: 0.9rem;
    }
}


/* ========== 新闻列表样式（优化标题与简介分行） ========== */
.news-list {
    margin: 2rem 0;
}
.news-item {
    border-bottom: 1px solid #eef2f6;
    padding: 2rem 0;
    transition: background 0.2s;
}
.news-item:first-child {
    padding-top: 0;
}
.news-item-meta {
    margin-bottom: 0.75rem;
}
.news-date {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.news-item-title {
    margin: 0 0 0.8rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}
.news-item-title a {
    color: #1e2a3a;
    text-decoration: none;
    transition: color 0.2s;
}
.news-item-title a:hover {
    color: #f0b90b;
}
.news-item-summary {
    color: #4a5b6e;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}
.news-read-more {
    color: #0055a5;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-block;
    transition: all 0.2s;
}
.news-read-more:hover {
    text-decoration: underline;
    transform: translateX(2px);
}
.news-subtitle {
    color: #4a5b6e;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}
.pagination-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-decoration: none;
    color: #1e2a3a;
    transition: all 0.2s;
}
.pagination-link:hover,
.pagination-link.active {
    background: #f0b90b;
    color: #1e2a3a;
}

@media (max-width: 768px) {
    .news-item {
        padding: 1.5rem 0;
    }
    .news-item-title {
        font-size: 1.2rem;
    }
    .news-item-summary {
        font-size: 0.9rem;
    }
}

/* 分页美化 - 现代化卡片风格 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.8rem;
    height: 2.8rem;
    padding: 0 0.8rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 500;
    color: #1e2a3a;
    transition: all 0.2s ease;
}
.pagination a:hover {
    background: #f0b90b;
    border-color: #f0b90b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(240,185,11,0.2);
}
.pagination .active {
    background: #f0b90b;
    border-color: #f0b90b;
    color: #1e2a3a;
    cursor: default;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.captcha-wrapper input {
    flex: 1;
    min-width: 120px;
    padding: 0.6rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
}
.captcha-wrapper img {
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #ddd;
}
.captcha-refresh {
    font-size: 0.85rem;
    color: #0055a5;
    cursor: pointer;
    text-decoration: underline;
}




/* Logo 通用样式 */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}
.logo-tagline {
    font-size: 0.7rem;
    font-weight: 400;
    color: #F0B90B;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}
/* 移动端适配 */
@media (max-width: 768px) {
    .logo-brand {
        font-size: 1.1rem;
    }
    .logo-tagline {
        font-size: 0.55rem;
        letter-spacing: 1.2px;
    }
    .logo-link {
        gap: 8px;
    }
}
/* ========== 搜索框完整样式（紧凑版） ========== */
.search-nav-item {
    margin-left: 0.8rem;
    display: flex;
    align-items: center;
}
.search-form {
    display: flex;
    align-items: center;
}
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: #f0b90b;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.2);
}
.search-input {
    background: transparent;
    border: none;
    padding: 0.3rem 0.6rem 0.3rem 1rem;
    font-size: 0.8rem;
    color: #ffffff;
    outline: none;
    width: 130px;
    transition: width 0.3s ease;
    border-radius: 30px 0 0 30px;
}
.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}
.search-input:focus {
    width: 180px;
}
.search-btn {
    background: #f0b90b;
    border: none;
    border-radius: 30px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 3px;
    color: #1e2a3a;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.search-btn:hover {
    background: #e0a800;
    transform: scale(1.02);
}
.search-icon {
    font-size: 0.85rem;
    line-height: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .search-nav-item {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }
    .search-wrapper {
        width: 100%;
        background: rgba(255, 255, 255, 0.15);
    }
    .search-input {
        flex: 1;
        width: auto;
        padding: 0.35rem 0.6rem 0.35rem 1rem;
    }
    .search-input:focus {
        width: auto;
    }
    .search-btn {
        width: 36px;
        height: 36px;
        margin-right: 4px;
    }
}
/* 其他样式... */
/* 其余样式保持不变... 为节省篇幅，此处省略重复部分，实际使用时请确保包含所有原有样式 */
