/* PDF Preview Modal */
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pdf-modal.is-open { display: flex; }

.pdf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.75);
  backdrop-filter: blur(4px);
}

.pdf-modal__dialog {
  position: relative;
  background: #e2e8f0;
  border-radius: 14px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  overflow: hidden;
}

.pdf-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #0a1628;
  color: #fff;
}
.pdf-modal__header h3 {
  font-size: 15px;
  font-weight: 700;
}
.pdf-modal__close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.pdf-modal__close:hover { opacity: 1; }

.pdf-modal__body {
  overflow: auto;
  padding: 20px;
  flex: 1;
  display: flex;
  justify-content: center;
  background: #94a3b8;
}

.pdf-modal__footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 18px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}
.pdf-modal__btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.pdf-modal__btn--ghost {
  background: #f1f5f9;
  color: #334155;
}
.pdf-modal__btn--primary {
  background: #f97316;
  color: #fff;
}
.pdf-modal__btn--dark {
  background: #0a1628;
  color: #fff;
}

/* A4 Flyer Sheet — 794×1123px @ 96dpi */
.a4-flyer-sheet {
  width: 794px;
  height: 1123px;
  background: #fff;
  color: #0a1628;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  font-size: 10px;
  line-height: 1.35;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.a4-accent { color: #2563eb; }

/* Header */
.a4-header {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 2px solid #e2e8f0;
  flex-shrink: 0;
}
.a4-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  margin-bottom: 6px;
}
.a4-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0a1628;
  color: #fff;
  padding: 5px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 8px;
}
.a4-badge svg { width: 14px; height: 14px; flex-shrink: 0; color: #f97316; }
.a4-badge strong { display: block; font-size: 8px; color: #fdba74; }
.a4-badge span { font-size: 7px; opacity: 0.85; }
.a4-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  color: #0a1628;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.a4-subtitle {
  font-size: 9px;
  color: #64748b;
  font-weight: 600;
}
.a4-header__right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.a4-devices { transform: scale(0.55); transform-origin: top right; margin-top: -8px; margin-right: -20px; }
.a4-shield-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #2563eb;
  color: #fff;
  font-size: 6px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 50px;
  margin-top: -30px;
  white-space: nowrap;
}
.a4-shield-badge svg { width: 10px; height: 10px; }

/* Products 3×2 grid */
.a4-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 12px;
  flex: 1;
  min-height: 0;
}
.a4-product {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fafbfc;
}
.a4-product__head {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-bottom: 4px;
}
.a4-product__num {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f97316;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.a4-product__icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--p-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.a4-product__icon svg { width: 12px; height: 12px; }
.a4-product__head h3 {
  font-size: 9px;
  font-weight: 800;
  color: var(--p-dark);
  line-height: 1.2;
}
.a4-product__tag {
  display: inline-block;
  background: var(--p-bg);
  color: var(--p-dark);
  font-size: 6px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 50px;
  margin-top: 2px;
}
.a4-product__desc {
  font-size: 7px;
  color: #475569;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.a4-product__feats {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 4px;
}
.a4-product__feats li {
  font-size: 6px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 2px;
}
.a4-product__feats svg { width: 8px; height: 8px; color: var(--p-color); flex-shrink: 0; }
.a4-product__bottom {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 4px;
  margin-top: auto;
  align-items: end;
}
.a4-product__mockup { overflow: hidden; border-radius: 4px; }
.a4-product__mockup .mockup-card {
  transform: scale(0.42);
  transform-origin: top left;
  width: 240%;
  margin-bottom: -55%;
}
.a4-product__cta {
  text-align: center;
  background: var(--p-bg);
  border-radius: 6px;
  padding: 4px 3px;
}
.a4-product__cta small {
  display: block;
  font-size: 5px;
  font-weight: 800;
  color: var(--p-dark);
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}
.a4-product__cta strong {
  display: block;
  font-size: 6px;
  color: var(--p-color);
  word-break: break-all;
  line-height: 1.2;
  margin-bottom: 2px;
}
.a4-product__cta em {
  font-size: 6px;
  color: #94a3b8;
  font-style: italic;
}
.a4-product__cta img {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  background: #fff;
}

/* Footer */
.a4-footer {
  flex-shrink: 0;
  padding: 8px 12px 10px;
  border-top: 2px solid #e2e8f0;
}
.a4-promo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.a4-promo__star {
  background: #fbbf24;
  color: #0a1628;
  font-size: 7px;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 50%;
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(251,191,36,0.4);
}
.a4-promo h4 {
  font-size: 13px;
  font-weight: 800;
  color: #0a1628;
  margin-bottom: 4px;
}
.a4-promo__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.a4-promo__chips span {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 7px;
  font-weight: 700;
  color: #475569;
}
.a4-promo__chips svg { width: 10px; height: 10px; color: #f97316; }

.a4-contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.a4-contact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
}
.a4-contact svg { width: 18px; height: 18px; flex-shrink: 0; }
.a4-contact small { display: block; font-size: 6px; font-weight: 600; opacity: 0.8; }
.a4-contact strong { font-size: 10px; font-weight: 800; }
.a4-contact--web { background: #2563eb; color: #fff; }
.a4-contact--wa { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.a4-contact--wa svg { color: #16a34a; }

.a4-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #0a1628;
  border-radius: 8px;
  padding: 6px 8px;
}
.a4-trust span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 5.5px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.2;
}
.a4-trust svg { width: 10px; height: 10px; color: #f97316; flex-shrink: 0; }

/* Print — hanya flyer A4 */
@media print {
  .nav, .fab-wa, #flyer-content,
  .pdf-modal__backdrop,
  .pdf-modal__header,
  .pdf-modal__footer { display: none !important; }

  .pdf-modal {
    display: block !important;
    position: static !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .pdf-modal__dialog {
    max-width: none !important;
    max-height: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #fff !important;
  }
  .pdf-modal__body {
    padding: 0 !important;
    background: #fff !important;
    overflow: visible !important;
    display: block !important;
  }
  .a4-flyer-sheet {
    box-shadow: none !important;
    margin: 0 auto;
    page-break-after: avoid;
  }
  @page { size: A4 portrait; margin: 0; }
}
