/*
 * Separes Store footer (0.3.0): gradient footer with floating light blobs, a
 * dotted pattern, a light that follows the mouse, columns that rise in on
 * scroll, and a bottom bar with the copyright, credit and back-to-top button.
 * Ported from the store's former footer; colours follow the «رنگ‌ها» tab.
 */
.sps-footer{
  --plf-font:var(--sps-store-font);
  --plum:var(--sps-color-secondary); --deep:var(--sps-color-primary); --orange:var(--sps-color-accent); --peach:#F7C8B6;
  --white:#FFF9F5; --cream:var(--sps-color-border);
  position:relative; direction:rtl; isolation:isolate; overflow:hidden;
  margin-top:60px; padding:70px 40px 0;
  border-radius:24px 24px 0 0;
  font-family:var(--plf-font); color:var(--cream);
  background:linear-gradient(135deg,var(--deep) 0%,var(--plum) 50%,var(--deep) 100%);
  background-size:220% 220%; animation:sps-footer-bg 18s ease-in-out infinite;
}
.sps-footer *{box-sizing:border-box}
.sps-footer svg{display:block}
.sps-footer :is(h4,a,p,span,li,button,b,strong){font-family:var(--plf-font)!important}
.sps-footer a{text-decoration:none;color:inherit}
@keyframes sps-footer-bg{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}

/* خط نورانی بالای فوتر */
.sps-footer::before{
  content:"";position:absolute;top:0;left:0;right:0;height:3px;z-index:3;
  background:linear-gradient(90deg,transparent,var(--orange),var(--peach),var(--orange),transparent);
  background-size:200% 100%;animation:sps-footer-shine 4s linear infinite;
}
@keyframes sps-footer-shine{to{background-position:-200% 0}}

/* الگوی نقطه‌ای */
.sps-footer__dots{position:absolute;inset:0;z-index:-2;opacity:.18;
  background-image:radial-gradient(rgba(247,200,182,.7) 1px,transparent 1.4px);
  background-size:26px 26px;
  -webkit-mask-image:linear-gradient(to bottom,#000,transparent 85%);
          mask-image:linear-gradient(to bottom,#000,transparent 85%);}

/* حباب‌های شناور نورانی */
.sps-footer__blob{position:absolute;border-radius:50%;filter:blur(70px);z-index:-1;opacity:.55;
  animation:sps-footer-float 14s ease-in-out infinite;}
.sps-footer__blob--1{width:380px;height:380px;background:#8a2e6c;top:-120px;right:-80px}
.sps-footer__blob--2{width:300px;height:300px;background:var(--orange);opacity:.18;bottom:-100px;left:20%;animation-delay:-5s}
.sps-footer__blob--3{width:260px;height:260px;background:var(--peach);opacity:.12;top:30%;left:-80px;animation-delay:-9s}
@keyframes sps-footer-float{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(40px,-30px) scale(1.15)}}

/* نور دنبال‌کننده ماوس */
.sps-footer__spot{position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(420px circle at var(--mx,50%) var(--my,0%),rgba(247,200,182,.13),transparent 60%);}

/* ---------- گرید اصلی (راست ← چپ) ---------- */
.sps-footer__grid{display:grid;max-width:1300px;margin:auto;gap:36px;
  grid-template-columns:1.6fr 1fr 1fr 1.3fr 1.3fr;}
.sps-footer__col{position:relative;opacity:0;transform:translateY(30px);
  transition:opacity .8s cubic-bezier(.2,.7,.2,1),transform .8s cubic-bezier(.2,.7,.2,1);}
.sps-footer.is-in .sps-footer__col{opacity:1;transform:none}
.sps-footer.is-in .sps-footer__col:nth-child(2){transition-delay:.12s}
.sps-footer.is-in .sps-footer__col:nth-child(3){transition-delay:.24s}
.sps-footer.is-in .sps-footer__col:nth-child(4){transition-delay:.36s}
.sps-footer.is-in .sps-footer__col:nth-child(5){transition-delay:.48s}
.sps-footer__col + .sps-footer__col::before{content:"";position:absolute;right:-18px;top:6px;bottom:6px;width:1px;
  background:linear-gradient(to bottom,transparent,rgba(247,200,182,.28),transparent);}

.sps-footer__title{font-weight:700;font-size:17px;color:var(--white);margin:0 0 22px;
  position:relative;padding-bottom:12px;line-height:1.6}
.sps-footer__title::after{content:"";position:absolute;right:0;bottom:0;width:34px;height:3px;border-radius:3px;
  background:var(--orange);transition:width .4s;}
.sps-footer__col:hover .sps-footer__title::after{width:64px}

/* ---------- برند: لوگو + متن + شبکه‌ها (هم‌عرض و هم‌تراز) ---------- */
.sps-footer__brand{width:100%;max-width:310px}

.sps-footer__logo{position:relative;display:flex;align-items:center;justify-content:center;width:100%;
  padding:16px 24px;margin-bottom:22px;border-radius:20px;overflow:hidden;
  background:linear-gradient(145deg,var(--white) 0%,var(--cream) 100%);
  box-shadow:
    0 16px 36px rgba(0,0,0,.32),
    0 0 0 6px rgba(247,200,182,.14),
    inset 0 1px 0 #fff;
  transition:transform .45s cubic-bezier(.2,.8,.2,1),box-shadow .45s;}
.sps-footer__logo::after{content:"";position:absolute;top:0;left:-130%;width:55%;height:100%;
  background:linear-gradient(100deg,transparent,rgba(244,119,53,.28),rgba(255,255,255,.7),transparent);
  transform:skewX(-20deg);animation:sps-footer-sweep 6s ease-in-out infinite;pointer-events:none}
@keyframes sps-footer-sweep{0%,55%{left:-130%}100%{left:170%}}
.sps-footer__logo:hover{transform:translateY(-4px) scale(1.03);
  box-shadow:0 22px 44px rgba(0,0,0,.38),0 0 0 8px rgba(244,119,53,.22),inset 0 1px 0 #fff}
.sps-footer__logo img{display:block;width:100%;max-width:190px;height:auto;position:relative;z-index:1}

/* تیتر کوچک + پاراگراف جاستیفای */
.sps-footer__about-title{display:block;margin:0 0 10px;font-weight:700;font-size:15.5px;line-height:1.8;color:var(--peach)}
.sps-footer__about{margin:0 0 24px;font-weight:300;font-size:14px;line-height:2.15;color:var(--cream);opacity:.92;
  text-align:justify;text-justify:inter-word;text-align-last:right;
  hyphens:none;word-spacing:0}

.sps-footer__social{display:flex;justify-content:space-between;gap:10px}
.sps-footer__social a{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:12px;
  background:rgba(255,249,245,.07);border:1px solid rgba(247,200,182,.22);
  backdrop-filter:blur(6px);transition:all .35s cubic-bezier(.2,.8,.2,1);}
.sps-footer__social svg{width:19px;height:19px;fill:none;stroke:var(--peach);stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;transition:stroke .3s}
.sps-footer__social a:hover{background:var(--orange);border-color:var(--orange);
  transform:translateY(-6px) rotate(-6deg);box-shadow:0 12px 24px rgba(244,119,53,.4);}
.sps-footer__social a:hover svg{stroke:#fff}

/* ---------- لینک‌ها ---------- */
.sps-footer__links{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:13px}
.sps-footer__links a{position:relative;display:inline-flex;align-items:center;gap:8px;
  font-weight:400;font-size:14.5px;color:var(--cream);opacity:.85;transition:all .3s;}
.sps-footer__links a::before{content:"";width:0;height:2px;border-radius:2px;background:var(--orange);transition:width .3s}
.sps-footer__links a:hover{opacity:1;color:#fff;transform:translateX(-6px)}
.sps-footer__links a:hover::before{width:14px}

/* ---------- تماس ---------- */
.sps-footer__contact{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:16px}
.sps-footer__contact li{display:flex;align-items:center;gap:12px;font-weight:400;font-size:14px;line-height:1.8}
.sps-footer__ico{flex:0 0 36px;height:36px;border-radius:11px;display:grid;place-items:center;
  background:linear-gradient(135deg,rgba(247,200,182,.95),rgba(244,119,53,.9));
  box-shadow:0 6px 14px rgba(0,0,0,.25);transition:transform .35s}
.sps-footer__contact li:hover .sps-footer__ico{transform:scale(1.15) rotate(-8deg)}
.sps-footer__ico svg{width:18px;height:18px;fill:none;stroke:var(--deep);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sps-footer__contact a:hover{color:var(--peach)}
.sps-footer__contact address{font-style:normal}
.sps-footer__ltr{direction:ltr;unicode-bidi:embed}

/* ---------- نمادها (سمت چپ) ---------- */
.sps-footer__badges{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.sps-footer__badge{aspect-ratio:1;border-radius:16px;background:var(--white);
  display:grid;place-items:center;padding:8px;position:relative;overflow:hidden;
  box-shadow:0 10px 24px rgba(0,0,0,.28);
  animation:sps-footer-bob 5s ease-in-out infinite;
  transition:transform .4s,box-shadow .4s;}
.sps-footer__badge:nth-child(2){animation-delay:-1.6s}
.sps-footer__badge:nth-child(3){animation-delay:-3.2s}
@keyframes sps-footer-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.sps-footer__badge > a,.sps-footer__badge > div{position:relative;z-index:1;display:grid;place-items:center;width:100%;height:100%}
.sps-footer__badge a{opacity:1!important;transform:none!important}
.sps-footer__badge img{display:block;max-width:100%!important;max-height:100%!important;
  width:auto!important;height:auto!important;object-fit:contain;margin:0!important;cursor:pointer}
.sps-footer__badge::after{content:"";position:absolute;top:0;left:-120%;width:60%;height:100%;z-index:2;pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(244,119,53,.3),transparent);transform:skewX(-20deg);}
.sps-footer__badge:hover{animation-play-state:paused;transform:translateY(-8px) scale(1.06);
  box-shadow:0 18px 34px rgba(244,119,53,.35)}
.sps-footer__badge:hover::after{left:140%;transition:left .8s}
.sps-footer__badges-note{margin-top:14px;font-size:12.5px;font-weight:300;color:var(--peach);opacity:.85;line-height:1.9}

/* ---------- نوار پایین: کپی‌رایت | وبیترا | بازگشت به بالا ---------- */
.sps-footer__bottom{max-width:1300px;margin:56px auto 0;padding:22px 0 26px;position:relative;
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;
  font-weight:300;font-size:13.5px;}
.sps-footer__bottom::before{content:"";position:absolute;top:0;left:0;right:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(247,200,182,.4),transparent)}
.sps-footer__bottom b{font-weight:700;color:var(--peach)}
.sps-footer__copy{justify-self:start}
.sps-footer__credit{justify-self:center;text-align:center;display:inline-flex;align-items:center;gap:6px;
  padding:7px 16px;border-radius:999px;
  background:rgba(255,249,245,.06);border:1px solid rgba(247,200,182,.18);
  backdrop-filter:blur(6px);transition:border-color .3s,background .3s}
.sps-footer__credit:hover{border-color:rgba(244,119,53,.6);background:rgba(244,119,53,.1)}
.sps-footer__credit a{position:relative;font-weight:700;color:var(--orange);transition:color .3s}
.sps-footer__credit a::after{content:"";position:absolute;right:0;bottom:-3px;height:2px;width:0;border-radius:2px;
  background:var(--orange);transition:width .35s}
.sps-footer__credit a:hover{color:#ff9a63}
.sps-footer__credit a:hover::after{width:100%}
.sps-footer__topwrap{justify-self:end}

/* دکمه بازگشت به بالا */
.sps-footer__top{display:inline-flex;align-items:center;gap:8px;cursor:pointer;border:0;
  font-weight:600;font-size:13px;color:#fff;
  background:var(--orange);padding:9px 16px;border-radius:12px;
  box-shadow:0 8px 20px rgba(244,119,53,.35);transition:all .3s}
.sps-footer__top svg{width:16px;height:16px;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .3s}
.sps-footer__top:hover{transform:translateY(-3px);background:#ff8a4a}
.sps-footer__top:hover svg{transform:translateY(-3px)}

/* ---------- ریسپانسیو ---------- */
@media(max-width:1100px){
  .sps-footer__grid{grid-template-columns:1fr 1fr 1fr}
  .sps-footer__col:nth-child(1){grid-column:1/-1}
  .sps-footer__col + .sps-footer__col::before{display:none}
  .sps-footer__brand{max-width:420px}
}
@media(max-width:800px){
  .sps-footer__bottom{grid-template-columns:1fr;justify-items:center;text-align:center}
  .sps-footer__copy,.sps-footer__credit,.sps-footer__topwrap{justify-self:center}
}
@media(max-width:700px){
  .sps-footer{padding:50px 20px 0}
  .sps-footer__grid{grid-template-columns:1fr 1fr;gap:34px 20px}
  .sps-footer__col:nth-child(4),.sps-footer__col:nth-child(5){grid-column:1/-1}
  .sps-footer__badges{max-width:340px}
  .sps-footer__brand{max-width:100%}
}
@media(prefers-reduced-motion:reduce){
  .sps-footer,.sps-footer *{animation:none!important;transition:none!important}
  .sps-footer__col{opacity:1;transform:none}
}
