/* Shop stories, plan v2 (r225). Loaded on top of shop-stories.css, with shop-stories-v2.js, only while the plan is active
   for the request (botenz-shop-stories.php); shop-stories.css itself keeps its bytes. What is here: the bar's third
   line, the savings card without a seventh jar, the box card's row for the goal box (six jars and the gifts' place),
   the line under its price, and the two looks of a place that differs for an influencer's visitor. */

/* An influencer's visitor (botenz-influencers.php). The shop page is cached and the same for everyone, so such a place
   is drawn twice: data-bz-inf="hide" for everyone else, data-bz-inf="show" for hers, and her script puts the class
   bz-inf on <html>. These two rules repeat that file's own, so that nothing of hers shows where it is missing. */
html:not(.bz-inf) [data-bz-inf="show"]{display:none!important}
html.bz-inf [data-bz-inf="hide"]{display:none!important}
/* her name, in the site's bronze; her script writes it (data-bz-inf-tpl), and without a name there is no pill */
:is(#s8st,#s8bar) .s8-pill{display:inline-block;flex:none;direction:rtl;max-width:8.5em;padding:0 7px;border-radius:999px;background:#9f814f;color:#fff;font:600 10px/16px var(--s8-body);font-style:normal;letter-spacing:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
:is(#s8st,#s8bar) .s8-pill:empty{display:none}
/* the truck of "משלוח חינם" drives the way the page reads */
:is(#s8st,#s8bar) svg.s8-truck{width:1.35em;height:1.35em;transform:scaleX(-1)}

/* ---------- 2. the savings card ---------- */
/* everyone: the book and the spoon are the marked row, as the pistachio's row was; hers: the pistachio's (the first) */
html:not(.bz-inf) #s8st.s8-r120.s8-v2 .s8-v7 .s8-gifts li.s8-gbk{box-shadow:0 0 0 1.5px rgba(230,200,142,.45)}
#s8st.s8-r120.s8-v2 .s8-gifts li b .s8-pill{margin-inline-start:2px}
/* the count over the jars: "6 צנצנות" stays for everyone; hers turns into "6 + 1 = 7" as before */
/* everyone: with no seventh jar to make room for, the six stand larger, as wide as the card allows (the row is about
   3.9 small jars' heights wide); hers keep the size of the seven */
html:not(.bz-inf) #s8st.s8-r120.s8-v2 .s8-v7 .s8-jars{--h:min(84px,calc((100vw - 48px) / 3.9))}
html:not(.bz-inf) #s8st.s8-inl.s8-r120.s8-v2 .s8-v7 .s8-jars{--h:min(84px,calc((100cqw - 48px) / 3.9))}
@media (prefers-reduced-motion:no-preference){
  html:not(.bz-inf) #s8st.s8-r120.s8-v2 .s8-v7.s8-on .s8-gifts li.s8-gbk{animation:s8glow 1.2s ease 1.5s both}
  #s8st.s8-r120.s8-v2 .s8-v7.s8-on .s8-js0{animation:s8js7 .45s cubic-bezier(.2,.8,.2,1) .9s both}
  /* without a seventh jar nothing lands on the row, so the six jars rise and stand */
  html:not(.bz-inf) #s8st.s8-r120.s8-v2 .s8-v7.s8-on .s8-jars>img:nth-child(1){animation:s8rise .7s cubic-bezier(.2,.8,.2,1) 0s forwards}
  html:not(.bz-inf) #s8st.s8-r120.s8-v2 .s8-v7.s8-on .s8-jars>img:nth-child(2){animation:s8rise .7s cubic-bezier(.2,.8,.2,1) .08s forwards}
  html:not(.bz-inf) #s8st.s8-r120.s8-v2 .s8-v7.s8-on .s8-jars>img:nth-child(3){animation:s8rise .7s cubic-bezier(.2,.8,.2,1) .16s forwards}
  html:not(.bz-inf) #s8st.s8-r120.s8-v2 .s8-v7.s8-on .s8-jars>img:nth-child(4){animation:s8rise .7s cubic-bezier(.2,.8,.2,1) .24s forwards}
  html:not(.bz-inf) #s8st.s8-r120.s8-v2 .s8-v7.s8-on .s8-jars>img:nth-child(5){animation:s8rise .7s cubic-bezier(.2,.8,.2,1) .32s forwards}
  html:not(.bz-inf) #s8st.s8-r120.s8-v2 .s8-v7.s8-on .s8-jars>img:nth-child(6){animation:s8rise .7s cubic-bezier(.2,.8,.2,1) .4s forwards}
  /* hers: the burst where the seventh jar lands is small while it rests, before and after it plays. In shop-stories.css
     it stays at its last, widest frame (unseen), which reaches under the card's end and lets the card scroll inside
     the sheet by some 30 px. */
  #s8st.s8-r120.s8-v2 .s8-v7 .s8-jars .s8-j7:before{transform:scale(.5)}
  #s8st.s8-r120.s8-v2 .s8-v7.s8-on .s8-jars .s8-j7:before{animation-fill-mode:backwards}
}

/* ---------- 5. the box card: the goal box ----------
   Six jars and, at the row's end (on the left), the gifts' place: the recipe book for everyone, and for an influencer's
   visitor also her free pistachio jar between the book and the box's jars. --h is a small jar's height; the 320 g jars
   stand 1.18 times taller. The jars overlap as the savings card's do (.118 of a small jar's height on each side), and
   --h is what the card's width allows: the row is about 4.5 small jars' heights wide, about 5.4 with her jar; on a
   wide screen, where the card is 420 px or more, at most 74 px, and 62 px with her jar. The row is never lower than a
   gold tag over a gift needs (4 px over a small jar, 18 px tall). With the spoon beside the book (r226) the gifts' place
   is .23 of a small jar's height wider, and the row with it (--k: 4.75, and 5.63 with her jar). */
#s8st.s8-r120.s8-v2 .s8-ojars{--k:4.52;--h:min(74px,calc((100vw - 76px) / var(--k)));position:relative;height:max(calc(var(--h) * 1.18),calc(var(--h) + 22px))}
html.bz-inf #s8st.s8-r120.s8-v2 .s8-ojars{--k:5.4;--h:min(62px,calc((100vw - 76px) / var(--k)))}
#s8st.s8-inl.s8-r120.s8-v2 .s8-ojars{--h:min(74px,calc((100cqw - 72px) / var(--k)))}
html.bz-inf #s8st.s8-inl.s8-r120.s8-v2 .s8-ojars{--h:min(62px,calc((100cqw - 72px) / var(--k)))}
#s8st.s8-r120.s8-v2 .s8-ojars:has(.s8-cut){--k:4.75}
html.bz-inf #s8st.s8-r120.s8-v2 .s8-ojars:has(.s8-cut){--k:5.63}
#s8st.s8-r120.s8-v2 .s8-ojars>img{margin:0 calc(var(--h) * -.118)}
/* the book's place: the gift's place of before (its glow, its gold tag), as wide as the book. The picture is the site's
   shared one of the book with the spoon (640 × 400), cut along the book's own left edges: without the round badge at
   its left, and with the spoon that stands behind the book's right edge (owner, 15 Nov: the card names the spoon, so
   the picture shows it). What is seen is 358 × 343 px of it, from 262, 33 (the book alone is 276 px wide); --bh is the
   height the book is drawn at. Any other picture is shown whole, in the book's own width. */
#s8st.s8-r120.s8-v2 .s8-ojars .s8-bk{--bh:calc(var(--h) * .96);width:calc(var(--bh) * .8047);height:var(--h);margin:0 calc(var(--h) * .09) 0 0}
#s8st.s8-r120.s8-v2 .s8-ojars .s8-bkp{position:absolute;left:0;bottom:0;display:block;width:calc(var(--bh) * .8047);height:var(--bh);filter:drop-shadow(0 8px 8px rgba(56,74,34,.22)) drop-shadow(0 0 8px rgba(230,200,142,.85))}
#s8st.s8-r120.s8-v2 .s8-ojars .s8-bkp img{position:absolute;left:0;top:0;bottom:auto;width:100%;height:100%;max-width:none;aspect-ratio:auto;object-fit:contain;margin:0;transform:none;filter:none}
#s8st.s8-r120.s8-v2 .s8-ojars .s8-cut .s8-bkp img{left:calc(var(--bh) * -.7638);top:calc(var(--bh) * -.0962);width:calc(var(--bh) * 1.8659);height:calc(var(--bh) * 1.1662);object-fit:fill;
  clip-path:polygon(53.66% 0,41.17% 79%,42.81% 82.5%,42.81% 100%,100% 100%,100% 0)}
#s8st.s8-r120.s8-v2 .s8-ojars .s8-bk.s8-cut,#s8st.s8-r120.s8-v2 .s8-ojars .s8-cut .s8-bkp{width:calc(var(--bh) * 1.0437)}
#s8st.s8-r120.s8-v2 .s8-ojars .s8-bk>em{left:50%;transform:translateX(-50%);transform-origin:50% 100%}
/* her jar's place: its gold "+1 בחינם" and, beside it, her name. With the book in the row, the tags are one row that
   starts at the book's left edge (the book's place and its gap are .8625 of --h wide, 1.092 with the spoon): the
   book's "מתנה", then hers. */
#s8st.s8-r120.s8-v2 .s8-ojars .s8-ojf{margin:0 calc(var(--h) * .06) 0 0}
#s8st.s8-r120.s8-v2 .s8-pills{position:absolute;left:0;bottom:calc(var(--h) + 4px);display:flex;direction:ltr;align-items:center;gap:3px;white-space:nowrap}
#s8st.s8-r120.s8-v2 .s8-ojf.s8-wbk .s8-pills{left:calc(var(--h) * -.8625)}
#s8st.s8-r120.s8-v2 .s8-cut+.s8-ojf.s8-wbk .s8-pills{left:calc(var(--h) * -1.092)}
#s8st.s8-r120.s8-v2 .s8-pills em{position:static;flex:none}
/* a narrow card (320 px phones): smaller tags and a shorter name, so that the row of tags ends before the 320 g jars */
@container (max-width:330px){
  #s8st.s8-r120.s8-v2 .s8-pills em{padding:1px 6px;font-size:10.5px}
  #s8st.s8-r120.s8-v2 .s8-pills .s8-pill{max-width:4.8em}
}
/* under the price: what the box gets, one line each (hers first) */
#s8st.s8-r120.s8-v2 .s8-giftl .s8-grow{display:flex;justify-content:center;align-items:center;gap:5px}
#s8st.s8-r120.s8-v2 .s8-giftl .s8-grow+.s8-grow{margin-top:1px}
#s8st.s8-r120.s8-v2 .s8-giftl b{font-size:14.5px}
#s8st.s8-r120.s8-v2 .s8-giftl .s8-perk{display:inline-flex;align-items:center;justify-content:center;gap:6px}
/* a narrow card (320 px phones) keeps that line in one line */
@container (max-width:330px){
  #s8st.s8-r120.s8-v2 .s8-giftl b{font-size:13.5px}
}
/* the terms are a little longer with "כולל משלוח": where they take two lines (the card inside a page), the lines are even */
#s8st.s8-r120.s8-v2 .s8-a5 .s8-terms{text-wrap:balance}
@media (prefers-reduced-motion:no-preference){
  /* the two jars the popular box did not have drop in after its four, then the gifts' place opens and the book drops in
     with its tag (hers: her jar after it); the place's burst of before is the pistachio's alone */
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-ojars>img:nth-child(5){animation-delay:1.1s}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-ojars>img:nth-child(6){animation-delay:1.2s}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-ojars .s8-bk{animation:s8bkw .4s cubic-bezier(.3,.7,.3,1) 1.75s both}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-ojars .s8-bk .s8-bkp{animation:s8bk .7s cubic-bezier(.3,1.25,.5,1) 1.85s both}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-ojars .s8-bk .s8-bkp img{animation:none}
  #s8st.s8-r120.s8-v2 .s8-a5 .s8-bk:before{display:none}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-bk>em{animation:s8bke .35s cubic-bezier(.3,1.5,.5,1) 2.45s both}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-ojars .s8-ojf{animation:s8ojfw .4s cubic-bezier(.3,.7,.3,1) 2.3s both}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-ojars .s8-ojf img{animation-delay:2.4s}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-ojf:before{animation-delay:3s}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-pills em{animation:none}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-pills{transform-origin:20% 100%;animation:s8j7e .35s cubic-bezier(.3,1.5,.5,1) 3.05s both}
  #s8st.s8-r120.s8-v2 .s8-a5.s8-on .s8-giftl{animation-delay:2.5s}
}
@keyframes s8bkw{from{width:0;margin:0}}
@keyframes s8ojfw{from{width:0;margin:0}}
@keyframes s8bk{0%{opacity:0;transform:translateY(-150px) rotate(-14deg)}35%{opacity:1}100%{opacity:1;transform:none}}
@keyframes s8bke{from{transform:translateX(-50%) scale(0)}to{transform:translateX(-50%)}}

/* ---------- the five cards of r101 (option bz_shop_stories_cards off): the box card holds six jars ---------- */
:is(#s8st,#s8bar).s8-v2 .s8-boxcard .s8-jarsrow img{width:18.5%;margin:0 -1.6%}
:is(#s8st,#s8bar).s8-v2 .s8-boxcard .s8-gift svg{flex:none;width:22px;height:22px;color:var(--s8-gold2)}
:is(#s8st,#s8bar).s8-v2 .s8-boxcard .s8-gift svg.s8-truck{color:var(--s8-deep)}
