/* =========================================================
   Lenjina Home Sections – پرفروش‌ترین‌ها و ردیف دسته‌بندی‌ها
   همه‌ی قانون‌ها زیر .lj-hs هستند و به بقیه‌ی سایت دست نمی‌زنند
   ========================================================= */

.lj-hs{
  --lj-red:#9a0000;
  --lj-ink:#2b2b2b;
  --lj-muted:#8a8a8a;
  --lj-line:#ececec;
  --lj-gap:12px;
  position:relative;
  box-sizing:border-box;
  margin:18px 0;
  padding:18px 18px 14px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(154,0,0,.04) 0%, rgba(154,0,0,0) 55%),
    #fff;
  border:1px solid rgba(154,0,0,.08);
  border-radius:22px;
}
.lj-hs *,
.lj-hs *::before,
.lj-hs *::after{ box-sizing:border-box; }

.lj-hs a,
.lj-hs a:hover,
.lj-hs a:focus{ text-decoration:none; color:inherit; }

/* ---------- هدر ---------- */
.lj-hs__head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
.lj-hs__titlewrap{ flex:1; min-width:0; }
.lj-hs__title{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  font-size:clamp(19px,2.2vw,24px);
  font-weight:800;
  line-height:1.6;
  color:var(--lj-ink);
}
.lj-hs__icon{ display:inline-flex; flex:0 0 auto; line-height:0; }
.lj-hs__leaf{
  flex:0 0 auto;
  width:10px;
  height:10px;
  background:linear-gradient(135deg,#c20000,#7a0000);
  border-radius:0 10px 0 10px;
  transform:translateY(-1px);
}
.lj-hs__sub{
  margin-top:2px;
  font-size:12.5px;
  line-height:1.7;
  color:var(--lj-muted);
}

.lj-hs__more{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  padding:6px 14px;
  border-radius:999px;
  background:rgba(154,0,0,.06);
  color:var(--lj-red) !important;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
  transition:background .2s;
}
.lj-hs__more:hover{ background:rgba(154,0,0,.12); }

/* ---------- فلش‌های کناری چپ/راست (موبایل و دسکتاپ، مثل پیش‌فرض وودمارت) ---------- */
.lj-hs__wrap{ position:relative; }

.lj-hs .lj-hs__btn{
  position:absolute !important;
  top:calc(50% - 4px);
  transform:translateY(-50%);
  z-index:6;
  display:none;
  visibility:visible;
  align-items:center;
  justify-content:center;
  -webkit-appearance:none;
  appearance:none;
  width:32px;
  height:32px;
  min-width:0;
  min-height:0;
  margin:0;
  padding:0;
  font-size:0;
  line-height:1;
  letter-spacing:0;
  text-transform:none;
  border:0 !important;
  border-radius:50% !important;
  background:#fff !important;
  color:var(--lj-ink);
  box-shadow:0 2px 12px rgba(0,0,0,.22);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:opacity .2s,color .2s,box-shadow .2s;
}
.lj-hs .lj-hs__btn::before,
.lj-hs .lj-hs__btn::after{ content:none !important; display:none !important; }
.lj-hs.is-ready.is-scrollable .lj-hs__btn{ display:inline-flex !important; }
.lj-hs .lj-hs__btn:hover:not(:disabled),
.lj-hs .lj-hs__btn:focus-visible{ background:#fff; color:var(--lj-red); box-shadow:0 3px 14px rgba(0,0,0,.24); }
.lj-hs .lj-hs__btn:disabled{ opacity:0; pointer-events:none; }
.lj-hs__btn svg{ display:block; }
.lj-hs .lj-hs__btn--prev{ inset-inline-start:-6px; }
.lj-hs .lj-hs__btn--next{ inset-inline-end:-6px; }
.lj-hs__btn--prev svg{ transform:scaleX(-1); }
.lj-hs.is-rtl .lj-hs__btn--prev svg{ transform:none; }
.lj-hs.is-rtl .lj-hs__btn--next svg{ transform:scaleX(-1); }
@media (min-width:768px){
  .lj-hs .lj-hs__btn{ width:40px; height:40px; }
  .lj-hs .lj-hs__btn--prev{ inset-inline-start:-12px; }
  .lj-hs .lj-hs__btn--next{ inset-inline-end:-12px; }
}

/* ---------- مسیر اسکرول افقی ---------- */
/* جلوگیری از «باز شدن» کانتینر به‌اندازه‌ی محتوا داخل ستون‌های فلکس/گرید المنتور و قالب
   (اگر این اتفاق بیفتد هیچ محتوایی سرریز نمی‌کند و اسکرول/فلش کار نمی‌کند) */
.lj-hs{ width:100%; max-width:100%; min-width:0; }
.lj-hs__wrap{ min-width:0; max-width:100%; }
.lj-hs__track{
  min-width:0;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  padding:2px 2px 8px;
  outline:none;
}
.lj-hs__track::-webkit-scrollbar{ display:none; }

.lj-hs__name{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-clamp:2;
  overflow:hidden;
  font-size:13px;
  font-weight:600;
  line-height:1.8;
  color:#333;
  text-align:start;
}

/* ---------- قیمت (همان ظاهر معمول سایت) ---------- */
.lj-hs .lj-price{ font-size:13px; line-height:1.7; }
.lj-hs .lj-price .amount,
.lj-hs .lj-price .woocommerce-Price-amount{ color:var(--lj-red); font-weight:800; }
.lj-hs .lj-price ins{ background:none; text-decoration:none; }
.lj-hs .lj-price del{ opacity:1; text-decoration:line-through; color:#9a9a9a; font-size:11.5px; margin-inline-end:6px; }
.lj-hs .lj-price del .amount,
.lj-hs .lj-price del .woocommerce-Price-amount{ color:#9a9a9a; font-weight:400; }
.lj-hs .lj-price .woocommerce-Price-currencySymbol{ font-size:.8em; font-weight:600; margin-inline-start:3px; }
.lj-hs .lj-oos{ font-size:12.5px; font-weight:700; color:var(--lj-muted); }

/* =========================================================
   پرفروش‌ترین‌ها – ستون‌های سه‌تایی (سبک دیجی‌کالا)
   ========================================================= */
.lj-hs--best{ --n:1.12; }
@media (min-width:640px){  .lj-hs--best{ --n:2.15; } }
@media (min-width:1024px){ .lj-hs--best{ --n:3.15; } }

.lj-hs--best .lj-hs__track{
  display:grid;
  grid-template-rows:repeat(3,auto);
  grid-auto-flow:column;
  grid-auto-columns:calc((100% - (var(--n) - 1) * var(--lj-gap)) / var(--n));
  gap:var(--lj-gap);
}

.lj-hs__row{
  scroll-snap-align:start;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:10px;
  background:#fff;
  border:1px solid var(--lj-line);
  border-radius:16px;
  transition:border-color .2s,box-shadow .2s;
}
@media (hover:hover){
  .lj-hs__row:hover{ border-color:rgba(154,0,0,.25); box-shadow:0 6px 18px rgba(0,0,0,.06); }
}

.lj-hs__thumb{
  flex:0 0 84px;
  width:84px;
  height:84px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}
.lj-hs__thumb img{ width:100% !important; height:100% !important; max-width:none; margin:0; object-fit:contain !important; object-position:center; display:block; }

.lj-hs__rank{
  flex:0 0 26px;
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(154,0,0,.08);
  color:var(--lj-red);
  font-size:13px;
  font-weight:800;
  line-height:1;
}
.lj-hs__rank.is-top{ background:var(--lj-red); color:#fff; }

.lj-hs__rtext{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

/* =========================================================
   ردیف دسته‌بندی – کارت‌های عمودی
   ========================================================= */
.lj-hs--cat{ --n:2.25; }
@media (min-width:640px){  .lj-hs--cat{ --n:3.25; } }
@media (min-width:900px){  .lj-hs--cat{ --n:4.25; } }
@media (min-width:1200px){ .lj-hs--cat{ --n:5.25; } }

.lj-hs--cat .lj-hs__track{
  display:flex;
  gap:var(--lj-gap);
}

.lj-hs__card{
  flex:0 0 calc((100% - (var(--n) - 1) * var(--lj-gap)) / var(--n));
  scroll-snap-align:start;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px;
  background:#fff;
  border:1px solid var(--lj-line);
  border-radius:16px;
  transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease;
}
@media (hover:hover){
  .lj-hs__card:hover{
    transform:translateY(-3px);
    border-color:rgba(154,0,0,.2);
    box-shadow:0 10px 24px rgba(0,0,0,.08);
  }
}

.lj-hs__media{
  position:relative;
  display:block;
  aspect-ratio:1 / 1;
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}
.lj-hs__media img{
  position:absolute;
  inset:0;
  width:100% !important;
  height:100% !important;
  max-width:none;
  margin:0;
  padding:6px;
  object-fit:contain !important;
  object-position:center center;
  display:block;
}
.lj-hs__card.is-oos .lj-hs__media img{ opacity:.45; }

.lj-hs__badge{
  position:absolute;
  inset-block-start:4px;
  inset-inline-start:4px;
  z-index:1;
  min-width:40px;
  padding:0 8px;
  height:22px;
  line-height:22px;
  text-align:center;
  border-radius:999px;
  background:linear-gradient(135deg,#c20000,#7a0000);
  color:#fff;
  font-size:11.5px;
  font-weight:800;
  box-shadow:0 3px 8px rgba(154,0,0,.25);
}

.lj-hs__card .lj-hs__name{ min-height:3.6em; }

.lj-hs__foot{
  margin-top:auto;
  display:flex;
  justify-content:flex-end;
  min-height:22px;
}
.lj-hs__foot .lj-price{ display:flex; flex-wrap:wrap; align-items:baseline; justify-content:flex-end; }

/* ---------- موبایل: دو ردیف دوتایی، بقیه با اسکرول افقی ---------- */
@media (max-width:767px){
  .lj-hs--best,
  .lj-hs--cat{ --n:2.25; }

  .lj-hs--cat .lj-hs__track{
    display:grid;
    grid-template-rows:repeat(2,auto);
    grid-auto-flow:column;
    grid-auto-columns:calc((100% - (var(--n) - 1) * var(--lj-gap)) / var(--n));
  }
  .lj-hs--cat .lj-hs__card{ flex:none; }

  .lj-hs--best .lj-hs__track{ grid-template-rows:repeat(2,auto); }
  .lj-hs--best .lj-hs__row{
    position:relative;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
  }
  .lj-hs--best .lj-hs__thumb{
    position:relative;
    flex:none;
    width:100%;
    height:auto;
    aspect-ratio:1 / 1;
  }
  .lj-hs--best .lj-hs__thumb img{
    position:absolute;
    inset:0;
    padding:6px;
  }
  .lj-hs--best .lj-hs__rank{
    position:absolute;
    inset-block-start:14px;
    inset-inline-start:14px;
    z-index:1;
    flex:none;
  }
  .lj-hs--best .lj-hs__rtext{ flex:none; width:100%; gap:4px; }
  .lj-hs--best .lj-hs__name{ min-height:3.6em; }
  .lj-hs--best .lj-hs__rtext .lj-price{
    display:flex;
    flex-wrap:wrap;
    align-items:baseline;
    justify-content:flex-end;
  }
}

/* ---------- موبایل ---------- */
@media (max-width:767px){
  .lj-hs{ padding:14px 10px 10px; border-radius:18px; margin:14px 0; }
  .lj-hs__head{ margin-bottom:10px; }
  .lj-hs__thumb{ flex-basis:72px; width:72px; height:72px; }
  .lj-hs__more{ padding:5px 12px; font-size:12.5px; }
}

@media (prefers-reduced-motion:reduce){
  .lj-hs *{ transition:none !important; }
}

/* =========================================================
   شگفت‌انگیز – پس‌زمینه‌ی قرمز، شمارنده، کارت‌های سفید
   ========================================================= */
.lj-hs--amz{
  --n:2.3;
  padding:14px 12px;
  border:0;
  border-radius:20px;
  color:#fff;
  background:
    radial-gradient(90% 130% at 0% 0%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(135deg,#d10a22 0%,#a00000 55%,#700000 100%);
  box-shadow:0 10px 26px rgba(154,0,0,.22);
}

.lj-hs__amzhead{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 10px;
  margin-bottom:12px;
}
.lj-hs__amztitle{
  flex:1 0 auto;
  display:flex;
  align-items:center;
  gap:6px;
  font-size:17px;
  font-weight:800;
  line-height:1.5;
  color:#fff;
  white-space:nowrap;
}
.lj-hs__amztitle svg{ flex:0 0 auto; width:22px; height:22px; }

.lj-hs__timer{ flex:0 0 auto; display:flex; align-items:center; gap:3px; direction:ltr; }
.lj-hs__timer span{
  min-width:24px;
  height:24px;
  padding:0 4px;
  display:inline-grid;
  place-items:center;
  border-radius:7px;
  background:#fff;
  color:#b30000;
  font-size:13px;
  font-weight:800;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.lj-hs__timer i{ font-style:normal; font-weight:800; color:#fff; line-height:1; }
.lj-hs__timer .lj-hs__days{
  margin-inline-end:4px;
  padding:0 8px;
  background:rgba(255,255,255,.2);
  color:#fff;
  font-size:12px;
}
.lj-hs__timer .lj-hs__days[hidden]{ display:none; }
.lj-hs--amz.is-ended .lj-hs__timer{ display:none; }

.lj-hs .lj-hs__amzmore{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:2px;
  font-size:12.5px;
  font-weight:700;
  white-space:nowrap;
  color:#fff !important;
}
.lj-hs__amzmore svg{ display:block; transform:scaleX(-1); }

.lj-hs--amz .lj-hs__track{ display:flex; gap:var(--lj-gap); padding-bottom:6px; }
.lj-hs--amz .lj-hs__card{
  border-color:transparent;
  box-shadow:0 4px 14px rgba(0,0,0,.14);
}
.lj-hs--amz .lj-hs__name{ min-height:3.6em; }
.lj-hs__stock{
  display:block;
  min-height:18px;
  font-size:11.5px;
  font-weight:700;
  line-height:1.6;
  color:#b30000;
}
.lj-hs--amz .lj-hs__foot{
  justify-content:space-between;
  align-items:flex-end;
  gap:6px;
}
.lj-hs__pct{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  background:linear-gradient(135deg,#d10a22,#8f0000);
  color:#fff;
  font-size:12px;
  font-weight:800;
  line-height:1;
}
.lj-hs--amz .lj-hs__foot .lj-price{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:flex-end;
  margin-inline-start:auto;
  font-size:14px;
}
.lj-hs--amz .lj-price .woocommerce-Price-amount,
.lj-hs--amz .lj-price .amount{ white-space:nowrap; }
.lj-hs--amz .lj-price ins{ order:1; }
.lj-hs--amz .lj-price del{ order:2; margin:0; }

@media (max-width:639px){
  .lj-hs--amz .lj-hs__card{ position:relative; }
  .lj-hs--amz .lj-hs__pct{
    position:absolute;
    inset-block-start:14px;
    inset-inline-start:14px;
    z-index:2;
    box-shadow:0 3px 8px rgba(154,0,0,.25);
  }
  .lj-hs--amz .lj-hs__foot{ justify-content:flex-end; }
  .lj-hs--amz .lj-hs__foot .lj-price{ font-size:13.5px; }
}

@media (min-width:640px){
  .lj-hs--amz{ --n:3.3; padding:16px; }
  .lj-hs--amz .lj-hs__foot .lj-price{ font-size:16px; }
  .lj-hs--amz .lj-price del{ font-size:13px; }
  .lj-hs__pct{ height:24px; font-size:13px; }
  .lj-hs__amztitle{ font-size:20px; }
  .lj-hs__amztitle svg{ width:26px; height:26px; }
  .lj-hs__timer span{ min-width:28px; height:28px; font-size:14px; }
}

/* دسکتاپ: عنوان و شمارنده ستون کناری می‌شوند */
@media (min-width:1024px){
  .lj-hs--amz{ display:flex; align-items:stretch; gap:18px; padding:18px; --n:4.15; }
  .lj-hs--amz .lj-hs__foot .lj-price{ font-size:17.5px; }
  .lj-hs--amz .lj-price del{ font-size:13.5px; }
  .lj-hs--amz .lj-hs__wrap{ flex:1; min-width:0; }
  .lj-hs__amzhead{
    flex:0 0 190px;
    flex-direction:column;
    justify-content:center;
    gap:16px;
    margin:0;
    text-align:center;
  }
  .lj-hs__amztitle{ flex:none; flex-direction:column; gap:10px; font-size:26px; white-space:normal; }
  .lj-hs__amztitle svg{ width:56px; height:56px; }
  .lj-hs__timer{ gap:5px; }
  .lj-hs__timer span{ min-width:34px; height:34px; border-radius:9px; font-size:16px; }
  .lj-hs .lj-hs__amzmore{
    padding:8px 18px;
    border:1.5px solid rgba(255,255,255,.7);
    border-radius:10px;
    font-size:13.5px;
  }
}
@media (min-width:1400px){
  .lj-hs--amz{ --n:5.15; }
}

/* =========================================================
   لینک پوششی کارت + دکمه‌ی افزودن به سبد خرید
   ========================================================= */
.lj-hs__row,
.lj-hs__card{ position:relative; }

.lj-hs .lj-hs__cover{
  position:absolute;
  inset:0;
  z-index:1;
  display:block;
  border-radius:inherit;
  -webkit-user-drag:none;
  user-select:none;
}
.lj-hs .lj-hs__cover:focus-visible{ outline:2px solid var(--lj-red); outline-offset:-2px; }
.lj-hs__badge,
.lj-hs__pct,
.lj-hs__rank{ pointer-events:none; }

.lj-hs__track img{ -webkit-user-drag:none; user-select:none; }

.lj-hs__buy{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:0;
}
.lj-hs__buy .lj-price{ flex:1 1 auto; min-width:0; }

.lj-hs .lj-hs__atc{
  position:relative;
  z-index:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex:0 0 auto;
  width:100%;
  height:36px !important;
  min-width:0;
  min-height:0 !important;
  margin:0;
  padding:0 10px !important;
  border:1px solid rgba(154,0,0,.2) !important;
  border-radius:10px !important;
  background:rgba(154,0,0,.05) !important;
  color:var(--lj-red) !important;
  font-family:inherit;
  font-size:12.5px !important;
  font-weight:700;
  line-height:1;
  letter-spacing:0;
  text-transform:none !important;
  white-space:nowrap;
  text-decoration:none !important;
  box-shadow:none !important;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  user-select:none;
  transition:background-color .2s,color .2s,border-color .2s,transform .12s;
}
.lj-hs .lj-hs__atc::before,
.lj-hs .lj-hs__atc::after{ content:none !important; display:none !important; }
.lj-hs .lj-hs__atc:focus-visible{
  background:var(--lj-red) !important;
  border-color:var(--lj-red) !important;
  color:#fff !important;
}
@media (hover:hover){
  .lj-hs .lj-hs__atc:hover{
    background:var(--lj-red) !important;
    border-color:var(--lj-red) !important;
    color:#fff !important;
  }
}
.lj-hs .lj-hs__atc:active{ transform:scale(.97); }

.lj-hs .lj-hs__atc .lj-i{ flex:0 0 auto; display:block; width:18px; height:18px; }
.lj-hs .lj-hs__atc .lj-i--spin,
.lj-hs .lj-hs__atc .lj-i--ok{ display:none !important; }
.lj-hs .lj-hs__atc.loading .lj-i--cart,
.lj-hs .lj-hs__atc.added .lj-i--cart{ display:none !important; }
.lj-hs .lj-hs__atc.loading .lj-i--spin{ display:block !important; animation:lj-spin .7s linear infinite; }
.lj-hs .lj-hs__atc.added .lj-i--ok{ display:block !important; }
@keyframes lj-spin{ to{ transform:rotate(360deg); } }

.lj-hs .lj-hs__atc-t--ok{ display:none; }
.lj-hs .lj-hs__atc.added .lj-hs__atc-t--def{ display:none; }
.lj-hs .lj-hs__atc.added .lj-hs__atc-t--ok{ display:inline; }
.lj-hs .lj-hs__atc.loading{ pointer-events:none; opacity:.85; }
.lj-hs .lj-hs__atc.added,
.lj-hs .lj-hs__atc.added:hover,
.lj-hs .lj-hs__atc.added:focus-visible{
  background:#1f8f4d !important;
  border-color:#1f8f4d !important;
  color:#fff !important;
}

/* لینک «مشاهده سبد خرید» که ووکامرس خودش بعد از افزودن اضافه می‌کند */
.lj-hs .added_to_cart{ display:none !important; }

/* ردیف پرفروش‌ترین‌ها (دسکتاپ): دکمه‌ی گرد کنار قیمت */
.lj-hs--best .lj-hs__atc{ width:36px; height:36px !important; padding:0 !important; border-radius:50% !important; }
.lj-hs--best .lj-hs__atc-t{ display:none !important; }

/* موبایل: فقط آیکون سبد (بدون متن) */
@media (max-width:767px){
  .lj-hs .lj-hs__atc{ height:34px !important; border-radius:10px !important; }
  .lj-hs .lj-hs__atc-t{ display:none !important; }
  .lj-hs--best .lj-hs__buy{ flex-direction:column; align-items:stretch; gap:6px; }
  .lj-hs--best .lj-hs__atc{ width:100%; height:34px !important; border-radius:10px !important; }
}

/* دسکتاپ: کشیدن با ماوس */
@media (hover:hover) and (pointer:fine){
  .lj-hs.is-scrollable .lj-hs__track{ cursor:grab; }
  .lj-hs .lj-hs__track.is-dragging{ cursor:grabbing; scroll-snap-type:none; scroll-behavior:auto; }
  .lj-hs .lj-hs__track.is-dragging *{ pointer-events:none; user-select:none; }
}

/* موبایل: فقط کشیدن با انگشت، بدون فلش */
@media (max-width:767px){
  .lj-hs .lj-hs__btn,
  .lj-hs.is-ready.is-scrollable .lj-hs__btn{ display:none !important; }
}

/* قیمت ردیف دسته‌بندی‌ها – تبلت و دسکتاپ بزرگ‌تر */
.lj-hs--cat .lj-price .woocommerce-Price-amount,
.lj-hs--cat .lj-price .amount{ white-space:nowrap; }
@media (min-width:640px){
  .lj-hs--cat .lj-hs__foot .lj-price{
    flex-direction:column;
    align-items:flex-end;
    font-size:16px;
  }
  .lj-hs--cat .lj-price ins{ order:1; }
  .lj-hs--cat .lj-price del{ order:2; margin:0; font-size:13px; }
}
@media (min-width:1024px){
  .lj-hs--cat .lj-hs__foot .lj-price{ font-size:17.5px; }
  .lj-hs--cat .lj-price del{ font-size:13.5px; }
}

/* =========================================================
   صفحه‌ی محصولات تخفیف‌دار  [lj_sale_grid]
   ========================================================= */
.lj-hs--sale{ padding:14px 10px 16px; }

.lj-hs__salehead{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 16px;
  margin-bottom:14px;
}
.lj-hs__saletitle{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:clamp(18px,2.2vw,24px);
  font-weight:800;
  line-height:1.6;
  color:var(--lj-ink);
}
.lj-hs__saletitle svg{ flex:0 0 auto; width:24px; height:24px; }
.lj-hs__saletitle small{ font-size:12.5px; font-weight:600; color:var(--lj-muted); }

.lj-hs__sort{
  flex:1 1 320px;
  min-width:0;
  display:flex;
  gap:8px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  padding:2px 0;
}
.lj-hs__sort::-webkit-scrollbar{ display:none; }
.lj-hs .lj-hs__sort a{
  flex:0 0 auto;
  padding:6px 14px;
  border-radius:999px;
  background:rgba(154,0,0,.06);
  color:var(--lj-red) !important;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
  transition:background .2s,color .2s;
}
.lj-hs .lj-hs__sort a:hover{ background:rgba(154,0,0,.12); }
.lj-hs .lj-hs__sort a.is-on{ background:var(--lj-red); color:#fff !important; }

.lj-hs--sale .lj-hs__grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--lj-gap);
}
@media (min-width:640px){  .lj-hs--sale{ padding:18px; } .lj-hs--sale .lj-hs__grid{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (min-width:900px){  .lj-hs--sale .lj-hs__grid{ grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (min-width:1200px){ .lj-hs--sale .lj-hs__grid{ grid-template-columns:repeat(5,minmax(0,1fr)); } }

.lj-hs--sale .lj-hs__card{ position:relative; flex:none; }
.lj-hs--sale .lj-hs__name{ min-height:3.6em; }
.lj-hs--sale .lj-hs__pct{
  position:absolute;
  inset-block-start:14px;
  inset-inline-start:14px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  height:24px;
  padding:0 9px;
  border-radius:999px;
  background:linear-gradient(135deg,#d10a22,#8f0000);
  color:#fff;
  font-size:12.5px;
  font-weight:800;
  line-height:1;
  box-shadow:0 3px 8px rgba(154,0,0,.25);
}
.lj-hs--sale .lj-hs__foot{ justify-content:flex-end; align-items:flex-end; }
.lj-hs--sale .lj-hs__foot .lj-price{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  font-size:13.5px;
}
.lj-hs--sale .lj-price .woocommerce-Price-amount,
.lj-hs--sale .lj-price .amount{ white-space:nowrap; }
.lj-hs--sale .lj-price ins{ order:1; }
.lj-hs--sale .lj-price del{ order:2; margin:0; }
@media (min-width:640px){
  .lj-hs--sale .lj-hs__foot .lj-price{ font-size:16px; }
  .lj-hs--sale .lj-price del{ font-size:13px; }
}
@media (min-width:1024px){
  .lj-hs--sale .lj-hs__foot .lj-price{ font-size:17.5px; }
  .lj-hs--sale .lj-price del{ font-size:13.5px; }
}

.lj-hs__empty{
  margin:24px 0;
  text-align:center;
  font-size:14px;
  color:var(--lj-muted);
}

.lj-hs__pager{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:6px;
  margin-top:18px;
}
.lj-hs .lj-hs__pg{
  min-width:36px;
  height:36px;
  padding:0 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  border:1px solid var(--lj-line);
  background:#fff;
  color:var(--lj-ink) !important;
  font-size:14px;
  font-weight:700;
  line-height:1;
  transition:border-color .2s,color .2s;
}
.lj-hs a.lj-hs__pg:hover{ border-color:rgba(154,0,0,.3); color:var(--lj-red) !important; }
.lj-hs .lj-hs__pg.is-on{ background:var(--lj-red); border-color:var(--lj-red); color:#fff !important; }
.lj-hs .lj-hs__pg--gap{ border:0; background:none; min-width:20px; padding:0; }
.lj-hs .lj-hs__pg--arrow{ font-size:20px; }

/* =========================================================
   پیام خطا/اطلاع (مثلاً کمبود موجودی) – خارج از .lj-hs چون به body اضافه می‌شود
   ========================================================= */
.lj-hs-toast{
  position:fixed;
  inset-inline:0;
  bottom:calc(24px + env(safe-area-inset-bottom,0px));
  z-index:99999;
  margin:0 auto;
  width:max-content;
  max-width:min(92vw,520px);
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 16px;
  box-sizing:border-box;
  border-radius:14px;
  background:#2b2b2b;
  color:#fff;
  font-size:13.5px;
  line-height:1.9;
  direction:rtl;
  box-shadow:0 12px 32px rgba(0,0,0,.28);
  opacity:0;
  transform:translateY(16px);
  pointer-events:none;
  visibility:hidden;
  transition:opacity .25s,transform .25s,visibility 0s .25s;
}
.lj-hs-toast.is-on{ opacity:1; transform:none; pointer-events:auto; visibility:visible; transition:opacity .25s,transform .25s; }
.lj-hs-toast__t{ flex:1 1 auto; min-width:0; }
.lj-hs-toast a.lj-hs-toast__a{
  flex:0 0 auto;
  padding:4px 12px;
  border-radius:999px;
  background:#fff;
  color:#9a0000 !important;
  font-size:12.5px;
  font-weight:700;
  white-space:nowrap;
  text-decoration:none !important;
}
@media (max-width:767px){
  .lj-hs-toast{ bottom:calc(76px + env(safe-area-inset-bottom,0px)); }
}
