/* ================================================
    印刷用ページ - 基本スタイル
   ================================================ */

  html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
    margin:0;
    padding:0;
    border:0;
    outline:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    line-height:1;
}

article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
    display:block;
}

nav ul {
    list-style:none;
}

blockquote, q {
    quotes:none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content:'';
    content:none;
}

a {
    margin:0;
    padding:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

/* change colours to suit your needs */
ins {
    background-color:#ff9;
    color:#000;
    text-decoration:none;
}

/* change colours to suit your needs */
mark {
    background-color:#ff9;
    color:#000;
    font-style:italic;
    font-weight:bold;
}

del {
    text-decoration: line-through;
}

abbr[title], dfn[title] {
    border-bottom:1px dotted;
    cursor:help;
}

table {
    border-collapse:collapse;
    border-spacing:0;
}

/* change border colour to suit your needs */
hr {
    display:block;
    height:1px;
    border:0;
    border-top:1px solid #cccccc;
    margin:1em 0;
    padding:0;
}

input, select {
    vertical-align:middle;
}

.print-container {
  width: 1024px;
  margin: 0 auto;
  padding: 20px;
}

/* ================================================
    ヘッダー部分
   ================================================ */

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  page-break-after: avoid;
}

.print-header-left {
  width: 55%;
}

.print-header-right {
  width: 42%;
}

.main-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
}

/* 問合せ番号 */
.inquiry-number {
  background: #204483;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 12px;
  font-weight: 700;
  color: #fff;
}

.inquiry-number-label {
  font-size: 12px;
}

.inquiry-number-value {
  font-size: 20px;
  margin-left: 8px;
}

/* 車両タイトル */
.vehicle-title {
  padding-left: 12px;
  border-left: 5px solid #008ad2;
  margin-bottom: 16px;
}

.vehicle-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: #008ad2;
  margin-bottom: 4px;
  line-height: 1.3;
}

.vehicle-title .model {
  font-size: 16px;
  color: #333;
}

/* 価格情報 */
.price-info {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.price-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.price-value {
  font-size: 28px;
  font-weight: 900;
  color: #008ad2;
  font-family: "Inter", sans-serif;
  line-height: 1.2;
}

.price-unit {
  font-size: 14px;
  margin-left: 4px;
}

.taxin-price {
  font-size: 16px;
  color: #333;
  margin-top: 4px;
}

/* タグ表示 */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-item {
  background: #05358a;
  color: #fff;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

/* ================================================
    基本情報テーブル
   ================================================ */

.info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 16px;
}

.info-table tr:first-child th {
  border-radius: 6px 0 0 0;
}

.info-table tr:first-child td {
  border-radius: 0 6px 0 0;
}

.info-table tr:last-child th {
  border-radius: 0 0 0 6px;
}

.info-table tr:last-child td {
  border-radius: 0 0 6px 0;
}

.info-table th {
  background: #d8d9d9;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  width: 35%;
  border-bottom: 2px solid #fff;
}

.info-table td {
  background: #f3f4f4;
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 2px solid #fff;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: none;
}

/* ================================================
    問い合わせ情報
   ================================================ */

.contact-section {
  background: #eaf8ff;
  padding: 20px;
  border-radius: 8px;
  margin: 30px 0;
  display: flex;
  justify-content: space-between;
  page-break-inside: avoid;
}

.contact-left {
  width: 35%;
  padding-right: 20px;
  border-right: 2px solid #d2efff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-right {
  width: 62%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-label {
  background: #204483;
  color: #fff;
  padding: 10px;
  text-align: center;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.contact-number {
  text-align: center;
  margin-bottom: 8px;
}

.contact-number-sub {
  font-size: 13px;
  margin-bottom: 4px;
}

.contact-number-main {
  font-size: 24px;
  font-weight: 900;
  font-family: "Inter", sans-serif;
}

.contact-tel-label {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.contact-tel {
  font-size: 32px;
  font-weight: 900;
  text-align: center;
  color: #008ad2;
  font-family: "Inter", sans-serif;
  letter-spacing: 0.05em;
}

.contact-hours {
  text-align: center;
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.6;
}

.contact-hours .holiday {
  font-size: 12px;
}

/* ================================================
    詳細スペックセクション
   ================================================ */

.spec-section {
  margin: 30px 0;
  page-break-inside: avoid;
}

.spec-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #333;
}

/* 詳細スペックテーブル */
.spec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.spec-table tr:first-child th:first-child {
  border-radius: 6px 0 0 0;
}

.spec-table tr:first-child td:last-child {
  border-radius: 0 6px 0 0;
}

.spec-table tr:last-child th:first-child {
  border-radius: 0 0 0 6px;
}

.spec-table tr:last-child td:last-child {
  border-radius: 0 0 6px 0;
}

.spec-table th {
  background: #d8d9d9;
  padding: 12px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  width: 25%;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
}

.spec-table th:last-child {
  border-right: none;
}

.spec-table td {
  background: #f3f4f4;
  padding: 12px;
  font-size: 13px;
  width: 25%;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
}

.spec-table td:last-child {
  border-right: none;
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: none;
}

.caution-text {
  font-size: 11px;
  color: #666;
  margin-top: 8px;
}

/* ================================================
    装備/仕様
   ================================================ */

.equipment-section {
  margin: 30px 0;
  page-break-inside: avoid;
}

.equipment-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f5f5f5;
  border-left: 5px solid #008ad2;
}

.equipment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.equipment-item {
  background: #f0fcff;
  border: 1px solid #3bc0de;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
}

/* ================================================
    コメントセクション
   ================================================ */

.comment-section {
  margin: 30px 0;
  padding: 16px;
  background: #f5f5f5;
  border-radius: 8px;
  page-break-inside: avoid;
}

.comment-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd;
}

.comment-content {
  font-size: 13px;
  line-height: 1.8;
}

.comment-content p {
  margin-bottom: 8px;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

/* ================================================
    画像ギャラリー
   ================================================ */

.gallery-section {
  margin-top: 40px;
  page-break-before: always;
}

.gallery-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #333;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  page-break-inside: avoid;
}

/* ================================================
    印刷ボタン
   ================================================ */

.print-button-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.print-button {
  background: #008ad2;
  color: #fff;
  padding: 16px 32px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s;
}

.print-button:hover {
  opacity: 0.85;
}

/* ================================================
    ユーティリティクラス
   ================================================ */

.page-break {
  page-break-after: always;
}

.print-br{
  display: none;
}

/* ================================================
    印刷時のスタイル
   ================================================ */

@media print {
  body {
    width: 100%;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    size: A4 portrait;
    margin: 15mm 10mm;
  }

  .print-button-container {
    display: none !important;
  }

  .print-container {
    width: 100%;
    padding: 0;
  }

  .print-br{
    display: block;
  }

  .gallery-section {
    page-break-before: always;
  }

  .page-break {
    page-break-after: always;
  }

  .spec-section,
  .equipment-section,
  .comment-section,
  .contact-section {
    page-break-inside: avoid;
  }

  /* 画像が途中で切れないように */
  .gallery-item {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* テーブル行が途中で切れないように */
  .info-table tr,
  .spec-table tr {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* 見出しとコンテンツが離れないように */
  .spec-title,
  .equipment-title,
  .comment-title,
  .gallery-title {
    page-break-after: avoid;
  }
}