/* パインバレー 車両紹介ページ用CSS (Swiper対応版) */
.pv-wrap { max-width: 900px; margin: 0 auto; line-height: 1.7; font-family: "Helvetica Neue", Arial, sans-serif; color: #333; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: relative; scroll-behavior: smooth; }
.pv-title { font-size: 24px; border-left: 6px solid #ff6600; padding: 5px 15px; margin: 0 0 20px 0; }

/* ★Swiperギャラリー用CSS★ */
.pv-main-swiper { position: relative; width: 100%; border-radius: 4px; overflow: hidden; background: #f9f9f9; }
.pv-main-swiper .swiper-slide { text-align: center; }
.pv-main-swiper .swiper-slide img { width: 100%; height: auto; max-height: 60vh; object-fit: contain; display: block; margin: 0 auto; }
.pv-main-swiper .swiper-button-next, .pv-main-swiper .swiper-button-prev { color: #ff6600; background: rgba(255,255,255,0.7); border-radius: 50%; width: 40px; height: 40px; }
.pv-main-swiper .swiper-button-next::after, .pv-main-swiper .swiper-button-prev::after { font-size: 20px; font-weight: bold; }
.pv-thumb-swiper { padding: 5px 0; }
.pv-thumb-swiper .swiper-slide { opacity: 0.5; transition: opacity 0.2s; border-radius: 4px; overflow: hidden; border: 2px solid transparent; cursor: pointer; }
.pv-thumb-swiper .swiper-slide-thumb-active, .pv-thumb-swiper .swiper-slide:hover { opacity: 1; }
.pv-thumb-swiper .swiper-slide-thumb-active { border-color: #ff6600; }
.pv-thumb-swiper .swiper-slide img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }

/* ★ステータスバッジ類（デフォルト非表示）★ */
.pv-sold-out-ribbon { display: none; position: absolute; top: 50%; left: 0; width: 100%; background: rgba(220, 38, 38, 0.9); color: #fff; text-align: center; font-size: clamp(24px, 5vw, 40px); font-weight: bold; padding: 15px 0; transform: translateY(-50%); letter-spacing: 4px; pointer-events: none; z-index: 10; box-shadow: 0 4px 6px rgba(0,0,0,0.3); font-family: Impact, sans-serif; }
.pv-negotiation-badge { display: none; position: absolute; top: 15px; left: 15px; background: #eab308; color: #fff; font-size: 20px; font-weight: bold; padding: 8px 16px; border-radius: 4px; pointer-events: none; z-index: 10; box-shadow: 0 4px 6px rgba(0,0,0,0.2); }
.pv-sold-msg { display: none; background: #fee2e2; border: 1px solid #fca5a5; padding: 20px; border-radius: 8px; text-align: center; margin-top: 20px; }

/* ★一番上の data-status によるレイアウト自動切り替え★ */
body:has(.pv-status-marker[data-status="soldout"]) .pv-sold-out-ribbon { display: block !important; }
body:has(.pv-status-marker[data-status="soldout"]) .pv-finance-box { display: none !important; }
body:has(.pv-status-marker[data-status="soldout"]) .pv-cta-horizontal { display: none !important; }
body:has(.pv-status-marker[data-status="soldout"]) .pv-sold-msg { display: block !important; }
body:has(.pv-status-marker[data-status="negotiation"]) .pv-negotiation-badge { display: block !important; }

/* ★タイトル横の自動ステータスバッジ★ */
body:has(.pv-status-marker) .pv-title::before { display: inline-block; font-size: 15px; padding: 4px 10px; border-radius: 4px; color: #fff; margin-right: 12px; vertical-align: middle; transform: translateY(-3px); font-weight: bold; }
body:has(.pv-status-marker[data-status="onsale"]) .pv-title::before { content: '販売中'; background: #10b981; }
body:has(.pv-status-marker[data-status="negotiation"]) .pv-title::before { content: '商談中'; background: #eab308; }
body:has(.pv-status-marker[data-status="soldout"]) .pv-title::before { content: '売約済み'; background: #dc2626; }

/* 価格・CTAボックス */
.pv-finance-box { background: #f4f4f4; border-radius: 8px; padding: 25px; margin-bottom: 30px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; border: 1px solid #ddd; margin-top: 20px; }
.pv-price-left { flex: 1; min-width: 250px; }
.pv-cta-right { display: flex; flex-direction: column; gap: 12px; width: 280px; flex-shrink: 0; }
.pv-price-total-label { font-size: 16px; color: #d32f2f; font-weight: bold; margin-bottom: 5px; display: block; }
.pv-price-total { color: #d32f2f; font-size: 48px; font-weight: 900; margin: 0; font-family: "Helvetica Neue", Arial, sans-serif; letter-spacing: 1px; line-height: 1.1; }
.pv-price-total span { font-size: 20px; font-weight: bold; }
.pv-price-base { font-size: 15px; color: #444; margin-top: 8px; font-weight: bold; }
.pv-point-notice { font-size: 13px; color: #c62828; font-weight: bold; margin-top: 5px; }
.pv-loan-link { appearance: none; display: inline-flex; align-items: center; margin-top: 12px; font-size: 14px; color: #1e40af; cursor: pointer; font-weight: bold; transition: 0.2s; border: 1px solid #1e40af; padding: 6px 12px; border-radius: 4px; background: #fff; line-height: 1; }
.pv-loan-link:hover { background: #eff6ff; }
.pv-loan-link::before { content: '📊'; margin-right: 5px; font-size: 14px; }

/* 店舗アンカーバッジ */
.pv-shop-badge { display: inline-flex; align-items: center; justify-content: center; background: #f3f4f6; color: #374151; font-weight: bold; font-size: 12px; padding: 8px 12px; border-radius: 4px; text-decoration: none; margin-bottom: 5px; transition: 0.2s; border: 1px solid #d1d5db; }
.pv-shop-badge:hover { background: #e5e7eb; }
.pv-shop-badge::after { content: '📍'; margin-left: 4px; font-size: 14px; }

/* ボタン類 */
.pv-btn-contact, .pv-btn-reserve { padding: 15px; border-radius: 6px; text-align: center; font-weight: bold; font-size: 16px; text-decoration: none; color: #fff; display: block; box-shadow: 0 4px 0 rgba(0,0,0,0.2); transition: 0.2s; }
.pv-btn-contact { background: #ff6600; box-shadow: 0 4px 0 #d35400; }
.pv-btn-reserve { background: #333; box-shadow: 0 4px 0 #000; }
.pv-btn-contact:hover { background: #e65c00; transform: translateY(2px); box-shadow: 0 2px 0 #d35400; color:#fff; }
.pv-btn-reserve:hover { background: #222; transform: translateY(2px); box-shadow: 0 2px 0 #000; color:#fff; }
.pv-cta-horizontal { display: flex; gap: 15px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #ddd; }
.pv-cta-horizontal > a { flex: 1; }

/* モーダル */
.pv-modal { border: none; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); padding: 25px; max-width: 320px; width: 90%; margin: auto; }
.pv-modal::backdrop { background: rgba(0,0,0,0.7); }
.pv-modal-close { position: absolute; top: 15px; right: 15px; font-size: 28px; cursor: pointer; color: #999; background: none; border: none; padding: 0; line-height: 1; z-index: 10; }
.pv-loan-list { list-style: none; padding: 0; margin: 0 0 15px; font-size: 13px; }
.pv-loan-list li { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: 10px 0; }

.pv-comment-box { background: #fff3e0; padding: 20px; border-radius: 8px; border-left: 5px solid #ff6600; margin: 30px 0; }
.pv-info-2col { display: flex; flex-wrap: wrap; gap: 30px; margin-bottom: 30px; }
.pv-info-col { flex: 1; min-width: 280px; }
.pv-info-head { border-bottom: 2px solid #333; padding-bottom: 8px; margin-bottom: 15px; font-size: 18px; }
.pv-spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pv-spec-table th { background: #f9f9f9; text-align: left; padding: 10px; border-bottom: 1px solid #eee; width: 110px; }
.pv-spec-table td { padding: 10px; border-bottom: 1px solid #eee; }
.pv-custom-list { padding-left: 20px; font-size: 14px; margin: 0; }
.pv-custom-list li { margin-bottom: 6px; }
.pv-custom-list a { color: #ff6600; font-weight: bold; text-decoration:underline; }
.pv-video-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 15px; border-radius: 4px; overflow: hidden; background: #000; }
.pv-video-wrap video { width: 100%; height: 100%; object-fit: contain; outline: none; }

/* 店舗情報・マップ */
.pv-shop-info { background: #f9f9f9; padding: 20px; border-radius: 8px; border: 1px solid #eee; margin-bottom: 20px; }
.pv-shop-info-head { border-bottom: 2px solid #333; padding-bottom: 8px; margin-bottom: 10px; font-size: 18px; font-weight:bold; }
.pv-map-wrap { width: 100%; height: 250px; border-radius: 4px; overflow: hidden; margin-top: 15px; margin-bottom: 15px; background: #eee; border: 1px solid #ddd; }
.pv-map-wrap iframe { width: 100%; height: 100%; border: none; }
.pv-sold-msg { background: #fee2e2; border: 1px solid #fca5a5; padding: 20px; border-radius: 8px; text-align: center; margin-top: 20px; }
.pv-sold-msg p { color: #dc2626; font-weight: bold; font-size: 16px; margin: 0 0 15px 0; }
.pv-btn-inventory { display: block; background: #4b5563; color: #fff; text-align: center; padding: 15px; border-radius: 4px; font-weight: bold; font-size: 16px; text-decoration: none; box-shadow: 0 4px 0 #374151; transition: 0.2s; }
.pv-btn-inventory:hover { background: #374151; transform: translateY(2px); box-shadow: 0 2px 0 #1f2937; color: #fff; }

@media (max-width: 600px) {
  .pv-price-total { font-size: 40px; }
  .pv-cta-right { width: 100%; border-top: 1px solid #ddd; padding-top: 20px; margin-top: 5px; }
  .pv-cta-horizontal { flex-direction: column; }
  .pv-info-2col { flex-direction: column; gap: 20px; }
  .pv-sold-out-ribbon { font-size: 28px; padding: 10px 0; }
}