/* ========== 主页样式文件 index.css ========== */

/* ========== Banner区域 ========== */

.banner {
    position: relative;
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    padding: 100px 0;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 1;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner .desc {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* ========== Banner搜索框 ========== */

.banner-search {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 50px;
    padding: 5px;
    display: flex;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.banner-search form {
    display: flex;
    width: 100%;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
}

.search-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #1E88E5 0%, #1565C0 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
}

/* ========== 优质供应商 ========== */

.hot-suppliers {
    padding: 40px 0;
    background-color: #fff;
}

.hot-suppliers h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.hot-suppliers h2 span {
    color: #1E88E5;
}

.supplier-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.supplier-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.supplier-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.supplier-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.supplier-item .info {
    padding: 15px;
}

.supplier-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.supplier-item .phone {
    font-size: 14px;
    color: #1E88E5;
    margin-bottom: 5px;
}

.supplier-item .address {
    font-size: 13px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== 设备分类导航 ========== */

.category-nav {
    padding: 30px 0;
    background-color: #f5f5f5;
}

.category-nav h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.category-item {
    background-color: #fff;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-item:hover {
    border-color: #1E88E5;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.2);
}

.category-item a {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    display: block;
}

.category-item:hover a {
    color: #1E88E5;
}

/* ========== 轮播广告 ========== */

/* ========== 横幅广告 ========== */

.ad-section {
    padding: 20px 0;
}

.ad-section .ad-banner {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ad-section .ad-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== 轮播广告 ========== */

.slider-section {
    padding: 30px 0;
}

.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
}

.slider-item {
    flex-shrink: 0;
    width: calc(100% / 3);
    padding: 0 10px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.slider-item:nth-child(3n+1) {
    transform: scale(1);
}

.slider-item:nth-child(3n+2) {
    transform: scale(1.15);
    z-index: 10;
}

.slider-item:nth-child(3n+3) {
    transform: scale(1);
}

.slider-item a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.slider-item:nth-child(3n+2) a {
    box-shadow: 0 8px 24px rgba(30, 136, 229, 0.3);
}

.slider-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.slider-item:nth-child(3n+2) img {
    height: 260px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-btn:hover {
    background-color: #1E88E5;
    color: #fff;
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* ========== 分类企业区块 ========== */

.category-section {
    padding: 40px 0;
    background-color: #fff;
}

.category-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.category-section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.category-section-header h2 span {
    color: #1E88E5;
}

.category-section-header .more {
    color: #1E88E5;
    font-size: 14px;
    transition: all 0.3s ease;
}

.category-section-header .more:hover {
    color: #1565C0;
}

.category-section-header .more i {
    margin-left: 5px;
}

/* ========== 横幅广告 ========== */

.section-banner {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.section-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== 企业网格 ========== */

.company-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.company-card {
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.company-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: #1E88E5;
}

.company-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.company-card:hover img {
    transform: scale(1.1);
}

.company-card .info {
    padding: 12px;
}

.company-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    max-height: 42px;
}

.company-card .tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #1E88E5;
    color: #fff;
    font-size: 11px;
    border-radius: 2px;
    margin-bottom: 8px;
}

.company-card .detail {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.company-card .detail i {
    margin-right: 4px;
    color: #1E88E5;
    font-size: 12px;
}

.company-card .hot {
    display: flex;
    align-items: center;
    color: #F44336;
    font-size: 14px;
}

.company-card .hot img {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.company-card .btn-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.company-card .btn {
    flex: 1;
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.company-card .btn-primary {
    background-color: #1E88E5;
    color: #fff;
}

.company-card .btn-primary:hover {
    background-color: #1565C0;
}

.company-card .btn-outline {
    border: 1px solid #1E88E5;
    color: #1E88E5;
}

.company-card .btn-outline:hover {
    background-color: #1E88E5;
    color: #fff;
}

/* ========== 新闻资讯区块 ========== */

.news-section {
    padding: 50px 0;
    background-color: #f5f5f5;
}

.news-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-column {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-column h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1E88E5;
    padding-bottom: 10px;
    border-bottom: 2px solid #1E88E5;
}

.news-list {
    list-style: none;
}

.news-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list .number {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background-color: #1E88E5;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    margin-right: 10px;
    vertical-align: middle;
}

.news-list a {
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    max-width: calc(100% - 40px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.news-list a:hover {
    color: #1E88E5;
    padding-left: 5px;
}

/* ========== 主页样式结束 ========== */