/* Pai Digital Selling Kit v3 — selling.css (staging)
   Offer bar · Lina invite · Wish layer · Cross-sell strip.
   Estate tokens with fallbacks, so the kit works on any estate page.
   Motion here is transform/opacity only; honours prefers-reduced-motion.
   Lina-clearance tiers on the bar reuse the proven home-page geometry
   (the Lina launcher card lives bottom-right; the bar never covers it). */

.pd {
  --pd-gold: var(--gold, #C9AA6D);
  --pd-champ: var(--champ, #E9D29F);
  --pd-ink: var(--obsidian, #0C1011);
  --pd-deep: var(--emerald, #102A22);
  --pd-ivory: var(--ivory, #F6F2E9);
  --pd-paper: var(--paper, #FBF9F4);
  --pd-text: var(--text, #18211E);
  --pd-serif: var(--serif, "Cormorant Garamond", Georgia, serif);
  --pd-sans: var(--sans, "Inter", ui-sans-serif, system-ui, sans-serif);
  --pd-rad: var(--rad, 18px);
  font-family: var(--pd-sans);
}

/* ---------- Offer bar (first-visit / returning / wish-aware) ---------- */
.pd-bar {
  position: fixed; left: 12px; right: 428px; bottom: 12px; z-index: 55;
  background: var(--pd-ink); color: var(--pd-ivory);
  border: 1px solid var(--pd-gold); border-radius: 16px;
  padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  box-shadow: 0 18px 44px rgba(12,16,17,.28);
  transform: translateY(160%); transition: transform .35s ease;
}
.pd-bar.show { transform: none; }
.pd-bar .pd-bar-txt { flex: 1; min-width: 0; font-size: .92rem; line-height: 1.3; }
.pd-bar .pd-bar-txt small { display: block; opacity: .78; font-size: .8rem; }
.pd-bar a { border-radius: 999px; padding: 9px 15px; font-weight: 800; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.pd-bar .pd-bar-free { color: var(--pd-champ); border: 1px solid var(--pd-gold); }
.pd-bar .pd-bar-go { background: linear-gradient(135deg, var(--pd-champ), var(--pd-gold)); color: #231a05; }
.pd-bar-x { background: none; border: 0; color: #fff; font-size: 1rem; cursor: pointer; padding: 6px; }
@media (max-width: 1099px) { .pd-bar { right: 190px; } }
@media (max-width: 640px) {
  .pd-bar { right: 154px; }
  .pd-bar .pd-bar-txt { flex: 1 1 100%; }   /* r5 lesson: text gets its own row */
  .pd-bar .pd-bar-go { flex: 1; text-align: center; }
}
@media (max-width: 560px) { .pd-bar .pd-bar-free { display: none; } }

/* ---------- Lina proactive invite ---------- */
.pd-invite {
  position: fixed; right: 16px; bottom: 148px; z-index: 56;
  width: min(324px, calc(100vw - 32px));
  background: var(--pd-paper); color: var(--pd-text);
  border: 1px solid var(--pd-gold); border-radius: var(--pd-rad);
  box-shadow: 0 28px 70px rgba(12,16,17,.28); padding: 14px 16px 12px;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.pd-invite.show { opacity: 1; transform: none; pointer-events: auto; }
.pd-invite .pd-inv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pd-inv-face {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pd-deep), var(--pd-ink));
  color: var(--pd-champ); font-family: var(--pd-serif); font-size: 1.15rem; font-weight: 700;
  border: 1px solid var(--pd-gold);
}
.pd-invite .pd-inv-name { font-weight: 800; font-size: .9rem; }
.pd-invite .pd-inv-name small { display: block; font-weight: 500; opacity: .65; font-size: .74rem; }
.pd-invite p { margin: 4px 0 10px; font-size: .92rem; line-height: 1.4; }
.pd-invite .pd-inv-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-inv-yes {
  flex: 1; background: linear-gradient(135deg, var(--pd-champ), var(--pd-gold)); color: #231a05;
  border: 0; border-radius: 999px; padding: 9px 14px; font-weight: 800; font-size: .88rem; cursor: pointer; white-space: nowrap;
}
.pd-inv-no {
  background: none; border: 1px solid rgba(24,33,30,.25); color: var(--pd-text);
  border-radius: 999px; padding: 9px 14px; font-weight: 600; font-size: .88rem; cursor: pointer;
}
.pd-inv-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; font-size: 1rem; cursor: pointer; opacity: .55; padding: 4px; }

/* ---------- Wish layer ---------- */
.pd-wish { text-align: center; padding: 8px 0 4px; }
.pd-wish .pd-wish-q { font-family: var(--pd-serif); font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.15; margin: 0 0 6px; }
.pd-wish .pd-wish-sub { opacity: .8; font-size: .95rem; margin: 0 auto 14px; max-width: 52ch; }
.pd-wish-chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.pd-wish-chip {
  border: 1.5px solid var(--pd-gold); background: transparent; color: inherit;
  border-radius: 999px; padding: 10px 18px; font: 600 .93rem var(--pd-sans); cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.pd-wish-chip:hover { transform: translateY(-1px); }
.pd-wish-chip[aria-pressed="true"] { background: var(--pd-gold); color: #141414; }
.pd-wish-chip.pd-wish-other { border-style: dashed; }
.pd-wishpath {
  display: none; margin: 16px auto 0; max-width: 62ch;
  border: 1px solid var(--pd-gold); border-radius: var(--pd-rad);
  background: linear-gradient(140deg, rgba(201,170,109,.16), rgba(201,170,109,.04));
  padding: 14px 18px; font-size: .98rem; line-height: 1.45;
}
.pd-wishpath.show { display: block; }
.pd-wishpath b { font-family: var(--pd-serif); font-size: 1.12rem; }
.pd-wishpath .pd-wishpath-cta { display: inline-block; margin-top: 8px; background: var(--pd-gold); color: #141414; font-weight: 800; border-radius: 999px; padding: 8px 16px; text-decoration: none; font-size: .88rem; }
.pd-gift { max-width: 62ch; margin: 0 auto 6px; font-size: .95rem; line-height: 1.5; opacity: .92; }
.pd-gift .pd-gift-tag { font-weight: 800; color: var(--pd-gold); letter-spacing: .02em; }

/* ---------- Cross-sell strip: "Complete the set" ---------- */
.pd-xsell { margin: 26px 0 6px; }
.pd-xsell h3 { font-family: var(--pd-serif); font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 4px; }
.pd-xsell .pd-xsell-sub { opacity: .85; margin: 0 0 14px; font-size: .95rem; max-width: 68ch; }
.pd-xsell-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 12px; }
.pd-xsell-card {
  border: 1px solid rgba(201,170,109,.45); border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,.03); display: flex; flex-direction: column; padding: 14px 16px; gap: 6px;
}
.pd-xsell-card b { font-size: 1rem; }
.pd-xsell-card p { margin: 0; font-size: .86rem; opacity: .88; flex: 1; }
.pd-xsell-card .pd-xsell-price { font-size: .8rem; opacity: .75; }
.pd-xsell-card a { align-self: flex-start; font-weight: 700; font-size: .85rem; color: var(--pd-gold); text-decoration: none; }
.pd-xsell-card a:hover { text-decoration: underline; }
.pd-xsell-card.pass { background: linear-gradient(140deg, rgba(201,170,109,.24), rgba(201,170,109,.06)); border-color: var(--pd-gold); }
.pd-xsell-card.pass a { background: var(--pd-gold); color: #141414; border-radius: 999px; padding: 8px 14px; }
.pd-xsell-card .pd-xsell-badge { align-self: flex-start; font-size: .7rem; font-weight: 800; letter-spacing: .04em; background: rgba(201,170,109,.22); border-radius: 999px; padding: 3px 9px; }

@media (prefers-reduced-motion: reduce) {
  .pd-bar, .pd-invite, .pd-wish-chip { transition: none; }
}
