/* 宽屏布局容器 */
.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
}
.vehicle-gallery-layout {
    display: flex;
    gap: 40px;
    margin: 40px auto;
}
/* 左侧侧边栏 */
.gallery-sidebar {
    flex: 0 0 260px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 16px;
    height: fit-content;
    position: sticky;
    top: 100px;
}
.gallery-sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}
.filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.filter-list li {
    margin-bottom: 10px;
}
.filter-list a {
    display: block;
    padding: 6px 12px;
    background: white;
    border-radius: 30px;
    color: #111;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.9rem;
}
.filter-list a.active,
.filter-list a:hover {
    background: #e63946;
    color: white;
}
/* 右侧主区域 */
.gallery-main {
    flex: 1;
}
.gallery-stats {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #555;
    border-left: 3px solid #e63946;
    padding-left: 12px;
}
.filtered-info {
    color: #e63946;
    font-weight: 500;
}
/* 4列网格 */
.vehicle-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.case-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}
.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.case-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.case-img {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}
.case-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}
.case-card:hover .case-img img {
    transform: scale(1.03);
}
.photo-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
    line-height: 1;
}
.case-info {
    padding: 14px;
}
.case-info h3 {
    font-size: 1.2rem;
    margin: 0 0 6px;
    font-weight: 700;
}
.wheel-used {
    font-size: 0.85rem;
    color: #e63946;
    margin: 0;
}
.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #aaa;
    font-size: 0.9rem;
}
/* 分页样式 */
.pagination-wrap {
    margin-top: 50px;
    text-align: center;
}
.pagination-wrap .page-numbers {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 14px;
    border-radius: 30px;
    background: #f5f5f5;
    color: #111;
    text-decoration: none;
    transition: 0.2s;
}
.pagination-wrap .page-numbers.current {
    background: #e63946;
    color: white;
}
.pagination-wrap .page-numbers:hover:not(.current) {
    background: #ddd;
}

/* ========== 移动端样式 (max-width: 992px) ========== */
@media (max-width: 992px) {
    .container-wide {
        padding: 0 20px;
    }
    .vehicle-gallery-layout {
        flex-direction: column;
        gap: 20px;
    }
    /* 移动端：侧边栏改为滑出菜单 */
    .gallery-sidebar {
        position: fixed;
        top: 0;
        left: -85%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 1002;
        background: #fff;
        border-radius: 0;
        box-shadow: 2px 0 12px rgba(0,0,0,0.2);
        transition: left 0.3s ease;
        padding: 20px 20px 30px;
        overflow-y: auto;
        flex: none;
        margin: 0;
    }
    .gallery-sidebar.active {
        left: 0;
    }
    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }
    .sidebar-header h3 {
        margin: 0;
        font-size: 1.4rem;
    }
    .close-sidebar-btn {
        background: none;
        border: none;
        font-size: 28px;
        cursor: pointer;
        color: #333;
        padding: 0 8px;
    }
    /* 移动端触发按钮 */
    .mobile-filter-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #f9f9f9;
        border: 1px solid #e0e0e0;
        border-radius: 50px;
        padding: 12px 20px;
        cursor: pointer;
        font-weight: 500;
        transition: background 0.2s;
        margin-bottom: 20px;
    }
    .mobile-filter-trigger:hover {
        background: #f0f0f0;
    }
    .filter-label-icon {
        font-size: 1.2rem;
        margin-right: 8px;
    }
    .filter-label-text {
        flex: 1;
        text-align: left;
        font-size: 1rem;
    }
    .current-model-name {
        background: #e63946;
        color: white;
        padding: 4px 12px;
        border-radius: 30px;
        font-size: 0.85rem;
        max-width: 150px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .filter-arrow {
        margin-left: 8px;
        font-size: 0.8rem;
        transition: transform 0.2s;
    }
    /* 遮罩层 */
    .mobile-filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s, visibility 0.3s;
    }
    .mobile-filter-overlay.active {
        visibility: visible;
        opacity: 1;
    }
    .gallery-main {
        width: 100%;
    }
    .vehicle-cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .filter-list a {
        font-size: 1rem;
        padding: 8px 16px;
    }
}

@media (max-width: 768px) {
    .vehicle-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .current-model-name {
        max-width: 120px;
    }
}

@media (max-width: 560px) {
    .vehicle-cases-grid {
        grid-template-columns: 1fr;
    }
    .current-model-name {
        max-width: 100px;
    }
}

/* 桌面端隐藏移动端元素 */
@media (min-width: 993px) {
    .mobile-filter-trigger,
    .mobile-filter-overlay,
    .close-sidebar-btn {
        display: none !important;
    }
    .gallery-sidebar {
        position: sticky;
        left: auto;
        width: auto;
        height: auto;
        max-width: none;
        background: #f9f9f9;
        box-shadow: none;
        transition: none;
    }
}