/* 搜索结果页面特定样式 */

.search-page {
    padding: 4rem 0;
}

.search-page h1 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

/* 新增的搜索和表单容器样式 */
.search-and-form-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.search-section {
    width: 100%;
}

.form-section {
    width: 25%;
    text-align: center;
    position: fixed;
    right: 70px;
    top: 206px;
    transform: translateY(-50%);
    z-index: 100;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-section h2 {
    margin-bottom: 1rem;
    text-align: left;
}

#contactForm {
    max-width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.search-filters {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.search-filters h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group select, .filter-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-count {
    font-size: 1.1rem;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-options select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.car-card {
    background: 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;
    cursor: pointer;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.car-image-container {
    position: relative;
    overflow: hidden;
}

.car-image-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.car-card:hover .car-image-container img {
    transform: scale(1.05);
}

.car-brand-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.car-model-type {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 165, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.car-content {
    padding: 1rem;
    position: relative;
}

.car-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.car-content p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFA500;
    margin-bottom: 1rem;
}

.car-arrow-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: #FFA500;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.car-arrow-btn:hover {
    background: #e69500;
}

.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.page-btn {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #333;
    padding: 5px 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn.active {
    background-color: #FFA500; /* 橙色背景 */
    border-color: #FFA500;
    color: #fff;
}

.page-btn:hover:not(.disabled) {
    background-color: #eee;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    margin: auto 5px;
}

.loading, .error, .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
}

.loading {
    color: #666;
}

.error {
    color: #e74c3c;
}

.no-results {
    color: #666;
}

@media (max-width: 768px) {
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sort-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-and-form-container {
        flex-direction: column;
    }
    
    .search-section, .form-section {
        width: 100%;
        margin-left: 0;
    }
    
    .form-section {
        position: static;
        transform: none;
        right: auto;
        top: auto;
        margin-top: 2rem;
        width: 100% !important;
    }
}