/* 인쇄 스타일.
   - 모든 페이지: 사이트 헤더·푸터·플로팅 UI를 숨기고 본문만 인쇄.
   - 제품 상세: 화면 레이아웃 대신 전용 사양서 양식(.product-print-sheet)만 인쇄. */

@media screen {
  .product-print-sheet {
    display: none;
  }
}

@media print {
  /* 브라우저 기본 머리글/바닥글(날짜·문서 제목·URL)은 지우고 쪽수만 남긴다. */
  @page {
    margin: 14mm 12mm;

    @top-left {
      content: "";
    }

    @top-center {
      content: "";
    }

    @top-right {
      content: "";
    }

    @bottom-left {
      content: "";
    }

    @bottom-center {
      content: "";
    }

    @bottom-right {
      content: counter(page) " / " counter(pages);
      color: #6b7280;
      font-size: 9pt;
    }
  }

  .site-header,
  .site-footer,
  .floating-actions,
  .scroll-top-action,
  .site-popup,
  .quote-modal,
  .board-tools,
  .board-pagination {
    display: none !important;
  }

  body {
    background: #fff;
  }

  /* 제품 상세: 화면용 콘텐츠는 전부 숨기고 인쇄 시트만 사용 */
  .product-detail-shop,
  .product-detail-content {
    display: none !important;
  }

  .product-print-sheet {
    display: block;
    color: #111114;
    font-size: 11pt;
    line-height: 1.6;
  }

  .print-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #111114;
    padding-bottom: 10px;
  }

  .print-sheet-head img {
    height: 26px;
    object-fit: contain;
  }

  .print-sheet-head span {
    color: #667085;
    font-size: 10pt;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .print-sheet-title {
    margin-top: 18px;
  }

  .print-sheet-title em {
    display: block;
    color: #009d9a;
    font-size: 10pt;
    font-style: normal;
    font-weight: 800;
  }

  .print-sheet-title h1 {
    margin: 2px 0 6px;
    font-size: 22pt;
    font-weight: 900;
    line-height: 1.25;
  }

  .print-sheet-title p {
    margin: 0;
    color: #303846;
  }

  .print-sheet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
  }

  .print-sheet-tags b {
    border: 1px solid #d0d5dd;
    border-radius: 999px;
    padding: 1px 10px;
    color: #475467;
    font-size: 9pt;
    font-weight: 700;
  }

  .print-sheet-visual {
    display: grid;
    place-items: center;
    margin: 16px 0 0;
    padding: 8px;
  }

  .print-sheet-visual img {
    max-width: 100%;
    max-height: 78mm;
    object-fit: contain;
  }

  /* 메인 이미지 아래 나머지 제품 이미지: 한 줄에 3개씩 */
  .print-sheet-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 6px;
  }

  .print-sheet-gallery figure {
    display: grid;
    place-items: center;
    margin: 0;
    padding: 4px;
    break-inside: avoid;
  }

  .print-sheet-gallery img {
    max-width: 100%;
    max-height: 32mm;
    object-fit: contain;
  }

  .print-sheet-section {
    margin-top: 22px;
  }

  .print-sheet-section h2 {
    margin: 0 0 10px;
    border-left: 4px solid #009d9a;
    padding-left: 8px;
    font-size: 14pt;
    font-weight: 900;
    break-after: avoid;
  }

  .print-sheet-section .board-detail-rich img {
    max-width: 100%;
    height: auto;
  }

  .print-sheet-files {
    margin: 0;
    padding-left: 1.2em;
  }

  .print-sheet-files li {
    margin: 2px 0;
  }

  .print-sheet-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 26px;
    border-top: 1px solid #d0d5dd;
    padding-top: 8px;
    color: #475467;
    font-size: 9pt;
  }

  .print-sheet-foot strong {
    color: #111114;
    font-weight: 900;
  }

  /* 사양표: 화면 스타일을 재사용하되 배경색이 인쇄에서도 보이게 한다. */
  .product-print-sheet .product-spec-table {
    font-size: 9.5pt;
  }

  .product-print-sheet .product-spec-table th,
  .product-print-sheet .product-spec-table td {
    padding: 8px 12px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .product-print-sheet .product-spec-table tr {
    break-inside: avoid;
  }
}
