/* Premium source code pages + tutorial call-to-actions. Everything is
   namespaced with .pm- so it never clashes with the blog styles. */
:root {
  --pm-ink: #0f1226;
  --pm-ink-2: #1b1f3b;
  --pm-card: #ffffff;
  --pm-muted: #5d6385;
  --pm-line: #e6e8f2;
  --pm-gold: #ffcd50;
  --pm-gold-ink: #3a2a06;
  --pm-green: #1f9d55;
  --pm-accent: #38d6f4;
  --pm-radius: 16px;
}

.pm-page { font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1c2040; }
.pm-page h1, .pm-page h2, .pm-page h3 { font-weight: 800; letter-spacing: -0.02em; }

/* ---------- hero ---------- */
.pm-hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1100px 500px at 85% -10%, color-mix(in srgb, var(--pm-accent) 38%, transparent), transparent 60%),
              linear-gradient(160deg, #0d1026 0%, #1d1240 100%);
  border-radius: 0 0 28px 28px; padding: 56px 0 64px; margin: -50px -12px 40px;
}
.pm-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 26px 26px; }
.pm-hero > .container { position: relative; z-index: 1; }
.pm-hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.08; margin: 14px 0 14px; color: #fff; }
.pm-hero .pm-lead { font-size: 1.15rem; color: #c9cdf0; max-width: 640px; }
.pm-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--pm-gold); color: var(--pm-gold-ink);
  font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; }
.pm-crumbs a { color: #aab0e0; text-decoration: none; font-size: .9rem; }
.pm-crumbs a:hover { color: #fff; }

.pm-demo { border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.12);
  background: #000; }
.pm-demo img { display: block; width: 100%; height: auto; }

/* ---------- buy box ---------- */
.pm-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 26px; }
.pm-price { font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1; }
.pm-price small { font-size: 1rem; font-weight: 600; color: #9aa0cf; text-decoration: line-through; margin-left: 8px; }
.pm-btn-buy { background: var(--pm-gold); color: var(--pm-gold-ink) !important; border: 0; font-weight: 800; font-size: 1.1rem;
  padding: 15px 30px; border-radius: 12px; box-shadow: 0 10px 24px rgba(255,205,80,.35); transition: transform .12s, box-shadow .12s; }
.pm-btn-buy:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255,205,80,.45); }
.pm-btn-buy:disabled { opacity: .6; transform: none; }
.pm-btn-ghost { color: #fff !important; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; padding: 13px 22px; font-weight: 700; }
.pm-btn-ghost:hover { background: rgba(255,255,255,.08); }
.pm-trust { color: #aab0e0; font-size: .88rem; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; }
.pm-trust i { color: #7ee2a8; margin-right: 6px; }

/* ---------- stats ---------- */
.pm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 30px; max-width: 640px; }
.pm-stat { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px 14px; }
.pm-stat b { display: block; font-size: 1.45rem; color: #fff; }
.pm-stat span { font-size: .8rem; color: #aab0e0; }
@media (max-width: 576px) { .pm-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sections ---------- */
.pm-section { margin: 56px 0; }
.pm-section > h2 { font-size: 1.9rem; margin-bottom: 8px; }
.pm-sub { color: var(--pm-muted); margin-bottom: 26px; }
.pm-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pm-feature { background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: var(--pm-radius); padding: 20px; }
.pm-feature i { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 1.1rem;
  color: var(--pm-ink); background: color-mix(in srgb, var(--pm-accent) 30%, #fff); margin-bottom: 12px; }
.pm-feature h3 { font-size: 1.05rem; margin: 0 0 6px; }
.pm-feature p { color: var(--pm-muted); font-size: .94rem; margin: 0; }

.pm-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--pm-line);
  border-radius: var(--pm-radius); overflow: hidden; font-size: .97rem; }
.pm-table th, .pm-table td { padding: 12px 16px; border-bottom: 1px solid var(--pm-line); vertical-align: top; }
.pm-table thead th { background: #f6f7fb; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pm-muted); }
.pm-table tr:last-child td { border-bottom: 0; }
.pm-table td.pm-pro { font-weight: 700; color: #16233f; background: color-mix(in srgb, var(--pm-accent) 9%, #fff); }
.pm-table td.pm-free { color: #8a8fac; }

.pm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pm-gallery figure { margin: 0; background: #fff; border: 1px solid var(--pm-line); border-radius: var(--pm-radius); overflow: hidden; }
.pm-gallery img { width: 100%; height: 220px; object-fit: contain; background: #0f1226; display: block; cursor: zoom-in; }
.pm-gallery figcaption { padding: 10px 14px; font-size: .88rem; color: var(--pm-muted); }

.pm-inside { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 22px; }
.pm-inside li { padding-left: 30px; position: relative; }
.pm-inside li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 1px;
  color: var(--pm-green); }

/* ---------- locked code ---------- */
.pm-locked { position: relative; border-radius: var(--pm-radius); overflow: hidden; background: #0f1226; color: #d6dbff;
  border: 1px solid #262b52; box-shadow: 0 20px 40px rgba(15,18,38,.18); }
.pm-locked-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #161a36; font-size: .85rem; color: #9aa0cf; }
.pm-locked-head .pm-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.pm-locked pre { margin: 0; padding: 16px 18px; font-size: 13.5px; line-height: 1.55; background: transparent !important;
  white-space: pre; overflow-x: auto; font-family: "JetBrains Mono", Consolas, Menlo, monospace; color: #d6dbff; }
.pm-locked pre.pm-blur { filter: blur(5px); user-select: none; pointer-events: none; opacity: .7; padding-top: 0; }
.pm-lock-overlay { position: absolute; left: 0; right: 0; bottom: 0; height: 64%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 20px;
  background: linear-gradient(180deg, rgba(15,18,38,0) 0%, rgba(15,18,38,.88) 38%, rgba(15,18,38,.97) 100%); }
.pm-lock-overlay .fa-lock { font-size: 1.6rem; color: var(--pm-gold); margin-bottom: 10px; }
.pm-lock-overlay h4 { color: #fff; font-weight: 800; margin-bottom: 6px; font-size: 1.25rem; }
.pm-lock-overlay p { color: #b9bee6; font-size: .95rem; max-width: 520px; margin-bottom: 14px; }

/* ---------- product cards ---------- */
.pm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.pm-card { background: #fff; border: 1px solid var(--pm-line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s; text-decoration: none !important; color: inherit !important; }
.pm-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20,25,60,.14); }
.pm-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.pm-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.pm-card-body h3 { font-size: 1.25rem; margin: 0 0 6px; }
.pm-card-body p { color: var(--pm-muted); font-size: .95rem; flex: 1; }
.pm-card-price { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 1.3rem; }
.pm-card-price s { color: #9ca1bd; font-weight: 600; font-size: .95rem; margin-left: 6px; }
.pm-card-price .pm-go { font-size: .9rem; color: #2a5bd7; }

.pm-pack { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; background: linear-gradient(135deg, #fff7e0, #fff);
  border: 2px solid var(--pm-gold); border-radius: 22px; padding: 26px; }
.pm-pack img { width: 100%; border-radius: 16px; box-shadow: 0 16px 36px rgba(40,30,0,.18); }
@media (max-width: 768px) { .pm-pack { grid-template-columns: 1fr; } }
.pm-save { display: inline-block; background: #e8fbef; color: var(--pm-green); font-weight: 800; border-radius: 8px; padding: 4px 10px; font-size: .85rem; }

.pm-faq details { background: #fff; border: 1px solid var(--pm-line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.pm-faq summary { font-weight: 700; cursor: pointer; }
.pm-faq p { color: var(--pm-muted); margin: 10px 0 0; }

.pm-final { text-align: center; background: linear-gradient(160deg, #0d1026 0%, #1d1240 100%); color: #fff; border-radius: 24px; padding: 44px 20px; }
.pm-final h2 { color: #fff; }
.pm-final p { color: #c9cdf0; }

/* ---------- access / download page ---------- */
.pm-dl { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px solid var(--pm-line); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.pm-dl img { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; }
.pm-dl h3 { font-size: 1.15rem; margin: 0 0 4px; }
.pm-dl p { margin: 0; color: var(--pm-muted); font-size: .92rem; }
.pm-dl .btn { margin-left: auto; white-space: nowrap; }
.pm-steps code { background: #f2f3f9; padding: 2px 7px; border-radius: 6px; }

/* ---------- tutorial call-to-actions (article + code pages) ---------- */
.pm-cta-banner { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #10132b, #22174a); color: #e8eaff;
  border-radius: 14px; padding: 12px 16px; margin: 6px 0 22px; text-decoration: none !important; font-family: Inter, sans-serif;
  font-size: 15px; line-height: 1.4; transition: transform .12s; }
.pm-cta-banner:hover { transform: translateY(-1px); color: #fff; }
.pm-cta-banner img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex: none; }
.pm-cta-banner b { color: #fff; }
.pm-cta-banner .pm-cta-go { margin-left: auto; background: var(--pm-gold); color: var(--pm-gold-ink); font-weight: 800; border-radius: 9px;
  padding: 7px 12px; white-space: nowrap; font-size: 14px; }
@media (max-width: 576px) { .pm-cta-banner .pm-cta-go { display: none; } }

.pm-upsell { margin: 34px 0 26px; font-family: Inter, sans-serif; }
.pm-upsell-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.pm-upsell-head img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex: none; }
.pm-upsell-head h3 { font-size: 1.3rem; font-weight: 800; margin: 2px 0 4px; }
.pm-upsell-head p { color: var(--pm-muted); margin: 0; font-size: 15px; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.pm-chips span { background: #eef0fb; color: #2d3360; border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 600; }
