/* ========================================
   经销商页样式
   ======================================== */

/* 经销商页顶部区域 */
.dealer-hero {
    width: 100%;
    height: 600px;
    background-image: url('../img/wqddd.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dealer-hero-content {
    max-width: 1440px;
    width: 100%;
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.dealer-hero-title {
    font-size: 60px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    margin: 0;
}

/* 经销商列表区域 */
.dealer-stores {
    background-color: #F5F5F5;
    padding: 80px 30px;
    display: flex;
    justify-content: center;
}

.dealer-container {
    max-width: 1440px;
    width: 100%;
}

/* 筛选栏 */
.dealer-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    align-items: center;
}

/* 筛选下拉框 */
.dealer-filter-dropdown {
    position: relative;
}

.dealer-filter-box {
    min-width: 200px;
    height: 48px;
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    border-radius: 6px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dealer-filter-box:hover {
    border-color: #999999;
}

.dealer-filter-box.active {
    border-color: #4B1C87;
}

.dealer-filter-text {
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    flex: 1;
}

.dealer-filter-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.dealer-filter-box.active .dealer-filter-arrow {
    transform: rotate(180deg);
}

/* 筛选下拉菜单 */
.dealer-filter-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #FFFFFF;
    border: 1px solid #D9D9D9;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}

.dealer-filter-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dealer-filter-item {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dealer-filter-item:hover {
    background: #F5F5F5;
    color: #4B1C87;
}

.dealer-filter-item:first-child {
    border-radius: 6px 6px 0 0;
}

.dealer-filter-item:last-child {
    border-radius: 0 0 6px 6px;
}

/* 经销商网格 */
.dealer-stores-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}

/* 经销商卡片 */
.dealer-store-card {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    aspect-ratio: 1 / 1; /* 保持正方形 */
}

.dealer-store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(75, 28, 135, 0.3);
}

/* 经销商图片 */
.dealer-store-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: #FFFFFF;
}

.dealer-store-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 经销商详细信息 */
.dealer-store-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
}

.dealer-store-card:hover .dealer-store-info {
    opacity: 1;
    visibility: visible;
}

/* 经销商名称 */
.dealer-store-name {
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 12px 0;
    text-align: center;
    line-height: 1.4;
}

/* 经销商详细信息容器 */
.dealer-store-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
}

/* 单个详细信息项 */
.dealer-store-detail {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 11px;
    color: #666666;
    line-height: 1.4;
}

.dealer-store-detail svg {
    flex-shrink: 0;
    margin-top: 2px;
    width: 14px;
    height: 14px;
}

.dealer-store-detail span,
.dealer-store-detail a {
    word-break: break-word;
    flex: 1;
}

.dealer-store-detail a {
    color: #666666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.dealer-store-detail a:hover {
    color: #4B1C87;
}

/* 没有经销商时的提示 */
.dealer-no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #999999;
}

/* ========================================
   响应式设计 - 平板和移动端
   ======================================== */

/* 平板端 (1024px 及以下) */
@media (max-width: 1024px) {
    .dealer-stores-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* 平板端 (768px 及以下) */
@media (max-width: 768px) {
    /* 顶部区域 */
    .dealer-hero {
        height: 128px;
        align-items: center;
        justify-content: center;
        padding-top: 0;
    }
    
    .dealer-hero-title {
        font-size: 20px;
        font-weight: 700;
    }
    
    /* 经销商列表 */
    .dealer-stores {
        padding: 40px 20px;
    }
    
    /* 筛选栏 */
    .dealer-filters {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .dealer-filter-dropdown {
        width: 100%;
    }
    
    .dealer-filter-box {
        width: 100%;
        min-width: auto;
    }
    
    /* 网格改为2列 */
    .dealer-stores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* 移动端：详细信息始终显示（不需要悬浮） */
    .dealer-store-info {
        position: static;
        opacity: 1;
        visibility: visible;
        background: transparent;
        padding: 15px;
    }
    
    .dealer-store-name {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .dealer-store-detail {
        font-size: 12px;
        gap: 6px;
    }
    
    .dealer-store-detail svg {
        width: 14px;
        height: 14px;
    }
}

/* 手机端 (480px 及以下) */
@media (max-width: 480px) {
    /* 顶部区域 */
    .dealer-hero {
        height: 128px;
    }
    
    .dealer-hero-title {
        font-size: 20px;
        font-weight: 700;
    }
    
    /* 经销商列表 */
    .dealer-stores {
        padding: 30px 15px;
    }
    
    /* 网格保持2列 */
    .dealer-stores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* 卡片信息更紧凑 */
    .dealer-store-info {
        padding: 10px;
    }
    
    .dealer-store-name {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .dealer-store-detail {
        font-size: 11px;
        gap: 5px;
    }
}

