/* ===========================
   OverheadCrane / Blog Header (RTL) – Sticky + Mega (SCOPED)
   با پالت جدید آرتیستون
   =========================== */

/* -------- Palette (scoped) -------- */
body.oc-body{
  --oc-primary:#008dd2;     /* آبی اصلی آرتیستون */
  --oc-navy:#01202c;        /* سرمه‌ای تیره */
  --oc-mid:#004e9e;         /* آبی میانی */
  --oc-gray-50:#f4f8fb;     /* پس‌زمینه خیلی روشن */
  --oc-gray-500:#a0a0a0;
  --oc-white:#ffffff;
  --oc-border:#e5e7eb;

  /* alias برای سازگاری با کدهای قدیمی که از زرد استفاده می‌کردند */
  --oc-yellow:var(--oc-primary);
}

/* -------- Base (scoped) -------- */
body.oc-body{
  margin:0;
  background:var(--oc-white);
  color:#111;
  font-family:Shabnam, sans-serif;
}
body.oc-body .oc-wrap{
  max-width:1200px;
  margin:0 auto;
  padding:0 16px;
}

/* Full-width containers for header/topbar */
body.oc-body .oc-header .oc-wrap,
body.oc-body .oc-topbar .oc-wrap{
  max-width:none;
  width:100%;
  padding:0 12px;
}

/* ===========================
   Topbar (brand strip)
   =========================== */
body.oc-body .oc-topbar{
  position:static !important;
  background:var(--oc-primary);      /* نوار بالا: آبی برند */
  color:#fff;
  font-size:13.5px;
  border-bottom:1px solid rgba(0,0,0,.06);
}
body.oc-body .oc-topbar .oc-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:6px 12px;
}
body.oc-body .oc-topbar-right{flex:1}
body.oc-body .oc-topbar-left{
  display:flex;
  align-items:center;
  gap:20px;
}
body.oc-body .oc-topbar a{
  color:#fff;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
body.oc-body .oc-topbar i{font-size:14px}

/* Topbar #2 (white – only mobile) */
body.oc-body .oc-topbar-2{
  display:none;
  background:#fff;
  color:var(--oc-navy);
  border-bottom:1px solid var(--oc-border);
}
body.oc-body .oc-topbar-2 .oc-wrap{
  max-width:none;
  width:100%;
  padding:6px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
body.oc-body .oc-tb2-right{
  display:flex;
  align-items:center;
  gap:16px;
}
body.oc-body .oc-tb2-left{
  display:flex;
  align-items:center;
}
body.oc-body .oc-tb2-link{
  color:var(--oc-navy);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:14px;
}
body.oc-body .oc-tb2-link i{font-size:16px}
body.oc-body .oc-back--tb2{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:var(--oc-navy);
  color:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:10px;
  padding:6px 10px;
  font-weight:700;
  font-size:13.5px;
  text-decoration:none;
}
body.oc-body .oc-back--tb2 i{font-size:14px}

/* ===========================
   Header (Sticky – white main bar)
   =========================== */
body.oc-body .oc-header{
  position:-webkit-sticky !important;
  position:sticky !important;
  top:0 !important;
  z-index:2147483646 !important;
  background:var(--oc-white);              /* هدر اصلی سفید */
  color:var(--oc-navy);
  border-bottom:1px solid rgba(0,0,0,.06);
  box-shadow:0 2px 8px rgba(0,0,0,.04);
}
body.oc-body .oc-header .oc-wrap{
  max-width:none;
  width:100%;
  padding:6px 12px;
}
body.oc-body .oc-header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:6px 10px;
}
body.oc-body .oc-logo img{
  display:block;
  height:auto;
  max-width:120px;
}

/* Fixed fallback class */
body.oc-body .oc-header.is-fixed{
  position:fixed !important;
  left:0;
  right:0;
  width:100%;
  top:0 !important;
}

/* Admin bar offset */
body.admin-bar.oc-body .oc-header{ top:32px !important; }
body.admin-bar.oc-body .oc-header.is-fixed{ top:32px !important; }
@media (max-width:782px){
  body.admin-bar.oc-body .oc-header{ top:46px !important; }
  body.admin-bar.oc-body .oc-header.is-fixed{ top:46px !important; }
}

/* ===========================
   Desktop Nav
   =========================== */
body.oc-body .oc-nav{
  flex:1;
  display:flex;
  justify-content:center;
  position:relative;
  z-index:10005;
}
body.oc-body .oc-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:16px;
  align-items:center;
}
body.oc-body .oc-menu>li{position:relative}
body.oc-body .oc-menu>li>a{
  color:var(--oc-navy);           /* لینک‌ها تیره روی هدر سفید */
  text-decoration:none;
  position:relative;
  padding:8px 2px;
  line-height:1.2;
}
body.oc-body .oc-menu>li>a::after{
  content:"";
  position:absolute;
  inset:auto 0 -6px auto;
  height:2.5px;
  width:0;
  background:var(--oc-primary);   /* هایلایت منو: آبی برند */
  transition:width .18s;
}
body.oc-body .oc-menu>li>a:hover::after{width:100%}

/* ===========================
   Mega menu – shared container
   =========================== */
body.oc-body .oc-has-mega .oc-mega{
  display:none;
  background:var(--oc-navy);
  border-top:3px solid var(--oc-primary);   /* قبلاً زرد، الان آبی برند */
  box-shadow:0 12px 28px rgba(0,0,0,.22);
  position:fixed !important;
  z-index:10010;
}

/* ====== Articles grid ====== */
body.oc-body .oc-mega--articles{padding:16px 0}
body.oc-body .oc-mega--articles .oc-mega-cols{
  display:grid;
  gap:18px;
  grid-template-columns:repeat(6,minmax(0,1fr));
  padding:0 12px;
}
body.oc-body .oc-mega--articles .oc-mega-col h4{
  margin:0 0 10px 0;
  font-size:14px;
  font-weight:700;
  color:#1a1a1a;
  background:var(--oc-primary);       /* تگ عنوان ستون‌ها آبی برند */
  display:inline-block;
  padding:6px 10px;
  border-radius:6px;
}
body.oc-body .oc-mega--articles .oc-mega-col ul{
  list-style:none;
  margin:0;
  padding:0;
}
body.oc-body .oc-mega--articles .oc-mega-col ul li+li{margin-top:6px}
body.oc-body .oc-mega--articles .oc-mega-col a{
  color:var(--oc-white);
  text-decoration:none;
  display:block;
  padding:10px 4px;
  font-size:14.5px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
body.oc-body .oc-mega--articles .oc-mega-col li:last-child a{border-bottom:none}
body.oc-body .oc-mega--articles .oc-mega-col a:hover{
  background:rgba(0,141,210,.12);      /* هوور با آبی برند */
}

/* ====== Standard 3-col shell ====== */
body.oc-body .oc-mega--std{padding:18px 12px}
body.oc-body .oc-mega--std .oc-mega-std{
  display:grid;
  gap:18px;
  grid-template-columns: 1.2fr 1fr 0.9fr;
  align-items:start;
  max-width:1200px;
  margin:0 auto;
}

/* ستون 1: لیست */
body.oc-body .oc-mega-col--list h4{
  margin:0 0 10px 0;
  font-size:14px;
  font-weight:700;
  color:#1a1a1a;
  background:var(--oc-primary);
  display:inline-block;
  padding:6px 10px;
  border-radius:6px;
}
body.oc-body .oc-mega-col--list ul{
  list-style:none;
  margin:0;
  padding:0;
}
body.oc-body .oc-mega-col--list li+li{margin-top:6px}
body.oc-body .oc-mega-col--list a{
  color:var(--oc-white);
  text-decoration:none;
  display:block;
  padding:10px 8px;
  font-size:14.5px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
body.oc-body .oc-mega-col--list li:last-child a{border-bottom:none}
body.oc-body .oc-mega-col--list a:hover{
  background:rgba(0,141,210,.12);
}

/* ===========================
   Cards: overlay + underline
   =========================== */
body.oc-body .oc-mega-col--cards{
  display:grid;
  gap:16px;
}
body.oc-body .oc-card{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  height:200px;
}
body.oc-body .oc-card img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
  pointer-events:none;
  user-select:none;
  transform:scale(1);
  transition:transform .35s ease;
}
body.oc-body .oc-card .oc-card-overlay{
  position:absolute;
  inset:0;
  background:rgba(1,32,44,.45);
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:6px;
  padding:14px;
  transition:background .25s ease, opacity .25s ease, transform .25s ease;
}
body.oc-body .oc-card .oc-card-overlay i{
  font-size:18px;
  opacity:.95;
  transition:transform .25s ease, opacity .25s ease;
}

/* خط زیر تیتر – راست به چپ */
body.oc-body .oc-card .oc-card-overlay h5{
  margin:0;
  font-weight:800;
  line-height:1.35;
  position:relative;
}
body.oc-body .oc-card .oc-card-overlay h5::after{
  content:"";
  position:absolute;
  right:0;
  left:auto;
  bottom:-6px;
  height:2.5px;
  width:60%;
  max-width:180px;
  background:var(--oc-primary);  /* قبلاً زرد، الان آبی برند */
  transform:scaleX(0);
  transform-origin:right;
  transition:transform .28s ease;
}
body.oc-body .oc-card:hover .oc-card-overlay h5::after{
  transform:scaleX(1);
}

body.oc-body .oc-card .oc-card-overlay p{
  margin:0;
  font-size:13.5px;
  opacity:.95;
}
body.oc-body .oc-card:hover img{transform:scale(1.05);}
body.oc-body .oc-card:hover .oc-card-overlay{
  background:rgba(1,32,44,.72);
}
body.oc-body .oc-card:hover .oc-card-overlay i{
  transform:translateY(-2px);
}

/* درباره‌ما: فشرده + تیتر بزرگ‌تر + هاور 100% */
body.oc-body .oc-mega--about-compact .oc-card{height:130px;}
body.oc-body .oc-mega--about-compact .oc-card .oc-card-overlay{padding:10px;}
body.oc-body .oc-mega--about-compact .oc-card .oc-card-overlay h5{font-size:17.5px;}
body.oc-body .oc-card.oc-card--about:hover .oc-card-overlay{background:rgba(1,32,44,1);}

/* محصولات: اورلی کم‌رنگ + 100% در هاور */
body.oc-body .oc-card.oc-card--product .oc-card-overlay{
  background:rgba(1,32,44,.18);
}
body.oc-body .oc-card.oc-card--product:hover .oc-card-overlay{
  background:rgba(1,32,44,1);
}

/* ===========================
   محصولات: دقیقاً 3 کارت در یک ردیف
   =========================== */
body.oc-body .oc-mega-just-cards .oc-mega-std{
  max-width:1200px;
  margin:0 auto;
  padding:0 12px;
  display:block;
}
body.oc-body .oc-mega-just-cards .oc-mega-col--cards{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(3, minmax(0,1fr));
  grid-auto-rows:1fr;
  align-items:stretch;
}
@media (max-width:1100px){
  body.oc-body .oc-mega-just-cards .oc-mega-col--cards{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
}
@media (max-width:700px){
  body.oc-body .oc-mega-just-cards .oc-mega-col--cards{
    grid-template-columns:1fr;
  }
}

/* ===========================
   CTA لینک‌باکس‌ها (درباره‌ما)
   =========================== */
body.oc-body .oc-mega-col--links{
  display:flex;
  flex-direction:column;
  min-height:100%;
}
body.oc-body .oc-cta-card{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  background:#fff;
  color:var(--oc-navy);
  border:1px solid rgba(255,255,255,.2);
  border-radius:14px;
  padding:16px 18px;
  font-weight:800;
  font-size:15.5px;
  box-shadow:0 10px 22px rgba(1,32,44,.12);
  transition:transform .15s, box-shadow .15s, background .15s;
}
body.oc-body .oc-cta-card:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(1,32,44,.18);
}
body.oc-body .oc-cta-card .oc-cta-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:32px;
  min-width:32px;
  height:32px;
  border-radius:10px;
  background:#eef6fb;
}
body.oc-body .oc-cta-card .oc-cta-body h6{
  margin:0 0 4px 0;
  font-size:15.5px;
  font-weight:900;
  line-height:1.2;
  position:relative;
}
body.oc-body .oc-cta-card .oc-cta-body h6::after{
  content:"";
  position:absolute;
  right:0;
  bottom:-6px;
  height:2.5px;
  width:70%;
  background:var(--oc-primary);
  transform:scaleX(0);
  transform-origin:right;
  transition:transform .25s ease;
}
body.oc-body .oc-cta-card:hover .oc-cta-body h6::after{
  transform:scaleX(1);
}
body.oc-body .oc-cta-stick-top{margin-bottom:12px;}
body.oc-body .oc-cta-stick-bottom{margin-top:auto;}

/* ===========================
   Searchbar
   =========================== */
body.oc-body .oc-searchbar[hidden]{display:none}
body.oc-body .oc-searchbar{
  background:var(--oc-white);
  border-top:1px solid var(--oc-border);
  position:relative;
  z-index:10015;
}
body.oc-body .oc-searchbar form{
  max-width:1100px;
  margin:12px auto;
  padding:10px 12px;
}
body.oc-body #ocSearchInput{
  width:100%;
  padding:12px 14px;
  border:1px solid var(--oc-border);
  border-radius:12px;
  font:15px Shabnam, sans-serif;
  outline:none;
  box-shadow:0 6px 18px rgba(1,32,44,.08);
}
body.oc-body #ocSearchInput:focus{
  border-color:var(--oc-primary);
  box-shadow:0 0 0 4px rgba(0,141,210,.15);
}

/* ===========================
   Header controls (با تم سفید)
   =========================== */
body.oc-body .oc-header-left{
  display:flex;
  align-items:center;
  gap:8px;
}
body.oc-body .oc-back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  background:var(--oc-primary);          /* دکمه بازگشت: آبی اصلی */
  color:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:10px;
  padding:8px 12px;
  font-weight:700;
  font-size:14px;
  transition:transform .12s, box-shadow .12s, background .12s;
}
body.oc-body .oc-back:hover{
  background:var(--oc-mid);              /* هاور: آبی تیره‌تر */
  box-shadow:0 6px 14px rgba(0,78,158,.25);
}
body.oc-body .oc-back:active{transform:translateY(1px)}

/* دکمه‌های آیکونی (همبرگر، سرچ و...) */
body.oc-body .oc-ctrl{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:10px;
  background:#fff;
  cursor:pointer;
  color:var(--oc-navy);                  /* آیکون تیره روی سفید */
  transition:border-color .15s, color .15s, background .15s;
}
body.oc-body .oc-ctrl:hover{
  border-color:var(--oc-primary);
  color:var(--oc-primary);
  background:#f5f9ff;
}
body.oc-body .oc-ctrl i{
  font-size:16px;
  line-height:1;
}

body.oc-body .only-mobile{display:none}

/* همبرگر بالاتر از همه در موبایل */
@media (max-width:992px){
  body.oc-body .oc-ctrl-menu{
    position:relative;
    z-index:10050;
  }
}

/* ===========================
   Overlay & Flyout (Mobile)
   =========================== */
body.oc-body #ocOverlay[hidden]{display:none}
body.oc-body .oc-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:10020;
}

/* باریک‌تر: 86vw (در خیلی کوچک‌ها 92vw) */
body.oc-body #ocFlyout[hidden]{display:none}
body.oc-body .oc-flyout{
  position:fixed;
  top:0;
  left:0;
  height:100vh;
  width:86vw;
  max-width:420px;
  background:var(--oc-navy);
  color:#fff;
  z-index:10030;
  display:flex;
  flex-direction:column;
  overscroll-behavior:contain;
}
@media (max-width:480px){
  body.oc-body .oc-flyout{
    width:92vw;
    max-width:none;
  }
}

body.oc-body .oc-flyout-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:var(--oc-navy);
  color:#fff;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.12);
}
body.oc-body .oc-flyout-close{
  appearance:none;
  border:1px solid rgba(255,255,255,.25);
  background:transparent;
  color:#fff;
  width:36px;
  height:36px;
  border-radius:10px;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}

body.oc-body .oc-flyout-nav{
  padding:6px 0;
  overflow:auto;
  scroll-behavior:smooth; /* اسکرول نرم */
}

/* لینک‌ها مینیمال */
body.oc-body .oc-flyout-nav > a{
  display:block;
  color:#fff;
  text-decoration:none;
  padding:12px 16px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
body.oc-body .oc-flyout-nav > a:hover{
  background:rgba(255,255,255,.06);
}

/* آکاردئون مینیمال + کارِت تکی */
body.oc-body .oc-acc{
  border-top:1px solid rgba(255,255,255,.08);
}
body.oc-body .oc-acc-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:12px 16px;
  background:transparent;
  color:#fff;
  border:none;
  cursor:pointer;
  font:inherit;
  text-align:right;
}
body.oc-body .oc-acc-toggle .oc-caret{
  display:inline-block;
  transition:transform .18s;
  font-style:normal;
  font-size:14px;
}
body.oc-body .oc-acc-toggle[aria-expanded="true"] .oc-caret{
  transform:rotate(180deg);
}
body.oc-body .oc-acc-toggle[aria-expanded="true"]{
  background:rgba(255,255,255,.06);
  font-weight:600;
  border-right:3px solid var(--oc-primary);
}
body.oc-body .oc-acc-panel[hidden]{display:none}
body.oc-body .oc-acc-panel{
  background:rgba(255,255,255,.04);
  border-right:3px solid rgba(255,255,255,.06);
}
body.oc-body .oc-acc-panel a{
  padding:10px 22px;
  display:block;
  color:#fff;
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.06);
}
body.oc-body .oc-acc-panel a:hover{
  background:rgba(255,255,255,.06);
}

/* اسکرول‌بار ظریف (فقط مرورگرهای پشتیبان) */
body.oc-body .oc-flyout-nav::-webkit-scrollbar{width:8px}
body.oc-body .oc-flyout-nav::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.25);
  border-radius:10px;
}
body.oc-body .oc-flyout-nav{
  scrollbar-color:rgba(255,255,255,.25) transparent;
  scrollbar-width:thin;
}

/* دکمهٔ اسکرول به بالا در فِلای‌اوت */
body.oc-body .oc-flyout-scrolltop{
  position:fixed;
  left:12px;
  bottom:12px;
  z-index:10040;
  display:none;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(1,32,44,.85);
  color:#fff;
  cursor:pointer;
}
body.oc-body .oc-flyout-scrolltop.is-visible{display:flex}

/* وقتی فِلای‌اوت باز است، هدر محو شود (موبایل) */
@media (max-width:992px){
  body.oc-body.oc-flyout-open .oc-header{
    visibility:hidden;
  }
}

/* ===========================
   Responsive
   =========================== */
@media (max-width:1200px){
  body.oc-body .oc-mega--articles .oc-mega-cols{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}
@media (max-width:992px){
  body.oc-body .oc-nav{display:none !important;}
  body.oc-body .only-mobile{display:inline-flex !important;}
  body.oc-body .oc-back--desktop,
  body.oc-body .oc-shop--desktop{display:none !important;}
  body.oc-body .oc-searchbar form{
    max-width:none;
    margin:0;
    padding:10px 12px;
  }
  body.oc-body #ocSearchInput{
    border-radius:10px;
    box-shadow:none;
  }
  body.oc-body .oc-topbar-2{display:block;}
}
@media (max-width:768px){
  body.oc-body .oc-topbar .oc-wrap{
    flex-direction:column;
    gap:6px;
    padding:8px 12px;
  }
  body.oc-body .oc-topbar-left{display:none !important;}
  body.oc-body .oc-logo img{max-width:106px}
  body.oc-body .oc-header-row{padding:6px 8px}
  body.oc-body .oc-back,
  body.oc-body .oc-back--tb2{
    padding:5px 8px !important;
    font-size:12.5px !important;
    gap:6px !important;
  }
  body.oc-body .oc-back i,
  body.oc-body .oc-back--tb2 i{
    font-size:13px !important;
  }
}
@media (min-width:993px){
  body.oc-body .only-mobile{display:none !important;}
}

/* ===========================
   Sticky Hardening & Layering — last (scoped)
   =========================== */
body.oc-body .site,
body.oc-body .site-content,
body.oc-body .site-header,
body.oc-body .inside-header,
body.oc-body .header-wrap,
body.oc-body .oc-header-parent,
body.oc-body .oc-header .oc-wrap{
  overflow:visible !important;
  contain:initial !important;
}
body.oc-body .oc-has-mega .oc-mega{z-index:10010;}
body.oc-body .oc-overlay{z-index:10020 !important;}
body.oc-body #ocFlyout{z-index:10030 !important;}
