/* ═══════════════════════════════════════════════════════
   shop.css — طراحی فروشگاه اینترنتی
   ═══════════════════════════════════════════════════════ */

:root {
  --sp-primary:       #4f46e5;
  --sp-primary-h:     #4338ca;
  --sp-accent:        #f59e0b;
  --sp-success:       #10b981;
  --sp-danger:        #ef4444;
  --sp-bg:            #f3f4f6;
  --sp-surface:       #ffffff;
  --sp-surface2:      #f9fafb;
  --sp-text:          #111827;
  --sp-text-m:        #6b7280;
  --sp-border:        #e5e7eb;
  --sp-radius:        14px;
  --sp-radius-sm:     8px;
  --sp-shadow:        0 1px 4px rgba(0,0,0,.08);
  --sp-shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --sp-font:          'Vazirmatn', sans-serif;
  --sp-header-h:      64px;
}

/* ── Besharat storefront refresh — 2026/08 ──────────────────────────────── */
:root {
  --sp-primary: #0f6b4c;
  --sp-primary-h: #073b2a;
  --sp-accent: #c6a348;
  --sp-bg: #fffdf8;
  --sp-surface2: #faf9f6;
  --sp-text: #19231f;
  --sp-text-m: #727873;
  --sp-border: #e9e7e1;
  --sp-radius: 12px;
  --sp-shadow: 0 2px 12px rgba(19,48,38,.055);
  --sp-shadow-md: 0 10px 28px rgba(19,48,38,.10);
  --sp-header-h: 84px;
}

body.shop-page { background:#fffdf8; padding-bottom:0; }
.sh-promo { height:38px; display:flex; align-items:center; justify-content:center; background:#f6f3ed; color:#24342e; border-bottom:1px solid #e9e3d8; font-size:.78rem; }
.sh-header { position:relative; height:var(--sp-header-h); box-shadow:none; border-bottom:0; }
.sh-header-inner { max-width:1320px; grid-template-columns:200px 1fr auto; padding:0 1.5rem; }
.sh-logo { grid-column:1; justify-content:flex-start; }
.sh-logo img { max-width:180px !important; height:50px !important; }
.sh-search { grid-column:2; justify-self:center; width:min(100%,420px); border-radius:25px; box-shadow:none; background:#fcfcfb; }
.sh-search-icon { color:#17231f; }
.sh-nav-actions { grid-column:3; gap:.65rem; }
.sh-btn-icon { border:0; border-radius:8px; width:40px; }
.sh-account-btn { border:0; color:var(--sp-text); padding:.45rem .55rem; }
.sh-account-btn:hover,.sh-account-btn.logged-in { background:#f2f6f4; color:var(--sp-primary); }
.sh-mobile-menu { display:none; background:none; border:0; color:var(--sp-text); cursor:pointer; }
.sh-cats { border-top:1px solid #f2f0eb; border-bottom:1px solid var(--sp-border); }
.sh-cats-inner { max-width:1320px; gap:1.5rem; justify-content:flex-start; }
.sh-cats a { padding:.75rem .25rem; color:#3e4945; }
.sh-cats a:first-child { color:var(--sp-primary); border-bottom-color:var(--sp-primary); font-weight:700; }
.sh-container { max-width:1320px; padding:1.5rem 1.5rem 2.5rem; }
.sh-banner-wrap { border:1px solid var(--sp-border); border-radius:14px; box-shadow:none; margin-bottom:2.1rem; background:#f5f2ec; }
.sh-banner-slide { aspect-ratio:3.2/1; }
.sh-banner-slide img { object-fit:cover; }
.sh-banner-caption { right:auto; left:8%; bottom:42%; background:var(--sp-primary); border-radius:7px; padding:.65rem 1.4rem; font-weight:600; }
.sh-banner-dots span { background:#d4d0c7; }
.sh-banner-dots span.active { background:var(--sp-accent); }
.sh-section-title { font-size:1.05rem; margin-bottom:1rem; color:#172a23; }
.sh-section-title::before { width:20px; height:20px; border:1px solid var(--sp-accent); background:transparent; border-radius:50%; }
.sh-section-title a { color:var(--sp-primary); border:0; background:none; }
.sh-product-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:1rem; }
.sh-product-card { border:1px solid var(--sp-border); border-radius:11px; box-shadow:none; overflow:hidden; background:#fff; }
.sh-product-card:hover { transform:translateY(-3px); box-shadow:var(--sp-shadow-md); border-color:#d9d4c8; }
.sh-product-img { background:#fafafa; }
.sh-discount-badge { background:#c9252d; right:9px; left:auto; border-radius:5px; }
.sh-product-cat { color:#9a9e9b; }
.sh-product-price { color:var(--sp-primary); }
.sh-product-add { background:#fff; color:var(--sp-accent); border-top:1px solid var(--sp-border); }
.sh-product-add:hover { background:var(--sp-primary); color:#fff; }
.sh-category-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:.8rem; }
.sh-category-card { min-height:112px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.55rem; padding:.8rem; background:#fff; border:1px solid var(--sp-border); border-radius:12px; text-align:center; transition:.2s; }
.sh-category-card:hover { border-color:var(--sp-accent) !important; color:var(--sp-primary) !important; transform:translateY(-2px); }
.sh-category-icon { display:grid; place-items:center; width:46px; height:46px; color:var(--sp-primary); border:1px solid #d6b779; border-radius:12px; font-size:1.45rem; }
.sh-category-card strong { font-size:.82rem; }
.sh-newsletter { max-width:1280px; margin:0 auto 1.5rem; padding:1.5rem 2rem; display:grid; grid-template-columns:85px 1fr minmax(320px,460px); gap:1.25rem; align-items:center; background:#f7f4ed; border:1px solid #eee7da; border-radius:13px; }
.sh-newsletter-art { font-size:3.7rem; text-align:center; }
.sh-newsletter h3 { color:var(--sp-primary); font-size:1.05rem; margin-bottom:.25rem; }
.sh-newsletter p { color:var(--sp-text-m); font-size:.78rem; }
.sh-newsletter-form { display:flex; gap:.5rem; direction:rtl; }
.sh-newsletter-form input { min-width:0; flex:1; border:1px solid var(--sp-border); border-radius:7px; padding:.75rem 1rem; font-family:var(--sp-font); outline:none; }
.sh-newsletter-form button { border:0; border-radius:7px; background:var(--sp-primary); color:#fff; padding:.7rem 1.4rem; font-family:var(--sp-font); cursor:pointer; }
.sh-footer { background:#fff; color:var(--sp-text-m); border-top:1px solid var(--sp-border); padding-top:2.25rem; }
.sh-footer-inner { max-width:1280px; }
.sh-footer h4 { color:var(--sp-text); }
.sh-footer ul li a { color:var(--sp-text-m); }
.sh-footer ul li a:hover { color:var(--sp-primary); }
.sh-footer-inner img { filter:none !important; }
.sh-footer-bottom { background:var(--sp-primary); color:#fff; border-radius:13px 13px 0 0; max-width:1320px; margin:1rem auto 0; }
.sh-mobile-bottom { display:none; }
.sh-besharat-hero { min-height:340px; margin-bottom:2.1rem; padding:2.5rem 4rem; display:grid; grid-template-columns:1fr 1.15fr; align-items:center; gap:2rem; overflow:hidden; background-color:#f7f2e8; background-image:linear-gradient(45deg,rgba(198,163,72,.06) 25%,transparent 25%,transparent 75%,rgba(198,163,72,.06) 75%); background-size:32px 32px; border:1px solid #e9dfca; border-radius:14px; }
.sh-besharat-hero span { color:var(--sp-accent); font-weight:700; font-size:.85rem; }
.sh-besharat-hero h1 { max-width:470px; margin:.55rem 0 .65rem; color:var(--sp-primary-h); font-size:2rem; line-height:1.55; }
.sh-besharat-hero p { margin-bottom:1.25rem; color:#66716c; }
.sh-hero-products { position:relative; display:flex; justify-content:center; align-items:center; direction:ltr; }
.sh-hero-products img { width:31%; aspect-ratio:1/1.18; object-fit:cover; border:5px solid #fff; border-radius:14px; box-shadow:0 12px 30px rgba(7,59,42,.13); }
.sh-hero-products img:nth-child(2) { width:36%; transform:translateY(-12px); z-index:2; margin:-12px; }

@media (max-width:1000px) {
  .sh-product-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .sh-category-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .sh-newsletter { margin-inline:1rem; grid-template-columns:65px 1fr; }
  .sh-newsletter-form { grid-column:1/-1; }
}

@media (max-width:640px) {
  body.shop-page { padding-bottom:72px; }
  .sh-promo { height:31px; font-size:.67rem; }
  .sh-header { height:72px; }
  .sh-header-inner { padding:0 .9rem; justify-content:space-between; }
  .sh-mobile-menu { display:block; order:3; }
  .sh-logo { order:2; }
  .sh-logo img { height:42px !important; max-width:130px !important; }
  .sh-nav-actions { order:1; }
  .sh-nav-actions .sh-account-btn { display:none; }
  .sh-btn-icon { width:36px; }
  .sh-cats { display:none; position:absolute; top:103px; right:0; left:0; z-index:190; box-shadow:var(--sp-shadow-md); }
  .sh-cats.open { display:block; }
  .sh-cats-inner { flex-direction:column; gap:0; padding:.5rem 1rem; background:#fff; }
  .sh-cats a { border-bottom:1px solid var(--sp-border); }
  .sh-container { padding:.8rem .75rem 1.5rem; }
  .sh-quick-search { margin-bottom:.8rem; }
  .sh-banner-wrap { margin-bottom:1.25rem; border-radius:11px; }
  .sh-banner-slide { aspect-ratio:1.55/1; }
  .sh-besharat-hero { min-height:auto; grid-template-columns:1fr; padding:1.5rem 1.1rem; text-align:center; gap:1.2rem; }
  .sh-besharat-hero h1 { font-size:1.45rem; }
  .sh-besharat-hero p { font-size:.8rem; }
  .sh-banner-caption { left:7%; bottom:22%; padding:.45rem .8rem; font-size:.7rem; }
  .sh-product-grid { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:.65rem; padding-bottom:.5rem; scrollbar-width:none; }
  .sh-product-grid::-webkit-scrollbar { display:none; }
  .sh-product-card { flex:0 0 47%; scroll-snap-align:start; }
  .sh-product-name { font-size:.78rem; }
  .sh-category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:.55rem; }
  .sh-category-card { min-height:98px; padding:.55rem .3rem; }
  .sh-category-icon { width:40px; height:40px; }
  .sh-newsletter { margin:0 .75rem 1rem; padding:1rem; display:flex; flex-direction:column; text-align:center; }
  .sh-newsletter-art { font-size:2.8rem; }
  .sh-newsletter-form { width:100%; flex-direction:column; }
  .sh-newsletter-form button { width:100%; }
  .sh-footer { margin-top:1rem; padding-bottom:1rem; }
  .sh-footer-inner { grid-template-columns:1fr 1fr; }
  .sh-footer-bottom { border-radius:0; }
  .sh-mobile-bottom { position:fixed; bottom:0; right:0; left:0; z-index:500; height:66px; display:grid; grid-template-columns:repeat(4,1fr); background:#fff; border-top:1px solid var(--sp-border); box-shadow:0 -4px 18px rgba(0,0,0,.06); padding:6px 8px max(6px,env(safe-area-inset-bottom)); }
  .sh-mobile-bottom a { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; color:#777; font-size:.64rem; }
  .sh-mobile-bottom a span { font-size:1.25rem; line-height:1; }
  .sh-mobile-bottom a.active { color:var(--sp-primary); }
  .sh-mobile-bottom b { position:absolute; top:0; right:28%; background:var(--sp-accent); color:#fff; width:16px; height:16px; border-radius:50%; font-size:.6rem; display:grid; place-items:center; }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.shop-page {
  font-family: var(--sp-font);
  background: var(--sp-bg);
  color: var(--sp-text);
  direction: rtl;
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Header ── */
.sh-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--sp-surface);
  border-bottom: 1px solid var(--sp-border);
  box-shadow: var(--sp-shadow);
  height: var(--sp-header-h);
}
.sh-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.sh-logo {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* راست در RTL */
  white-space: nowrap;
  flex-shrink: 0;
  grid-column: 1;
}
.sh-logo span { color: var(--sp-accent); }

.sh-search {
  grid-column: 2;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  padding: .2rem .9rem;
  gap: .6rem;
  width: 420px;
  max-width: 480px;
  box-shadow: 0 2px 10px rgba(17,24,39,.06);
}
.sh-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: var(--sp-font);
  font-size: .9rem;
  color: var(--sp-text);
  padding: .85rem 0;
  outline: none;
  direction: rtl;
}
.sh-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: .85rem 0;
  color: var(--sp-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: .15s;
}
.sh-search-icon:hover { color: var(--sp-primary-h); }
.sh-search-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sp-text-m);
  flex-shrink: 0;
  padding: .85rem 0;
  transition: .15s;
}
.sh-search-filter:hover { color: var(--sp-primary); }

.sh-nav-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* چپ */
  gap: .5rem;
  flex-shrink: 0;
}
.sh-btn-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--sp-border);
  background: var(--sp-surface);
  color: var(--sp-text);
  cursor: pointer;
  transition: .15s;
  text-decoration: none;
}
.sh-btn-icon:hover { border-color: var(--sp-primary); color: var(--sp-primary); }
.sh-cart-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  background: var(--sp-danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sh-account-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border-radius: 50px;
  border: 1.5px solid var(--sp-primary);
  color: var(--sp-primary);
  font-size: .85rem;
  font-weight: 600;
  font-family: var(--sp-font);
  cursor: pointer;
  transition: .15s;
  background: transparent;
  text-decoration: none;
}
.sh-account-btn:hover { background: var(--sp-primary); color: #fff; }
.sh-account-btn.logged-in { background: var(--sp-primary); color: #fff; }

/* ── Category nav bar ── */
.sh-cats {
  background: var(--sp-surface);
  border-bottom: 1px solid var(--sp-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.sh-cats::-webkit-scrollbar { display: none; }
.sh-cats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
  gap: .25rem;
  white-space: nowrap;
}
.sh-cats a {
  display: inline-block;
  padding: .5rem .9rem;
  font-size: .82rem;
  color: var(--sp-text-m);
  border-bottom: 2.5px solid transparent;
  transition: .15s;
}
.sh-cats a:hover, .sh-cats a.active {
  color: var(--sp-primary);
  border-bottom-color: var(--sp-primary);
}

/* ── Layout container ── */
.sh-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* ── Banner slider ── */
.sh-banner-wrap {
  position: relative;
  border-radius: var(--sp-radius);
  overflow: hidden;
  margin-bottom: 2rem;
  background: linear-gradient(135deg,#e8eaf0 0%,#d0d4de 100%);
  /* fallback aspect-ratio for Safari < 15 */
  height: 0;
  padding-bottom: 39%; /* هم‌راستا با نسبت واقعی تصاویر بنر آپلودشده — در همه سایزها (موبایل/تبلت/دسکتاپ) از بریدگی جلوگیری می‌کند */
  contain: layout paint;
}
.sh-banner-slides {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  display: flex;
  height: 100%;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.sh-banner-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
}
.sh-banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sh-banner-caption {
  position: absolute;
  bottom: 1.5rem;
  right: 2rem;
  background: rgba(0,0,0,.55);
  color: #fff;
  padding: .5rem 1.2rem;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
}
.sh-banner-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--sp-text);
  box-shadow: var(--sp-shadow);
}
.sh-banner-btn.prev { right: 1rem; }
.sh-banner-btn.next { left: 1rem; }
.sh-banner-dots {
  position: absolute;
  bottom: .75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .35rem;
}
.sh-banner-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  cursor: pointer;
  transition: .2s;
}
.sh-banner-dots span.active { background: #fff; width: 20px; border-radius: 4px; }

/* ── Quick search (صفحه اصلی) ── */
/* در دسکتاپ/لپ‌تاپ سرچ‌بار هدر نمایش داده می‌شود؛ این سرچ‌بار فقط مخصوص موبایل است */
.sh-quick-search { margin-bottom: 1.75rem; display: none; }
.sh-quick-search-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  padding: .2rem .9rem;
  box-shadow: 0 2px 10px rgba(17,24,39,.06);
}
.sh-quick-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: .85rem 0;
  color: var(--sp-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.sh-quick-search-form input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--sp-font);
  font-size: .9rem;
  color: var(--sp-text);
  padding: .85rem 0;
  direction: rtl;
}
.sh-quick-search-form input::placeholder { color: var(--sp-text-m); }
.sh-quick-search-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sp-text-m);
  flex-shrink: 0;
  padding: .85rem 0;
  transition: .15s;
}
.sh-quick-search-filter:hover { color: var(--sp-primary); }

/* ── Section title ── */
.sh-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sp-text);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sh-section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--sp-primary);
  border-radius: 2px;
}
.sh-section-title a {
  margin-right: auto;
  font-size: .82rem;
  font-weight: 400;
  color: var(--sp-primary);
}

/* ── Product grid — mobile-first: همیشه ۲ ستون، در دسکتاپ بیشتر ── */
.sh-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
}
@media (min-width: 640px) {
  .sh-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
}

.sh-product-card {
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  overflow: hidden;
  box-shadow: var(--sp-shadow);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.sh-product-card:hover {
  box-shadow: var(--sp-shadow-md);
  transform: translateY(-3px);
}
.sh-product-img {
  position: relative;
  /* fallback aspect-ratio for Safari < 15 */
  height: 0;
  padding-bottom: 100%; /* 1:1 ratio */
  overflow: hidden;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: sh-shimmer 1.5s infinite;
}
/* بعد از لود تصویر، انیمیشن و background حذف می‌شود (از طریق JS style.animation=none) */
.sh-product-img img {
  transition: opacity .35s ease;
}
@keyframes sh-shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}
.sh-discount-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  background: #ef4444;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .18rem .45rem;
  border-radius: 20px;
  line-height: 1.4;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.sh-product-img img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: .5rem;
  transition: transform .3s;
}
.sh-product-card:hover .sh-product-img img { transform: scale(1.05); }
.sh-product-info {
  padding: .75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.sh-product-cat {
  font-size: .72rem;
  color: var(--sp-text-m);
}
.sh-product-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--sp-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sh-product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sp-primary);
  margin-top: auto;
}
.sh-product-price small {
  font-size: .7rem;
  font-weight: 400;
  color: var(--sp-text-m);
}
.sh-price-old {
  display: block;
  font-size: .74rem;
  font-weight: 400;
  color: var(--sp-text-m);
  text-decoration: line-through;
  margin-bottom: .1rem;
}
.sh-product-add {
  width: 100%;
  padding: .5rem;
  background: var(--sp-primary);
  color: #fff;
  border: none;
  border-top: 1px solid var(--sp-border);
  font-family: var(--sp-font);
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s;
}
.sh-product-add:hover { background: var(--sp-primary-h); }
.sh-product-add.out-of-stock {
  background: var(--sp-border);
  color: var(--sp-text-m);
  cursor: not-allowed;
}

/* ── Product detail ── */
.sh-product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  padding: 2rem;
  box-shadow: var(--sp-shadow);
}
.sh-detail-img-wrap {
  position: relative;
  border-radius: var(--sp-radius-sm);
  overflow: hidden;
  background: var(--sp-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 1rem;
}
.sh-detail-img-wrap img { max-height: 380px; object-fit: contain; }
.sh-detail-info { display: flex; flex-direction: column; gap: 1rem; }
.sh-detail-cat {
  font-size: .8rem;
  color: var(--sp-text-m);
}
.sh-detail-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--sp-text);
  line-height: 1.5;
}
.sh-detail-price-wrap {
  background: var(--sp-bg);
  border-radius: var(--sp-radius-sm);
  padding: 1rem;
}
.sh-detail-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sp-primary);
}
.sh-detail-price small { font-size: .85rem; font-weight: 400; color: var(--sp-text-m); }
.sh-detail-price-old {
  font-size: 1rem;
  font-weight: 400;
  color: var(--sp-text-m);
  text-decoration: line-through;
  margin-inline-start: .6rem;
}
.sh-detail-stock {
  font-size: .82rem;
  margin-top: .35rem;
}
.sh-detail-stock.in { color: var(--sp-success); }
.sh-detail-stock.out { color: var(--sp-danger); }
.sh-qty-row {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.sh-qty-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--sp-border);
  border-radius: 50px;
  overflow: hidden;
}
.sh-qty-input button {
  width: 36px; height: 36px;
  border: none;
  background: var(--sp-bg);
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--sp-text);
}
.sh-qty-input input {
  width: 48px;
  text-align: center;
  border: none;
  font-family: var(--sp-font);
  font-size: .95rem;
  background: transparent;
  outline: none;
}
.sh-btn-primary {
  background: var(--sp-primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .65rem 1.5rem;
  font-family: var(--sp-font);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
}
.sh-btn-primary:hover { background: var(--sp-primary-h); }
.sh-btn-primary:disabled { background: var(--sp-border); color: var(--sp-text-m); cursor: not-allowed; }
.sh-btn-outline {
  background: transparent;
  color: var(--sp-primary);
  border: 1.5px solid var(--sp-primary);
  border-radius: 50px;
  padding: .6rem 1.2rem;
  font-family: var(--sp-font);
  font-size: .9rem;
  cursor: pointer;
  transition: .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.sh-btn-outline:hover { background: var(--sp-primary); color: #fff; }

/* ── Cart ── */
.sh-cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }
.sh-cart-table { background: var(--sp-surface); border-radius: var(--sp-radius); overflow: hidden; box-shadow: var(--sp-shadow); }
.sh-cart-table-head {
  display: grid;
  grid-template-columns: 1fr 120px 130px 80px;
  padding: .75rem 1rem;
  background: var(--sp-bg);
  font-size: .8rem;
  color: var(--sp-text-m);
  font-weight: 600;
}
.sh-cart-row {
  display: grid;
  grid-template-columns: 1fr 120px 130px 80px;
  padding: 1rem;
  border-top: 1px solid var(--sp-border);
  align-items: center;
}
.sh-cart-product { display: flex; align-items: center; gap: .75rem; }
.sh-cart-product img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: var(--sp-bg); padding: .3rem; }
.sh-cart-product-name { font-size: .88rem; font-weight: 600; }
.sh-cart-product-price { font-size: .78rem; color: var(--sp-text-m); margin-top: .2rem; }
.sh-cart-qty { display: flex; align-items: center; gap: .4rem; }
.sh-cart-qty input { width: 48px; text-align: center; border: 1px solid var(--sp-border); border-radius: 6px; padding: .3rem; font-family: var(--sp-font); font-size: .88rem; }
.sh-cart-qty button { background: none; border: none; color: var(--sp-primary); cursor: pointer; font-size: .8rem; padding: .2rem .4rem; }
.sh-cart-sub { font-weight: 600; color: var(--sp-primary); }
.sh-cart-del button {
  background: none;
  border: none;
  color: var(--sp-danger);
  cursor: pointer;
  padding: .3rem;
  border-radius: 6px;
}
.sh-cart-del button:hover { background: #fee2e2; }

.sh-cart-summary {
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.sh-summary-row { display: flex; justify-content: space-between; font-size: .9rem; }
.sh-summary-row.total { font-weight: 700; font-size: 1.05rem; border-top: 1px solid var(--sp-border); padding-top: .75rem; }
.sh-summary-btn { width: 100%; }

/* ── Empty state ── */
.sh-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--sp-text-m);
}
.sh-empty svg { width: 64px; height: 64px; opacity: .35; margin: 0 auto 1rem; }
.sh-empty h3 { font-size: 1.1rem; margin-bottom: .5rem; color: var(--sp-text); }

/* ── Auth forms ── */
.sh-auth-wrap {
  min-height: calc(100vh - var(--sp-header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.sh-auth-card {
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow-md);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
}
.sh-auth-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; }
.sh-form-group { margin-bottom: 1rem; }
.sh-form-group label {
  display: block;
  font-size: .83rem;
  color: var(--sp-text-m);
  margin-bottom: .35rem;
  font-weight: 500;
}
.sh-form-group input,
.sh-form-group select,
.sh-form-group textarea {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  font-family: var(--sp-font);
  font-size: .9rem;
  color: var(--sp-text);
  background: var(--sp-surface);
  transition: border-color .15s;
  outline: none;
  direction: rtl;
}
.sh-form-group input:focus,
.sh-form-group select:focus,
.sh-form-group textarea:focus { border-color: var(--sp-primary); }
.sh-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.sh-form-hint { font-size: .75rem; color: var(--sp-text-m); margin-top: .25rem; }
.sh-form-divider {
  text-align: center;
  font-size: .83rem;
  color: var(--sp-text-m);
  margin: 1rem 0;
  position: relative;
}
.sh-form-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--sp-border);
}
.sh-form-divider span {
  position: relative;
  background: var(--sp-surface);
  padding: 0 .75rem;
}

/* ── Steps indicator (Checkout) ── */
.sh-steps-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1.5rem;
  font-size: .82rem;
  overflow: hidden;
}
.sh-step {
  display: flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
  color: var(--sp-text-m);
  flex-shrink: 0;
}
.sh-step-done { color: var(--sp-success); }
.sh-step-active { color: var(--sp-primary); font-weight: 600; }
.sh-step-circle {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  flex-shrink: 0;
  background: var(--sp-success);
  color: #fff;
}
.sh-step-circle-active { background: var(--sp-primary); font-weight: 700; }
.sh-step-circle-muted  { background: var(--sp-border); color: var(--sp-text-m); }
.sh-step-line {
  flex: 1;
  height: 2px;
  background: var(--sp-border);
  min-width: 8px;
}
.sh-step-line-active { background: var(--sp-primary); }
@media (max-width: 400px) {
  .sh-step-lbl { display: none; }
  .sh-steps-bar { gap: .25rem; }
}

/* ── Checkout ── */
.sh-checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.sh-checkout-layout > * { min-width: 0; }
.sh-checkout-form {
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 1.5rem;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}
.sh-checkout-form h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--sp-border);
}
.sh-checkout-actions {
  margin-top: 1rem;
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.sh-checkout-actions .sh-btn-primary {
  flex: 1;
  justify-content: center;
  min-width: 180px;
}

/* ── Account tabs ── */
.sh-account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; align-items: start; }
.sh-account-sidebar {
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  overflow: hidden;
}
.sh-account-user {
  padding: 1.25rem;
  background: var(--sp-primary);
  color: #fff;
  text-align: center;
}
.sh-account-user-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .75rem;
  font-size: 1.4rem;
  font-weight: 700;
}
.sh-account-user-name { font-size: .95rem; font-weight: 600; }
.sh-account-nav a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1.25rem;
  font-size: .88rem;
  color: var(--sp-text-m);
  border-bottom: 1px solid var(--sp-border);
  transition: .15s;
}
.sh-account-nav a:hover,
.sh-account-nav a.active { color: var(--sp-primary); background: var(--sp-bg); }
.sh-account-nav a:last-child { border-bottom: none; }

.sh-account-content {
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 1.5rem;
}
.sh-account-content h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--sp-border);
}

/* ── Orders table ── */
.sh-orders-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.sh-orders-table th {
  background: var(--sp-bg);
  padding: .65rem 1rem;
  text-align: right;
  font-weight: 600;
  font-size: .8rem;
  color: var(--sp-text-m);
  border-bottom: 1px solid var(--sp-border);
}
.sh-orders-table td {
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--sp-border);
  vertical-align: middle;
}
.sh-orders-table tr:hover td { background: var(--sp-bg); }
.sh-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 50px;
  font-size: .72rem;
  font-weight: 600;
}
.sh-badge-green  { background: #d1fae5; color: #065f46; }
.sh-badge-yellow { background: #fef3c7; color: #92400e; }
.sh-badge-red    { background: #fee2e2; color: #991b1b; }
.sh-badge-gray   { background: var(--sp-bg); color: var(--sp-text-m); }
.sh-badge-blue   { background: #dbeafe; color: #1e40af; }

/* ── Order detail ── */
.sh-order-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.sh-order-info-card {
  background: var(--sp-bg);
  border-radius: var(--sp-radius-sm);
  padding: 1rem;
}
.sh-order-info-card h4 {
  font-size: .82rem;
  color: var(--sp-text-m);
  margin-bottom: .5rem;
}
.sh-order-info-card p { font-size: .9rem; font-weight: 500; }

/* ── Payment result ── */
.sh-result-wrap {
  min-height: calc(100vh - var(--sp-header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.sh-result-card {
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow-md);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 440px;
  width: 100%;
}
.sh-result-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}
.sh-result-icon.success { background: #d1fae5; color: var(--sp-success); }
.sh-result-icon.fail    { background: #fee2e2; color: var(--sp-danger); }
.sh-result-title { font-size: 1.3rem; font-weight: 700; margin-bottom: .5rem; }
.sh-result-sub   { font-size: .9rem; color: var(--sp-text-m); margin-bottom: 1.5rem; }
.sh-result-track { font-size: .8rem; color: var(--sp-text-m); margin-top: .5rem; }

/* ── Breadcrumb ── */
.sh-breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--sp-text-m);
  margin-bottom: 1rem;
}
.sh-breadcrumb a:hover { color: var(--sp-primary); }
.sh-breadcrumb .sep { opacity: .4; }

/* ── Flash messages ── */
.sh-flash-wrap {
  position: fixed;
  top: calc(var(--sp-header-h) + .75rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-width: 300px;
  max-width: 480px;
  width: 90%;
}
.sh-flash {
  padding: .75rem 1.2rem;
  border-radius: var(--sp-radius-sm);
  font-size: .88rem;
  font-weight: 500;
  box-shadow: var(--sp-shadow-md);
  animation: sh-slide-in .25s ease;
}
.sh-flash-success { background: #d1fae5; color: #065f46; border-right: 4px solid var(--sp-success); }
.sh-flash-error   { background: #fee2e2; color: #991b1b; border-right: 4px solid var(--sp-danger); }
.sh-flash-info    { background: #dbeafe; color: #1e40af; border-right: 4px solid var(--sp-primary); }
@keyframes sh-slide-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Footer ── */
.sh-footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 2.5rem 1rem 1.5rem;
  margin-top: 3rem;
}
.sh-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.sh-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .75rem; }
.sh-footer p  { font-size: .83rem; line-height: 1.8; }
.sh-footer ul { list-style: none; }
.sh-footer ul li { margin-bottom: .4rem; }
.sh-footer ul li a { font-size: .83rem; color: #9ca3af; transition: .15s; }
.sh-footer ul li a:hover { color: #fff; }
.sh-footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 1px solid #374151;
  font-size: .78rem;
  color: #6b7280;
  text-align: center;
}
.sh-enamad-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  transition: transform .18s ease, box-shadow .18s ease;
}
.sh-enamad-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
}
.sh-enamad-box img {
  display: block;
  width: 90px;
  height: auto;
}

/* ── Toast notification ── */
#sh-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1f2937;
  color: #fff;
  padding: .65rem 1.4rem;
  border-radius: 50px;
  font-size: .88rem;
  font-family: var(--sp-font);
  z-index: 9999;
  transition: transform .3s ease, opacity .3s ease;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
#sh-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── Pagination ── */
.sh-pagination {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.sh-pagination a, .sh-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--sp-radius-sm);
  border: 1.5px solid var(--sp-border);
  font-size: .88rem;
  color: var(--sp-text);
  transition: .15s;
  text-decoration: none;
  background: var(--sp-surface);
}
.sh-pagination a:hover { border-color: var(--sp-primary); color: var(--sp-primary); }
.sh-pagination .current { background: var(--sp-primary); color: #fff; border-color: var(--sp-primary); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .sh-product-detail  { grid-template-columns: 1fr; }
  .sh-cart-layout     { grid-template-columns: 1fr; }
  .sh-checkout-layout { grid-template-columns: 1fr; }
  .sh-account-layout  { grid-template-columns: 1fr; }
  /* فوتر موبایل: بخش معرفی تمام‌عرض، دو ستون لینک کنار هم، نماد اعتماد تمام‌عرض و وسط‌چین → فوتر کوتاه‌تر */
  .sh-footer-inner    { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; }
  .sh-footer-inner > div:first-child { grid-column: 1 / -1; }
  .sh-footer-inner > div:last-child  { grid-column: 1 / -1; text-align: center; }
  .sh-footer-inner > div:last-child .sh-enamad-box { margin: 0 auto; }
}
@media (max-width: 640px) {
  .sh-cart-table-head { display: none; }
  .sh-cart-row { grid-template-columns: 1fr auto; gap: .5rem; }
  .sh-cart-sub, .sh-cart-del { grid-column: 2; }
  .sh-cart-qty { grid-column: 1 2; }
  .sh-form-grid { grid-template-columns: 1fr; }
  .sh-banner-caption { bottom: .85rem; right: 1rem; padding: .4rem .8rem; font-size: .82rem; border-radius: 6px; }
  .sh-order-detail-grid { grid-template-columns: 1fr; }
  .sh-search { display: none; }
  /* سرچ‌بار موبایل */
  .sh-quick-search { display: block; margin-bottom: 1.25rem; }
  .sh-quick-search-form { border-radius: 14px; padding: .1rem .7rem; gap: .4rem; }
  .sh-quick-search-form input { font-size: .84rem; padding: .7rem 0; }
  .sh-quick-search-icon, .sh-quick-search-filter { padding: .7rem 0; }
  /* فوتر موبایل: فشرده‌تر */
  .sh-footer { padding: 1.75rem 1rem 1.25rem; margin-top: 2rem; }
  .sh-footer-inner { gap: 1.25rem 1rem; margin-bottom: 1.25rem; }
  .sh-footer h4 { margin-bottom: .5rem; font-size: .88rem; }
  .sh-footer p { font-size: .8rem; line-height: 1.7; }
  .sh-footer ul li { margin-bottom: .3rem; }
  /* موبایل: grid → flex ساده */
  .sh-header-inner {
    display: flex;
    justify-content: space-between;
  }
  .sh-logo { grid-column: unset; justify-content: unset; }
  .sh-nav-actions { grid-column: unset; justify-content: unset; }
  /* checkout موبایل */
  .sh-container { padding: 1rem .75rem; }
  .sh-checkout-form { padding: 1rem; }
  .sh-checkout-actions { flex-direction: column-reverse; }
  .sh-checkout-actions .sh-btn-primary,
  .sh-checkout-actions .sh-btn-outline { width: 100%; justify-content: center; text-align: center; min-width: 0; }
  .sh-checkout-layout { gap: 1rem; }

  /* ── پنل کاربری موبایل ── */
  .sh-account-layout { gap: .75rem; }
  .sh-account-sidebar { display: flex; flex-direction: column; }
  .sh-account-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-align: right;
    padding: .75rem 1rem;
  }
  .sh-account-user-info { flex: 1; min-width: 0; }
  .sh-account-user-avatar {
    width: 40px; height: 40px;
    font-size: 1rem;
    margin: 0;
    flex-shrink: 0;
  }
  .sh-account-user-name { font-size: .85rem; }
  .sh-account-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .sh-account-nav::-webkit-scrollbar { display: none; }
  .sh-account-nav a {
    flex: 1;
    min-width: max-content;
    justify-content: center;
    font-size: .8rem;
    gap: .3rem;
    padding: .6rem .65rem;
    border-bottom: none;
    border-top: 1px solid var(--sp-border);
    border-left: 1px solid var(--sp-border);
  }
  .sh-account-nav a:last-child  { border-left: none; }
  .sh-account-content { padding: 1rem; }

  /* ── جدول سفارش‌ها → کارت موبایل ── */
  .sh-orders-wrap { overflow: visible; }
  .sh-orders-table thead { display: none; }
  .sh-orders-table,
  .sh-orders-table tbody { display: block; }
  .sh-orders-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius-sm);
    margin-bottom: .75rem;
    overflow: hidden;
    background: var(--sp-surface);
  }
  .sh-orders-table tr:hover td { background: transparent; }
  .sh-orders-table td {
    display: flex;
    flex-direction: column;
    gap: .18rem;
    padding: .6rem .85rem;
    border-bottom: 1px solid var(--sp-border);
    border-left: none;
    font-size: .85rem;
    vertical-align: top;
  }
  .sh-orders-table td::before {
    content: attr(data-label);
    font-size: .7rem;
    color: var(--sp-text-m);
    font-weight: 500;
  }
  /* شماره سفارش — تمام عرض */
  .sh-orders-table td:first-child {
    grid-column: 1 / -1;
    background: var(--sp-bg);
    font-size: .82rem;
  }
  /* دکمه مشاهده — تمام عرض */
  .sh-orders-table td:last-child {
    grid-column: 1 / -1;
    border-bottom: none;
    padding: .6rem .85rem;
    align-items: flex-start;
  }
}

/* ══════════════════════════════════════════════════════════
   No-image placeholder
   ══════════════════════════════════════════════════════════ */
.sh-no-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: var(--sp-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Final cascade: keep the new storefront skin after all legacy declarations. */
body.shop-page { background:#fffdf8; padding-bottom:0; }
.sh-promo { height:38px; display:flex; align-items:center; justify-content:center; background:#f6f3ed; color:#24342e; border-bottom:1px solid #e9e3d8; font-size:.78rem; }
.sh-header { position:relative; height:84px; box-shadow:none; border-bottom:0; }
.sh-header-inner { max-width:1320px; grid-template-columns:200px 1fr auto; padding:0 1.5rem; }
.sh-logo { grid-column:1; justify-content:flex-start; }
.sh-search { grid-column:2; justify-self:center; width:min(100%,420px); border-radius:25px; box-shadow:none; background:#fcfcfb; }
.sh-nav-actions { grid-column:3; gap:.65rem; }
.sh-btn-icon { border:0; border-radius:8px; width:40px; }
.sh-account-btn { border:0; color:var(--sp-text); padding:.45rem .55rem; }
.sh-mobile-menu { display:none; background:none; border:0; color:var(--sp-text); cursor:pointer; }
.sh-cats { border-top:1px solid #f2f0eb; border-bottom:1px solid var(--sp-border); }
.sh-cats-inner { max-width:1320px; gap:1.5rem; justify-content:flex-start; }
.sh-cats a { padding:.75rem .25rem; color:#3e4945; }
.sh-container { max-width:1320px; padding:1.5rem 1.5rem 2.5rem; }
.sh-banner-wrap { border:1px solid var(--sp-border); border-radius:14px; box-shadow:none; margin-bottom:2.1rem; background:#f5f2ec; }
.sh-banner-slide { aspect-ratio:3.2/1; }
.sh-banner-slide img { object-fit:cover; }
.sh-banner-caption { right:auto; left:8%; bottom:42%; background:var(--sp-primary); border-radius:7px; }
.sh-section-title { font-size:1.05rem; margin-bottom:1rem; color:#172a23; }
.sh-section-title::before { width:20px; height:20px; border:1px solid var(--sp-accent); background:transparent; border-radius:50%; }
.sh-product-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:1rem; }
.sh-product-card { border:1px solid var(--sp-border); border-radius:11px; box-shadow:none; overflow:hidden; background:#fff; }
.sh-product-card:hover { transform:translateY(-3px); box-shadow:var(--sp-shadow-md); border-color:#d9d4c8; }
.sh-product-img { background:#fafafa; }
.sh-product-add { background:#fff; color:var(--sp-accent); border-top:1px solid var(--sp-border); }
.sh-category-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:.8rem; }
.sh-category-card { min-height:112px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.55rem; padding:.8rem; background:#fff; border:1px solid var(--sp-border); border-radius:12px; text-align:center; transition:.2s; }
.sh-category-icon { display:grid; place-items:center; width:46px; height:46px; color:var(--sp-primary); border:1px solid #d6b779; border-radius:12px; font-size:1.45rem; }
.sh-newsletter { max-width:1280px; margin:0 auto 1.5rem; padding:1.5rem 2rem; display:grid; grid-template-columns:85px 1fr minmax(320px,460px); gap:1.25rem; align-items:center; background:#f7f4ed; border:1px solid #eee7da; border-radius:13px; }
.sh-footer { background:#fff; color:var(--sp-text-m); border-top:1px solid var(--sp-border); padding-top:2.25rem; }
.sh-footer h4 { color:var(--sp-text); }
.sh-footer ul li a { color:var(--sp-text-m); }
.sh-footer-inner img { filter:none !important; }
.sh-footer-bottom { background:var(--sp-primary); color:#fff; border-radius:13px 13px 0 0; max-width:1320px; margin:1rem auto 0; }
.sh-mobile-bottom { display:none; }

@media (max-width:1000px) {
  .sh-product-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .sh-category-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .sh-newsletter { margin-inline:1rem; grid-template-columns:65px 1fr; }
  .sh-newsletter-form { grid-column:1/-1; }
}
@media (max-width:640px) {
  body.shop-page { padding-bottom:72px; }
  .sh-promo { height:31px; font-size:.67rem; }
  .sh-header { height:72px; }
  .sh-header-inner { padding:0 .9rem; justify-content:space-between; }
  .sh-mobile-menu { display:block; order:3; }
  .sh-logo { order:2; }
  .sh-nav-actions { order:1; }
  .sh-nav-actions .sh-account-btn { display:none; }
  .sh-cats { display:none; position:absolute; top:103px; right:0; left:0; z-index:190; box-shadow:var(--sp-shadow-md); }
  .sh-cats.open { display:block; }
  .sh-cats-inner { flex-direction:column; gap:0; background:#fff; }
  .sh-banner-slide { aspect-ratio:1.55/1; }
  .sh-product-grid { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:.65rem; scrollbar-width:none; }
  .sh-product-card { flex:0 0 47%; scroll-snap-align:start; }
  .sh-category-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:.55rem; }
  .sh-category-card { min-height:98px; padding:.55rem .3rem; }
  .sh-newsletter { margin:0 .75rem 1rem; padding:1rem; display:flex; flex-direction:column; text-align:center; }
  .sh-newsletter-form { width:100%; flex-direction:column; }
  .sh-footer { background:#fff; padding-bottom:1rem; }
  .sh-mobile-bottom { position:fixed; bottom:0; right:0; left:0; z-index:500; height:66px; display:grid; grid-template-columns:repeat(4,1fr); background:#fff; border-top:1px solid var(--sp-border); box-shadow:0 -4px 18px rgba(0,0,0,.06); padding:6px 8px max(6px,env(safe-area-inset-bottom)); }
  .sh-mobile-bottom a { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#777; font-size:.64rem; }
  .sh-mobile-bottom a span { font-size:1.25rem; }
  .sh-mobile-bottom a.active { color:var(--sp-primary); }
}
.sh-no-img::after {
  content: '';
  display: block;
  width: 38%;
  height: 38%;
  max-width: 120px;
  max-height: 120px;
  background-image: url("/static/besharat/logo-mark.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.3;
  filter: grayscale(1);
}

/* ══════════════════════════════════════════════════════════
   Brand box — صفحه محصول
   ══════════════════════════════════════════════════════════ */
.sh-brand-box {
  background: var(--sp-bg);
  border: 1.5px solid var(--sp-border);
  border-radius: var(--sp-radius-sm);
  padding: .85rem 1.1rem;
  transition: border-color .15s;
  margin-bottom: .5rem;
}
.sh-brand-box:hover { border-color: var(--sp-primary); }
.sh-brand-box a {
  display: flex;
  align-items: center;
  gap: .9rem;
  text-decoration: none;
  color: inherit;
}
.sh-brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sp-primary), #818cf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79,70,229,.25);
}
.sh-brand-name {
  font-size: .92rem;
  font-weight: 700;
  color: var(--sp-text);
}
.sh-brand-link {
  font-size: .78rem;
  color: var(--sp-primary);
  margin-top: .18rem;
}

/* ══════════════════════════════════════════════════════════
   Brand page header
   ══════════════════════════════════════════════════════════ */
.sh-brand-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--sp-shadow);
}
.sh-brand-header-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sp-primary), #818cf8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(79,70,229,.3);
}
.sh-brand-header-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sp-text);
  margin-bottom: .25rem;
}
.sh-brand-header-count {
  font-size: .85rem;
  color: var(--sp-text-m);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BESHARAT COMMERCE DESIGN SYSTEM — final cascade
   ═══════════════════════════════════════════════════════════════════════════ */
:root{--bs-green:#0f6b4c;--bs-green-dark:#073b2a;--bs-gold:#c6a348;--bs-cream:#fffdf8;--bs-cream-2:#f7f3e9;--bs-ink:#17231f;--bs-muted:#707871;--bs-line:#e7e3d9;--bs-red:#c92d32;--bs-r:12px;--bs-shadow:0 8px 28px rgba(7,59,42,.07);--sp-primary:var(--bs-green);--sp-primary-h:var(--bs-green-dark);--sp-accent:var(--bs-gold);--sp-bg:var(--bs-cream);--sp-border:var(--bs-line);--sp-text:var(--bs-ink);--sp-text-m:var(--bs-muted)}
body.shop-page{background:var(--bs-cream);color:var(--bs-ink)}
.sh-promo{height:36px;background:#f4f0e8;color:#3b4943;border-bottom:1px solid #e8e0d2;font-size:.74rem}
.sh-header{height:auto;min-height:98px;background:rgba(255,253,248,.98);border-bottom:1px solid var(--bs-line);position:sticky;top:0;backdrop-filter:blur(12px)}
.sh-header-inner{max-width:1320px;min-height:98px;display:grid;grid-template-columns:190px 1fr 300px auto;gap:1.2rem;padding:0 1.4rem}
.sh-logo{grid-column:auto;display:flex;gap:.55rem;align-items:center}.sh-logo img{width:54px!important;height:54px!important;object-fit:contain}.sh-logo>span{display:flex;flex-direction:column;color:var(--bs-green-dark)}.sh-logo>span b{font-size:1.15rem}.sh-logo>span small{font-size:.6rem;color:#8c8068}
.bs-main-nav{display:flex;align-items:center;justify-content:center;gap:1.3rem;white-space:nowrap}.bs-main-nav a{font-size:.78rem;padding:.7rem 0;border-bottom:2px solid transparent}.bs-main-nav a:hover,.bs-main-nav a.active{color:var(--bs-green);border-bottom-color:var(--bs-green)}
.sh-search{grid-column:auto;width:100%;height:46px;border-radius:25px;background:#fff;border:1px solid var(--bs-line);padding-inline:1rem}.sh-search input{font-size:.78rem}.sh-search-filter{display:none}
.sh-nav-actions{grid-column:auto}.sh-btn-icon{width:40px;height:40px;border:0;background:transparent}.sh-btn-icon:hover{background:#f1eee6}.sh-account-btn{font-size:0;width:40px;height:40px;padding:0;justify-content:center}.sh-account-btn svg{width:21px;height:21px}.sh-cart-badge,.sh-wishlist-badge{position:absolute;top:0;left:0;width:17px;height:17px;border-radius:50%;display:grid;place-items:center;background:var(--bs-gold);color:#fff;font-size:.58rem;font-weight:700}
.bs-home{max-width:1320px;margin:auto;padding:24px 24px 0}.bs-hero{height:420px;position:relative;overflow:hidden;border:1px solid #e8dfd0;border-radius:14px;background:#f5eee2}.bs-hero>img{width:100%;height:100%;object-fit:cover}.bs-hero-copy{position:absolute;z-index:2;top:50%;right:51%;transform:translateY(-50%);max-width:390px;text-align:right}.bs-hero-copy span{color:var(--bs-gold);font-size:.78rem;font-weight:700}.bs-hero-copy h1{font-size:2.35rem;line-height:1.45;color:var(--bs-green-dark);margin:.35rem 0}.bs-hero-copy p{color:#4e5a55;margin-bottom:1.2rem;font-size:.9rem}
.bs-primary-btn,.bs-outline-btn{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:42px;padding:.6rem 1.25rem;border-radius:7px;font-family:var(--sp-font);font-size:.8rem;font-weight:700;cursor:pointer}.bs-primary-btn{border:1px solid var(--bs-green);background:var(--bs-green);color:#fff}.bs-primary-btn:hover{background:var(--bs-green-dark)}.bs-outline-btn{border:1px solid var(--bs-green);background:#fff;color:var(--bs-green)}
.bs-section{margin-top:34px}.bs-section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.bs-section-head h2{font-size:1.08rem;color:var(--bs-green-dark);display:flex;align-items:center;gap:.5rem}.bs-section-head h2:before{content:'';width:18px;height:18px;border:1px solid var(--bs-gold);border-radius:50%;box-shadow:inset 0 0 0 4px var(--bs-cream)}.bs-section-head>a{font-size:.75rem;color:var(--bs-green)}.bs-carousel-controls{display:flex;gap:.35rem}.bs-carousel-controls button{width:32px;height:32px;border:1px solid var(--bs-line);border-radius:50%;background:#fff;color:var(--bs-green);cursor:pointer}
.bs-carousel{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding:4px 1px 12px}.bs-carousel::-webkit-scrollbar{display:none}.bs-carousel .bs-product-card{flex:0 0 calc((100% - 56px)/5)}
.bs-product-card{min-width:0;background:#fff;border:1px solid var(--bs-line);border-radius:11px;overflow:hidden;scroll-snap-align:start;transition:.2s}.bs-product-card:hover{transform:translateY(-3px);box-shadow:var(--bs-shadow)}.bs-product-media{height:220px;display:block;position:relative;background:#faf9f6;overflow:hidden}.bs-product-media img{width:100%;height:100%;object-fit:contain;padding:12px;transition:.25s}.bs-product-card:hover img{transform:scale(1.03)}.bs-discount{position:absolute;z-index:2;top:9px;right:9px;background:var(--bs-red);color:#fff;border-radius:5px;padding:.18rem .4rem;font-size:.63rem;font-weight:700}.bs-wishlist-btn{position:absolute;z-index:3;top:8px;left:8px;width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:50%;background:rgba(255,255,255,.92);color:#9b9f9c;cursor:pointer}.bs-wishlist-btn.active{color:var(--bs-red);fill:var(--bs-red)}.bs-wishlist-btn.active svg{fill:currentColor}.bs-product-body{padding:12px}.bs-product-name{height:43px;display:block;font-size:.79rem;font-weight:700;line-height:1.7;overflow:hidden}.bs-rating{display:flex;gap:.3rem;align-items:center;margin:.35rem 0}.bs-rating span,.bs-detail-rating span,.bs-review-summary span{color:#d4a72c;letter-spacing:1px;font-size:.67rem}.bs-rating small{color:#9a9e9b;font-size:.62rem}.bs-price-row{display:flex;align-items:flex-end;justify-content:space-between;gap:.4rem}.bs-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem;color:var(--bs-green-dark)}.bs-price del{width:100%;color:#aaa;font-size:.62rem}.bs-price strong{font-size:.9rem}.bs-price small{font-size:.62rem}.bs-cart-btn{width:34px;height:34px;display:grid;place-items:center;border:1px solid #e2d8c5;border-radius:8px;background:#fff;color:var(--bs-gold);cursor:pointer}.bs-cart-btn:hover{background:var(--bs-green);color:#fff;border-color:var(--bs-green)}.bs-center{text-align:center;margin-top:14px}
.bs-category-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:10px}.bs-category-card{min-height:112px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.6rem;background:#fff;border:1px solid var(--bs-line);border-radius:11px;transition:.2s}.bs-category-card span{width:44px;height:44px;display:grid;place-items:center;color:var(--bs-green);border:1px solid #dbc797;border-radius:11px}.bs-category-card strong{font-size:.7rem;text-align:center}.bs-category-card:hover{border-color:var(--bs-gold);transform:translateY(-2px)}
.bs-benefits{margin:32px 0 0;padding:16px 20px;display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border:1px solid var(--bs-line);border-radius:11px}.bs-benefits>div{display:flex;align-items:center;justify-content:center;gap:.75rem;color:var(--bs-gold);border-left:1px solid var(--bs-line)}.bs-benefits>div:last-child{border:0}.bs-benefits p{display:flex;flex-direction:column}.bs-benefits strong{color:var(--bs-ink);font-size:.78rem}.bs-benefits span{color:var(--bs-muted);font-size:.63rem}
.bs-promo-banner{min-height:220px;margin:38px 0 0;padding:2.1rem 3rem;display:grid;grid-template-columns:1fr 300px;align-items:center;background:#f3eee2;border:1px solid #e5dac5;border-radius:13px;overflow:hidden}.bs-promo-banner span{color:var(--bs-gold);font-size:.72rem;font-weight:700}.bs-promo-banner h2{font-size:1.35rem;color:var(--bs-green-dark);margin:.35rem 0}.bs-promo-banner p{color:var(--bs-muted);font-size:.8rem;margin-bottom:1rem}.bs-promo-mark{text-align:center}.bs-promo-mark img{max-height:120px;margin:auto}
.sh-newsletter{margin-top:34px;background:#f8f4eb}.sh-newsletter-art{font-size:0}.sh-newsletter-art:after{content:'✦';font-size:3rem;color:var(--bs-gold)}.sh-footer{background:#fff}.sh-footer-inner{grid-template-columns:1.4fr repeat(3,1fr)}.sh-footer-bottom{max-width:none;border-radius:0;background:var(--bs-green-dark)}.sh-mobile-bottom{grid-template-columns:repeat(5,1fr)!important}
.bs-inner-page{padding-top:28px}.bs-page-head{display:flex;align-items:flex-end;justify-content:space-between;margin:16px 0 22px}.bs-page-head span{color:var(--bs-gold);font-size:.72rem;font-weight:700}.bs-page-head h1{font-size:1.45rem;color:var(--bs-green-dark)}.bs-page-head p{color:var(--bs-muted);font-size:.75rem}.bs-filterbar{display:grid;grid-template-columns:1.5fr 1fr 1fr auto;gap:10px;align-items:end;padding:14px;margin-bottom:22px;background:#fff;border:1px solid var(--bs-line);border-radius:11px}.bs-filterbar label{display:flex;flex-direction:column;gap:.3rem;font-size:.65rem;color:var(--bs-muted)}.bs-filterbar input,.bs-filterbar select{height:42px;padding:0 .8rem;border:1px solid var(--bs-line);border-radius:7px;background:#fff;font-family:var(--sp-font);outline:none}.bs-products-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.bs-wishlist-wide{width:100%;height:42px;margin-top:.55rem;display:flex;align-items:center;justify-content:center;gap:.4rem;border:1px solid var(--bs-line);border-radius:8px;background:#fff;color:var(--bs-green);font-family:var(--sp-font);cursor:pointer}.bs-wishlist-wide.active{color:var(--bs-red);border-color:#efc6c8}.bs-detail-rating{display:flex;align-items:center;gap:.4rem;margin:.4rem 0 1rem}.bs-detail-rating b{font-size:.75rem}.bs-detail-rating small{font-size:.67rem;color:var(--bs-muted)}.bs-review-box{margin-bottom:2rem;padding:1.25rem;background:#fff;border:1px solid var(--bs-line);border-radius:11px}.bs-review-summary{display:flex;align-items:center;gap:.8rem}.bs-review-summary strong{font-size:1.8rem;color:var(--bs-green-dark)}.bs-review-summary p,.bs-review-empty{font-size:.75rem;color:var(--bs-muted)}
@media(max-width:1080px){.sh-header-inner{grid-template-columns:170px 1fr 240px auto}.bs-main-nav{gap:.7rem}.bs-main-nav a{font-size:.7rem}.bs-carousel .bs-product-card{flex-basis:calc((100% - 42px)/4)}.bs-category-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:720px){body.shop-page{padding-bottom:70px}.sh-promo{height:30px;font-size:.62rem}.sh-header{min-height:72px;top:0}.sh-header-inner{min-height:72px;display:flex}.sh-mobile-menu{display:block;order:3}.sh-logo{order:2;margin:auto}.sh-logo img{width:43px!important;height:43px!important}.sh-logo>span{display:none}.bs-main-nav{display:none}.sh-search{position:absolute;top:72px;right:12px;left:12px;width:auto;height:42px;z-index:5}.sh-nav-actions{order:1}.sh-nav-actions>a[href='/wishlist'],.sh-account-btn{display:none}.bs-home{padding:55px 12px 0}.bs-hero{height:260px;border-radius:11px}.bs-hero>img{object-position:center}.bs-hero:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent 20%,rgba(255,253,248,.88) 62%)}.bs-hero-copy{right:48%;left:10px;max-width:none;z-index:3}.bs-hero-copy span{font-size:.58rem}.bs-hero-copy h1{font-size:1.25rem}.bs-hero-copy p{font-size:.65rem;margin-bottom:.7rem}.bs-primary-btn,.bs-outline-btn{min-height:37px;padding:.5rem .85rem;font-size:.7rem}.bs-section{margin-top:25px}.bs-section-head h2{font-size:.92rem}.bs-carousel .bs-product-card{flex-basis:46%}.bs-product-media{height:170px}.bs-category-grid{grid-template-columns:repeat(3,1fr);gap:7px}.bs-category-card{min-height:94px}.bs-category-card:nth-child(n+7){display:none}.bs-benefits{grid-template-columns:1fr 1fr;padding:10px}.bs-benefits>div{justify-content:flex-start;padding:9px;border-left:0;border-bottom:1px solid var(--bs-line)}.bs-benefits>div:nth-child(3),.bs-benefits>div:nth-child(4){border-bottom:0}.bs-benefits span{font-size:.56rem}.bs-promo-banner{min-height:190px;grid-template-columns:1fr 100px;padding:1.3rem}.bs-promo-banner h2{font-size:1rem}.bs-promo-banner p{font-size:.65rem}.bs-promo-mark img{max-height:75px}.sh-newsletter{margin-inline:12px}.sh-footer-inner{grid-template-columns:1fr 1fr}.sh-footer-inner>div:first-child{grid-column:1/-1}.sh-mobile-bottom{display:grid}.bs-inner-page{padding-top:64px}.bs-filterbar{grid-template-columns:1fr 1fr}.bs-filterbar label:first-child{grid-column:1/-1}.bs-products-grid{grid-template-columns:1fr 1fr;gap:8px}.bs-page-head h1{font-size:1.2rem}.sh-product-detail{background:#fff;padding:10px}.sh-detail-name{font-size:1.2rem}}
