html[data-site-theme="v2"] body:not(.fiscal-workspace) *,
html[data-site-theme="v2"] body:not(.fiscal-workspace) *::before,
html[data-site-theme="v2"] body:not(.fiscal-workspace) *::after { box-sizing: border-box; }
html[data-site-theme="v2"] body:not(.fiscal-workspace) { overflow-x: hidden; }
.booklet-page { width: min(1320px, 100%); max-width: 100%; min-width: 0; }
.booklet-heading { padding: 27px 0 18px; border-bottom: 1px solid var(--v2-line); }
.booklet-breadcrumb { display: flex; gap: 9px; margin-bottom: 18px; color: var(--v2-muted); font-size: 11px; }
.booklet-breadcrumb a { color: var(--v2-muted); text-decoration: none; }
.booklet-breadcrumb a:hover { color: var(--v2-blue); }
.booklet-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; min-width: 0; }
.booklet-heading-row > div { min-width: 0; }
.booklet-heading-row p, .booklet-lead, .booklet-note { overflow-wrap: anywhere; }
.booklet-heading h1 { margin: 0 !important; font-size: 27px !important; }
.booklet-heading p { margin: 7px 0 0; color: var(--v2-muted); font-size: 12px; }
.booklet-account { padding: 7px 12px; border: 1px solid #a9c5df; border-radius: 5px; color: #256ba9; font-size: 11px; text-decoration: none; }
.booklet-account:hover { background: var(--v2-blue-soft); }
.booklet-workspace, .booklet-catalog-column, .booklet-quote { min-width: 0; }
.booklet-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 30px; padding: 28px 0 42px; align-items: start; }
.booklet-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--v2-line); }
.booklet-section-heading h2, .booklet-quote h2 { margin: 0 !important; font-size: 17px !important; }
.booklet-section-heading span, .quote-heading span { color: var(--v2-muted); font-size: 11px; }
.booklet-lead { margin: 13px 0 20px; color: var(--v2-muted); font-size: 12px; }
.booklet-binding-notice { display: flex; align-items: flex-start; gap: 10px; margin: -6px 0 20px; padding: 12px 14px; border: 1px solid var(--v2-line); border-left: 3px solid var(--v2-blue); background: #f8faf8; }
.booklet-binding-notice img { width: 24px; height: 24px; color: var(--v2-blue); }
.booklet-binding-notice strong { display: block; margin-bottom: 2px; color: var(--v2-ink); font-size: 12px; }
.booklet-binding-notice span { display: block; color: var(--v2-muted); font-size: 11px; line-height: 1.6; }
.booklet-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.booklet-card { display: grid; grid-template-columns: 122px minmax(0, 1fr); gap: 15px; min-width: 0; padding: 14px; border: 1px solid var(--v2-line); background: #fff; }
.booklet-card.selected { border-color: var(--v2-blue); box-shadow: inset 3px 0 0 var(--v2-blue); }
.booklet-card-cover { display: block; width: 122px; height: 150px; padding: 0; overflow: hidden; border: 0; background: #f2f3f2; cursor: pointer; }
.booklet-card-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.booklet-card h3 { margin: 2px 0 6px; color: var(--v2-ink); font-size: 15px; }
.booklet-card p { margin: 0; color: var(--v2-muted); font-size: 11px; line-height: 1.6; }
.booklet-card > div { min-width: 0; }
.booklet-meta { margin-top: 8px !important; color: var(--v2-ink) !important; }
.booklet-card-controls { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.booklet-card-controls label { color: var(--v2-muted); font-size: 11px; }
.booklet-quantity { width: 64px; height: 32px !important; padding: 4px 7px !important; font-size: 12px; }
.booklet-select { min-height: 32px; padding: 5px 9px; border: 1px solid var(--v2-line); border-radius: 4px; background: #fff; color: var(--v2-blue); font-size: 11px; }
.booklet-note { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--v2-line); color: var(--v2-muted); font-size: 11px; line-height: 1.7; }
.booklet-quote { position: sticky; top: 18px; padding: 18px; border: 1px solid var(--v2-line); background: #fbfbfa; }
.quote-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--v2-line); }
.quote-heading h2, .quote-heading span { min-width: 0; }
.quote-heading span { text-align: right; overflow-wrap: anywhere; }
.quote-preview { padding: 13px 0 5px; border-bottom: 1px solid var(--v2-line); }
.quote-preview-label { display: block; margin-bottom: 9px; color: var(--v2-muted); font-size: 10px; }
.quote-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quote-preview-item { min-width: 0; margin: 0; }
.quote-preview-item img { display: block; width: 100%; height: 132px; object-fit: contain; background: #f1f3f1; }
.quote-preview-item figcaption { margin-top: 5px; color: var(--v2-muted); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.quote-lines { min-height: 98px; padding: 13px 0; }
.quote-empty { margin: 0; color: var(--v2-muted); font-size: 12px; line-height: 1.7; }
.quote-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 7px 0; border-bottom: 1px solid #eceeec; font-size: 12px; }
.quote-line small { display: block; color: var(--v2-muted); font-size: 10px; }
.quote-line strong { color: var(--v2-ink); font-weight: 600; }
.quote-line > div, .quote-line strong { min-width: 0; overflow-wrap: anywhere; }
.quote-document h3 { margin: 0 0 13px; color: var(--v2-ink); font-size: 20px; text-align: center; }
.quote-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; background: #fff; font-size: 11px; }
.quote-table th, .quote-table td { border: 1px solid var(--v2-line); padding: 7px 8px; vertical-align: middle; }
.quote-table th { background: #f4f6f4; color: var(--v2-muted); font-weight: 650; }
.quote-meta th { width: 70px; }
.quote-items th { text-align: center; }
.quote-items td:nth-child(n+3), .quote-totals td { text-align: right; }
.quote-totals { width: min(260px, 100%); margin-left: auto; }
.quote-totals tr:last-child th, .quote-totals tr:last-child td { color: var(--v2-ink); font-size: 13px; font-weight: 800; }
.quote-options { display: grid; gap: 10px; padding: 12px 0; border-top: 1px solid var(--v2-line); }
.quote-options label { display: grid; gap: 5px; color: var(--v2-muted); font-size: 11px; }
.quote-options input, .quote-options select { width: 100%; min-height: 36px; border: 1px solid var(--v2-line); border-radius: 4px; background: #fff; padding: 7px 9px; font-size: 12px; }
.quote-total { margin: 0; border-top: 1px solid var(--v2-line); }
.quote-total div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; color: var(--v2-muted); font-size: 11px; }
.quote-total dt, .quote-total dd { margin: 0; }
.quote-total dd { text-align: right; }
.quote-total .total-row { margin-top: 3px; padding-top: 11px; border-top: 1px solid var(--v2-line); color: var(--v2-ink); font-size: 15px; font-weight: 700; }
.quote-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.booklet-button { min-height: 38px; padding: 8px 10px; border: 1px solid var(--v2-line); border-radius: 4px; background: #fff; color: var(--v2-ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.booklet-button.primary { border-color: var(--v2-blue); background: var(--v2-blue); color: #fff; }
.booklet-button:disabled { cursor: not-allowed; opacity: .45; }
.booklet-fine { min-height: 36px; margin: 12px 0 0; color: var(--v2-muted); font-size: 11px; line-height: 1.6; }
.quote-legal { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--v2-line); font-size: 10px; }
.quote-legal strong { color: var(--v2-ink); }
.quote-legal span { color: #a86c00; text-align: right; }
.quote-legal p { grid-column: 1 / -1; margin: 4px 0 0; color: var(--v2-muted); line-height: 1.6; }
.checkout-link,
.booklet-payment-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--v2-blue);
  border-radius: 4px;
  color: var(--v2-blue);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.checkout-link {
  width: 100%;
  margin-top: 12px;
}
.checkout-link:hover,
.booklet-payment-link a:hover {
  background: var(--v2-blue-soft);
}
.booklet-process { padding: 22px 0 32px; border-top: 1px solid var(--v2-line); }
.process-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.process-grid > div { display: grid; grid-template-columns: 24px 1fr; gap: 2px 9px; padding: 18px 18px 5px 0; border-right: 1px solid var(--v2-line); }
.process-grid > div:not(:first-child) { padding-left: 18px; }
.process-grid > div:last-child { border-right: 0; }
.process-grid b { grid-row: span 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--v2-blue); color: #fff; font-size: 11px; }
.process-grid strong { font-size: 13px; }
.process-grid p { margin: 0; color: var(--v2-muted); font-size: 11px; line-height: 1.6; }
.booklet-payment-link {
  margin: 18px 0 0;
}
.booklet-payment-link a {
  min-width: 150px;
  padding: 7px 13px;
}
.booklet-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0 30px; border-top: 1px solid var(--v2-line); color: var(--v2-muted); font-size: 11px; }
.booklet-footer span:first-child { color: var(--v2-ink); font-weight: 700; }
.quote-print-only { display: none; }

@media print {
  @page { size: A4; margin: 0; }
  html,
  body {
    width: 210mm;
    min-height: 297mm;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  html[data-site-theme="v2"] body:not(.fiscal-workspace) { padding: 0; background: #fff !important; }
  html[data-site-theme="v2"] body:not(.fiscal-workspace) #v2-sidebar,
  .booklet-heading, .booklet-catalog-column, .booklet-process, .booklet-footer { display: none !important; }
  html[data-site-theme="v2"] body:not(.fiscal-workspace) #main { padding: 0; }
  .booklet-workspace { display: block; padding: 0; }
  .booklet-quote { box-sizing: border-box; position: static; width: 210mm; min-height: 297mm; border: 0; padding: 18mm 19mm 16mm; background: #fff; }
  .quote-heading, .quote-preview, .quote-options, .quote-total, .quote-actions, .quote-legal, .booklet-fine { display: none; }
  .checkout-link,
  .booklet-payment-link { display: none; }
  .quote-lines { padding: 0; min-height: 0; }
  .quote-document h3 { font-size: 24px; margin-bottom: 18px; }
  .quote-table { font-size: 11pt; }
  .quote-table th, .quote-table td { padding: 7pt; }
}

@media (max-width: 980px) {
  .booklet-workspace { grid-template-columns: 1fr; }
  .booklet-quote { position: static; }
}
@media (max-width: 680px) {
  html[data-site-theme="v2"] body:not(.fiscal-workspace) #main { padding-inline: 16px; }
  .booklet-heading { padding-top: 19px; }
  .booklet-heading-row { display: block; }
  .booklet-account { display: inline-block; margin-top: 12px; }
  .booklet-list { grid-template-columns: 1fr; }
  .booklet-card { grid-template-columns: 96px minmax(0, 1fr); }
  .booklet-card-cover { width: 96px; height: 122px; }
  .quote-preview-item img { height: 118px; }
  .process-grid { grid-template-columns: 1fr; }
  .process-grid > div, .process-grid > div:not(:first-child) { padding: 14px 0; border-right: 0; border-bottom: 1px solid var(--v2-line); }
  .process-grid > div:last-child { border-bottom: 0; }
  .booklet-footer { display: block; }
  .booklet-footer span { display: block; margin-top: 5px; }
}
