/* پوسته‌ی «wholesale» — فقط وقتی همین پوسته فعاله بارگذاری می‌شه. */
html[data-skin="wholesale"]:not([data-theme="dark"]) {
  --bg-page:#F4F6F9; --bg-card:#FFFFFF; --header-bg:#FFFFFF; --footer-bg:#FFFFFF;
  --primary:#1D5BD8; --pastel-red:#E7EEFC; --pastel-green:#E6F4EA; --pastel-blue:#EAF0FA;
  --text-dark:#1B2433; --text-muted:#667085; --border:#E3E8EF;
}
html[data-skin="wholesale"] { --card-radius:10px; }
html[data-skin="wholesale"] .pro-header-search, html[data-skin="wholesale"] .pro-icon-btn, html[data-skin="wholesale"] .pro-mega-btn { border-radius:8px; }
html[data-skin="wholesale"] .pro-btn, html[data-skin="wholesale"] .pro-hero-cta, html[data-skin="wholesale"] .pro-slide-btn { border-radius:8px; }

/* ======================================================================
   پوسته‌ی عمده‌فروشی — طراحیِ اختصاصی (قالب‌ها: templates/storefront/skins/wholesale/)
   ====================================================================== */
html[data-skin="wholesale"] .wrap { max-width:1320px; }
html[data-skin="wholesale"] .pro-view-toggle { display:none; }
html[data-skin="wholesale"] .pro-hero { padding:22px 20px; text-align:right; }
html[data-skin="wholesale"] .pro-hero h1 { font-size:22px; }
html[data-skin="wholesale"] .pro-section-head { margin:22px 0 10px; }
html[data-skin="wholesale"] .pro-section-head h2 { font-size:16px; font-weight:800; }
html[data-skin="wholesale"] .pro-footer { padding:16px 0; }
@media (min-width:821px) {
  html[data-skin="wholesale"] .pro-header-search { max-width:720px; border:2px solid var(--primary); background:var(--bg-card); }
  html[data-skin="wholesale"] .pro-product { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); }
}
@media (max-width:820px) {
  html[data-skin="wholesale"] .pro-bnav-item.active .pro-bnav-ic { background:var(--pastel-blue); border-radius:8px; }
  /* هدرِ جمع‌شونده */
  html[data-skin="wholesale"] .pro-header.is-compact { box-shadow:0 4px 18px rgba(0,0,0,.08); }
  html[data-skin="wholesale"] .pro-header.is-compact .pro-topbar, html[data-skin="wholesale"] .pro-header.is-compact .pro-mobile-search { display:none; }
  html[data-skin="wholesale"] .pro-header.is-compact .pro-header-main { padding:4px 0; }
  html[data-skin="wholesale"] .pro-header.is-compact .pro-search-toggle { display:inline-flex; }
  html[data-skin="wholesale"] .pro-header.is-compact.search-open .pro-mobile-search { display:block; }
}

/* ---------- لیستِ محصولات = جدول (صفحه‌ی اصلی: دو ستون از ردیف‌ها در دسکتاپ؛ فروشگاه: یک ستون) ---------- */
html[data-skin="wholesale"] .pro-grid { display:grid; grid-template-columns:minmax(0,1fr) !important; gap:0 !important; background:var(--bg-card);
  border:1px solid var(--border); border-radius:var(--card-radius); overflow:hidden; }
@media (min-width:1000px) {
  html[data-skin="wholesale"] .pro-grid:not(.pro-shop-grid) { grid-template-columns:repeat(2, minmax(0,1fr)) !important; }
  html[data-skin="wholesale"] .pro-grid:not(.pro-shop-grid) > .ws-row:nth-child(odd) { border-left:1px solid var(--border); }
}
.ws-row { display:grid !important; grid-template-columns:56px minmax(0,1fr) auto 150px; align-items:center; gap:4px 14px; padding:9px 12px !important;
  border:none !important; border-bottom:1px solid var(--border) !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; min-height:0; }
.ws-row:hover { background:var(--bg-page) !important; }
.ws-row .pro-thumb { width:56px; height:56px; aspect-ratio:1/1; border-radius:8px; background:#fff; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--text-muted); }
.ws-row .pro-thumb img { width:100%; height:100%; object-fit:cover; }
.ws-row .pro-thumb .ic { width:24px; height:24px; }
.ws-info { min-width:0; display:flex; flex-direction:column; gap:4px; }
.ws-row .pro-card-name { font-size:13.5px; font-weight:600; min-height:0; -webkit-line-clamp:1; line-height:1.6; }
.ws-row .pro-card-name:hover { color:var(--primary); }
.ws-meta { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; font-size:11px; }
.ws-row .pro-card-code { display:inline-block; direction:ltr; font-size:11px; color:var(--text-muted); background:var(--bg-page); border-radius:5px; padding:0 6px; }
.ws-stock { display:inline-flex; align-items:center; gap:4px; }
.ws-stock::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.ws-stock.in { color:#16a34a; }
.ws-stock.out { color:var(--text-muted); }
.ws-off { color:var(--primary); font-weight:700; }
.ws-flag { background:var(--pastel-red); color:var(--primary); border-radius:5px; padding:0 6px; font-weight:700; }
.ws-price { display:block; text-align:left; line-height:1.45; white-space:nowrap; }
.ws-price .pro-price-old { display:block; }
.ws-price .pro-price-old { font-size:11px; }
.ws-price .pro-price { font-size:15px; font-weight:800; color:var(--text-dark); }
.ws-price .pro-price.is-oos { color:var(--text-muted); font-weight:500; }
.ws-price small { font-size:10.5px; color:var(--text-muted); }
.ws-row > .pro-btn { width:auto; padding:8px 14px; border-radius:8px; justify-self:end; }
.ws-row > .pro-btn:disabled { background:var(--bg-page); color:var(--text-muted); }
.ws-row .ws-qty { justify-self:end; width:auto !important; }
.ws-row .ws-qty input { width:52px; }
.ws-row.is-oos .pro-thumb img { opacity:.5; }
html[data-skin="wholesale"] .pro-card.ws-picked { background:var(--pastel-blue) !important; }
/* سرِ جدول (فقط فروشگاه، دسکتاپ) */
.ws-thead { display:none; }
@media (min-width:821px) {
  .ws-thead { display:grid; grid-template-columns:56px minmax(0,1fr) auto 150px; gap:14px; padding:8px 12px; font-size:11.5px; color:var(--text-muted); font-weight:700; }
  .ws-thead span:first-child { grid-column:1 / 3; }
  .ws-thead span:nth-child(2) { text-align:left; min-width:90px; }
  .ws-thead span:nth-child(3) { text-align:center; }
}
@media (max-width:699px) {
  .ws-row { grid-template-columns:48px minmax(0,1fr) auto; grid-template-areas:"t i i" "t p b"; gap:4px 10px; }
  .ws-row .pro-thumb { grid-area:t; width:48px; height:48px; align-self:start; }
  .ws-info { grid-area:i; }
  .ws-price { grid-area:p; text-align:right; align-self:center; }
  .ws-row > .pro-btn, .ws-row .ws-qty { grid-area:b; }
}
