/* منجاز — المتجر: الفرز والتصفية مطويان افتراضياً، والمنتجات عمودان على الجوال.
   تُحمَّل هذه الورقة آخر ورقة في store.php لتغلب طبقات التنسيق السابقة. */

/* ---- لوحة الفرز والتصفية: شريط واحد مطوي ---- */
html body.shop .stx-lay{display:block!important;margin-top:16px!important}
html body.shop .stx-lay>main.wrap{width:100%!important;max-width:none!important;margin:0!important;min-width:0!important}
html body.shop .stx-side{
  position:relative!important;top:auto!important;width:auto!important;max-width:none!important;
  margin:0 0 14px!important;padding:0!important;border-radius:16px!important;overflow:hidden!important;
  background:#fff!important;border:1px solid rgba(8,111,105,.14)!important;box-shadow:0 6px 18px rgba(5,63,73,.06)!important;
}
html body.shop .stx-side>h2{
  display:flex!important;align-items:center!important;gap:10px!important;margin:0!important;padding:13px 16px!important;
  font-size:15px!important;font-weight:800!important;color:#155066!important;cursor:pointer!important;user-select:none;
}
html body.shop .stx-side>h2::after{
  content:"";width:8px;height:8px;margin-inline-start:auto;border:solid currentColor;border-width:0 2px 2px 0;
  transform:rotate(45deg);transition:transform .2s ease;
}
html body.shop .stx-side.open>h2::after{transform:rotate(-135deg)}
html body.shop .stx-side:not(.open)>:not(h2){display:none!important}
html body.shop .stx-side.open{padding-bottom:14px!important}
html body.shop .stx-side.open>:not(h2){margin-inline:14px!important}
html body.shop .stx-side .stx-sortbox{min-width:0;margin-block:6px 0!important;padding:10px 12px!important;border:1px solid rgba(8,111,105,.12)!important;border-radius:14px!important}
html body.shop .stx-side .stx-sortbox legend{padding:0 8px;font-size:13px;font-weight:800;color:#0a5e61}
html body.shop .stx-side .stx-sort{display:flex!important;flex-wrap:wrap;gap:8px;margin:0!important}
/* زر الفرز القديم داخل شريط الأدوات مكرر الآن */
html body.shop .stx-lay #sort{display:none!important}
@media(min-width:761px){
  html body.shop .stx-side.open{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;padding:0 14px 14px!important}
  html body.shop .stx-side.open>h2{grid-column:1/-1;margin-inline:-14px!important}
  html body.shop .stx-side.open>:not(h2){margin-inline:0!important}
}

/* ---- شبكة المنتجات: عمودان على كل الجوالات ---- */
@media(max-width:760px){
  html body.shop .sh-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  html body.shop .sh-card{min-width:0!important}
  html body.shop .sh-body{padding:9px!important}
  html body.shop .sh-body h3{font-size:12.2px!important;line-height:1.45!important}
  html body.shop .sh-body p{display:none!important}
  html body.shop .sh-foot{flex-direction:column!important;align-items:stretch!important;gap:6px!important}
  html body.shop .sh-foot .btn{width:100%!important;justify-content:center!important;text-align:center!important;padding:8px 4px!important;font-size:11.6px!important;white-space:normal!important}
  html body.shop .sh-pr b{font-size:15.5px!important}
}
@media(max-width:380px){
  html body.shop .sh-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  html body.shop .sh-body{padding:7px!important}
  html body.shop .sh-body h3{font-size:11.5px!important}
  html body.shop .sh-foot .btn{font-size:10.8px!important}
}

/* رقاقات الفرز: لا تتداخل ولا تتقلص */
html body.shop .stx-side .stx-sort>*{flex:0 0 auto!important;white-space:nowrap!important;position:static!important;margin:0!important}
html body.shop .stx-side .stx-sort{overflow:visible!important;height:auto!important}

/* ---- الجوال: عرض أوسع للشبكة وبطاقات مرتبة (لا تراكب ولا كلمات مكسورة) ---- */
@media(max-width:760px){
  html body.shop .stx-lay{width:100%!important;max-width:none!important;margin-inline:auto!important;padding-inline:8px!important;box-sizing:border-box!important}
  html body.shop .stx-lay>main.wrap{padding-inline:0!important}
  html body.shop .sh-card{position:relative!important}
  /* القلب في الزاوية اليسرى صغير، والشارات في اليمنى فوق بعضها بلا تراكب */
  html body.shop .sh-card .fav{width:30px!important;height:30px!important;top:8px!important;left:8px!important;right:auto!important;padding:0!important;display:grid!important;place-items:center!important;z-index:3}
  html body.shop .sh-card .fav .ic,html body.shop .sh-card .fav svg{width:15px!important;height:15px!important}
  html body.shop .sh-img .b-tag,html body.shop .sh-img .b-off,html body.shop .sh-img .sh-pack{position:absolute!important;right:8px!important;left:auto!important;max-width:calc(100% - 56px);font-size:10.5px!important;line-height:1.3!important;padding:3px 8px!important;border-radius:8px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;z-index:2}
  html body.shop .sh-img .b-tag{top:8px!important}
  html body.shop .sh-img .b-off{top:8px!important}
  html body.shop .sh-img .b-tag~.b-off,html body.shop .sh-img .b-off~.b-tag{top:30px!important}
  html body.shop .sh-img .sh-pack{top:52px!important}
  /* وسم القسم: سطر مرتب بدل الدائرة */
  html body.shop .sh-body .sh-cat{display:block!important;width:auto!important;max-width:100%;height:auto!important;padding:2px 8px!important;border-radius:8px!important;font-size:10.5px!important;line-height:1.5!important;white-space:normal}
  html body.shop .sh-body .sh-st{font-size:11px!important}
  /* سعر المشتركين مضغوط */
  html body.shop .sh-card .mb-box,html body.shop .sh-card .mb-tag,html body.shop .sh-card .mb-hint,html body.shop .sh-card .mb-big{font-size:10.5px!important;line-height:1.55!important;padding:5px 7px!important;margin-top:4px!important;border-radius:8px!important;word-break:normal!important;overflow-wrap:anywhere}
  html body.shop .sh-card .mb-big b{font-size:14px!important}
  html body.shop .sh-pr s{font-size:12px!important}
}

/* ---- الجوال: صورة الترويسة وبطاقة العنوان بطاقة واحدة متصلة ---- */
@media(max-width:760px){
  html body.shop .stx-hero:not(.stx-never){gap:0!important;padding:0!important;border-radius:26px!important;overflow:hidden!important;box-shadow:0 12px 30px rgba(8,70,80,.12)!important;border:1px solid rgba(8,111,105,.12)!important;margin-inline:0!important}
  html body.shop .stx-hero:not(.stx-never) .stx-art-a{border-radius:0!important;margin:0!important;height:clamp(170px,56vw,250px)!important;position:relative!important}
  html body.shop .stx-hero:not(.stx-never) .stx-art-a::after{content:"";position:absolute;inset:auto 0 0 0;height:46%;background:linear-gradient(180deg,rgba(255,255,255,0),#fff 92%);pointer-events:none}
  html body.shop .stx-hero:not(.stx-never) .stx-in{margin:-34px 0 0!important;position:relative!important;z-index:2!important;border-radius:0!important;box-shadow:none!important;border:0!important;padding:0 18px 20px!important}
  html body.shop .stx-hero:not(.stx-never) .stx-in h1{font-size:clamp(26px,8vw,34px)!important}
}

/* ---- عنوان المتجر: بلا أيقونة سلة، وفي الوسط؛ والمميزات في سطر واحد بألوان مختلفة ---- */
html body.shop .stx-in h1 .stx-i{display:none!important}
@media(max-width:760px){
  html body.shop .stx-hero:not(.stx-never) .stx-in{text-align:center!important}
  html body.shop .stx-in h1{justify-content:center!important;text-align:center!important;width:100%!important}
  html body.shop .stx-in .stx-sub,html body.shop .stx-in .stx-lead{text-align:center!important}
  html body.shop .stx-ft{display:flex!important;flex-wrap:nowrap!important;gap:7px!important;justify-content:stretch!important;margin-top:14px!important}
  html body.shop .stx-ft span{flex:1 1 0!important;min-width:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;padding:10px 4px!important;border-radius:14px!important;border:1.5px solid var(--ftc,#BFD8D3)!important;font-size:10.5px!important;line-height:1.45!important;font-weight:800!important;text-align:center!important;white-space:normal!important;color:#27414A!important}
  html body.shop .stx-ft span i{width:30px!important;height:30px!important;border-radius:10px!important;display:grid!important;place-items:center!important;background:var(--ftb,#E4F3F0)!important;color:var(--ftc,#0F7F78)!important;flex:none!important}
  html body.shop .stx-ft span i svg{width:17px!important;height:17px!important}
  html body.shop .stx-ft span:nth-child(1){--ftc:#0F8F7A;--ftb:#DDF5EE}
  html body.shop .stx-ft span:nth-child(2){--ftc:#C9791B;--ftb:#FFF0D9}
  html body.shop .stx-ft span:nth-child(3){--ftc:#3B6FD1;--ftb:#E3ECFC}
  html body.shop .stx-ft span:nth-child(4){--ftc:#8A4FC4;--ftb:#EEE5FA}
}
