/* 长租自驾页面样式 */

.long-term-rental-page {
    background-color: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 40px;
}

.rental-header {
    background: #ffffff;
    padding: 25px 20px;
    /* text-align: center; */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 3px solid #ffc700;
}

.rental-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffc700 0%, #ffb400 100%);
    color: #ffffff;
    padding: 10px 28px;
    border-radius: 28px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(255, 199, 0, 0.25);
    transition: all 0.3s ease;
}

.rental-title:hover {
    box-shadow: 0 6px 16px rgba(255, 199, 0, 0.35);
    transform: translateY(-2px);
}

/* 筛选和排序栏 */
.filter-bar {
    background-color: white;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    /* position: sticky; */
    top: 60px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.back-btn {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.back-btn:hover {
    background-color: #ffa500;
    color: white;
    border-color: #ffa500;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 100px;
}

.sort-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

.sort-buttons {
    display: flex;
    gap: 5px;
}

.sort-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    transition: all 0.3s ease;
}

.sort-btn:hover {
    background-color: #ffa500;
    color: white;
    border-color: #ffa500;
}

.sort-btn.active {
    background-color: #ffa500;
    color: white;
    border-color: #ffa500;
}

.filter-toggle {
    flex: 1;
    min-width: 100px;
    text-align: right;
}

.filter-btn {
    background-color: #ffa500;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.filter-btn:hover {
    background-color: #ff8c00;
}

/* 筛选菜单遮罩层 */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 400;
    display: none;
    cursor: pointer;
}

/* 筛选菜单 */
.filter-menu {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: white;
    z-index: 500;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    max-width: 100%;
}

.filter-menu.active {
    right: 0;
}


.filter-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #ffa500;
    color: white;
}

.filter-menu-header h2 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.filter-group {
    border-bottom: 1px solid #e0e0e0;
}

.filter-group-title {
    padding: 15px 20px;
    background-color: #f9f9f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
    user-select: none;
    transition: background-color 0.3s ease;
}

.filter-group-title:hover {
    background-color: #f0f0f0;
}

.filter-group-title i {
    transition: transform 0.3s ease;
    color: #999;
}

.filter-group-items {
    padding: 15px 20px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.filter-group-items.active {
    display: block;
}

.filter-group-title.active i {
    transform: rotate(90deg);
}

.filter-group-items label {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: color 0.2s ease;
}

.filter-group-items label:hover {
    color: #ffa500;
}

.filter-group-items input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #ffa500;
}

.filter-menu-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    display: flex;
    gap: 10px;
}

.filter-reset-btn {
    flex: 2;
    background-color: #e0e0e0;
    color: #333;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-reset-btn:hover {
    background-color: #c0c0c0;
}

.filter-confirm-btn {
    flex: 2;
    background-color: #ffa500;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-confirm-btn:hover {
    background-color: #ff8c00;
}

.filter-share-btn {
    flex: 1;
    background-color: #8d7447;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.filter-share-btn:hover {
    background-color: #218838;
}

.filter-share-btn i {
    font-size: 14px;
}

/* 车辆卡片网格 */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}


.car-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.car-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.15);
}

.car-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%;
    background-color: #f0f0f0;
    overflow: hidden;
}

.car-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f0f0f0;
}

.car-image.error {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 200"><rect fill="%23f0f0f0" width="300" height="200"/><text x="150" y="100" text-anchor="middle" dy=".3em" fill="%23999" font-size="14">图片加载失败</text></svg>');
    background-size: cover;
    background-position: center;
}

.car-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.car-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.car-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
    flex: 1;
}

.spec-item {
    font-size: 12px;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.spec-label {
    color: #999;
    font-size: 11px;
}

.spec-value {
    color: #333;
    font-weight: 500;
}

.car-price {
    background-color: #fff5e6;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    margin-top: auto;
}

.price-text {
    font-size: 18px;
    font-weight: bold;
    color: #ffa500;
}

.price-label {
    font-size: 12px;
    color: #999;
}

.reserve-btn {
    margin-top: 10px;
    background-color: #ffa500;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.reserve-btn:hover {
    background-color: #ff8c00;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 30px 20px;
    background-color: white;
    border-top: 1px solid #e0e0e0;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #ffa500;
    color: white;
    border-color: #ffa500;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-number:hover {
    background-color: #ffa500;
    color: white;
    border-color: #ffa500;
}

.page-number.active {
    background-color: #ffa500;
    color: white;
    border-color: #ffa500;
    font-weight: 600;
}

.page-info {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ddd;
}

.empty-state p {
    font-size: 16px;
}


@media (max-width: 768px) {
    /* 1. 调整外层容器，极端缩小内边距 */
    .filter-bar {
        padding: 10px 6px;
        background-color: white;
        border-bottom: 1px solid #e0e0e0;
        z-index: 100;
    }

    /* 2. 强制单行显示 */
    .filter-controls {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 18px;
        flex-wrap: nowrap;
        overflow-x: auto;
        
    }

    /* 3. 极端缩小返回按钮 */
    .back-btn {
        padding: 4px 6px;
        font-size: 15px;
        min-width: auto;
        flex-shrink: 0;
        border-radius: 3px;
    }

    .back-btn i {
        margin-right: 1px;
    }

    /* 4. 调整排序控制组 */
    .sort-control {
        display: flex;
        align-items: center;
        gap: 1px;
        flex: 0 0 auto;
        min-width: 0;
        flex-shrink: 0;
    }

    .sort-title {
        font-size: 15px;
        min-width: auto;
        white-space: nowrap;
        font-weight: 500;
    }

    .sort-buttons {
        display: flex;
        gap: 1px;
    }

    /* 5. 极端缩小升降序小按钮 */
    .sort-btn {
        width: 18px;
        height: 18px;
        font-size: 8px;
        padding: 1px;
        flex-shrink: 0;
        border-radius: 2px;
    }

    /* 6. 极端缩小筛选按钮 */
    .filter-toggle {
        flex: 0 0 auto;
        min-width: 0;
        margin-left: auto;
        flex-shrink: 0;
    }

    .filter-btn {
        padding: 6px 8px;
        font-size: 10px;
        gap: 2px;
        white-space: nowrap;
        border-radius: 3px;
    }

    .filter-btn i {
        font-size: 11px;
    }
}
@media (max-width: 480px) {
    .car-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }
}
