/* TISH | Paper controls v12: install pin, cart icon, empty bag, quantities.
   Visual and motion only. No cart, checkout or install behavior replaced. */
body.tish-paper{
  --tish-control-color:var(--tish-card-primary,var(--primary,#a91f16));
  --tish-control-ink:var(--tish-card-ink,var(--text,#352014));
  --tish-control-light:var(--tish-card-on-primary,var(--on-primary,#fff));
  --tish-control-ease:cubic-bezier(.22,1,.36,1);
}
/* Paper pin: actually torn ivory art, never the old solid circle.
   Separate backdrop preserves the irregular edge and readable text. */
body.tish-paper #pwaInstallBtn.tish-paper-pin-control:not([hidden]){
  position:fixed!important;
  left:10px!important;
  right:auto!important;
  bottom:calc(162px + env(safe-area-inset-bottom,0px))!important;
  z-index:48!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  align-items:center!important;
  gap:2px!important;
  width:clamp(76px,21vw,98px)!important;
  height:clamp(76px,21vw,98px)!important;
  min-width:76px!important;
  min-height:76px!important;
  max-width:98px!important;
  margin:0!important;
  padding:15px 7px!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:transparent url('../../tish-paper/paper/favorite-disc.webp') center/100% 100% no-repeat!important;
  clip-path:polygon(0 5%,8% 2%,17% 4%,25% 0,36% 3%,47% 1%,58% 4%,68% 1%,79% 3%,90% 0,100% 5%,98% 22%,100% 37%,98% 55%,100% 71%,98% 87%,100% 97%,90% 100%,78% 97%,65% 100%,52% 97%,40% 100%,26% 98%,13% 100%,0 96%,2% 76%,0 57%,2% 40%,0 21%);
  color:var(--tish-control-color)!important;
  filter:drop-shadow(0 6px 4px rgba(60,37,25,.27))!important;
  font-family:Cairo,Tajawal,Arial,sans-serif!important;
  font-size:clamp(.63rem,2.3vw,.82rem)!important;
  font-weight:900!important;
  line-height:1.32!important;
  text-align:center!important;
  white-space:normal!important;
  transform:translateZ(0);
  transform-origin:center center;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  transition:transform 260ms var(--tish-control-ease),filter 260ms ease-out!important;
}
body.tish-paper #pwaInstallBtn.tish-paper-pin-control:not([hidden]) i{
  display:block!important;
  flex:0 0 auto;
  color:var(--tish-control-color)!important;
  font-size:clamp(1.18rem,3.6vw,1.52rem)!important;
  line-height:1.25;
  transform:rotate(12deg);
}
body.tish-paper #pwaInstallBtn.tish-paper-pin-control:not([hidden]) span{
  display:block;
  max-width:100%;
  color:var(--tish-control-color)!important;
  font-weight:900;
  text-align:center;
  line-height:1.27;
  text-shadow:none;
}
body.tish-paper.cm-has-sticky-cart #pwaInstallBtn.tish-paper-pin-control:not([hidden]){
  bottom:calc(180px + env(safe-area-inset-bottom,0px))!important;
}
@media(hover:hover) and (pointer:fine){
  body.tish-paper #pwaInstallBtn.tish-paper-pin-control:not([hidden]):not(.paper-pin-fold):hover{
    transform:translateY(-3px)!important;
    filter:drop-shadow(0 9px 5px rgba(60,37,25,.3))!important;
  }
}
@keyframes tish-paper-pin-press{
  0%{transform:scale(1) rotate(0)}
  31%{transform:scale(.91) rotate(-3deg)}
  58%{transform:scale(.95) rotate(-1deg)}
  80%{transform:scale(1.025) rotate(1deg)}
  100%{transform:scale(1) rotate(0)}
}
body.tish-paper #pwaInstallBtn.tish-paper-pin-control:not([hidden]):active,
body.tish-paper #pwaInstallBtn.tish-paper-pin-control.paper-pin-pressed:not([hidden]){
  animation:tish-paper-pin-press 340ms var(--tish-control-ease) both!important;
  filter:drop-shadow(0 3px 2px rgba(60,37,25,.2))!important;
}
body.tish-paper #pwaInstallBtn.tish-paper-pin-control:focus-visible{
  outline:3px solid var(--tish-control-color)!important;
  outline-offset:5px!important;
}
@media(max-width:375px){
  body.tish-paper #pwaInstallBtn.tish-paper-pin-control:not([hidden]){
    left:6px!important;
    width:76px!important;
    height:76px!important;
    padding:12px 6px!important;
  }
}
/* Cart uses the same unselected icon treatment and selected paper as the other tabs. */
body.tish-paper .bottom-nav .nav-btn.tish-paper-cart-nav > .tish-paper-cart-icon-disc{
  display:none!important;
}
@keyframes tish-paper-cart-squish{
  0%,100%{transform:scale(1) rotate(0)}
  28%{transform:scale(.85,.93) rotate(-4deg)}
  64%{transform:scale(1.07,.99) rotate(2deg)}
}
body.tish-paper .bottom-nav .nav-btn.tish-paper-cart-nav:active .tish-paper-nav-icon,
body.tish-paper .bottom-nav .nav-btn.tish-paper-cart-nav.paper-cart-icon-pop .tish-paper-nav-icon,
body.tish-paper.tish-cart-page #cartItems .cart-row .row-actions button.paper-cart-qty-press{
  animation:tish-paper-cart-squish 380ms var(--tish-control-ease) both!important;
}
/* Floating basket stays a real paper badge, but never masks its contents. */
body.tish-paper .cm-sticky-cart .cm-sticky-cart-icon{
  display:grid!important;
  place-items:center!important;
  background:url('../../tish-paper/paper/favorite-disc.webp') center/100% 100% no-repeat!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  transform-origin:center;
}
body.tish-paper .cm-sticky-cart .cm-sticky-cart-icon i{
  color:var(--tish-control-color)!important;
  font-size:1.05rem!important;
}
body.tish-paper .cm-sticky-cart:active .cm-sticky-cart-icon{
  transform:scale(.9)!important;
}
/* Cart empty illustration: physical paper bag 'settles' onto its backing.
   The original round TISH logo stays intact, rather than being redrawn. */
body.tish-paper.tish-cart-page #cartItems .tish-cart-bag-art{
  transform-origin:50% 80%!important;
  animation:tish-paper-bag-settle 550ms var(--tish-control-ease) both;
}
@keyframes tish-paper-bag-settle{
  from{opacity:0;transform:translateY(9px) scale(.94,.97)}
  70%{opacity:1;transform:translateY(-2px) scale(1.01)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
body.tish-paper.tish-cart-page #cartItems .tish-cart-bag-art .tish-cart-bag-logo{
  filter:drop-shadow(0 3px 2px rgba(67,42,26,.22))!important;
}
body.tish-paper.tish-cart-page #cartItems .tish-cart-browse:active,
body.tish-paper.tish-cart-page #checkoutStart:not(:disabled):active{
  transform:scale(.96)!important;
  filter:drop-shadow(0 2px 1px rgba(60,37,25,.20))!important;
}
body.tish-paper.tish-cart-page #cartItems .row-actions button{
  transform-origin:center;
  touch-action:manipulation;
}
body.tish-paper.tish-cart-page #cartItems .row-actions button:active{
  transform:scale(.89)!important;
}
@media(prefers-reduced-motion:reduce){
  body.tish-paper #pwaInstallBtn.tish-paper-pin-control,
  body.tish-paper .bottom-nav .nav-btn.tish-paper-cart-nav .tish-paper-nav-icon,
  body.tish-paper .cm-sticky-cart .cm-sticky-cart-icon,
  body.tish-paper.tish-cart-page #cartItems .tish-cart-bag-art,
  body.tish-paper.tish-cart-page #cartItems .row-actions button{
    animation:none!important;
    transition:none!important;
    transform:none!important;
  }
}
body.tish-paper .cm-sticky-cart:not([hidden]) {
  animation:none;
  transform-origin:center bottom;
}
@media(prefers-reduced-motion:no-preference) {
  body.tish-paper .cm-sticky-cart .cm-sticky-cart-cta {
    transition:scale 120ms ease-out;
  }
  body.tish-paper .cm-sticky-cart:active .cm-sticky-cart-cta {
    scale:.94;
  }
}
