/* ==========================================================================
   KALI FX LAB - Product page layout (v2)
   Loaded AFTER ../css/styles.css. Adds new classes only (all prefixed pp-),
   so existing pages that still use styles.css are not affected.
   ========================================================================== */

:root {
  --pp-ink: #162033;
  --pp-muted: #5b6678;
  --pp-line: #e3e8ef;
  --pp-bg: #f4f4f4;
  --pp-card: #ffffff;
  --pp-blue: #0077b6;
  --pp-blue-dark: #023e8a;
  --pp-blue-tint: #eaf4fb;
  --pp-green: #20a86b;
  --pp-green-dark: #178555;
  --pp-wa: #25d366;
  --pp-red-bg: #fff1f1;
  --pp-red-line: #f3b4b4;
  --pp-red-ink: #8a1f1f;
  --pp-radius: 12px;
  --pp-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

html { scroll-behavior: smooth; }

/* Page container (overrides the global `main` box from styles.css) */
.pp-main {
  max-width: 1100px;
  margin: 20px auto 40px;
  padding: 0 16px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: var(--pp-ink);
}

.pp-main h1,
.pp-main h2,
.pp-main h3 { text-align: left; color: var(--pp-ink); }

.pp-card {
  background: var(--pp-card);
  border: 1px solid var(--pp-line);
  border-radius: var(--pp-radius);
  box-shadow: var(--pp-shadow);
  padding: 24px;
}

/* ---------- Hero ---------- */
.pp-section.pp-overview { margin-top: 0; }
.pp-overview .pp-specs { margin: 0 0 22px; }
.pp-overview .pp-spec { background: #fafbfd; }
.pp-overview + .pp-tabs { margin-top: 6px; }

.pp-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  margin: 0 0 10px;
}

.pp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.pp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f0f2f5;
  color: var(--pp-muted);
}
.pp-chip--blue  { background: var(--pp-blue-tint); color: var(--pp-blue-dark); }
.pp-chip--green { background: #e6f6ee; color: var(--pp-green-dark); }

.pp-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--pp-muted);
  max-width: 70ch;
}

.pp-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}


/* ---------- Quick facts strip ---------- */
.pp-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.pp-spec {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--pp-card);
  border: 1px solid var(--pp-line);
  border-radius: 10px;
  padding: 12px 14px;
}

.pp-spec i {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pp-blue-tint);
  color: var(--pp-blue);
  font-size: 0.95rem;
}

.pp-spec__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pp-muted);
}

.pp-spec__value {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pp-ink);
}

/* ---------- Two-column layout ---------- */
.pp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

/* ---------- Section tabs (sticky in-page menu) ---------- */
.pp-tabs {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0;
  margin: -10px 0 0;
  background: var(--pp-bg);
  scrollbar-width: none;
}
.pp-tabs::-webkit-scrollbar { display: none; }

.pp-tabs a {
  flex: 0 0 auto;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--pp-line);
  background: #fff;
  color: var(--pp-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pp-tabs a:hover { color: var(--pp-blue); border-color: var(--pp-blue); }
.pp-tabs a.is-active {
  background: var(--pp-blue);
  border-color: var(--pp-blue);
  color: #fff;
}

/* ---------- Sections ---------- */
.pp-section {
  margin-top: 16px;
  scroll-margin-top: 64px;
}
.pp-section > h2 {
  margin: 0 0 14px;
  font-size: 1.3rem;
}
.pp-section p {
  margin: 0 0 12px;
  line-height: 1.7;
  color: #2c3647;
}
.pp-section p:last-child { margin-bottom: 0; }

.pp-note {
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--pp-muted);
}

/* Key / value rows (How it trades) */
.pp-kv {
  margin: 16px 0 0;
  border: 1px solid var(--pp-line);
  border-radius: 10px;
  overflow: hidden;
}
.pp-kv__row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid var(--pp-line);
}
.pp-kv__row:first-child { border-top: 0; }
.pp-kv dt { font-weight: 700; color: var(--pp-ink); }
.pp-kv dd { margin: 0; color: #2c3647; }

/* Feature cards */
.pp-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pp-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--pp-line);
  border-radius: 10px;
  background: #fafbfd;
}
.pp-feature i {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--pp-blue-tint);
  color: var(--pp-blue);
}
.pp-feature strong { display: block; margin-bottom: 2px; }
.pp-feature span { font-size: 0.92rem; color: var(--pp-muted); line-height: 1.5; }

/* Checklist (recommended setup) */
.pp-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 20px;
}
.pp-checklist li {
  position: relative;
  padding-left: 28px;
  line-height: 1.5;
}
.pp-checklist li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--pp-green);
}

/* Parameter table */
.pp-table-wrap { overflow-x: auto; border: 1px solid var(--pp-line); border-radius: 10px; }
.pp-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.pp-table th,
.pp-table td { padding: 10px 14px; text-align: left; vertical-align: top; }
.pp-table thead th {
  background: #f4f6fa;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pp-muted);
}
.pp-table tbody th[scope="colgroup"] {
  background: var(--pp-blue-tint);
  color: var(--pp-blue-dark);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}
.pp-table tbody tr + tr td { border-top: 1px solid var(--pp-line); }
.pp-table td:first-child { white-space: normal; width: 30%; min-width: 150px; }
.pp-table code {
  overflow-wrap: anywhere;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  background: #f0f2f5;
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--pp-ink);
}

/* FAQ */
.pp-faq details {
  border: 1px solid var(--pp-line);
  border-radius: 10px;
  background: #fafbfd;
}
.pp-faq details + details { margin-top: 10px; }
.pp-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 44px 14px 16px;
  font-weight: 700;
  position: relative;
}
.pp-faq summary::-webkit-details-marker { display: none; }
.pp-faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--pp-blue);
}
.pp-faq details[open] summary::after { content: "\2212"; }
.pp-faq details p { margin: 0; padding: 0 16px 16px; }

/* Screenshots */
.pp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.pp-gallery a {
  display: block;
  border: 1px solid var(--pp-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.pp-gallery img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.2s ease;
}
.pp-gallery a:hover img { transform: scale(1.04); }

/* Sub-headings, numbered steps and video (used by longer product pages) */
.pp-section h3 { margin: 24px 0 12px; font-size: 1.05rem; }
.pp-section h2 + h3 { margin-top: 0; }

.pp-features--stack { grid-template-columns: 1fr; }
.pp-checklist--one { grid-template-columns: 1fr; }

.pp-steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.pp-steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  min-height: 26px;
  line-height: 1.55;
}
.pp-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pp-blue);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.pp-video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.pp-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.pp-video__play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background-color: #000;
  background-size: cover;
  background-position: center;
}
.pp-video__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1.4rem;
  padding-left: 4px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.pp-video__play:hover .pp-video__icon,
.pp-video__play:focus-visible .pp-video__icon {
  background: #ff0000;
  transform: translate(-50%, -50%) scale(1.08);
}

/* Plain bullet lists, tag pills and text-only price line */
.pp-section .pp-list {
  margin: 0 0 12px;
  padding-left: 20px;
  line-height: 1.65;
  color: #2c3647;
}
.pp-section .pp-list li + li { margin-top: 4px; }
.pp-section .pp-list .pp-list,
.pp-steps .pp-list { margin: 6px 0 0; }
.pp-section h3 + .pp-kv { margin-top: 0; }
.pp-section .pp-kv + h3 { margin-top: 24px; }
.pp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pp-tags .pp-chip { font-size: 0.85rem; padding: 6px 14px; }
.pp-buy__amount--text { font-size: 1.1rem; font-weight: 700; color: var(--pp-ink); line-height: 1.3; }

/* Risk disclaimer */
.pp-risk {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--pp-red-line);
  border-radius: 10px;
  background: var(--pp-red-bg);
  color: var(--pp-red-ink);
  font-size: 0.9rem;
  line-height: 1.55;
}
.pp-risk i { margin-top: 3px; }

/* ---------- Buy box (sticky sidebar) ---------- */
.pp-buy {
  position: sticky;
  top: 16px;
  padding: 22px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.pp-buy__head {
  margin: 0 0 16px;
}
.pp-buy__img {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto 14px;
  border-radius: 10px;
}
.pp-buy__info { min-width: 0; }
.pp-buy__name {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pp-muted);
}
.pp-buy__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}
.pp-buy__amount { font-size: 1.4rem; font-weight: 800; color: var(--pp-ink); line-height: 1; }
.pp-buy__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  background: var(--pp-green);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.pp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.pp-btn + .pp-btn { margin-top: 10px; }
.pp-btn:hover { transform: translateY(-1px); text-decoration: none; }

.pp-btn--primary { background: var(--pp-green); color: #fff; box-shadow: 0 4px 12px rgba(32, 168, 107, 0.3); }
.pp-btn--primary:hover { background: var(--pp-green-dark); }
.pp-btn--ghost { background: #fff; color: var(--pp-blue-dark); border-color: var(--pp-blue); }
.pp-btn--ghost:hover { background: var(--pp-blue-tint); }

/* Free download button wrapped for subscribe-gate.js (it looks for .download-button).
   styles.css styles .download-button a with its own badge, so reset that here. */
.pp-buy .download-button,
.pp-buy .platform-actions {
  display: block;
  grid-template-columns: none;
  gap: 0;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.pp-buy .download-button a.pp-btn,
.pp-buy .platform-actions a.pp-btn {
  min-width: 0;
  min-height: 48px;
  padding: 10px 16px;
  gap: 9px;
  background: var(--pp-green);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(32, 168, 107, 0.3);
  font-size: 0.98rem;
  font-weight: 700;
}
.pp-buy .download-button a.pp-btn::before,
.pp-buy .platform-actions a.pp-btn::before { content: none; display: none; }
.pp-buy .download-button a.pp-btn:hover,
.pp-buy .platform-actions a.pp-btn:hover {
  background: var(--pp-green-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(32, 168, 107, 0.3);
}
.pp-buy .sg-box { margin: 0 0 12px; }
.pp-buy .sg-box .sg-message { font-size: 0.9rem; margin: 0 0 12px; }
.pp-buy .sg-box .sg-subscribe { width: 100%; font-size: 0.95rem; }
.pp-buy .sg-box .sg-status { font-size: 0.85rem; }

.pp-buy__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }

.pp-buy__help {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--pp-line);
  font-size: 0.9rem;
  color: var(--pp-muted);
}
.pp-buy__help p { margin: 0 0 8px; }
.pp-help-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-help-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--pp-line);
  border-radius: 8px;
  color: var(--pp-ink);
  font-weight: 600;
  text-decoration: none;
}
.pp-help-links a:hover { border-color: var(--pp-blue); color: var(--pp-blue); }
.pp-help-links .fa-whatsapp { color: var(--pp-wa); }
.pp-help-links .fa-telegram-plane { color: #0088cc; }

/* Mobile bottom bar (hidden on desktop) */
.pp-mobilebar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pp-layout { grid-template-columns: 1fr; }
  .pp-buy { position: static; order: -1; }

  body.pp-body { padding-bottom: 76px; }

  .pp-mobilebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--pp-line);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.1);
  }
  .pp-mobilebar__price { line-height: 1.15; }
  .pp-mobilebar__price strong { display: block; font-size: 1.25rem; }
  .pp-mobilebar__price span { font-size: 0.75rem; color: var(--pp-muted); }
  .pp-mobilebar .pp-btn { width: auto; min-width: 170px; margin: 0; }
}

@media (max-width: 600px) {
  .pp-card { padding: 18px; }
  .pp-kv__row { grid-template-columns: 1fr; gap: 2px; }
  .pp-section > h2 { font-size: 1.15rem; }
  .pp-table td:first-child { white-space: normal; }
}

/* ==========================================================================
   Top bar: breadcrumb + language picker
   ========================================================================== */
.pp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.pp-topbar .breadcrumb { margin: 15px 0 0; }

/* ==========================================================================
   Small screens
   ========================================================================== */

/* Readable breadcrumb and top nav (styles.css shrinks them to ~8px) */
body.pp-body .breadcrumb { font-size: 0.85rem; }
body.pp-body .modal .close { top: 12px; right: 12px; padding: 8px 14px; }

@media (max-width: 900px) {
  /* One column. display:contents lets the overview, buy card and tabs be
     re-ordered: title first, then the buy card, then the section menu. */
  .pp-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 12px; }
  .pp-content { display: contents; }
  .pp-section { margin-top: 0; }
  .pp-risk { margin-top: 0; }
  .pp-section, .pp-risk, .pp-buy, .pp-tabs { min-width: 0; max-width: 100%; }

  .pp-overview { order: -3; }
  .pp-buy { order: -4; max-height: none; overflow: visible; }
  .pp-tabs { order: -1; margin: 0; }

  /* Compact buy card header on phones/tablets: small image left, name + price right */
  .pp-buy__head { display: flex; align-items: center; gap: 14px; }
  .pp-buy__img { flex: 0 0 38%; width: 38%; max-width: 120px; margin: 0; border-radius: 8px; }

  /* Bottom buy bar slides away while the buy card itself is on screen */
  .pp-mobilebar { transition: transform 0.25s ease; }
  .pp-mobilebar.is-hidden { transform: translateY(110%); }
  .pp-mobilebar .pp-btn { flex: 1 1 auto; min-width: 0; max-width: 240px; }

  /* Bigger touch targets */
  .pp-tabs a { padding: 10px 16px; }
  .pp-faq summary { padding-top: 16px; padding-bottom: 16px; }
}

@media (max-width: 600px) {
  .pp-main { padding: 0 12px; }
  .pp-topbar { padding: 0 12px; }
  .pp-topbar .breadcrumb { margin-left: 0; }
  .pp-title { font-size: 1.5rem; }
  .pp-table th, .pp-table td { padding: 9px 10px; }
  .pp-table code { overflow-wrap: anywhere; }
  .pp-help-links a { flex: 1 1 auto; justify-content: center; }

  /* Slightly smaller type and tighter padding so text wraps less on phones */
  .pp-main { font-size: 15px; }
  .pp-card { padding: 16px; }
  .pp-title { font-size: 1.35rem; }
  .pp-section > h2 { font-size: 1.1rem; margin-bottom: 12px; }
  .pp-section p { line-height: 1.6; }
  .pp-meta { gap: 6px; margin-bottom: 12px; }
  .pp-chip { font-size: 0.72rem; padding: 3px 10px; }
  .pp-kv__row { padding: 10px 12px; }
  .pp-feature { padding: 12px; gap: 10px; }
  .pp-feature strong { font-size: 0.92rem; }
  .pp-feature span { font-size: 0.85rem; }
  .pp-checklist li { font-size: 0.9rem; padding-left: 24px; }
  .pp-note { font-size: 0.82rem; }
  .pp-table { font-size: 0.82rem; }
  .pp-table code { font-size: 0.8rem; padding: 1px 5px; }
  .pp-table td:first-child { width: 40%; }
  .pp-faq summary { font-size: 0.92rem; padding: 14px 40px 14px 14px; }
  .pp-faq details p { font-size: 0.9rem; padding: 0 14px 14px; }
  .pp-risk { font-size: 0.8rem; padding: 12px; }
  .pp-tabs a { font-size: 0.82rem; padding: 9px 13px; }

  .pp-buy { padding: 16px; }
  .pp-buy__name { font-size: 0.92rem; }
  .pp-btn { font-size: 0.92rem; min-height: 46px; padding: 8px 12px; gap: 8px; }
  .pp-buy .download-button a.pp-btn { font-size: 0.92rem; min-height: 46px; padding: 8px 12px; }
  .pp-buy .sg-box .sg-message { font-size: 0.85rem; }
  .pp-help-links a { font-size: 0.85rem; padding: 7px 10px; }

  .pp-mobilebar { padding-left: 12px; padding-right: 12px; }
  .pp-mobilebar__price strong { font-size: 1.1rem; }
  .pp-mobilebar__price span { font-size: 0.68rem; }
  .pp-mobilebar .pp-btn { max-width: 210px; }
  .pp-steps > li { font-size: 0.9rem; padding-left: 34px; }
  .pp-section .pp-list { font-size: 0.9rem; }
  .pp-tags .pp-chip { font-size: 0.78rem; padding: 5px 12px; }
  .pp-buy__amount--text { font-size: 1rem; }
  .pp-section h3 { font-size: 1rem; margin: 20px 0 10px; }
}

@media (max-width: 480px) {
  /* styles.css makes the top menu ~9px on phones; keep it tappable */
  body.pp-body nav ul li { margin: 0 0.25em; }
  body.pp-body nav ul li a { font-size: 0.85rem; padding: 0.9em 0.7em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pp-mobilebar, .pp-btn, .pp-gallery img { transition: none; }
}
