/* 二手车列表页面样式 */
.used-car-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.used-car-main {
    display: flex;
    gap: 20px;
}

/* 筛选栏 */
.filter-bar {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.filter-item select, .filter-item input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 80px;
}

.search-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

/* 车辆网格布局 */
.cars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 车辆卡片样式 */
.car-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.car-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.car-card:hover .car-img {
    transform: scale(1.05);
}

.car-info {
    padding: 20px;
}

.car-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.car-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.car-details span {
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.car-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
}

.contact-btn {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.contact-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* 车辆标签 */
.car-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

.car-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.car-tag.hot {
    background: #ff4757;
    color: white;
}

.car-tag.new {
    background: #2ed573;
    color: white;
}

.car-tag.discount {
    background: #ff9f43;
    color: white;
}

/* 无车辆提示 */
.no-cars {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    grid-column: 1 / -1;
}

.no-cars p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

.publish-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #e74c3c;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.publish-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* 分页样式已统一到模板文件中 */

.page-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.page-btn.active {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
}

.sidebar-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f1f1f1;
    color: #333;
}

/* 热门推荐 */
.hot-car {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f1f1;
}

.hot-car:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.hot-car-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.hot-car-info {
    flex: 1;
}

.hot-car-name {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.3;
}

.hot-car-price {
    font-size: 14px;
    color: #e74c3c;
    font-weight: bold;
}

/* 热门推荐链接间距 */
.hot-car-link {
    display: block;
    margin-bottom: 15px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.hot-car-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.hot-car-link:last-child {
    margin-bottom: 0;
}

/* 广告位 */
.ad {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.ad-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.ad-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 10px;
    color: white;
}

.ad-title {
    font-size: 15px;
    font-weight: 600;
}

/* 服务 */
.services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.service-item:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.service-icon {
    font-size: 20px;
    color: #e74c3c;
    margin-bottom: 5px;
}

.service-name {
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .used-car-main {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .cars-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 600px) {
    .filter-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cars-grid {
        grid-template-columns: 1fr;
    }
    
    .car-img {
        height: 180px;
    }
    
    .hot-car {
        flex-direction: column;
        text-align: center;
    }
    
    .hot-car-img {
        width: 100%;
        height: 120px;
    }
    
    .services {
        grid-template-columns: 1fr;
    }
}



/* 面包屑导航 - 增强版 */
.breadcrumb {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    color: #0073aa;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 4px;
    background: rgba(0, 115, 170, 0.1);
    font-weight: 500;
}

.breadcrumb a:hover {
    color: #ffffff;
    background: #0073aa;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.breadcrumb span {
    color: #6c757d;
    font-weight: 500;
}

.breadcrumb .current {
    color: #495057;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(108, 117, 125, 0.1);
    border-radius: 4px;
}

/* 面包屑分隔符 */
.breadcrumb .separator {
    color: #adb5bd;
    margin: 0 5px;
    font-weight: normal;
}

/* 二手车详情页布局 */
.used-car-single-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

.car-main-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.car-sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* 猜你喜欢推荐 */
.recommended-cars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommended-car-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.recommended-car-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.recommended-car {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.recommended-car:hover {
    background: #e9ecef;
}

.recommended-car-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.recommended-car-placeholder {
    width: 80px;
    height: 60px;
    background: #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    flex-shrink: 0;
}

.recommended-car-info {
    flex: 1;
    min-width: 0;
}

.recommended-car-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommended-car-details {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.recommended-car-details span {
    font-size: 12px;
    color: #666;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
}

.recommended-car-price {
    font-size: 16px;
    font-weight: bold;
    color: #e74c3c;
}

.no-recommendations {
    text-align: center;
    color: #666;
    font-size: 14px;
    padding: 20px 0;
}

/* 响应式设计 */
@media (max-width: 900px) {
    .used-car-single-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .car-sidebar {
        position: static;
        /*  order: -1;  移除*/ 
    }
}

@media (max-width: 600px) {
    .recommended-car {
        flex-direction: column;
        text-align: center;
    }
    
    .recommended-car-img,
    .recommended-car-placeholder {
        width: 100%;
        height: 100px;
    }
}

/* 二手车详情页标题居中 */
.car-title-center {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

/* 元数据在同一行显示 */
.car-meta {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.meta-item-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.meta-item-inline .label {
    font-weight: 500;
    color: #333;
}

.meta-item-inline .value {
    color: #666;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .car-meta {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .meta-item-inline {
        justify-content: center;
    }
}

/* 置顶和标红样式 */
.sticky-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.highlight-title {
    color: #e74c3c !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.highlight-title:hover {
    color: #c0392b !important;
    text-decoration: underline !important;
}
/* 在响应式区域添加 */
@media (max-width: 768px) {
    /* 图片查看器打开时隐藏猜你喜欢 */
    body.car-gallery-open .recommended-cars {
        display: none !important;
    }
}