/*
 * Global print stylesheet — Nicosia Motors
 *
 * Loaded via <link rel="stylesheet" href="/print.css" media="print" /> on the
 * car detail page so that hitting Cmd/Ctrl+P produces a clean ink-friendly
 * sheet without site chrome, CTAs, or related-car grids.
 *
 * For the dedicated showroom placard sheet see /araclar/[slug]/yazdir.
 */

@media print {
  @page {
    size: A4 portrait;
    margin: 14mm;
  }

  /* Force background colors / images to print (e.g. hero placeholders). */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.45;
  }

  /* Force the design-token gold to a darker, ink-friendly gold on paper. */
  :root {
    --color-gold: #a8862a !important;
    --color-gold-soft: #b8975e !important;
    --color-gold-deep: #715626 !important;
    --color-gold-bright: #a8862a !important;
  }

  /* --- Hide site chrome and interactive widgets ---------------------- */
  header,
  footer,
  .site-header,
  .site-footer,
  .topbar,
  .header,
  .footer,
  .mega-menu,
  .chat-widget,
  .cookie-consent,
  .cookie-banner,
  .nm-cmp-bar,
  .float-action-cluster,
  .compare-bar,
  .back-link,
  .detail-ctas,
  .detail-related,
  .filter-bar,
  .pagination,
  nav,
  [data-print-hide],
  [aria-label="WhatsApp"],
  .detail-cta-wa,
  .detail-print-link,
  .skip-link {
    display: none !important;
  }

  /* --- Detail page — promote content -------------------------------- */
  main,
  .detail-page,
  .container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  /* Stack gallery + aside vertically — single-column on paper. */
  .detail-grid {
    display: block !important;
    grid-template-columns: none !important;
  }

  /* Gallery: show the first image at near-page width, hide thumbs after. */
  .detail-gallery {
    display: block !important;
  }
  .detail-gallery .gallery-frame {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 6mm;
  }
  .detail-gallery .gallery-frame:first-child img {
    width: 100% !important;
    height: auto !important;
    max-height: 110mm !important;
    object-fit: cover !important;
  }
  /* Only show the cover + at most one secondary photo to save ink. */
  .detail-gallery .gallery-frame:nth-child(n + 3) {
    display: none !important;
  }

  /* Aside / spec block — keep readable, no aside styling, no borders. */
  .detail-aside {
    display: block !important;
    position: static !important;
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }
  .detail-brand {
    font-size: 10pt;
    letter-spacing: 0.16em;
    color: #6b6663 !important;
    text-transform: uppercase;
    margin-bottom: 1mm;
  }
  .detail-name {
    font-size: 22pt !important;
    line-height: 1.1 !important;
    margin: 0 0 2mm 0 !important;
  }
  .detail-sub {
    font-size: 10pt;
    color: #4a4744 !important;
    margin-bottom: 4mm;
  }
  .detail-price {
    font-size: 22pt !important;
    font-weight: 800 !important;
    color: #0a0908 !important;
    margin: 0 0 6mm 0 !important;
  }

  /* Spec list — two-column flat table on paper. */
  .detail-specs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 6mm !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .detail-specs > div {
    padding: 2mm 0 !important;
    border-bottom: 0.5px solid #d8d4cf !important;
  }
  .detail-specs dt {
    font-size: 8.5pt !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6b6663 !important;
  }
  .detail-specs dd {
    font-size: 11pt !important;
    margin: 0 !important;
  }

  /* Description — wider on paper, smaller font. */
  .detail-description {
    margin-top: 8mm !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .detail-description .h-section {
    font-size: 11pt !important;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #6b6663 !important;
    margin-bottom: 2mm !important;
  }
  .detail-description p {
    font-size: 10pt !important;
    line-height: 1.55 !important;
    color: #2a2724 !important;
    max-width: 100% !important;
  }

  /* Strip background images on hero/gallery placeholders, force gray-on-white. */
  .gallery-placeholder {
    background: #f3f1ee !important;
    color: #6b6663 !important;
  }

  /* Prevent links from spelling out the URL after the anchor text. */
  a[href]::after {
    content: "" !important;
  }

  /* --- Page-break rules — never break key cards across pages --------- */
  .fc,
  .detail-specs,
  .detail-specs dl,
  .test-card,
  .budget-card,
  .gallery-frame,
  .ps-metrics,
  .ps-specs,
  .ps-qrwrap,
  .ps-foot {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* Belt-and-braces: hide any floating chrome that uses common widget hooks. */
  .cookie-banner,
  .nm-cmp-bar,
  .float-action-cluster,
  .nm-floats,
  .nm-toast-stack,
  .chat-widget,
  [data-floating],
  [data-widget="chat"] {
    display: none !important;
  }
}
