/**
 * Project: Used Car Sales Site (uniform-reservation)
 * Version: 1.01.12
 * Description: アーカイブ、ホーム、会社概要、お問い合わせ全てのスタイルを完全網羅。
 */

/* @media (min-width: 922px) でAstraが効かせる flex を解除 */
@media (min-width: 922px) {
    .site-content .ast-container {
        display: block !important;
        /* flexを解除して縦並びに戻す */
        /* Astraの幅制限を解除 */
        padding: 0 !important;
    }
}
/* ==========================================================================
   1. 基本設定 & 共通クラス (Global & Utilities)
   ========================================================================== */
body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f7f9;
    color: #333;
    line-height: 1.6;
}

h1,
h2,
h3 {
    margin: 0 0 15px 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Astra 固定ヘッダー対応 */
.site-content {
    padding-top: 10px;
}

/* 汎用：1カラム・中央寄せ構造 (Archive, Company共通) */
.cp-archive-wrapper,
.cp-one-column-wrapper,
.main-section {
    background-color: #f5f7f9;
    padding: 60px 0;
    display: flex;
    justify-content: center;
}

.cp-main-content,
.cp-container-center {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    float: none !important;
    clear: both;
}

.cp-page-header {
    text-align: center;
    margin-bottom: 50px;
}

.cp-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 5px;
    color: #333;
}

.cp-page-subtitle {
    color: #888;
    font-size: 0.9rem;
}

/* 共通：カード・ボタン */
.cp-card-base,
.campaign-item,
.store-info,
.review-item,
.cp-message-card,
.cp-store-integrated-card,
.cp-shop-profile-block,
.cp-car-card-horizontal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    overflow: hidden;
}

.btn {
    display: inline-block;
    font-weight: 700;
    padding: 14px 35px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: #e60012;
    color: #fff;
    box-shadow: 0 4px 10px rgba(230, 0, 18, 0.3);
}

.btn-secondary {
    background: #ffc107;
    color: #333;
}

/* ==========================================================================
   2. ホームページ専用 (Hero / Campaign / New Arrivals)
   ========================================================================== */
.hero-image {
    min-height: 550px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    padding: 60px;
    margin-bottom: 40px;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    color: #fff !important;
    text-align: left;
}

.hero-supertitle {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 1);
}

.campaign-list h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #e60012;
}

/* 5カラムグリッド (新着) */
.cp-new-car-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.cp-car-name {
    font-size: 0.9rem;
    font-weight: bold;
    height: 2.8em;
    overflow: hidden;
}

.cp-price-row.total {
    color: #d32f2f;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 4px;
}

.cp-price-row.total em {
    font-size: 1.2rem;
    font-weight: 900;
    font-style: normal;
}

/* ==========================================================================
   3. 在庫一覧・アーカイブ (Archive Horizontal Cards)
   ========================================================================== */
.cp-car-card-horizontal {
    display: flex;
    transition: 0.2s;
    width: 100%;
}

.cp-car-card-horizontal:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.cp-horizontal-link {
    display: flex;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* 左側：画像 320px固定 */
.cp-card-img-side {
    flex: 0 0 320px;
    position: relative;
    overflow: hidden;
}

.cp-card-img-side img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-status-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #333;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 3px;
}

/* 右側：情報 */
.cp-card-info-side {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cp-car-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #000;
}

.cp-main-data-flex {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 10px;
}

.cp-price-box {
    flex: 0 0 160px;
}

.cp-price-item.total .value em {
    font-size: 1.6rem;
    font-weight: 900;
    color: #d32f2f;
    font-style: normal;
}

/* スペック 2カラムグリッド */
.cp-spec-grid-mini {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
}

.cp-spec-grid-mini .spec-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    border-bottom: 1px dotted #ccc;
}

.cp-spec-grid-mini .label {
    color: #888;
}

/* ==========================================================================
   4. お問い合わせフォーム (Blue Theme)
   ========================================================================== */

/* 4-1. 車両情報ヘッダー (Version 1.01.19統合) */
.cp-contact-car-card-header {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cp-header-title-bar {
    background: #f8f9fa;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #e67e22;
    border-bottom: 1px solid #eee;
}

.cp-header-flex-body {
    display: flex;
    padding: 20px;
    gap: 25px;
}

.cp-header-img-box {
    flex: 0 0 200px;
    height: 135px;
}

.cp-header-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.cp-header-info-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cp-header-maker {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.cp-header-car-name {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.cp-header-price-row {
    font-size: 0.95rem;
}

.cp-header-price-row .value em {
    font-size: 1.6rem;
    font-weight: 900;
    color: #d32f2f;
    font-style: normal;
}

/* 4-2. フォーム全体・共通設定 */
.cp-contact-form-area-blue p,
.cp-contact-form-area-blue .wpcf7-form-control-wrap {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

.cp-required {
    background: #e03131;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 2px;
    margin-top: 4px;
    width: fit-content;
}

/* 4-3. 【重要】上段・下段構成（お問い合わせ内容セクション） */
.cp-contact-section-group {
    border: 1px solid #d1e1f2;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    background: #fff;
}

/* 縦積み用行スタイル */
.cp-contact-row-stack {
    display: flex;
    flex-direction: column;
}

/* 項目と詳細エリアの区切り線 */
.cp-contact-row-stack.no-border-top {
    border-top: 1px dashed #d1e1f2;
}

/* 全幅ラベルカラム */
.cp-label-column-full {
    background: #eef6ff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #d1e1f2;
}

/* 全幅入力カラム */
.cp-input-column-full {
    padding: 20px;
}

/* チェックボックスの配置 */
.cp-checkbox-wrapper {
    padding: 10px 0;
}

.cp-checkbox-wrapper .wpcf7-list-item {
    margin-right: 25px;
    margin-bottom: 10px;
    display: inline-block;
}

/* メッセージエリアと注釈 */
.cp-detail-box textarea {
    width: 100%;
    height: 180px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 15px;
    box-sizing: border-box;
}

.cp-notes-small {
    margin-top: 15px;
    padding: 15px;
    background: #fafafa;
    border-left: 4px solid #ccd5db;
    font-size: 12px;
    color: #666;
}

/* 4-4. お客様情報（従来の横並びスタイル） */
.cp-contact-row {
    display: flex;
    border: 1px solid #d1e1f2;
    background: #fff;
    margin-bottom: 20px !important;
    min-height: 64px;
    border-radius: 4px;
}

.cp-label-column {
    width: 200px;
    background: #eef6ff;
    padding: 10px 20px !important;
    border-right: 1px solid #d1e1f2;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cp-input-column {
    flex: 1;
    padding: 10px 20px !important;
    display: flex;
    align-items: center;
}

.cp-input-column input[type="text"],
.cp-input-column input[type="email"] {
    width: 100%;
    max-width: 450px;
    height: 42px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 12px;
}

/* 4-5. 送信ボタン */
.cp-form-submit-container {
    text-align: center;
    margin-top: 40px;
}

.cp-btn-submit {
    background: #004a99;
    color: #fff;
    border: none;
    padding: 18px 80px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s ease;
}

.cp-btn-submit:hover {
    background: #003366;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* レスポンシブ */
@media screen and (max-width: 768px) {
    .cp-contact-row {
        flex-direction: column;
    }

    .cp-label-column {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #d1e1f2;
    }

    .cp-header-flex-body {
        flex-direction: column;
    }

    .cp-header-img-box {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
    }
}

/* ==========================================================================
   5. 会社概要・店舗情報 (Shop Profile & Integrated)
   ========================================================================== */
.cp-shop-profile-block {
    display: flex !important;
    gap: 40px;
    padding: 40px;
}

.cp-shop-spec-frame {
    flex: 1.2;
}

.cp-modern-table {
    width: 100%;
    border-collapse: collapse;
}

.cp-modern-table th,
.cp-modern-table td {
    padding: 18px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.cp-modern-table th {
    width: 100px;
    color: #888;
    font-weight: 600;
    font-size: 0.9rem;
}

.cp-store-flex-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.cp-store-image {
    flex: 1;
}

.cp-store-image img {
    width: 100%;
    border-radius: 6px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.cp-store-details {
    flex: 1.2;
}

.cp-map-full,
.cp-store-map-wide {
    width: 100%;
    height: 450px;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.cp-map-full iframe,
.cp-store-map-wide iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* ==========================================================================
   6. レスポンシブ (Responsive)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .cp-new-car-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cp-horizontal-link,
    .cp-car-card-horizontal,
    .cp-contact-row,
    .cp-shop-profile-block,
    .cp-store-flex-container {
        flex-direction: column !important;
    }

    .cp-card-img-side,
    .cp-label-column,
    .cp-shop-image-frame,
    .cp-shop-spec-frame {
        width: 100% !important;
        border-right: none;
        height: auto;
    }

    .cp-card-img-side {
        height: 220px;
    }

    .cp-main-data-flex {
        flex-direction: column;
        gap: 15px;
    }

    .cp-modern-table th,
    .cp-modern-table td {
        display: block;
        width: 100%;
        padding: 10px 5px;
    }
}

/* 展示中ラベル（基本色） */
.cp-status-tag.display {
    background: #27ae60 !important;
    /* 深い緑 */
    color: #fff !important;
}

/* 商談中ラベル */
.cp-status-tag.negotiating {
    background: #f1c40f !important;
    /* 黄色 */
    color: #000 !important;
}