.cars-sale-print-view {
  background: #fff;
  color: #111;
}

.cars-sale-print-view #wpadminbar {
  display: none !important;
}
.cars-sale-print-view html {
  margin-top: 0 !important;
}

.print-page-header {
  background: #fff;
  border-bottom: 1px solid #d6d6d6;
  margin-bottom: 8mm;
}

.cars-sale-print-header-inner {
  max-width: 210mm;
  margin: 0 auto;
  padding: 10mm 0 6mm;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  /* gap: 10mm; */
}

.cars-sale-print-header-left {
  flex: 1;
  min-width: 0;
}

.cars-sale-print-offer-code {
  flex: 0 0 auto;
  align-self: start;
  font-size: 14pt;
  color: #111;
  padding-top: 2mm;
  white-space: nowrap;
  margin-right: 10mm;
}

.cars-sale-print-header-right {
  flex: 0 0 auto;
}

.cars-sale-print-qr {
  display: block;
  text-decoration: none;
}

.cars-sale-print-qr img {
  width: 22mm;
  height: 22mm;
  display: block;
  border: 1px solid #e6e6e6;
}

.cars-sale-print-logo img {
  max-height: 18mm;
  width: auto;
  height: auto;
  display: block;
}

.cars-sale-print-site-name {
  display: inline-block;
  font-weight: 700;
  font-size: 14pt;
}

.cars-sale-print-title {
  margin-top: 4mm;
}

.cars-sale-print-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 11pt;
  padding: 1mm 3mm;
  border: 1px solid #2fad20;
  color: #2fad20;
  margin-bottom: 2mm;
}

.cars-sale-print-h1 {
  margin: 0;
  font-size: 20pt;
  line-height: 1.2;
  font-weight: 700;
}

.cars-sale-print {
  max-width: 210mm;
  margin: 0 auto;
}

.print-page {
  break-after: page;
  page-break-after: always;
}
.print-page:last-child {
  break-after: auto;
  page-break-after: auto;
}

.print-page--overview {
  min-height: 240mm;
  position: relative;
}

.print-overview-grid {
  display: grid;
  grid-template-columns: 0.90fr 1.10fr;
  gap: 5mm;
  align-items: start;
  padding-bottom: 18mm; /* keep content clear of floating price */
}

.print-overview-left {
  display: flex;
  flex-direction: column;
  min-height: 220mm;
}

.print-specs-box {
  background: #e3e3e3;
  padding: 6mm 3mm 5mm;
}

.print-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11pt;
}

.print-specs-table th,
.print-specs-table td {
  padding: 2.0mm 0;
  vertical-align: top;
  border-bottom: 0;
  border: none;
}

.print-specs-table th {
  width: 46%;
  text-align: left;
  font-weight: 700;
  color: #222;
  padding-right: 4mm;
}

.print-specs-table td {
  text-align: right;
  color: #111;
}

.print-specs-table tr:last-child th,
.print-specs-table tr:last-child td {
  border-bottom: 0;
}

.print-specs-vin {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 10pt;
}

.print-description {
  border-top: none;
  border-bottom: 1px solid #d6d6d6 !important;
  padding: 4mm 0 !important;
  margin-top: 0;
}

.print-description h4 {
  margin: 0 0 2mm;
  font-size: 12pt;
  font-weight: 700;
}

.print-price {
  margin-top: auto;
  padding-top: 6mm;
}

.print-price--floating {
  position: absolute;
  right: 0;
  bottom: 4mm;
  padding: 0;
  margin: 0;
  text-align: right;
  max-width: 95mm;
  background: #fff;
}

.print-price-text {
  font-size: 16pt;
  font-weight: bold;
  color: gray !important;
}

.print-price-DDS {
  font-size: 16pt;
}

.print-price-row {
  display: flex;
  justify-content: flex-end;
  gap: 4mm;
  align-items: baseline;
  font-size: 36pt;
  font-weight: 700;
  line-height: 1.2;
}

.print-price-old {
  font-weight: 600;
  color: #666;
  text-decoration: line-through;
}

.print-price-new {
  color: #e05710;
}

.print-overview-right {
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  gap: 6mm;
}

.print-featured-image {
  width: 100%;
  height: auto;
  max-height: 120mm;
  object-fit: contain;
  border: 1px solid #e6e6e6;
}

.print-secondary-image {
  width: 100%;
  height: auto;
  max-height: 70mm;
  object-fit: contain;
  border: 1px solid #e6e6e6;
}

.print-page--equipment h4 {
  margin: 0 0 4mm;
  font-size: 13pt;
  font-weight: 700;
}

.print-slide-body {
  column-count: 2;
  column-gap: 10mm;
}

.print-slide-body li {
  break-inside: avoid;
  list-style: none;
  margin: 0 0 3mm;
  padding-left: 6mm;
  position: relative;
}

.print-slide-body li:before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  html,
  body {
    background: #fff !important;
  }

  /*
    Ensure the overview page is treated as a single-page layout.
    If the section is allowed to fragment across pages, absolutely-positioned
    elements can end up rendered on the next fragment/page.
  */
  .cars-sale-print-view .print-page--overview {
    height: 273mm; /* A4 height (297mm) - @page margins (12mm*2) */
    break-inside: avoid;
    page-break-inside: avoid;
    overflow: hidden;
  }

  .cars-sale-print-view .print-overview-left {
    min-height: 0;
  }

  .cars-sale-print-view .print-overview-grid {
    padding-bottom: 0;
  }

  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  /* Prevent print styles from appending URLs after links (e.g. under QR). */
  .cars-sale-print-view a[href]:after {
    content: "" !important;
  }
  .cars-sale-print-view a[href]:before {
    content: "" !important;
  }

  /*
    Force the gray specs background to render in print preview/output.
    Note: some browsers still require “Background graphics” enabled.
  */
  .cars-sale-print-view .print-specs-box,
  .cars-sale-print-view .print-specs-box th,
  .cars-sale-print-view .print-specs-box td {
    background: #e3e3e3 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
