/* ==========================================================================
   گروه صنعتی بتن آریا — لایه هویت بصری برند
   --------------------------------------------------------------------------
   این فایل بعد از main.css بارگذاری می شود (views/layout.php) و نقش آن
   بازتعریف متغیرهای ریشه و افزودن اجزای اختصاصی برند است.
   قواعد: بدون float، بدون !important، ویژگی های منطقی برای راست‌چین.
   ========================================================================== */


/* ==========================================================================
   ۱) فونت — ایران یکان ایکس (خودمیزبان)
   ========================================================================== */

@font-face {
  font-family: 'IRANYekanX';
  src: url('/fonts/IRANYekanX-Light.woff2') format('woff2'),
       url('/fonts/IRANYekanX-Light.woff')  format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANYekanX';
  src: url('/fonts/IRANYekanX-DemiBold.woff2') format('woff2'),
       url('/fonts/IRANYekanX-DemiBold.woff')  format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANYekanX';
  src: url('/fonts/IRANYekanX-ExtraBold.woff2') format('woff2'),
       url('/fonts/IRANYekanX-ExtraBold.woff')  format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANYekanX';
  src: url('/fonts/IRANYekanX-Heavy.woff2') format('woff2'),
       url('/fonts/IRANYekanX-Heavy.woff')  format('woff');
  font-weight: 1000;
  font-style: normal;
  font-display: swap;
}


/* ==========================================================================
   ۲) متغیرهای برند — بازنویسی توکن های main.css
   ========================================================================== */

:root {

  /* --- رنگ های اصلی هویت --- */
  --brand-blue:        #3366CC;   /* نوار بالای سایت، کپشن کارت مرتبط */
  --brand-blue-dark:   #2a55aa;
  --brand-navy:        #000066;   /* نوار تماس پایین، عنوان مقالات، حاشیه تصویر */
  --brand-navy-mobile: #000099;   /* نوار بالای موبایل */
  --brand-yellow:      #FFCC00;   /* لبه تاکیدی کارت های مرتبط */

  /* --- آبی عملیاتی (سرتیتر، دکمه، لینک) --- */
  --action-blue:       #007bff;
  --action-blue-dark:  #0066cc;
  --action-blue-deep:  #004c99;

  /* --- گرادیان فیروزه ای قیمت (امضای بصری سایت) --- */
  --price-from:        #00b4d8;
  --price-to:          #0096c7;
  --price-edge:        #00d4ff;
  --price-label:       #e0f7ff;

  /* --- رنگ های وضعیت --- */
  --amber:             #ffc107;   /* دکمه خرید */
  --amber-dark:        #ff9800;
  --sale-green:        #28a745;   /* نشان «فروش» و ثبت دیدگاه */
  --download-green:    #4CAF50;   /* دانلود کاتالوگ */
  --price-red:         #e74c3c;
  --price-red-dark:    #dc3545;
  --faq-underline:     #00aaff;

  /* --- سطوح --- */
  --surface-page:      #F0F0F0;   /* پس زمینه صفحه و بخش ها */
  --surface-crumb:     #ececec;   /* نوار مسیر صفحه */
  --surface-line:      #dcdcdc;

  /* --- گرادیان فوتر (خانواده بنفش‌آبی نسخه قدیمی) --- */
  --footer-from:       #4118a8;
  --footer-to:         #4f74dd;

  /* ---------------------------------------------------------------
     بازنویسی توکن های main.css
     --------------------------------------------------------------- */
  --blue:         var(--action-blue);
  --blue-dark:    var(--action-blue-dark);
  --blue-light:   #e9f2ff;
  --blue-border:  #b9d6ff;

  --accent:       var(--action-blue-dark);
  --accent-dark:  var(--action-blue-deep);
  --accent-rgb:   0, 102, 204;          /* main.css این را صدا می زند ولی تعریف نکرده */

  --red:          var(--price-red-dark);
  --red-light:    #fdecee;
  --green:        var(--sale-green);
  --green-light:  #edf8f0;

  --text:         #333333;
  --text-light:   #555555;
  --text-muted:   #666666;

  --bg:           #ffffff;
  --bg-light:     #f7f7f7;
  --bg-section:   var(--surface-page);
  --border:       #e2e2e2;

  /* متغیرهایی که views/home.php صدا می زند و در main.css تعریف نشده اند */
  --ink:          var(--brand-navy);
  --bg-alt:       var(--surface-page);
  --gold-pale:    #eef4fc;

  /* --- گِردی گوشه ها --- */
  --radius-sm:    5px;    /* دکمه های کوچک و نوار سرتیتر */
  --radius:       8px;    /* کارت ها */
  --radius-lg:    10px;   /* پنل ها */
  --radius-xl:    20px;   /* نشان ها */
  --radius-pill:  50px;   /* دکمه های قرصی */

  /* --- سایه ها --- */
  --shadow-sm:    0 1px 4px rgba(0, 0, 0, .07);
  --shadow:       0 2px 8px rgba(0, 0, 0, .1);
  --shadow-lg:    0 8px 20px rgba(0, 0, 0, .15);

  --container:    1200px;
  --font:         'IRANYekanX', 'IRANYekan', 'Vazirmatn', Tahoma, system-ui, sans-serif;

  /* --- حرکت --- */
  --lift:         -5px;
  --zoom:         1.05;
  --t-card:       transform .3s ease, box-shadow .3s ease;
  --t-img:        transform .4s ease;

  /* --- ارتفاع نوارهای چسبان (برای آفست هدر و پدینگ بدنه) --- */
  --topbar-h:     38px;
  --phonebar-h:   60px;
}

/* غیرفعال کردن حرکت برای کاربرانی که آن را کم کرده اند
   (به جای بازنویسی با !important، خودِ توکن ها خنثی می شوند) */
@media (prefers-reduced-motion: reduce) {
  :root {
    --lift:   0px;
    --zoom:   1;
    /* مقدارِ none در فهرست transition نامعتبر می شود، پس زمان را صفر می کنیم */
    --t-card: transform .01ms linear, box-shadow .01ms linear;
    --t-img:  transform .01ms linear;
  }
  html { scroll-behavior: auto; }
}


/* ==========================================================================
   ۳) تایپوگرافی و پایه
   ========================================================================== */

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  /* نوار تماس ثابت پایین نباید روی محتوا بیفتد */
  padding-block-end: 0;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font); }

h1, .page-h1 {
  font-size: 24px;
  line-height: 1.7;
  font-weight: 600;
  color: var(--text);
}

h2 {
  font-size: 20px;
  line-height: 1.75;
  font-weight: 800;
  color: var(--text);
}

h3 { font-size: 17px; font-weight: 600; line-height: 1.8; }

a { color: var(--action-blue-dark); }
a:hover { color: var(--action-blue-deep); }

/* بلوک های محتوایی — ارتفاع خط ۲ مطابق نسخه قدیمی (۳۲px روی متن ۱۷px) */
.page-content,
.page-content-intro,
.section-content,
.about-content,
.hcs-content {
  font-size: 17px;
  line-height: 2;
  color: var(--text);
}

.page-content h2,
.section-content h2 { font-size: 20px; font-weight: 800; }
.page-content h3,
.section-content h3 { font-size: 17px; font-weight: 600; }

/* تصاویر داخل محتوا — حاشیه سرمه ای نسخه قدیمی */
.page-content img {
  border: 1px solid var(--brand-navy);
  border-radius: var(--radius);
}


/* ==========================================================================
   ۴) دکمه های پایه (main.css این ها را تعریف نکرده است)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.btn-lg { padding: 13px 26px; font-size: 16px; }

.btn-primary {
  background: var(--action-blue);
  border-color: var(--action-blue);
  color: #fff;
}
.btn-primary:hover {
  background: var(--action-blue-dark);
  border-color: var(--action-blue-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--action-blue);
  color: var(--action-blue-dark);
}
.btn-outline:hover {
  background: var(--action-blue);
  color: #fff;
}

.btn:focus-visible,
.buy-btn:focus-visible,
.download-btn:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 2px;
}


/* ==========================================================================
   ۵) نوار بالای سایت — .topbar
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: var(--brand-blue);
  color: #fff;
  font-size: 13px;
  line-height: 1.8;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-h);
}

.topbar-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.topbar-items {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  transition: transform .45s ease;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  color: rgba(255, 255, 255, .95);
}
.topbar-item i { font-size: 12px; opacity: .85; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* شماره تماس — قرص سفید سمت راست نوار */
.topbar-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 13px;
  background: #fff;
  color: var(--brand-blue);
  font-weight: 600;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.topbar-phone:hover {
  background: var(--brand-yellow);
  color: var(--brand-navy);
}

/* سوییچ زبان — قرص های سفید radius 5px */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .16);
}
.lang-switch-ico { display: inline-flex; opacity: .85; }
.lang-switch-ico svg { width: 15px; height: 15px; fill: #fff; display: block; }

.lang-opt {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .9);
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.lang-opt:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.lang-opt.is-active { background: #fff; color: var(--brand-blue); }

.lang-switch.is-block { display: flex; background: var(--bg-light); }
.lang-switch.is-block .lang-opt { color: var(--text-light); flex: 1; text-align: center; }
.lang-switch.is-block .lang-opt.is-active { background: var(--brand-blue); color: #fff; }

/* هدر زیر نوار چسبان می ماند */
.site-header { top: var(--topbar-h); }


/* ==========================================================================
   ۶) نوار تماس ثابت پایین — .phonebar / .mobile-contact-bar
   ========================================================================== */

/* نسخه ساده و مستقل (در صورت افزودن مارک آپ اختصاصی) */
.phonebar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--phonebar-h);
  padding: 10px 16px;
  background: var(--brand-navy);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .2);
}
.phonebar,
.phonebar:hover { color: #fff; }
.phonebar-num { direction: ltr; letter-spacing: .5px; }

/* نسخه موجود در مارک آپ: nav.mobile-contact-bar.igs-mcb */
.mobile-contact-bar.igs-mcb { display: none; }

@media (max-width: 960px) {

  .phonebar { display: flex; }

  .mobile-contact-bar.igs-mcb {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1200;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    background: var(--brand-navy);
    border-top: 2px solid var(--brand-blue);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .22);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-contact-bar.igs-mcb .igs-mcb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: var(--phonebar-h);
    padding: 8px 4px;
    background: none;
    border: none;
    border-inline-end: 1px solid rgba(255, 255, 255, .15);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
  }
  .mobile-contact-bar.igs-mcb .igs-mcb-item:last-child { border-inline-end: none; }
  .mobile-contact-bar.igs-mcb .igs-mcb-item:active { background: rgba(255, 255, 255, .12); }

  .mobile-contact-bar.igs-mcb .igs-mcb-ico { font-size: 18px; line-height: 1; }
  .mobile-contact-bar.igs-mcb .is-wa    .igs-mcb-ico { color: #25d366; }
  .mobile-contact-bar.igs-mcb .is-ig    .igs-mcb-ico { color: #e1306c; }
  .mobile-contact-bar.igs-mcb .is-quote .igs-mcb-ico { color: var(--brand-yellow); }

  /* فضای امن تا نوار ثابت روی محتوا نیفتد */
  body { padding-block-end: calc(var(--phonebar-h) + env(safe-area-inset-bottom, 0px)); }
}


/* ==========================================================================
   ۷) مسیر صفحه — .breadcrumb
   ========================================================================== */

.breadcrumb {
  background: var(--surface-crumb);
  border-bottom: 1px solid var(--surface-line);
  padding: 9px 0;
  font-size: 13px;
  line-height: 1.9;
}

/* توجه: در مارک آپ، <ol> داخل .container است؛ پس اینجا padding افقی نمی گذاریم */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb li { display: flex; align-items: center; gap: 6px; }

/* جداکننده راست‌چین — پیکان رو به چپ، هم‌جهت با خوانش فارسی */
.breadcrumb li + li::before {
  content: '\2039';
  margin: 0;
  color: #9a9a9a;
  font-size: 15px;
  line-height: 1;
}

/* مارک آپ خودش یک «›» چاپ می کند و main.css هم ::before می سازد؛
   جداکننده تکراری مارک آپ پنهان می شود تا یک نشانه بیشتر دیده نشود */
.breadcrumb li > span[aria-hidden="true"] { display: none; }

.breadcrumb a { color: var(--text-muted); font-weight: 400; text-decoration: none; }
.breadcrumb a:hover { color: var(--action-blue-dark); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--text); font-weight: 600; }


/* ==========================================================================
   ۸) کارت قیمت — گرادیان فیروزه ای (امضای بصری برند)
   ========================================================================== */

.price-card,
.igs-pdp-buy {
  background: linear-gradient(135deg, var(--price-from) 0%, var(--price-to) 100%);
  border-radius: var(--radius);
  /* در راست‌چین، لبه چپِ نسخه قدیمی همان inline-end است */
  border-inline-end: 5px solid var(--price-edge);
  box-shadow: 0 4px 12px rgba(0, 180, 216, .2);
  padding: 18px 20px;
  color: #fff;
}

.price-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

/* عدد قیمت — ۳۲px ضخیم سفید با سایه متن */
.price-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .18);
  direction: ltr;
  unicode-bidi: isolate;
}

.price-currency {
  font-size: 14px;
  font-weight: 600;
  color: var(--price-label);
}

/* واحد فروش — قرص سفید */
.price-unit {
  margin-inline-start: auto;
  padding: 5px 14px;
  background: #fff;
  color: var(--price-to);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  border-radius: var(--radius-xl);
  white-space: nowrap;
}

.price-note {
  flex-basis: 100%;
  font-size: 13.5px;
  color: var(--price-label);
}

/* حالت «قیمت به نرخ روز» در صفحه محصول */
.igs-pdp-buy { display: grid; gap: 14px; }

.igs-pdp-price {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}

.igs-pdp-btns { display: flex; flex-wrap: wrap; gap: 10px; }

.igs-pdp-btns .btn-primary {
  background: #fff;
  border-color: #fff;
  color: var(--price-to);
}
.igs-pdp-btns .btn-primary:hover {
  background: var(--brand-yellow);
  border-color: var(--brand-yellow);
  color: var(--brand-navy);
}
.igs-pdp-btns .btn-outline {
  border-color: rgba(255, 255, 255, .8);
  color: #fff;
}
.igs-pdp-btns .btn-outline:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.igs-pdp-trust {
  list-style: none;
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  color: var(--price-label);
}
.igs-pdp-trust li { display: flex; align-items: center; gap: 7px; }
.igs-pdp-trust li::before {
  content: '\2713';
  font-weight: 800;
  color: #fff;
}


/* ==========================================================================
   ۹) دکمه خرید (کهربایی) و دکمه دانلود کاتالوگ (سبز)
   ========================================================================== */

.buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 28px;
  background: var(--amber);
  border: 2px solid var(--amber-dark);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--brand-navy);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.buy-btn:hover {
  background: var(--amber-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 152, 0, .35);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 22px;
  background: var(--download-green);
  border: 1px solid var(--download-green);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, box-shadow .25s ease;
}
.download-btn:hover {
  background: #3d8b40;
  color: #fff;
  box-shadow: 0 4px 12px rgba(76, 175, 80, .32);
}

/* جای آیکن دانلود — چه <i> فونت‌آوسام باشد چه <svg> */
.download-btn i,
.download-btn svg { flex-shrink: 0; font-size: 16px; width: 17px; height: 17px; fill: currentColor; }

/* اگر آیکنی داخل دکمه نبود، پیکان پیش‌فرض گذاشته می شود */
.download-btn:not(:has(i)):not(:has(svg))::before {
  content: '\2193';
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
}


/* ==========================================================================
   ۱۰) نوار سرتیتر بخش — .section-head
   ========================================================================== */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  margin-bottom: 24px;
  background: var(--action-blue);
  border-radius: var(--radius-sm);
}

.section-head .section-title,
.section-head h2 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.7;
  color: #fff;
}
.section-head .section-title::after,
.section-head .section-title::before { content: none; }


/* ==========================================================================
   ۱۱) کارت محصول — .product-card / .igs-prod
   ========================================================================== */

.product-grid,
.igs-prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.igs-products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.igs-products-head .section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-navy);
}

/* حالت اسلایدری */
.igs-car-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 6px;
}
.igs-car-track > .igs-prod {
  flex: 0 0 clamp(180px, 46vw, 232px);
  scroll-snap-align: start;
}

.igs-car-nav { display: flex; gap: 8px; }

.igs-car-btn,
.igs-art-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--action-blue-dark);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, opacity .2s ease;
}
.igs-car-btn:hover:not(:disabled),
.igs-art-btn:hover:not(:disabled) {
  background: var(--action-blue);
  border-color: var(--action-blue);
  color: #fff;
}
.igs-car-btn:disabled,
.igs-art-btn:disabled { opacity: .35; cursor: default; }

.igs-car-btn::before,
.igs-art-btn::before {
  content: '\203A';
  font-size: 20px;
  line-height: 1;
}
.igs-car-btn[data-dir="next"]::before,
.igs-art-btn[data-dir="next"]::before { content: '\2039'; }

/* --- خود کارت --- */
.product-card,
.igs-prod {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: var(--t-card);
}
.product-card:hover,
.igs-prod:hover {
  transform: translateY(var(--lift));
  box-shadow: var(--shadow-lg);
}

/* تصویر مربعی */
.product-card-media,
.igs-prod-media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-light);
}
.product-card-media img,
.igs-prod-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--t-img);
}
.product-card:hover .product-card-media img,
.igs-prod:hover .igs-prod-media img { transform: scale(var(--zoom)); }

/* جانشین تصویر */
.igs-prod-noimg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c9cfd8;
}
.igs-prod-noimg svg { width: 42px; height: 42px; fill: currentColor; }

/* بدنه */
.product-card-body,
.igs-prod-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  padding: 13px 14px 14px;
}

/* عنوان — دو خط، بقیه با سه‌نقطه */
.product-card-title,
.igs-prod-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.4em;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--brand-navy);
}
.product-card:hover .product-card-title,
.igs-prod:hover .igs-prod-title { color: var(--action-blue-dark); }

.igs-prod-code {
  font-size: 12px;
  color: var(--text-muted);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

/* قیمت قرمز داخل کارت */
.product-card-price {
  font-size: 17px;
  font-weight: 800;
  color: var(--price-red);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}
.product-card-price small { font-size: 12px; font-weight: 400; color: var(--text-muted); }

.product-card-foot,
.igs-prod-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.igs-prod-brand {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* دکمه عملیات آبی */
.product-card-cta,
.igs-prod-cta {
  flex-shrink: 0;
  padding: 5px 12px;
  background: var(--action-blue);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  transition: background-color .2s ease;
}
.product-card:hover .product-card-cta,
.igs-prod:hover .igs-prod-cta { background: var(--action-blue-dark); }

/* نشان سبز «فروش» — گوشه ابتدایی کارت */
.product-card .badge-sale,
.igs-prod .badge-sale {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 2;
  padding: 3px 12px;
  background: var(--sale-green);
  border-radius: var(--radius-xl);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  color: #fff;
  box-shadow: 0 2px 6px rgba(40, 167, 69, .3);
}


/* ==========================================================================
   ۱۲) بلوک مشخصات فنی — .spec-section / .igs-pdp-spec
   ========================================================================== */

.spec-section,
.igs-pdp-spec {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  margin: 0;
}

.spec-section > h2,
.spec-section > h3 {
  margin: -16px -18px 14px;
  padding: 10px 18px;
  background: var(--action-blue);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.spec-row,
.igs-pdp-spec-row {
  display: grid;
  grid-template-columns: minmax(90px, 30%) 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14.5px;
}
.spec-row:last-child,
.igs-pdp-spec-row:last-child { border-bottom: none; }

.spec-row dt,
.igs-pdp-spec-row dt {
  font-weight: 600;
  color: var(--text-muted);
}
.spec-row dd,
.igs-pdp-spec-row dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.igs-ltr { direction: ltr; unicode-bidi: isolate; text-align: start; }


/* ==========================================================================
   ۱۳) آکاردئون پرسش و پاسخ — .faq-accordion / .faq2-*
   ========================================================================== */

.faq-accordion { display: flex; flex-direction: column; gap: 10px; }

.faq-accordion .faq-row,
.section-faq2 .faq2-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-accordion .faq-q,
.section-faq2 .faq2-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  background: #fff;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
  color: var(--brand-navy);
  text-align: start;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.faq-accordion .faq-q:hover,
.section-faq2 .faq2-q:hover { background: var(--blue-light); }

.faq-accordion .faq-row.open .faq-q,
.section-faq2 .faq2-item.open .faq2-q {
  background: var(--blue-light);
  color: var(--action-blue-dark);
}

/* خط زیرِ فیروزه ای روی عنوان پرسش */
.faq-accordion .faq-q-text,
.section-faq2 .faq2-q-text {
  flex: 1;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color .18s ease;
}
.faq-accordion .faq-row.open .faq-q-text,
.section-faq2 .faq2-item.open .faq2-q-text {
  border-bottom-color: var(--faq-underline);
}

/* آیکن + / − */
.faq-accordion .faq-icon,
.section-faq2 .faq2-icon {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.faq-accordion .faq-icon::before,
.faq-accordion .faq-icon::after,
.section-faq2 .faq2-icon::before,
.section-faq2 .faq2-icon::after {
  content: '';
  position: absolute;
  background: var(--action-blue);
  transition: opacity .25s ease, transform .25s ease;
}
.faq-accordion .faq-icon::before,
.section-faq2 .faq2-icon::before {
  inset-inline: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
}
.faq-accordion .faq-icon::after,
.section-faq2 .faq2-icon::after {
  inset-block: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
}
.faq-accordion .faq-row.open .faq-icon::after,
.section-faq2 .faq2-item.open .faq2-icon::after { opacity: 0; }

.faq-accordion .faq-a-inner,
.section-faq2 .faq2-a-inner {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  line-height: 2;
  color: var(--text-light);
}


/* ==========================================================================
   ۱۴) فهرست مطالب — .toc / .toc-box
   ========================================================================== */

.toc,
.toc-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin: 26px 0;
  padding: 0;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--action-blue);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  color: #fff;
  border: none;
}
.toc-title svg { width: 18px; height: 18px; fill: currentColor; }

.toc-list {
  list-style: none;
  margin: 0;
  padding: 8px 18px 14px;
  counter-reset: toc;
}
.toc-list li {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
}
.toc-list li:last-child { border-bottom: none; }
.toc-list li::before { content: none; }

.toc-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  background: var(--blue-light);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  color: var(--action-blue-dark);
}

.toc-list a {
  flex: 1;
  font-size: 14.5px;
  font-weight: 400;
  color: var(--text-light);
  text-decoration: none;
}
.toc-list a:hover { color: var(--action-blue-dark); text-decoration: underline; }

.toc-level-3 { padding-inline-start: 18px; }


/* ==========================================================================
   ۱۵) کارت مقاله — .article-card / .igs-art
   ========================================================================== */

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.igs-art-car { position: relative; }

.igs-art-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 8px;
}
.igs-art-track > .igs-art {
  flex: 0 0 clamp(250px, 80vw, 340px);
  scroll-snap-align: start;
}

.article-card,
.igs-art {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: var(--t-card);
}
.article-card:hover,
.igs-art:hover {
  transform: translateY(var(--lift));
  box-shadow: var(--shadow-lg);
}

.article-card-img,
.igs-art-img {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-light);
}
.article-card-img img,
.igs-art-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--t-img);
}
.article-card:hover .article-card-img img,
.igs-art:hover .igs-art-img img { transform: scale(var(--zoom)); }

.article-card-body,
.igs-art-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 15px 16px 16px;
}

/* عنوان سرمه ای ضخیم — مطابق نسخه قدیمی */
.article-card-title,
.igs-art-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.75;
  color: var(--brand-navy);
}
.article-card:hover .article-card-title,
.igs-art:hover .igs-art-title { color: var(--action-blue-dark); }

.article-card-excerpt,
.igs-art-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--text-light);
}

.article-card-more,
.igs-art-more {
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--action-blue-dark);
}
.article-card-more::after,
.igs-art-more::after { content: ' \2190'; }


/* ==========================================================================
   ۱۶) کارت مطالب مرتبط — .related-card / .related-item
   ========================================================================== */

.related-pages { margin-top: 44px; }

.related-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.related-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--blue-light);
  border-radius: var(--radius-sm);
}
.related-icon svg { width: 18px; height: 18px; fill: var(--action-blue-dark); }
.related-title { margin: 0; font-size: 20px; font-weight: 800; color: var(--brand-navy); }

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.related-card,
.related-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  /* لبه زردِ نسخه قدیمی روی ضلع آغازین (در RTL سمت راست) */
  border-inline-start: 7px solid var(--brand-yellow);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: var(--t-card);
}
.related-card:hover,
.related-item:hover {
  transform: translateY(var(--lift));
  box-shadow: var(--shadow-lg);
}

.related-card-img,
.related-item-img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-light);
}
.related-card-img img,
.related-item-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--t-img);
}
.related-card:hover .related-card-img img,
.related-item:hover .related-item-img img { transform: scale(var(--zoom)); }

.related-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 5;
  background: var(--bg-light);
}
.related-item-icon svg { width: 26px; height: 26px; fill: #c2c8d2; }

/* بلوک کپشن آبی برند */
.related-card-body,
.related-item-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  padding: 12px 14px;
  background: var(--brand-blue);
}

.related-card-title,
.related-item-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.75;
  color: #fff;
}
.related-card:hover .related-card-title,
.related-item:hover .related-item-title { color: var(--brand-yellow); }

.related-item-arrow {
  flex-shrink: 0;
  font-size: 17px;
  color: rgba(255, 255, 255, .85);
  transition: transform .3s ease;
}
.related-item:hover .related-item-arrow { transform: translateX(-4px); }


/* ==========================================================================
   ۱۷) نوار فراخوان بالای فوتر — .footer-cta
   ========================================================================== */

.footer-cta {
  background: var(--brand-blue);
  color: #fff;
  padding: 20px 0;
}

.footer-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-cta-text {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-cta-icon { font-size: 30px; color: var(--brand-yellow); flex-shrink: 0; }
.footer-cta-text strong { display: block; font-size: 17px; font-weight: 800; line-height: 1.7; }
.footer-cta-text span { display: block; font-size: 13.5px; color: rgba(255, 255, 255, .82); }

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 26px;
  background: var(--brand-yellow);
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-navy);
  text-decoration: none;
  transition: background-color .22s ease, color .22s ease, box-shadow .22s ease;
}
.footer-cta-btn:hover {
  background: #fff;
  color: var(--brand-blue);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}


/* ==========================================================================
   ۱۸) فوتر — نوار گرادیانی + نوار حق نشر روشن
   ========================================================================== */

.site-footer.mry-footer {
  background: linear-gradient(135deg, var(--footer-from) 0%, var(--footer-to) 100%);
  color: #fff;
  padding: 46px 0 0;
}

.mry-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(200px, 1fr));
  gap: 34px;
  padding-bottom: 40px;
}

/* --- ستون برند --- */
.mry-footer-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.mry-footer-logo img { height: 52px; width: auto; }
.mry-logo-icon { font-size: 24px; color: var(--brand-yellow); }
.mry-logo-text { font-size: 18px; font-weight: 800; color: #fff; }

.mry-footer-desc {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 2;
  color: rgba(255, 255, 255, .8);
}

.mry-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.mry-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius-xl);
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
}
.mry-badge i { color: var(--brand-yellow); }

.mry-socials { display: flex; gap: 9px; margin-top: 20px; }
.mry-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 17px;
  text-decoration: none;
  transition: var(--t-card), background-color .25s ease;
}
.mry-social:hover { transform: translateY(-3px); color: #fff; }
.mry-social.ig:hover { background: linear-gradient(135deg, #f09433, #dc2743, #bc1888); }
.mry-social.tg:hover { background: #0088cc; }
.mry-social.wa:hover { background: #25d366; }

/* --- ستون های لینک و تماس --- */
.mry-footer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 255, 255, .18);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}
.mry-footer-title i { color: var(--brand-yellow); font-size: 14px; }

.mry-footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.mry-footer-links a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  transition: color .2s ease, padding-inline-start .2s ease;
}
.mry-footer-links a i { font-size: 11px; color: var(--brand-yellow); }
.mry-footer-links a:hover { color: #fff; padding-inline-start: 6px; }

.mry-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mry-contact-list li { display: flex; align-items: flex-start; gap: 11px; }

.mry-contact-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .14);
  color: var(--brand-yellow);
  font-size: 14px;
}
.mry-contact-list small {
  display: block;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .6);
}
.mry-contact-list a,
.mry-contact-list div > span {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  line-height: 1.8;
}
.mry-contact-list a:hover { color: var(--brand-yellow); }

/* --- نوار حق نشر روشن --- */
.mry-footer-bottom {
  background: var(--surface-page);
  color: var(--text-light);
}
.mry-footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block: 14px;
  font-size: 13px;
}
.mry-footer-credit { color: var(--text-light); text-decoration: none; }
.mry-footer-credit strong { color: var(--action-blue-dark); font-weight: 800; }
.mry-footer-credit:hover strong { color: var(--brand-blue); }


/* ==========================================================================
   ۱۹) اجزای کمکی — جداکننده بخش ها و دکمه شناور واتساپ
   ========================================================================== */

/* جداکننده هایی که views/home.php تولید می کند (بدون تصویر، فقط گرادیان) */
.igs-sep { width: 100%; line-height: 0; }
.igs-sep-fade {
  height: 46px;
  background: linear-gradient(to bottom, var(--sep-from, #fff), var(--sep-to, #fff));
}
.igs-sep-fade.is-mark { height: 26px; }
.igs-sep-curve { height: clamp(48px, 7vw, 90px); }
.igs-sep-curve svg { display: block; width: 100%; height: 100%; }
.igs-sep-line { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 2; }

.whatsapp-float {
  background: #25d366;
  box-shadow: 0 4px 16px rgba(37, 211, 102, .38);
}


/* ==========================================================================
   ۲۰) واکنش گرایی — ۱۰۲۴ / ۷۶۸ / ۴۸۰
   ========================================================================== */

@media (max-width: 1024px) {

  .mry-footer-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; }
  .igs-prod-grid   { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
  .article-grid    { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

  .topbar-items { gap: 18px; }
}

@media (max-width: 960px) {
  /* منوی کشویی از عرض ۹۶۰ فعال است؛ هدر دیگر آفست نوار بالا را نمی خواهد */
  .site-header { top: 0; }
  .topbar { position: static; }
}

@media (max-width: 768px) {

  /* نوار بالا: چرخش دوتایی آیتم ها (اسکریپت header.php متغیر --tb-page را می دهد) */
  .topbar { font-size: 12.5px; }
  .topbar-inner { min-height: 34px; }
  .topbar-items {
    gap: 0;
    width: 100%;
    transform: translateX(calc(var(--tb-page, 0) * 100%));
  }
  .topbar-item {
    flex: 0 0 50%;
    justify-content: center;
    padding-inline: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* شماره و سوییچ زبان روی موبایل در هدر و نوار پایین در دسترس اند */
  .topbar-actions { display: none; }

  .breadcrumb ol { padding-inline: 16px; }

  .footer-cta-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .footer-cta-text  { flex-direction: column; gap: 8px; }
  .footer-cta-btn   { justify-content: center; }

  .mry-footer-bottom-inner { flex-direction: column; text-align: center; }

  .price-value { font-size: 28px; }
  .price-unit  { margin-inline-start: 0; }

  .spec-row,
  .igs-pdp-spec-row { grid-template-columns: 1fr; gap: 2px; }

  .related-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 480px) {

  body { font-size: 15.5px; }
  h1, .page-h1 { font-size: 21px; }
  h2 { font-size: 18px; }
  .page-content, .page-content-intro, .section-content { font-size: 16px; }

  .igs-prod-grid  { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .article-grid   { grid-template-columns: 1fr; }
  .related-list   { grid-template-columns: 1fr; }
  .mry-footer-grid { grid-template-columns: 1fr; gap: 26px; }

  .section-head { padding: 9px 14px; }
  .section-head .section-title, .section-head h2 { font-size: 17px; }

  .price-card { padding: 15px 16px; }
  .price-value { font-size: 26px; }

  .product-card-title, .igs-prod-title { font-size: 13.5px; min-height: 3.3em; }
  .igs-prod-cta, .product-card-cta { padding: 4px 9px; font-size: 11.5px; }

  .buy-btn, .download-btn { width: 100%; }
}


/* ==========================================================================
   ۲۱) چاپ
   ========================================================================== */

@media print {
  .topbar,
  .phonebar,
  .mobile-contact-bar,
  .whatsapp-float,
  .footer-cta,
  .igs-car-nav,
  .igs-art-btn { display: none; }

  .site-footer.mry-footer { background: none; color: #000; }
}


/* ==========================================================================
   ۲۲) چارچوب بخش های صفحه اول — .hs-section
   --------------------------------------------------------------------------
   صفحه اول از جدول home_sections ساخته می شود و هر بخش یک
   <section class="hs-section ..."> است. رنگ پس زمینه را مدیر به صورت inline
   می دهد، پس اینجا فقط ریتم عمودی و عنوان ها تعریف می شود.
   ========================================================================== */

.hs-section { padding: 46px 0; }

/* بخش هایی که خودشان تمام عرض اند نباید پدینگ عمودی بگیرند */
.hs-section.hs-slider { padding: 0; }
.hs-section.hs-html   { padding-block: 34px; }
/* عنوان اختیاری بالای اسلایدر نباید به لبه تصویر بچسبد */
.hs-section.hs-slider > .container { padding-block: 26px 16px; }

.hs-title {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.7;
  color: var(--brand-navy);
  text-align: center;
}

/* عنوان به همراه دکمه «همه» در یک ردیف */
.hs-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
/* خط تاکیدی آبی زیر عنوان، دقیقا روی خط پایین ردیف می نشیند
   (۱۲px پدینگ + ۲px حاشیه ردیف = ۱۴px جبران منفی) */
.hs-title-row .hs-title {
  margin: 0 0 -14px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--action-blue);
  text-align: start;
}

.hs-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--blue-light);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--action-blue-dark);
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.hs-more-btn:hover { background: var(--action-blue); color: #fff; }

/* بلوکِ ساده نگه داشته می شود تا text-align که رندرکننده به صورت inline
   می دهد (راست/چپ/وسط) کار کند؛ دکمه ها خودشان inline-flex اند */
.hs-btns-wrap { display: block; }
.hs-btns-wrap .cta-btn { margin: 6px; }


/* ==========================================================================
   ۲۳) شبکه کارت ها — .hs-card-grid / .hs-card
   شبکه سه تایی دسته ها و چهارتایی «آخرین محصولات» سایت قدیم
   ========================================================================== */

.hs-card-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 20px;
}

.hs-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: var(--t-card);
}
.hs-card:hover {
  transform: translateY(var(--lift));
  box-shadow: var(--shadow-lg);
}

.hs-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-light);
}
.hs-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--t-img);
}
.hs-card:hover .hs-card-img img { transform: scale(var(--zoom)); }

.hs-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 15px 16px 16px;
}

.hs-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.75;
  color: var(--brand-navy);
}
.hs-card:hover .hs-card-title { color: var(--action-blue-dark); }

.hs-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--text-light);
}

.hs-card-date {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}


/* ==========================================================================
   ۲۴) فهرست خبری — .hs-news-list / .hs-news-item
   کارت مقاله سه تایی سایت قدیم با عنوان سرمه ای ضخیم
   ========================================================================== */

.hs-news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.hs-news-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: var(--t-card);
}
.hs-news-item:hover {
  transform: translateY(var(--lift));
  box-shadow: var(--shadow-lg);
}

.hs-news-item > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: var(--t-img);
}
.hs-news-item:hover > img { transform: scale(var(--zoom)); }

.hs-news-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  padding: 15px 16px 16px;
}

.hs-news-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.75;
  color: var(--brand-navy);
}
.hs-news-item:hover .hs-news-title { color: var(--action-blue-dark); }

.hs-news-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--text-light);
}


/* ==========================================================================
   ۲۵) فهرست ساده — .hs-simple-list
   ========================================================================== */

.hs-simple-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hs-simple-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.hs-simple-list li:last-child { border-bottom: none; }
.hs-simple-list li:hover { background: var(--bg-light); }

.hs-simple-list a {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-navy);
  text-decoration: none;
}
.hs-simple-list a::before {
  content: '\2190';
  margin-inline-end: 8px;
  color: var(--action-blue);
}
.hs-simple-list a:hover { color: var(--action-blue-dark); }


/* ==========================================================================
   ۲۶) بنرها — .hs-banner / .banner-grid / .banner-card
   شمار ستون ها و نسبت تصویر از متغیرهای inline خوانده می شود
   ========================================================================== */

.banner-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: var(--gap, 16px);
}

.banner-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: var(--t-card);
}
.banner-card:hover {
  transform: translateY(var(--lift));
  box-shadow: var(--shadow-lg);
}

.banner-card img {
  width: 100%;
  aspect-ratio: var(--ratio, 16 / 9);
  object-fit: cover;
  transition: var(--t-img);
}
.banner-card:hover img { transform: scale(var(--zoom)); }

/* کپشن روی بنر با پرده تیره برای خوانایی */
.banner-card-body {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 26px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent);
  color: #fff;
}
.banner-card-title { font-size: 16px; font-weight: 800; line-height: 1.7; color: #fff; }
.banner-card-sub   { font-size: 13px; color: rgba(255, 255, 255, .85); }


/* ==========================================================================
   ۲۷) اسلایدر — .hs-slider
   مکانیک اصلی با swiper-bundle.min.css است؛ اینجا فقط پوسته برند،
   لایه متن روی اسلاید و جای دکمه ها (راست‌چین) تنظیم می شود.
   ========================================================================== */

.hs-slider .swiper {
  /* متغیرهای رسمی سوایپر — به جای جنگیدن با قواعد آن */
  --swiper-theme-color: var(--action-blue);
  --swiper-navigation-color: #ffffff;
  --swiper-navigation-size: 26px;
  --swiper-pagination-color: var(--brand-yellow);
  --swiper-pagination-bullet-inactive-color: #ffffff;
  --swiper-pagination-bullet-inactive-opacity: .55;
  --swiper-pagination-bullet-size: 10px;

  height: var(--slider-h, 500px);
  max-height: 78vh;
}

.hs-slider .swiper-slide { position: relative; overflow: hidden; }

.hs-slider .swiper-img,
.hs-slider .swiper-slide picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* لایه متن — از ضلع آغازین (در راست‌چین: راست) شروع می شود */
.hs-slider .swiper-content {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  width: min(100%, var(--container));
  margin-inline: auto;
  padding: 0 clamp(20px, 6vw, 72px);
  text-align: start;
  /* پرده از ضلع آغازین تا متن روی هر تصویری خوانا بماند */
  background: linear-gradient(to left, rgba(0, 0, 0, .62), rgba(0, 0, 0, .15) 55%, transparent 78%);
}

.hs-slider .swiper-h2 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(21px, 3.4vw, 36px);
  font-weight: 800;
  line-height: 1.55;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

.hs-slider .swiper-sub {
  margin: 0;
  max-width: 42ch;
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.95;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
}

.hs-slider .swiper-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

/* جای دکمه های ناوبری در راست‌چین: «قبلی» سمت راست، «بعدی» سمت چپ.
   هر دو ضلع صریح تعیین می شود تا قواعد فیزیکی سوایپر بازنویسی شوند. */
.hs-slider .swiper-button-prev {
  inset-inline-start: clamp(8px, 2vw, 22px);
  inset-inline-end: auto;
}
.hs-slider .swiper-button-next {
  inset-inline-end: clamp(8px, 2vw, 22px);
  inset-inline-start: auto;
}

.hs-slider .swiper-button-prev,
.hs-slider .swiper-button-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  transition: background-color .2s ease;
}
.hs-slider .swiper-button-prev:hover,
.hs-slider .swiper-button-next:hover { background: var(--action-blue); }


/* ==========================================================================
   ۲۸) متن و تصویر — .ti-grid
   عرض ستون تصویر از متغیر inline یعنی --img-size می آید
   ========================================================================== */

.ti-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--img-size, 40%)) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

/* تصویر سمت چپ: ترتیب ستون ها و جای عناصر جابه جا می شود */
.ti-grid.ti-img-left { grid-template-columns: minmax(0, 1fr) minmax(0, var(--img-size, 40%)); }
.ti-grid.ti-img-left .ti-content { order: 1; }
.ti-grid.ti-img-left .ti-image   { order: 2; }

/* وقتی تصویری تعریف نشده، متن تمام عرض را می گیرد */
.ti-grid:not(:has(.ti-image)) { grid-template-columns: minmax(0, 1fr); }

.ti-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ti-image img { display: block; width: 100%; height: auto; }

.ti-content { min-width: 0; }
.ti-content > :first-child { margin-top: 0; }
.ti-content > :last-child  { margin-bottom: 0; }


/* ==========================================================================
   ۲۹) نوار جستجو، شبکه های اجتماعی و بلوک HTML
   ========================================================================== */

.hs-search-bar { background: var(--surface-page); }

.hs-search-form .search-input-wrapper {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.hs-search-form .search-input-wrapper:focus-within { border-color: var(--action-blue); }

.hs-search-form input {
  flex: 1;
  min-width: 0;
  padding: 13px 20px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
}
.hs-search-form input:focus { outline: none; }

.hs-search-form button {
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  border: none;
  background: var(--action-blue);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease;
}
.hs-search-form button:hover { background: var(--action-blue-dark); }
.hs-search-form button svg { width: 20px; height: 20px; fill: currentColor; }

.hs-social .social-section-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.hs-social-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--brand-blue);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: var(--t-card), background-color .2s ease;
}
.hs-social-item:hover { transform: translateY(-3px); color: #fff; }
.hs-social-item svg { flex-shrink: 0; width: 20px; height: 20px; fill: currentColor; }

/* حالت «فقط آیکن» — دایره ای */
.hs-social-icons .hs-social-item {
  width: 46px;
  height: 46px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.hs-social-instagram { background: linear-gradient(135deg, #f09433, #dc2743, #bc1888); }
.hs-social-telegram  { background: #0088cc; }
.hs-social-whatsapp  { background: #25d366; }
.hs-social-linkedin  { background: #0a66c2; }
.hs-social-twitter   { background: #000; }
.hs-social-youtube   { background: #ff0000; }

.hs-html > :first-child { margin-top: 0; }


/* ==========================================================================
   ۳۰) دکمه های فراخوان — اصلاح برند روی پایه main.css
   --------------------------------------------------------------------------
   ‏.cta-btn و .cta-primary و .cta-secondary در main.css خط ۷۰۱ تا ۷۳۷ تعریف
   شده اند و رنگشان از ‎--accent‎ می آید که بازنویسی شده است. اینجا فقط سایه
   آبیِ هاردکدشده و حرکتِ بدون محافظ اصلاح می شود.
   ========================================================================== */

.cta-primary:hover {
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), .32);
  transform: translateY(calc(var(--lift) / 2.5));
}
.cta-secondary:hover { transform: translateY(calc(var(--lift) / 2.5)); }

/* روی اسلاید تیره، دکمه ثانویه باید سفید بماند */
.hs-slider .swiper-btns .cta-secondary {
  background: rgba(255, 255, 255, .12);
  border-color: #fff;
  color: #fff;
}
.hs-slider .swiper-btns .cta-secondary:hover { background: #fff; color: var(--action-blue-dark); }


/* ==========================================================================
   ۳۱) صفحه محصول — .ba-pdp
   ========================================================================== */

.ba-pdp { margin-bottom: 34px; }

/* چیپ های دسته بندی — یک محصول می تواند زیر چند دسته باشد */
.ba-pdp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.ba-pdp-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 14px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.ba-pdp-tag span { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.ba-pdp-tag:hover {
  background: var(--blue-light);
  border-color: var(--blue-border);
  color: var(--action-blue-dark);
}

/* دسته اصلی پررنگ تر از بقیه */
.ba-pdp-tag.is-primary {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}
.ba-pdp-tag.is-primary span { color: rgba(255, 255, 255, .75); }
.ba-pdp-tag.is-primary:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  color: #fff;
}

.ba-pdp-h1 { margin: 0 0 22px; }

/* دو ستون: تصویر ۴۵٪ و اطلاعات ۵۵٪ — همان نسبت pr1/pr2 سایت قدیم */
.ba-pdp-cols {
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  gap: 26px;
  align-items: start;
}

.ba-pdp-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid var(--brand-navy);
  border-radius: var(--radius);
  overflow: hidden;
}
.ba-pdp-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--t-img);
}

.ba-pdp-media.is-zoomable { cursor: zoom-in; }
.ba-pdp-media.is-zoomable:hover img { transform: scale(var(--zoom)); }
.ba-pdp-media.is-zoomable:focus-visible {
  outline: 3px solid var(--action-blue);
  outline-offset: 3px;
}

/* نشانه بزرگ نمایی تا معلوم شود تصویر باز می شود */
.ba-pdp-media.is-zoomable::after {
  content: '\002B';
  position: absolute;
  inset-block-end: 10px;
  inset-inline-end: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
}

.ba-pdp-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 14px;
  color: var(--text-muted);
}

.ba-pdp-info { display: flex; flex-direction: column; gap: 14px; }

/* دکمه های ستون اطلاعات تمام عرض اند */
.ba-pdp-info .buy-btn,
.ba-pdp-info .download-btn { width: 100%; flex-wrap: wrap; }

.ba-pdp-trust {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 0;
  padding: 14px 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-light);
}
.ba-pdp-trust li { display: flex; align-items: center; gap: 8px; }
.ba-pdp-trust li::before {
  content: '\2713';
  flex-shrink: 0;
  font-weight: 800;
  color: var(--sale-green);
}

.ba-pdp-video {
  margin-top: 26px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ba-pdp-video video {
  display: block;
  width: 100%;
  max-height: 70vh;
  background: #000;
}


/* ==========================================================================
   ۳۲) لایت باکس تصویر محصول — .ba-lightbox
   ========================================================================== */

.ba-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 48px);
  background: rgba(0, 0, 0, .85);
  opacity: 0;
  transition: opacity .18s ease;
}
.ba-lightbox.is-open { opacity: 1; }

.ba-lb-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}
.ba-lb-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--radius);
  transform: scale(.96);
  transition: transform .18s ease;
}
.ba-lightbox.is-open .ba-lb-stage img { transform: scale(1); }

/* دکمه بستن — گوشه بالا سمت آغازین (در راست‌چین: بالا-راست) */
.ba-lb-close {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-start: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease;
}
.ba-lb-close:hover { background: rgba(255, 255, 255, .34); }
.ba-lb-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }


/* ==========================================================================
   ۳۳) تکمیل کارت قیمت — ساختار تازه مارک آپ
   ========================================================================== */

.price-card-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

/* حالت استعلامی — بدون عدد قیمت، پس گرادیان فیروزه ای جای خود را به یک
   سطح خنثی می دهد تا امضای رنگی فقط برای قیمت واقعی بماند */
.price-card.is-inquiry {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-inline-end: 5px solid var(--brand-blue);
  box-shadow: none;
  color: var(--text);
}
.price-card.is-inquiry .price-note {
  flex-basis: auto;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-navy);
}
.price-card.is-inquiry .price-unit {
  background: var(--brand-blue);
  color: #fff;
}


/* ==========================================================================
   ۳۴) قیمت داخل کارت محصول — .igs-prod-price
   ========================================================================== */

.igs-prod-price {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--price-red);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

.igs-prod-cur {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  direction: rtl;
  unicode-bidi: isolate;
}

/* کارت دارای قیمت، دکمه عملیاتش کهربایی می شود (خرید، نه استعلام) */
.igs-prod.has-price .igs-prod-cta {
  background: var(--amber);
  color: var(--brand-navy);
}
.igs-prod.has-price:hover .igs-prod-cta {
  background: var(--amber-dark);
  color: #fff;
}


/* ==========================================================================
   ۳۵) واکنش گرایی بخش های تازه — ۱۰۲۴ / ۷۶۸ / ۴۸۰
   ========================================================================== */

@media (max-width: 1024px) {

  /* شمار ستون از --cols به یک شبکه سیال سپرده می شود؛ داخل repeat()
     نمی توان از توابع ریاضی استفاده کرد، پس auto-fit جای آن را می گیرد */
  .hs-card-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
  .banner-grid  { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }

  .ba-pdp-cols { gap: 20px; }
  .ti-grid, .ti-grid.ti-img-left { gap: 22px; }
}

@media (max-width: 768px) {

  .hs-section { padding: 34px 0; }
  .hs-title { margin-bottom: 18px; font-size: 19px; }
  .hs-title-row { gap: 8px; }

  .hs-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .banner-grid  { grid-template-columns: repeat(var(--cols-mob, 1), minmax(0, 1fr)); }
  .hs-news-list { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

  /* متن و تصویر: تک ستونی و تصویر همیشه اول */
  .ti-grid,
  .ti-grid.ti-img-left { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .ti-grid.ti-img-left .ti-image   { order: 0; }
  .ti-grid.ti-img-left .ti-content { order: 0; }

  /* صفحه محصول تک ستونی */
  .ba-pdp-cols  { grid-template-columns: minmax(0, 1fr); }
  .ba-pdp-media { aspect-ratio: 4 / 3; }

  .hs-slider .swiper { height: clamp(240px, 52vw, var(--slider-h, 500px)); }
  .hs-slider .swiper-content {
    background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .2));
  }
  .hs-slider .swiper-button-prev,
  .hs-slider .swiper-button-next { width: 36px; height: 36px; }
}

@media (max-width: 480px) {

  .hs-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hs-news-list { grid-template-columns: minmax(0, 1fr); }
  .banner-grid  { grid-template-columns: minmax(0, 1fr); }

  .hs-title { font-size: 17.5px; }
  .hs-card-title, .hs-news-title { font-size: 14.5px; }
  .hs-card-excerpt, .hs-news-excerpt {
    font-size: 12.5px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .ba-pdp-h1 { margin-bottom: 16px; }
  .ba-pdp-tag { padding: 4px 11px; font-size: 12px; }

  .hs-social-item { padding: 9px 13px; font-size: 13px; }
  .hs-btns-wrap .cta-btn { width: 100%; justify-content: center; }

  .ba-lb-close {
    inset-block-start: 10px;
    inset-inline-start: 10px;
    width: 38px;
    height: 38px;
  }
}


/* ==========================================================================
   ۳۶) کاهش حرکت برای اجزای تازه
   توکن های ‎--lift‎ و ‎--zoom‎ خودشان محافظت شده اند؛ این بلوک فقط گذارهایی
   را خنثی می کند که مستقیم در همین بخش ها تعریف شده اند.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .ba-lightbox { transition: opacity .01ms linear; }
  .ba-lb-stage img,
  .ba-lightbox.is-open .ba-lb-stage img { transform: none; transition: none; }
  .hs-social-item:hover { transform: none; }
}

/* ==========================================================================
   ۳۷) تصاویر داخل محتوا
   بدنهٔ مطلب در دو ظرف رندر می‌شود: .page-content (متن اصلی صفحه) و
   .section-content (بخش‌های آمده از جدول dakheli2 سایت قدیم — که بیشترِ
   متن سایت همان است). main.css فقط برای اولی وسط‌چین دارد، پس تصویرِ
   بخش‌ها چپ‌چین می‌افتاد. سلکتور سوم عمداً هم‌وزنِ قاعدهٔ main.css است
   تا بر آن غلبه کند.
   ========================================================================== */

.page-content img,
.section-content img,
.section-text .section-content img {
  display: block;
  margin-inline: auto;
  margin-block: 26px;
  max-width: 100%;
  height: auto;
  border-radius: var(--r-card, 10px);
  border: 1px solid var(--line, #e6e8ef);
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
  background: #fff;
}

/* تصویرِ داخل لینک نباید فاصلهٔ inline اضافه بگیرد */
.page-content a:has(> img),
.section-content a:has(> img) { display: block; }

/* تصاویر خیلی کوچک (آیکون، لوگو) کش نیایند و قاب نگیرند */
.page-content img[width]:not([width="0"]),
.section-content img[width]:not([width="0"]) { width: auto; }

.page-content figure,
.section-content figure {
  margin: 28px auto;
  text-align: center;
  max-width: 100%;
}
.page-content figure img,
.section-content figure img { margin-block: 0 8px; }

.page-content figcaption,
.section-content figcaption {
  font-size: 13px;
  color: var(--muted, #6b7280);
  line-height: 1.9;
}

/* جدول‌های محتوا روی موبایل باید خودشان اسکرول بخورند، نه کل صفحه */
.page-content table,
.section-content table { width: 100%; border-collapse: collapse; }

.page-content > table,
.section-content > table { display: block; overflow-x: auto; }

@media (max-width: 560px) {
  .page-content img,
  .section-content img,
  .section-text .section-content img { margin-block: 18px; }
}
