@page {
  size: A4;
  margin: 14mm;
}

body * { visibility: hidden !important; }
.print-root, .print-root * { visibility: visible !important; }

.print-root {
  display: block !important;
  position: absolute;
  inset: 0;
  padding: 0;
  background: #fff;
  color: #1f2433;
  font-family: "Figtree", "Segoe UI", sans-serif;
}

.print-sheet { max-width: 180mm; margin: 0 auto; }

.print-header {
  display: flex; justify-content: space-between; gap: 1rem;
  align-items: flex-start; margin-bottom: 1.1rem;
}
.print-brand { display: flex; gap: 0.7rem; align-items: center; }
.print-brand img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  background: transparent; border: 0;
}
.print-brand h1 {
  margin: 0; color: #3b4693; font-size: 1.35rem; font-weight: 800;
}
.print-brand p { margin: 0.15rem 0 0; font-size: 0.78rem; color: #5c6478; }

.print-meta { text-align: right; }
.print-meta .title {
  margin: 0; color: #3b4693; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.04em;
}
.print-meta p { margin: 0.2rem 0 0; font-size: 0.85rem; color: #5c6478; }

.print-cliente {
  border: 1px solid #cfd3e6; border-radius: 10px; padding: 0.7rem 0.85rem;
  margin-bottom: 1rem; background: #f7f8fc;
}
.print-cliente .label {
  font-size: 0.72rem; font-weight: 800; color: #3b4693; letter-spacing: 0.04em;
}
.print-cliente p { margin: 0.2rem 0 0; font-weight: 700; }

.print-producto {
  display: grid;
  grid-template-columns: 4cm 1fr;
  gap: 0.9rem;
  align-items: start;
  margin-bottom: 1.1rem;
  clear: both;
}
.print-foto {
  width: 4cm;
  max-width: 4cm;
  height: 4cm;
  border: 1px solid #3b4693;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: #8a91a5;
  background: #fff;
  padding: 0.25cm;
  overflow: hidden;
}
.print-foto img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}
.print-producto-txt { min-width: 0; }
.print-producto .kicker {
  margin: 0; font-size: 0.75rem; font-weight: 800; color: #3b4693; text-transform: uppercase;
}
.print-producto h2 {
  margin: 0.15rem 0 0; color: #3b4693; font-size: 1.25rem; font-weight: 800;
}
.print-producto .ean { margin: 0.25rem 0 0; font-size: 0.82rem; color: #5c6478; }

.print-specs {
  width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.9rem;
}
.print-specs caption {
  text-align: left; font-size: 0.75rem; font-weight: 800; color: #3b4693;
  letter-spacing: 0.04em; margin-bottom: 0.3rem;
}
.print-specs td {
  padding: 0.4rem 0; border-bottom: 1px solid #e4e7f1;
}
.print-specs td:last-child { text-align: right; font-weight: 800; }

.print-desglose {
  border: 1px solid #cfd3e6; border-radius: 10px; padding: 0.55rem 0.85rem;
  margin-bottom: 0.8rem;
}
.print-desglose .row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.4rem 0; border-bottom: 1px solid #e4e7f1; font-size: 0.92rem;
}
.print-desglose .row:last-child { border-bottom: 0; }
.print-desglose .gratis { color: #1f8a4c; font-weight: 800; }

.print-total {
  background: #3b4693; color: #fff; border-radius: 10px;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.85rem 1rem; font-weight: 700;
}
.print-total strong { font-size: 1.45rem; font-weight: 800; }

.print-foot {
  margin-top: 1rem; font-size: 0.8rem; color: #5c6478; line-height: 1.4;
}
