/* A unit's print sheet (templates/public/vehicle_print.html): letter paper, white, in the
   dealer's colors. Every color comes from site.css's variables, which crate::theme
   re-derives from the dealer's accent (--red*, --on-red; --chip-ink is the accent
   deepened to read on light, dark when the accent is light). The pieces are the site's
   own: the title chip with its brand tick, the slanted condition tag, red-edged section
   heads, the dark price box. No filters or soft shadows on the sheet: Chrome turns
   those into pictures in a PDF. */

@page {
  size: letter;
  margin: .4in .45in .55in;
  @bottom-left { font: 7pt "Roboto Condensed", "Arial Narrow", Arial, sans-serif; color: #777; vertical-align: top; padding-top: .14in; }
  @bottom-right { font: 7pt "Roboto Condensed", "Arial Narrow", Arial, sans-serif; color: #777; vertical-align: top; padding-top: .14in; }
}

.ps, .ps * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
html:has(.ps) { background: #dcdcd8; }
.ps { display: block; margin: 0; padding: 0; min-height: 100vh; background: #dcdcd8; color: #1b1b1b; font: 400 10pt/1.4 var(--cond); }
.ps h1, .ps h2 { margin: 0; }

/* ---- on screen: a bar to go back or print, and the sheet as a page of paper ---- */
.ps-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: #151515; color: #ddd; font: 400 14px var(--cond); }
.ps-bar__back { color: #fff; font: 700 14px var(--cond); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.ps-bar__hint { flex: 1; min-width: 0; color: #9a9a9a; }
.ps-bar__print { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; border: 0; background: var(--red); color: var(--on-red); font: 700 15px var(--cond); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.ps-bar__print:hover { background: var(--red-dark); }
@media (max-width: 640px) { .ps-bar__hint { display: none; } .ps-bar { justify-content: space-between; } }
.ps-fit { padding: 24px 0 48px; }
.sheet { box-sizing: border-box; width: 8.5in; min-height: 11in; margin: 0 auto; padding: .4in .45in .5in; background: #fff; box-shadow: 0 2px 18px rgba(0,0,0,.18); }

/* ---- header: the store, on the site's dark bar, the accent rule under it ---- */
.sh-head { display: flex; align-items: center; justify-content: space-between; gap: .3in; padding: .12in .2in; background: linear-gradient(180deg, #222, #111); color: #fff; }
.sh-head__brand { flex: 0 1 auto; min-width: 0; }
.sh-head__logo { display: block; max-width: 3.3in; max-height: .75in; width: auto; height: auto; }
.sh-head__name { font: 400 22pt/1.05 var(--display); text-transform: uppercase; }
.sh-head__contact { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 1px; font-size: 9pt; color: #d6d6d6; }
.sh-head__phone { font: 400 24pt/1.05 var(--display); color: #fff; letter-spacing: .01em; }
.sh-head__host { font: 700 8.5pt var(--cond); text-transform: uppercase; letter-spacing: .12em; color: #fff; }
/* the rule: the accent, ending in the slanted dashes the inventory list's dividers use */
.sh-rule { display: flex; align-items: center; gap: 6px; height: 5px; margin: 0 0 .14in; }
.sh-rule span { flex: 1; height: 100%; background: var(--red); }
.sh-rule::after { content: ""; flex: none; width: .7in; height: 100%; background: repeating-linear-gradient(-66deg, #222 0 4px, transparent 4px 8px); }

/* ---- title: condition tag, the name chip with its make's tick, then the numbers ---- */
.sh-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sh-title h1 { min-width: 0; font: 700 21pt/1.12 var(--body); }
.sh-title .title-chip { border: 1px solid #deddd6; border-left-width: 5px; }
.sh-cond { position: relative; isolation: isolate; display: inline-flex; align-items: center; height: 28px; padding: 0 calc(.85em + 10px) 0 10px; color: var(--on-red); font: 700 12pt/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.sh-cond::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--red); border-left: 4px solid var(--red-deep); clip-path: polygon(0 0, 100% 0, calc(100% - .85em) 100%, 0 100%); }
.sh-cond--used::before, .sh-cond--rental::before { background: #1b1b1b; border-left-color: var(--red); }
.sh-cond--used, .sh-cond--rental { color: #fff; }
.sh-cond--demo { color: #111; }
.sh-cond--demo::before { background: #e9a100; border-left-color: #b67d00; }
/* not on the floor (sold, in transit, on order…): said in black and white beside the condition */
.sh-status { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 2px solid #111; color: #111; font: 700 11pt/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.sh-title__ids { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 2px 0 0; font-size: 9pt; color: #666; text-transform: uppercase; letter-spacing: .04em; }
.sh-title__ids strong { color: #111; letter-spacing: .02em; }
.sh-swatch { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); vertical-align: -1px; }

/* ---- the photo and, beside it, price and QR ---- */
.sh-hero { display: grid; grid-template-columns: minmax(0, 1fr) 2.55in; gap: .16in; margin-top: .14in; }
.sh-photo { position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; background: #f1f1ee; border: 1px solid #e2e2dd; }
.sh-photo img { width: 100%; height: 100%; object-fit: contain; }
.sh-photo .sh-photo__none { object-fit: cover; }
.sh-stock { position: absolute; left: 6px; top: 6px; padding: 3px 7px; background: rgba(20,20,20,.85); color: #fff; font: 700 7pt/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.sh-ribbon { position: absolute; left: 0; bottom: 0; max-width: 85%; padding: 6px calc(.9em + 12px) 6px 12px; background: var(--red); color: var(--on-red); font: 700 10pt/1.1 var(--cond); letter-spacing: .04em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, calc(100% - .9em) 100%, 0 100%); }

.sh-side { display: flex; flex-direction: column; gap: .12in; min-width: 0; }
.sh-price { padding: 10px 13px 11px; background: linear-gradient(180deg, #262626, #121212); border-top: 4px solid var(--red); color: #fff; }
.sh-price__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sh-price__label { font: 700 7.5pt/1.2 var(--cond); text-transform: uppercase; letter-spacing: .08em; color: #bdbdbd; }
.sh-price__save { flex: none; padding: 3px 6px; background: #ffd400; color: #111; font: 700 7.5pt/1 var(--cond); text-transform: uppercase; letter-spacing: .04em; }
.sh-price__amount { margin: 3px 0 1px; font: 400 30pt/1.05 var(--display); letter-spacing: .01em; }
.sh-price__amount--text { font-size: 17pt; line-height: 1.15; }
.sh-price__was { display: flex; flex-wrap: wrap; gap: 0 10px; margin: 0; font-size: 8.5pt; color: #bdbdbd; }
.sh-price__rows { margin: 7px 0 0; padding-top: 6px; border-top: 1px solid #3a3a3a; font-size: 8.5pt; }
.sh-price__rows div { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; }
.sh-price__rows dt { color: #c8c8c8; }
.sh-price__rows dd { margin: 0; font-weight: 700; white-space: nowrap; }
.sh-price__total { margin-top: 3px; padding-top: 4px !important; border-top: 1px solid #3a3a3a; }
.sh-price__total dt { color: #fff; font-weight: 700; }
.sh-price__pay { display: flex; flex-direction: column; margin: 8px 0 0; padding: 5px 8px; border-left: 3px solid var(--red); background: rgba(255,255,255,.07); font-size: 9pt; }
.sh-price__pay strong { font-size: 12pt; }
.sh-price__pay small { color: #bdbdbd; font-size: 7.5pt; }
.sh-price__note { margin: 6px 0 0; font-size: 6.5pt; line-height: 1.3; color: #9a9a9a; }

.sh-qr { display: grid; grid-template-columns: .95in minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px; border: 1px solid #e2e2dd; border-left: 4px solid var(--red); }
.sh-qr__code { position: relative; display: block; width: .95in; background: #fff; }
.sh-qr__code svg { display: block; width: 100%; height: auto; }
.sh-qr__code img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); box-sizing: content-box; max-width: 40%; max-height: 22%; width: auto; height: auto; padding: 2.5%; background: #fff; }
.sh-qr p { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 8pt; line-height: 1.25; color: #555; }
.sh-qr strong { font: 400 12pt/1.1 var(--display); text-transform: uppercase; color: var(--chip-ink); }

.sh-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .1in; margin: .1in 0 0; padding: 0; list-style: none; }
.sh-thumbs li { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #f1f1ee; border: 1px solid #e2e2dd; }
.sh-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.sh-thumbs .sh-stock { left: 3px; top: 3px; font-size: 6pt; padding: 2px 4px; }

/* ---- sections: a red-edged head like the site's, a hairline running on from it ---- */
.sh-sec { margin-top: .17in; }
.sh-h { display: flex; align-items: center; gap: 10px; margin: 0 0 7px !important; padding-left: 8px; border-left: 4px solid var(--red); font: 400 13pt/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em; color: #111; break-after: avoid; break-inside: avoid; }
.sh-h::after { content: ""; flex: 1; height: 1px; background: #dedbd2; }

.sh-facts dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 .16in; margin: 0; }
.sh-facts dl div { min-width: 0; padding: 4px 0 5px; border-bottom: 1px solid #ebe9e3; break-inside: avoid; }
.sh-facts dt { font: 700 6.5pt/1.2 var(--cond); text-transform: uppercase; letter-spacing: .08em; color: #8a8a8a; }
.sh-facts dd { margin: 1px 0 0; font: 700 10pt/1.2 var(--body); color: #111; overflow-wrap: anywhere; }

.sh-about__lead { margin: 0 0 6px; font: 700 11pt/1.35 var(--body); color: var(--chip-ink); }
/* the dealer's description was written for the dark site: its own colors and backgrounds go */
.sh-about__text { columns: 2; column-gap: .3in; font-size: 9pt; line-height: 1.45; color: #2a2a2a; }
.sh-about__text * { color: inherit !important; background: transparent !important; }
.sh-about__text p, .sh-about__text ul, .sh-about__text ol { margin: 0 0 6px; }
.sh-about__text ul, .sh-about__text ol { padding-left: 1.2em; }
.sh-about__text h1, .sh-about__text h2, .sh-about__text h3, .sh-about__text h4 { margin: 2px 0 4px; font: 700 10.5pt/1.2 var(--body); break-after: avoid; }
.sh-about__text img { max-width: 100%; height: auto; break-inside: avoid; }
.sh-about__text iframe, .sh-about__text video, .sh-about__text script, .sh-about__text form { display: none !important; }
.sh-about__text a { text-decoration: none; }

.sh-specs__cols { columns: 2; column-gap: .3in; }
.sh-specs table { width: 100%; margin: 0 0 8px; border-collapse: collapse; font-size: 8.5pt; }
.sh-specs tr { break-inside: avoid; }
.sh-specs caption { break-after: avoid; padding: 0 0 3px; border-bottom: 2px solid var(--red); text-align: left; font: 700 8pt/1.2 var(--cond); text-transform: uppercase; letter-spacing: .07em; color: var(--chip-ink); }
.sh-specs tr:nth-child(even) { background: #f6f5f1; }
.sh-specs th, .sh-specs td { padding: 3px 5px; text-align: left; vertical-align: top; }
.sh-specs th { width: 44%; font-weight: 400; color: #666; }
.sh-specs td { font-weight: 700; color: #111; overflow-wrap: anywhere; }

/* ---- the store again, at the end: where, how to reach, when ---- */
.sh-visit { display: grid; grid-template-columns: repeat(auto-fit, minmax(1.8in, 1fr)); gap: .16in; margin-top: .18in; padding: 9px 14px; background: linear-gradient(180deg, var(--chip-bg-hi), var(--chip-bg)); border-left: 5px solid var(--red); break-inside: avoid; }
.sh-visit h2 { margin: 0 0 3px; font: 700 7.5pt/1.2 var(--cond); text-transform: uppercase; letter-spacing: .1em; color: var(--chip-ink); }
.sh-visit p { margin: 0; font-size: 9pt; line-height: 1.35; color: #333; }
.sh-visit__phone { font: 400 15pt/1.1 var(--display); color: #111; }
.sh-visit__hours { margin: 0; font-size: 8.5pt; }
.sh-visit__hours div { display: flex; justify-content: space-between; gap: 10px; }
.sh-visit__hours dd { margin: 0; font-weight: 700; }

.sh-fine { margin-top: .12in; font-size: 6.5pt; line-height: 1.35; color: #858585; }
.sh-fine p { margin: 0 0 3px; }

/* ---- on paper ---- */
@media print {
  html:has(.ps), .ps { background: #fff; min-height: 0; }
  .ps-bar { display: none !important; }
  .ps-fit { padding: 0; }
  .sheet { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; zoom: 1 !important; }
  .ps a { color: inherit; }
}
.sh-qr em { font: 700 7.5pt/1.2 var(--cond); font-style: normal; color: #111; overflow-wrap: anywhere; }
