/**
 * HUG Vehicle フロントエンド グリッド表示用スタイルシート
 * サムネイル型の車両一覧表示用
 */

/* グリッドコンテナ */
.hug-vehicle-results-grid {
    margin: 30px 0;
}

.vehicle-grid-container {
    margin: 0 -10px;
}

.vehicle-grid-container .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

/* グリッドアイテム */
.vehicle-grid-item {
    padding: 10px;
    margin-bottom: 20px;
}

.col-4 {
    width: 33.333%;
    flex: 0 0 33.333%;
}

.col-3 {
    width: 25%;
    flex: 0 0 25%;
}

.col-6 {
    width: 50%;
    flex: 0 0 50%;
}

/* 車両カード */
.vehicle-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.vehicle-card.sold-out {
    opacity: 0.8;
}

.vehicle-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vehicle-link:hover {
    text-decoration: none;
    color: inherit;
}

/* サムネイル画像 */
.vehicle-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* アスペクト比 3:2 */
    overflow: hidden;
    background: #f5f5f5;
}

.vehicle-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vehicle-card:hover .vehicle-thumbnail img {
    transform: scale(1.05);
}

/* ステータスバッジ */
.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    border-radius: 4px;
    z-index: 1;
    text-transform: uppercase;
}

.sold-out-badge {
    background: #e74c3c;
}

.negotiating-badge {
    background: #f39c12;
}

/* 車両情報 */
.vehicle-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.vehicle-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.vehicle-grade {
    display: block;
    font-size: 14px;
    font-weight: normal;
    color: #666;
    margin-top: 4px;
}

/* 詳細情報 */
.vehicle-details {
    margin: 10px 0;
    font-size: 14px;
}

.detail-item {
    margin: 5px 0;
}

.detail-label {
    color: #666;
    font-size: 13px;
}

.detail-value {
    color: #333;
    font-weight: bold;
}

/* 価格表示 */
.vehicle-price {
    font-size: 18px;
    color: #e74c3c;
    font-weight: bold;
    margin: 15px 0 10px;
    padding: 10px 0;
    border-top: 1px solid #eee;
}

.price-amount {
    font-size: 22px;
}

/* 店舗情報 */
.vehicle-store {
    font-size: 13px;
    color: #666;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 4px;
    text-align: center;
    margin-top: auto;
}

/* 一覧ページの画像リンクを相対位置に設定 */
.results_data_box .vehicle-image-link {
    position: relative !important;
    display: block !important;
    overflow: hidden !important; /* 画像の外にはみ出ないようにする */
}

/* 成約済スタンプ（既存のsoldout.png用） */
.results_data_box .vehicle-image-link .soldout {
    position: absolute;
    top: 0px;
    left: 0;
    width: 50%;
    height: auto;
    object-fit: contain;
    z-index: 10;
    bottom: auto;
    object-position: top;
}

/* 検索結果なし */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.no-results h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
}

.no-results p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
}

.no-results .btn {
    display: inline-block;
    padding: 10px 25px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.no-results .btn:hover {
    background: #005a88;
}

/* ページネーション */
.vehicle-pagination {
    margin: 40px 0;
    text-align: center;
}

.vehicle-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 5px;
}

.vehicle-pagination li {
    display: inline-block;
}

.vehicle-pagination a,
.vehicle-pagination span {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.vehicle-pagination a:hover {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.vehicle-pagination .current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
    font-weight: bold;
}

/* レスポンシブデザイン */
@media screen and (max-width: 991px) {
    .col-4 {
        width: 50%;
        flex: 0 0 50%;
    }

    .col-3 {
        width: 50%;
        flex: 0 0 50%;
    }
}

@media screen and (max-width: 767px) {
    .vehicle-grid-container {
        margin: 0;
    }

    .vehicle-grid-item {
        padding: 5px;
    }

    .col-4,
    .col-3,
    .col-6 {
        width: 100%;
        flex: 0 0 100%;
    }

    .vehicle-title {
        font-size: 15px;
    }

    .vehicle-price {
        font-size: 16px;
    }

    .price-amount {
        font-size: 20px;
    }

    .vehicle-details {
        font-size: 13px;
    }

    .vehicle-pagination {
        margin: 30px 0;
    }

    .vehicle-pagination a,
    .vehicle-pagination span {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .vehicle-info {
        padding: 12px;
    }

    .vehicle-title {
        font-size: 14px;
    }

    .detail-label {
        font-size: 12px;
    }

    .vehicle-store {
        font-size: 12px;
        padding: 6px 10px;
    }
}