.wd_predictive_search_wrapper {
    background: #f8f8f8;
    padding: 40px 20px;
    border-top: 1px solid #eee;
    margin-top: 60px;
    /* ドロップダウンが横にはみ出ても隠れないようにする */
    overflow: visible;
}

.wd_search_container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.wd_search_title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: bold;
}

.wd_input_group {
    display: flex;
    position: relative;
}

.wd_search_input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
    outline: none;
}

.wd_search_input:focus {
    border-color: #E60012;
}

.wd_search_btn {
    background: #E60012;
    color: #fff;
    border: none;
    padding: 0 30px;
    border-radius: 0 5px 5px 0;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
}


.wd_spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #ccc;
    border-top-color: #E60012;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.wd_heading_flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 5px solid #E60012;
}

.wd_heading_flex .wd_result_heading {
    border-left: none;
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: none;
}

.wd_sort_area {
    position: relative;
    display: inline-block;
    min-width: 200px;
    margin-bottom: 10px;
}

.wd_sort_select {
    width: 100%;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 45px 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.wd_sort_select:hover {
    border-color: #aaa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.wd_sort_select:focus {
    outline: none;
    border-color: #E60012;
    box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1);
}

@media (max-width: 767px) {
    .wd_heading_flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .wd_sort_area {
        margin-top: 10px;
        align-self: flex-end;
        width: 100%;
    }

    .wd_sort_select {
        padding: 10px 40px 10px 14px;
        font-size: 13px;
    }
}


/* 件数表示のスタイル */
.wd_search_summary {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 10px;
}

.wd_highlight {
    font-weight: bold;
    color: #E60012;
}

.wd_total_count {
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

.wd_count_num {
    font-size: 28px;
    color: #E60012;
    font-weight: 800;
}

.wd_sub_count {
    font-size: 0.7em;
    font-weight: normal;
    margin-left: 10px;
    white-space: nowrap;
}


/* ベースレイアウト */
#wd_searchsection {
    padding-bottom: 80px;
}

.wd_result_group {
    margin-bottom: 40px;
}

.wd_mt_large {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px dashed #ccc;
    position: relative;
}

.wd_result_heading {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 5px solid #E60012;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.wd_no_result_text {
    color: #666;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

/* グリッドレイアウト */
.wd_result_grid {
    display: grid;
    gap: 6px;
}

/* [PC] 買取ページ：大きく2列 */
.wd_result_grid_large {
    grid-template-columns: repeat(3, 1fr);
}

/* [PC] 買取実績：4列 */
.wd_result_grid_small {
    grid-template-columns: repeat(4, 1fr);
}

/* カード共通スタイル */
.wd_result_card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    height: 100%;
}

.wd_result_grid_small .wd_result_card {
    padding: 1cqw;
    gap: 1cqw;
    container-type: inline-size;
}

.wd_result_card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    opacity: 1;
}

#wd_searchsection .wd_card_img_wrap {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wd_card_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.wd_result_card:hover .wd_card_img {
    transform: scale(1.05);
}

.wd_no_image {
    color: #aaa;
    font-size: 12px;
    padding: 20px;
}

.wd_card_body_large {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.wd_card_body_small {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.wd_card_title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* カード個別：大きい方（買取ページ） */
.wd_card_large .wd_card_img_wrap {
    height: 230px;
}

.wd_card_large .wd_card_title {
    font-size: 18px;
    margin-bottom: 15px;
    display: block;
}

.wd_card_link_text {
    color: #E60012;
    font-weight: bold;
    margin-top: auto;
    text-align: right;
}

/* カード個別：小さい方（買取実績） */
#wd_searchsection .wd_card_small .wd_card_img_wrap {
    text-align: center;
    height: 100cqw;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#wd_searchsection .wd_card_small .wd_card_img_wrap img {

    border-radius: var(--border-radius-l);
}

.wd_card_small .wd_card_title {
    font-size: 14px;
    margin-bottom: 8px;
}

.wd_card_meta {
    margin-top: auto;
    font-size: 12px;
}

.wd_card_price {
    color: #E60012;
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 4px;
}

.wd_card_price span {
    font-size: 18px;
}

.wd_card_date {
    font-size: 14px;
}

.price-label {
    font-size: 14px;
    padding: 1cqw;
    font-weight: bold;
}

/* スマホ対応 */
@media (max-width: 767px) {
    .wd_result_grid_large {
        grid-template-columns: repeat(2, 1fr);
    }

    .wd_result_grid_small {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .wd_card_large .wd_card_img_wrap {
        height: 40vw;
    }

    .wd_card_small .wd_card_img_wrap {
        height: 120px;
    }

    .wd_card_body_large {
        padding: 10px;
    }

    .wd_card_title {
        font-size: 14px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .wd_result_grid_large {
        grid-template-columns: repeat(2, 1fr);
    }

    .wd_result_grid_small {
        grid-template-columns: repeat(3, 1fr);
    }
}