/* WordPress bridge — لایه هماهنگی بین قالب قدیمی و طراحی tajhiz-gostar */

/*
 * Bootstrap .container::before/::after (clearfix) به عنوان آیتم گرید شمرده می‌شوند
 * و لایه‌های display:grid را به‌هم می‌ریزند (مثل صفحه تک‌محصول).
 */
body.ik-theme .container::before,
body.ik-theme .container::after,
body.ik-theme .product-detail__grid::before,
body.ik-theme .product-detail__grid::after,
body.ik-theme .footer-grid::before,
body.ik-theme .footer-grid::after,
body.ik-theme .benefits-grid::before,
body.ik-theme .benefits-grid::after {
  content: none !important;
  display: none !important;
}

/* عرض .container قالب جدید نباید با Bootstrap override شود */
body.ik-theme .container {
  width: min(calc(100% - 40px), var(--container, 1120px)) !important;
  max-width: none !important;
  padding-left: 0;
  padding-right: 0;
  margin-inline: auto;
  float: none;
}

body.ik-theme {
  margin: 0;
  max-width: none;
  float: none;
  background: #fff;
}

body.ik-theme.boxed-layout,
body.ik-theme.boxed-layout.container,
body.ik-theme.fullwidth-layout {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.ik-theme #content-wrap.site-content {
  width: 100%;
  float: none;
  padding: 0;
  margin: 0;
}

body.ik-theme .site-header .top-nav,
body.ik-theme .site-header .category-nav,
body.ik-theme .site-footer .container,
body.ik-theme .benefits .container,
body.ik-theme .hero-content {
  float: none;
}

body.ik-theme .main-nav a,
body.ik-theme .category-nav a,
body.ik-theme .site-footer a {
  text-decoration: none;
}

body.ik-theme .brand img,
body.ik-theme .footer-about img {
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
}

body.ik-theme .footer-about .custom-logo-link,
body.ik-theme .brand .custom-logo-link {
  display: block;
}

/* جلوگیری از تداخل ریست قدیمی روی SVG هدر */
body.ik-theme .site-header svg,
body.ik-theme .icon-btn svg,
body.ik-theme .phone-link svg {
  fill: none;
  stroke: currentColor;
}

/* محتوای داخلی صفحات تا اسکین‌شدن کامل ووکامرس */
body.ik-inner-page #content-wrap > .container,
body.ik-inner-page #primary,
body.ik-inner-page .woocommerce {
  width: min(calc(100% - 40px), 1120px);
  margin-inline: auto;
}

body.ik-inner-page #primary.no-sidebar,
body.ik-inner-page #primary.pull-left,
body.ik-inner-page #primary.pull-right {
  float: none;
  width: min(calc(100% - 40px), 1120px);
}

/* گالری محصول ووکامرس — جلوگیری از بیرون‌زدن تصویر */
body.ik-theme .woocommerce-product-gallery,
body.ik-theme .woocommerce-product-gallery__wrapper,
body.ik-theme .woocommerce-product-gallery__image {
  overflow: hidden;
  max-width: 100%;
}

body.ik-theme .woocommerce-product-gallery img,
body.ik-theme .woocommerce div.product div.images img {
  max-width: 100%;
  height: auto;
  width: auto;
  max-height: 500px;
  object-fit: contain;
  margin-inline: auto;
}

/* هیرو فرانت — مخفی کردن اسلایدر قدیمی اگر هنوز در قالب صفحه باشد */
body.ik-front #home-slider {
  display: none !important;
}

/* ویجت تماس شناور از قالب قدیم */
body.ik-theme .elm_c_wrap {
  z-index: 9999;
}

body.ik-theme .cp-top {
  z-index: 9998;
}
