/* joy.css — the "המשמח" joy layer (see kit/JOY.md). Classes: .hm-joy-*  ·  loaded on every page after me.css */

/* ---------- the smile that draws itself ---------- */
.hm-joy-sm{display:inline-block;line-height:0;color:var(--red);vertical-align:middle}
.hm-joy-sm svg{display:block;width:100%;height:auto;overflow:visible}
.hm-joy-sm path{fill:none;stroke:currentColor;stroke-width:112;stroke-linecap:round}
.hm-joy-sm circle{fill:currentColor}
.hm-joy-sm.draw path{stroke-dasharray:1 2;stroke-dashoffset:1;opacity:0;animation:joy-draw var(--jd,.9s) var(--jl,0s) cubic-bezier(.65,0,.35,1) forwards}
.hm-joy-sm.draw circle{transform-box:fill-box;transform-origin:center;transform:scale(0);animation:joy-dot .5s cubic-bezier(.3,1.7,.5,1) forwards}
.hm-joy-sm.draw circle.a{animation-delay:var(--jl,0s)}
.hm-joy-sm.draw circle.b{animation-delay:calc(var(--jl,0s) + var(--jd,.9s) - .12s)}
@keyframes joy-draw{0%{stroke-dashoffset:1;opacity:0}6%{opacity:1}100%{stroke-dashoffset:0;opacity:1}}
@keyframes joy-dot{to{transform:scale(1)}}

/* ---------- hand-drawn smile under a heading word ---------- */
.hm-joy-ulh{position:relative}
.hm-joy-ul{position:absolute;inset-inline:-.06em;bottom:-.1em;width:calc(100% + .12em);height:.2em;overflow:visible;pointer-events:none}
.hm-joy-ul path{fill:none;stroke:var(--stone,#D9BC8C);stroke-width:5px;stroke-linecap:round;stroke-dasharray:1 2;stroke-dashoffset:1;opacity:0}
.hm-joy-ulh.joy-in .hm-joy-ul path{animation:joy-draw 1s .2s cubic-bezier(.65,0,.35,1) forwards}
.hm-joy-ulh.joy-still .hm-joy-ul path{animation:none;stroke-dashoffset:0;opacity:1}
@media (max-width:860px){.hm-joy-ul path{stroke-width:3.5px}}

/* ---------- cart pill: the bag grins for a moment after every add ---------- */
.hm-cartb>.hm-joy-grin{display:none;width:21px;height:21px;place-items:center;flex:none}
.hm-cartb>.hm-joy-grin .hm-joy-sm{width:21px}
.hm-cartb.joy-grin>svg{display:none}
.hm-cartb.joy-grin>.hm-joy-grin{display:grid;animation:joy-grinpop .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes joy-grinpop{from{transform:scale(.6) rotate(-12deg)}}

/* ---------- the cheers moment: two glasses clink on every add (JS: HM.joy.cheers) ---------- */
.hm-joy-ch{position:fixed;top:0;left:0;z-index:155;pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:calc(5px*var(--s,1));width:max-content;min-width:calc(120px*var(--s,1))}
.hm-joy-ch .st{position:relative;width:calc(120px*var(--s,1));height:calc(64px*var(--s,1))}
.hm-joy-ch .g{position:absolute;left:50%;bottom:0;width:calc(32px*var(--s,1));height:calc(64px*var(--s,1));margin-left:calc(-16px*var(--s,1));transform-origin:50% 97%;opacity:0;will-change:transform,opacity;
 filter:drop-shadow(0 0 1.2px rgba(255,255,255,.95)) drop-shadow(0 5px 7px rgba(20,20,20,.2))}
.hm-joy-ch .halo{position:absolute;left:50%;top:55%;width:calc(150px*var(--s,1));height:calc(104px*var(--s,1));border-radius:50%;opacity:0;background:radial-gradient(closest-side,rgba(255,252,245,.92) 0%,rgba(255,252,245,.7) 55%,rgba(255,252,245,0) 100%)}
.hm-joy-ch.inpd .halo{display:none}
.hm-joy-ch .g svg{display:block;width:100%;height:100%;overflow:visible}
.hm-joy-ch .g.r svg{transform:scaleX(-1)}
.hm-joy-ch .sp{position:absolute;left:50%;width:calc(22px*var(--s,1));height:calc(22px*var(--s,1));opacity:0;z-index:2}
.hm-joy-ch .sp svg{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 0 3px rgba(255,236,190,.95))}
.hm-joy-ch .dr{position:absolute;left:50%;width:calc(4.5px*var(--s,1));height:calc(5.5px*var(--s,1));border-radius:50% 50% 50% 50%/60% 60% 40% 40%;opacity:0;box-shadow:inset 0 0 0 .6px rgba(58,38,32,.5)}
.hm-joy-ch .ln{display:block;font-family:inherit;font-weight:800;font-size:14px;line-height:1;color:#fff;background:var(--red,#A31D2B);padding:7px 13px 8px;border-radius:99px;white-space:nowrap;opacity:0;
 box-shadow:0 8px 18px rgba(163,29,43,.28),inset 0 0 0 1px rgba(255,255,255,.12)}
.hm-joy-ch .hm-joy-chs{width:calc(40px*var(--s,1));margin:calc(-2px*var(--s,1)) 0 calc(1px*var(--s,1))}
.hm-joy-ch.big .ln{font-size:16px;padding:9px 16px 10px}
.hm-joy-ch.quiet .ln{font-size:12px;padding:5px 10px 6px;background:#fff;color:var(--red,#A31D2B);box-shadow:0 4px 12px rgba(20,20,20,.12),inset 0 0 0 1px rgba(163,29,43,.25)}
/* reduced motion: a static check + the line, nothing moves */
.hm-joy-ch.rm{flex-direction:row;gap:8px;min-width:0;background:#fff;border-radius:99px;padding-block:5px;padding-inline:5px 15px;box-shadow:0 10px 24px rgba(20,20,20,.16),inset 0 0 0 1px var(--line,#e8e2d8)}
.hm-joy-ch.rm .ln{opacity:1;background:none;color:var(--ink,#141414);box-shadow:none;padding:0;font-size:14px}
.hm-joy-ch.rm .ck{width:26px;height:26px;border-radius:50%;background:var(--ok,#1F7A4D);color:#fff;display:grid;place-items:center;flex:none}
.hm-joy-ch.rm .ck svg{width:15px;height:15px}

/* ---------- confetti layer ---------- */
.hm-joy-cf{position:fixed;inset:0;pointer-events:none;z-index:160;overflow:hidden;contain:strict}
.hm-joy-cf i{position:absolute;top:0;left:0;width:9px;height:13px;border-radius:2px;will-change:transform}
.hm-joy-cf i.r{width:9px;height:9px;border-radius:50%}
.hm-joy-cf i.l{width:4px;height:16px;border-radius:3px}
.hm-joy-cf i.s{width:26px;height:10px;background:none}
.hm-joy-cf i.s svg{width:100%;height:100%;overflow:visible}
.hm-joy-cf i.s path{fill:none;stroke:currentColor;stroke-width:120;stroke-linecap:round}
.hm-joy-cf i.s circle{fill:currentColor}

/* ---------- empty states + loader ---------- */
.hm-joy-empty{width:96px;height:96px;border-radius:50%;background:var(--tile,#F6F1E9);display:grid;place-items:center;margin:8px auto 16px}
.hm-joy-empty .hm-joy-sm{width:52px;margin-top:10px}
.pgc-loading.joy{display:flex;flex-direction:column;align-items:center;gap:14px;font-weight:700}
.hm-joy-spin{width:54px;animation:joy-nod 1.6s ease-in-out infinite;transform-origin:50% 0}
.hm-joy-load{display:flex;flex-direction:column;align-items:center;gap:14px;padding:60px 0;color:var(--muted);font-weight:700}
.hm-joy-load .hm-joy-sm{width:54px;animation:joy-nod 1.6s ease-in-out infinite;transform-origin:50% 0}
@keyframes joy-nod{0%,100%{transform:rotate(-7deg) scaleX(.92)}50%{transform:rotate(7deg) scaleX(1.06)}}

/* ---------- free shipping reached: the smile sits in the meter line ---------- */
.hmc-pfs small .hm-joy-sm,.hmc-fs .tx .hm-joy-sm{width:24px;flex:none;color:var(--red)}
.hmc-fs .tx .hm-joy-sm{width:30px;margin-inline-end:2px}
.hmc-pfs small .hm-joy-sm svg,.hmc-fs.ok .tx .hm-joy-sm svg{width:100%;height:auto;color:inherit}
.hmc-pfs.joy small{color:var(--ok);font-weight:900}
.hmc-pfs.joy .mt i,.hmc-fs.ok.joy .mt i{background-image:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.65) 50%,transparent 70%);background-size:220% 100%;background-repeat:no-repeat;animation:joy-sheen 1.4s .3s ease-out 2}
@keyframes joy-sheen{from{background-position:130% 0}to{background-position:-90% 0}}

/* ---------- Hanukkah (auto-off after the holiday) ---------- */
.hm-joy-hol{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.hm-joy-hol b{font-weight:900}
.hm-joy-hol .s{font-weight:700;opacity:.92}
.hm-joy-men{width:34px;height:20px;flex:none;overflow:visible;margin-top:-3px}
.hm-joy-men .fl{transform-box:fill-box;transform-origin:50% 100%;animation:joy-flicker 2.4s ease-in-out infinite}
@keyframes joy-flicker{0%,100%{transform:scale(1,1)}40%{transform:scale(.9,1.12) skewX(-3deg)}70%{transform:scale(1.06,.94)}}
.hm-topbar .hm-joy-hold{width:4px;height:4px;border-radius:50%;background:#fff;opacity:.6}
/* phones: the top bar leads with the holiday ("חנוכה שמח · נר ראשון") + free shipping; the store-hours notice is gone (kit.css) */
@media (max-width:860px){
 .hm-joy-men{width:26px;height:16px}
 .hm-topbar .hm-joy-hol{gap:6px}
}
@media (max-width:420px){.hm-topbar{font-size:11.5px;gap:8px}.hm-joy-men{width:22px;height:14px}}

/* ---------- playful hovers: the colour blobs breathe, tiles tilt a little ---------- */
@keyframes joy-breathe{0%,100%{transform:scale(1.3)}50%{transform:scale(1.5) translate(-4%,3%)}}
.hm-it:hover>a .bico circle,.hm-it>a:focus-visible .bico circle{animation:joy-breathe 2.4s .35s ease-in-out infinite}
.hm-dcat>button .bico circle,.hm-dcat>a .bico circle{transform-box:fill-box;transform-origin:center;transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.hm-dcat>button:active .bico circle,.hm-dcat>a:active .bico circle,.hm-dcat>button[aria-expanded="true"] .bico circle{transform:scale(1.35)}
@media (hover:hover){
 .hm-mlist a img{transition:transform .45s cubic-bezier(.3,1.5,.5,1),box-shadow .25s}
 .hm-mlist a:hover img{transform:rotate(-6deg) scale(1.08)}
 .hm-sx-ctile img{transition:transform .5s cubic-bezier(.3,1.5,.5,1)}
 .hm-sx-ctile:hover img{transform:translateY(-4px) rotate(-3deg)}
}

/* ---------- reduced motion: show every final state, nothing moves ---------- */
@media (prefers-reduced-motion:reduce){
 .hm-joy-sm.draw path,.hm-joy-ulh .hm-joy-ul path{stroke-dashoffset:0!important;opacity:1!important;animation:none!important}
 .hm-joy-sm.draw circle{transform:none!important;animation:none!important}
 .hm-joy-spin,.hm-joy-load .hm-joy-sm,.hm-joy-men .fl,.hm-it:hover>a .bico circle{animation:none!important}
 .hm-joy-cf{display:none}
 .hm-joy-ch .g,.hm-joy-ch .sp,.hm-joy-ch .dr{animation:none!important;transition:none!important}
}
/* bigger, clearer line (Sharon 2026-12-04) */
.hm-joy-ch .ln{font-size:18px;padding:9px 18px 10px;box-shadow:0 6px 18px rgba(163,29,43,.3)}
.hm-joy-ch.quiet .ln{font-size:15px}
@media (max-width:860px){.hm-joy-ch .ln{font-size:16px}}
