/* 巴士详情页面整体样式 */
.bus-detail-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 页面标题样式 */
.bus-detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.bus-detail-header h2 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    color: #333;
    font-weight: 700;
}

.bus-meta {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
    color: #666;
    flex-wrap: wrap;
}

.bus-meta span {
    display: inline-flex;
    align-items: center;
}

.bus-meta span::after {
    content: '•';
    margin-left: 20px;
    color: #ccc;
}

.bus-meta span:last-child::after {
    content: '';
    margin-left: 0;
}

/* 主内容区布局 */
.bus-detail-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* 图片画廊样式 */
.bus-image-gallery {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.main-image {
    width: 100%;
    height: auto;
    min-height: 400px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.main-image img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.main-image:hover img {
    transform: scale(1.02);
}

/* 缩略图样式 */
.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #ddd #f0f0f0;
}

.thumbnails::-webkit-scrollbar {
    height: 6px;
}

.thumbnails::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.thumbnails::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    background-color: #fff;
}

.thumbnail:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.thumbnail.active {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.thumbnail:hover img {
    transform: scale(1.1);
}

/* 基本信息样式 */
.bus-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bus-info h3 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}

.bus-specs {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bus-specs tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.bus-specs tr:hover {
    background-color: #f8f9fa;
}

.bus-specs tr:last-child {
    border-bottom: none;
}

.bus-specs th {
    text-align: left;
    padding: 15px 20px;
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    width: 150px;
    font-size: 0.95rem;
    vertical-align: top;
}

.bus-specs td {
    padding: 15px 20px;
    color: #333;
    font-size: 0.95rem;
    vertical-align: top;
}

.bus-specs td img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 10px;
}

/* 技术参数样式 */
.bus-technical-specs {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bus-technical-specs h3 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}

.technical-specs-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0;
}

.spec-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    flex-wrap: wrap;
}

.spec-item {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    min-width: 250px;
    flex: 1;
}

.spec-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.spec-item.full-width {
    grid-column: 1 / -1;
}

.spec-item label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
    display: block;
}

.spec-value {
    font-size: 1rem;
    color: #333;
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

/* 相关巴士档案样式 */
.related-buses {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.related-buses h3 {
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}

.related-buses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.related-bus-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.related-bus-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.related-bus-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
}

.related-bus-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-bus-item:hover .related-bus-image img {
    transform: scale(1.05);
}

.related-bus-info {
    padding: 15px;
}

.related-bus-info h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.related-bus-info h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-bus-info h4 a:hover {
    color: #3498db;
}

.related-bus-type {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

/* 默认图片占位符 */
.default-image-placeholder {
    width: 100%;
    height: 400px;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 18px;
    border-radius: 8px;
}

.default-image-placeholder i {
    font-size: 64px;
    margin-bottom: 16px;
    color: #ccc;
}

.default-image-placeholder p {
    margin: 0;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .bus-detail-page {
        padding: 15px;
    }
    
    .bus-detail-header h2 {
        font-size: 1.5rem;
    }
    
    .bus-meta {
        font-size: 0.9rem;
        gap: 15px;
    }
    
    .bus-meta span::after {
        margin-left: 15px;
    }
    
    .bus-specs th {
        width: 120px;
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .bus-specs td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .related-buses-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .spec-row {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .bus-detail-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .bus-detail-header h2 {
        font-size: 1.3rem;
    }
    
    .bus-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .bus-meta span {
        padding: 5px 0;
        border-bottom: 1px dashed #e0e0e0;
    }
    
    .bus-meta span:last-child {
        border-bottom: none;
    }
    
    .bus-meta span::after {
        content: '';
        margin-left: 0;
    }
    
    .bus-detail-content {
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .bus-image-gallery,
    .bus-info,
    .bus-technical-specs,
    .related-buses {
        padding: 15px;
    }
    
    .main-image {
        min-height: 300px;
    }
    
    .main-image img {
        max-height: 400px;
    }
    
    .thumbnail {
        width: 100px;
        height: 75px;
    }
    
    .bus-info h3,
    .bus-technical-specs h3,
    .related-buses h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .bus-specs {
        font-size: 0.85rem;
    }
    
    .bus-specs th {
        width: 100px;
        padding: 10px;
    }
    
    .bus-specs td {
        padding: 10px;
    }
    
    .spec-row {
        grid-template-columns: 1fr;
    }
    
    .spec-item {
        min-width: auto;
    }
    
    .related-buses-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    
    .related-bus-image {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .bus-detail-page {
        padding: 10px;
    }
    
    .bus-detail-header h2 {
        font-size: 1.2rem;
    }
    
    .main-image {
        min-height: 250px;
    }
    
    .main-image img {
        max-height: 300px;
    }
    
    .thumbnail {
        width: 80px;
        height: 60px;
    }
    
    .bus-specs {
        display: block;
    }
    
    .bus-specs tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #e0e0e0;
        padding: 10px 0;
    }
    
    .bus-specs tr:last-child {
        border-bottom: none;
    }
    
    .bus-specs th {
        width: auto;
        padding: 0 0 5px 0;
        background-color: transparent;
        font-size: 0.9rem;
    }
    
    .bus-specs td {
        padding: 0;
        font-size: 0.9rem;
    }
}

/* 状态标签样式 */
.bus-status-table {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    text-align: center;
    transition: all 0.2s ease;
}

.status-operating {
    background-color: #4caf50; /* 绿色 - 运营中 */
}

.status-retired {
    background-color: #f44336; /* 红色 - 已退役 */
}

.status-scrap {
    background-color: #ff9800; /* 黄色 - 待报废 */
}

.status-other {
    background-color: #9e9e9e; /* 灰色 - 其他 */
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 链接样式 */
.bus-specs a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bus-specs a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 图片加载动画 */
.main-image img {
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.main-image img.loading {
    opacity: 0.5;
}

/* 技术参数值为空时的样式 */
.spec-value:empty::before {
    content: '未填写';
    color: #999;
    font-style: italic;
}

/* 打印样式 */
@media print {
    .bus-detail-page {
        box-shadow: none;
        padding: 0;
        max-width: none;
    }
    
    .bus-detail-header {
        border-bottom: 1px solid #000;
    }
    
    .bus-meta {
        color: #000;
    }
    
    .bus-image-gallery,
    .bus-info,
    .bus-technical-specs,
    .related-buses {
        box-shadow: none;
        border: 1px solid #e0e0e0;
        break-inside: avoid;
    }
    
    .related-buses-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}