/* Chrysalis v2, phone-first choice "pack" (Claude, 15 Nov 2026). Loaded on product pages while a variant of the choice is on
   (inc/v2/v2-ph-pack.php). Phones only: every rule that shows anything sits inside the product page's own phone
   breakpoint (max-width:899px), so the computer layout is untouched. The parts are written by assets/v4/v2-ph-pack.js and
   by the few lines printed after the buy form; without them none of these classes exists and the page is today's.

   1. the price line while the row "2 + 1 FREE" is chosen   2. the sticky Add bar's words */

/* never on computers, never before the script has placed it */
.chvpk,.chvpk-bar{display:none}

@media (max-width:899px){
  /* ---------- 1. the price line ----------
     Today's own parts (the price of one, "per pen") stay where they are, only unseen, so the line keeps its exact size at
     every width and nothing under it moves when the choice changes. The pack line lies over them, on the same baseline. */
  .chv2s9 .c3-root .p3-price.chvpk-in{position:relative}
  .chv2s9 .c3-root .p3-price.is-pack>.p3-price__v,
  .chv2s9 .c3-root .p3-price.is-pack>.p3-price__u,
  .chv2s9 .c3-root .p3-price.is-roll>.p3-price__v{visibility:hidden}
  .chv2s9 .c3-root .p3-price.is-pack>.chvpk,
  .chv2s9 .c3-root .p3-price.is-roll>.chvpk{display:block;position:absolute;left:0;top:0;font-size:var(--t-h2);line-height:1;white-space:nowrap;pointer-events:none}
  /* the number: the price line's own size and weight. An unseen copy of the finished amount holds its width while it counts */
  .chv2s9 .c3-root .chvpk__v{display:inline-grid;font-weight:500;letter-spacing:-.03em}
  .chv2s9 .c3-root .chvpk__sz,.chv2s9 .c3-root .chvpk__n{grid-area:1/1;justify-self:start}
  .chv2s9 .c3-root .chvpk__sz{visibility:hidden;font-style:normal}
  /* beside it, two short lines that end on the number's baseline: the row's words with its green tag, the crossed-out amount */
  .chv2s9 .c3-root .chvpk__c{display:inline-block;vertical-align:baseline;margin:-8px 0 0 11px;font-size:14px;font-weight:500;letter-spacing:-.01em;line-height:1}
  .chv2s9 .c3-root .chvpk__w{display:flex;align-items:center;gap:6px;margin:0 0 4px;color:#fff}
  .chv2s9 .c3-root .chvpk__w .chv2-pack__free{padding:2.5px 8px}
  .chv2s9 .c3-root .chvpk__was{display:block;color:var(--mute,#a6a7ad);font-size:13px;font-weight:400;letter-spacing:0}
  .chv2s9 .c3-root .p3-price.is-roll .chvpk__c{display:none}
  @media (max-width:379px){
    /* narrow phones: the two short lines sit a little closer to the number, so the largest amounts keep clear of "In stock" */
    .chv2s9 .c3-root .chvpk__c{margin-left:8px}
    .chv2s9 .c3-root .chvpk__was{font-size:12px}
  }
  @media (max-width:339px){
    /* the narrowest phones: the tag stays inside the card */
    .chv2s9 .c3-root .chvpk__w{gap:4px}
    .chv2s9 .c3-root .chvpk__w .chv2-pack__free{padding:2.5px 6px}
  }
  @media (prefers-reduced-motion:no-preference){
    /* after the first change only: what comes in fades in; nothing fades at page load */
    .chv2s9 .c3-root .p3-price.is-live.is-pack .chvpk__c,
    .chv2s9 .c3-root .p3-price.is-live:not(.is-pack)>.p3-price__u{animation:chvpk-in .26s cubic-bezier(.22,1,.36,1) both}
  }

  /* ---------- 2. the sticky Add bar: the chosen row's own words ---------- */
  .chv2s9 .c3-root .p3-pbar.is-pack .chvpk-bar{display:inline-flex;align-items:center;gap:6px;margin-right:3px;vertical-align:baseline}
  .chv2s9 .c3-root .p3-pbar.is-pack .p3-pbar__l>[data-p3-amt],
  .chv2s9 .c3-root .p3-pbar.is-pack .p3-pbar__l>.chv2-pack__x{display:none}
  .chv2s9 .c3-root .chvpk-bar__d{white-space:pre}
}
/* JOIN (main session, 15 Nov 2026): product page A or B + this price line, VIAL pages on a phone. The column beside the vial
   is too narrow for "AED 460  2 vials + 1 FREE / AED 690" on one line (the tag was cut at the card's edge), so the group goes
   under the big price and "In stock" moves down by the same amount. Only while 2 + 1 FREE is chosen (is-pack). */
@media (max-width:899.98px){
  body:is(.chvp-pdp-a,.chvp-pdp-b).chv2s9 .c3-root.p3-page:has(#p3-stage .p3-gal__img--vial.chvp-cut) #p3-form .p3-price.is-pack>.chvpk{right:0;white-space:normal}
  body:is(.chvp-pdp-a,.chvp-pdp-b).chv2s9 .c3-root.p3-page:has(#p3-stage .p3-gal__img--vial.chvp-cut) #p3-form .p3-price.is-pack>.chvpk .chvpk__c{display:block;margin:8px 0 0}
  body:is(.chvp-pdp-a,.chvp-pdp-b).chv2s9 .c3-root.p3-page:has(#p3-stage .p3-gal__img--vial.chvp-cut) #p3-form .p3-price.is-pack>.p3-price__s{margin-top:48px}
}
@keyframes chvpk-in{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
