/* ==========================================================================
   Ürün teknik föyü (resources/views/pages/product-sheet.blade.php)
   Ekranda gri zemin üstünde A4 kâğıt; baskıda yalnız kâğıt (çubuk gizli).
   Renkler sitenin style.css'indeki değişkenlerle aynı.
   ========================================================================== */
:root {
  --primary-dark: #07192f;
  --primary: #0f294a;
  --accent-blue: #0284c7;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-light: #e2e8f0;
  --bg-soft: #f1f5f9;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

body.sheet-body {
  margin: 0;
  background: #e5e9f0;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 9pt;
  line-height: 1.45;
}

.sheet-rtl { --font-sans: 'Noto Kufi Arabic', 'Plus Jakarta Sans', sans-serif; }

/* Ekrandaki üst çubuk ------------------------------------------------------ */
.sheet-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.9rem;
}

.sheet-toolbar-back { color: #cbd5e1; text-decoration: none; font-weight: 600; }
.sheet-toolbar-back:hover { color: #fff; }
.sheet-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.sheet-toolbar-hint { color: #94a3b8; font-size: 0.8rem; }

.sheet-toolbar-print {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent-blue);
  color: #fff;
  font: 700 0.9rem var(--font-sans);
  cursor: pointer;
}

.sheet-toolbar-print:hover { background: #0369a1; }

/* Kâğıt -------------------------------------------------------------------- */
.sheet-paper {
  width: 210mm;
  min-height: 297mm;
  margin: 1.5rem auto 3rem;
  padding: 10mm 12mm 8mm;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 41, 74, 0.15);
  display: flex;
  flex-direction: column;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 3mm;
  border-bottom: 2px solid var(--primary);
}

.sheet-logo { height: 11mm; width: auto; }
.sheet-header-meta { display: flex; flex-direction: column; align-items: flex-end; text-align: end; }
.sheet-doc-type { font-size: 8pt; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-blue); }
.sheet-doc-code { font-size: 15pt; font-weight: 800; color: var(--primary); line-height: 1.2; }

.sheet-intro {
  display: grid;
  grid-template-columns: 1fr 62mm;
  gap: 7mm;
  align-items: center;
  padding: 4.5mm 0 4mm;
}

.sheet-intro--no-image { grid-template-columns: 1fr; }
.sheet-tag { display: inline-block; font-size: 7.5pt; font-weight: 700; letter-spacing: 0.1em; color: var(--accent-blue); margin-bottom: 1.5mm; }
.sheet-title { margin: 0 0 2mm; font-size: 17pt; font-weight: 800; line-height: 1.15; color: var(--primary); }
.sheet-lead { margin: 0; color: #334155; font-size: 8.8pt; }

.sheet-image {
  height: 40mm;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3mm;
  border: 1px solid var(--border-light);
  border-radius: 3mm;
  background: #fff;
}

.sheet-image img { max-width: 100%; max-height: 100%; object-fit: contain; }

.sheet-keyspecs {
  display: grid;
  grid-template-columns: repeat(var(--count, 4), 1fr);
  margin-bottom: 4.5mm;
  border-radius: 2.5mm;
  background: var(--primary);
  color: #fff;
  overflow: hidden;
}

.sheet-keyspec { display: flex; flex-direction: column; gap: 0.5mm; padding: 2.4mm 4mm; }
.sheet-keyspec + .sheet-keyspec { border-inline-start: 1px solid rgba(255, 255, 255, 0.18); }
.sheet-keyspec-label { font-size: 6.5pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #93c5fd; }
.sheet-keyspec-value { font-size: 10.5pt; font-weight: 800; }

.sheet-section { margin-bottom: 4.5mm; }
.sheet-heading { margin: 0 0 1.5mm; font-size: 11pt; font-weight: 800; color: var(--primary); }
.sheet-subtext { margin: 0 0 2.5mm; color: var(--text-muted); font-size: 8pt; }

.sheet-table { width: 100%; border-collapse: collapse; font-size: 7.4pt; line-height: 1.3; }
.sheet-table th,
.sheet-table td { padding: 1.1mm 1.8mm; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border-light); }
.sheet-table th { background: var(--bg-soft); color: var(--primary); font-weight: 700; font-size: 7pt; line-height: 1.3; }
.sheet-table tbody tr:nth-child(even) td { background: #f8fafc; }
.sheet-table tr { break-inside: avoid; }
/* Değerler tek satırda (föy kısa kalır); kâğıda sığmayan tabloda betik --wrap ekler */
.sheet-table td { white-space: nowrap; }
.sheet-table--wrap td { white-space: normal; }
.sheet-model { font-weight: 800; color: var(--primary); white-space: nowrap; }
.sheet-table--dense { font-size: 6.9pt; }
.sheet-table--dense th,
.sheet-table--dense td { padding: 0.9mm 1.4mm; }

.sheet-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-bottom: 4.5mm; }
.sheet-cards--single { grid-template-columns: 1fr; }
.sheet-card { padding: 3mm 3.5mm; border: 1px solid var(--border-light); border-radius: 2.5mm; break-inside: avoid; }
.sheet-list { margin: 0; padding: 0; list-style: none; font-size: 7.6pt; line-height: 1.38; }
.sheet-list li { padding: 0.5mm 0; }
.sheet-list strong { color: var(--primary); }
.sheet-list--bullets li { position: relative; padding-inline-start: 3.5mm; }
.sheet-list--bullets li::before { content: ""; position: absolute; inset-inline-start: 0; top: 1.9mm; width: 1.4mm; height: 1.4mm; border-radius: 50%; background: var(--accent-blue); }
.sheet-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.sheet-group-title { margin: 0 0 1mm; font-size: 8.5pt; font-weight: 700; color: var(--primary); }

.sheet-footer { margin-top: auto; padding-top: 3mm; border-top: 2px solid var(--primary); break-inside: avoid; }
.sheet-contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 5mm; font-size: 8pt; }
.sheet-contact-grid > div { display: flex; flex-direction: column; gap: 0.6mm; }
.sheet-contact-grid strong { color: var(--primary); }
.sheet-note { margin: 3mm 0 0; color: var(--text-light, #94a3b8); font-size: 6.8pt; }

/* Telefon: kâğıt ekran genişliğine sığar --------------------------------- */
@media screen and (max-width: 800px) {
  .sheet-toolbar-hint { display: none; }
  /* :not(.is-measuring): baskı öncesi ölçüm A4 düzeninde yapılır */
  .sheet-paper:not(.is-measuring) { width: auto; min-height: 0; margin: 1rem; padding: 1.25rem 1rem; }
  .sheet-paper:not(.is-measuring) .sheet-intro,
  .sheet-paper:not(.is-measuring) .sheet-cards,
  .sheet-paper:not(.is-measuring) .sheet-contact-grid { grid-template-columns: 1fr; }
  .sheet-paper:not(.is-measuring) .sheet-keyspecs { grid-template-columns: 1fr 1fr; }
  .sheet-paper:not(.is-measuring) .sheet-keyspec + .sheet-keyspec { border-inline-start: 0; }
  .sheet-paper:not(.is-measuring) .sheet-section { overflow-x: auto; }
}

/* Baskı / PDF -------------------------------------------------------------- */
@page { size: A4; margin: 0; }

@media print {
  body.sheet-body { background: #fff; }
  .sheet-toolbar { display: none; }
  /* 297mm tam sayfada yuvarlama boş ikinci sayfa açabiliyor */
  .sheet-paper { width: 210mm; min-height: 296mm; margin: 0; box-shadow: none; }
  /* Tek sayfaya sığmayan föy küçültülür (--sheet-fit, sayfadaki betik); dış ölçü yine A4 */
  .sheet-paper.is-fitted {
    zoom: var(--sheet-fit);
    width: calc(210mm / var(--sheet-fit));
    min-height: calc(296mm / var(--sheet-fit));
  }
}

/* Betiğin ölçümü için: kâğıdın A4 genişliğindeki doğal yüksekliği */
.sheet-paper.is-measuring { width: 210mm !important; min-height: 0 !important; zoom: 1 !important; }
