/* =========================
   0) Base Typography
   ========================= */
a{color:#13479b;font-weight:700}
a:hover{color:#f29900;text-decoration:underline}

h3,h4,h5,h6{margin:10px 0}
h1,h2{margin:20px 0 10px}

p{line-height:1.9!important;font-weight:450!important}
strong,b{font-weight:700}

/* =========================
   1) Notice Box
   ========================= */
.notice{
  background-color:#eaf5f5;
  border-left:5px solid #00bcd4;
  border-radius:8px;
  padding:15px 55px 15px 15px;
  margin:10px;
  font-size:16px;
  font-weight:500;
  color:#333;
  display:flex;
  align-items:center;
  position:relative;
}
.notice::before{
  content:"!";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background-color:#cff5ff;
  border-radius:8px;
  color:#00bcd4;
  font-size:30px;
  padding:10px;
  margin-left:60px;
  margin-right:15px;
  border:2px solid transparent;
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
}
@media (max-width:768px){
  .notice{padding:15px;flex-direction:column;text-align:center}
  .notice::before{position:static;margin:0 auto 10px;transform:none}
}
@media (max-width:480px){
  .notice{padding:10px;font-size:14px}
  .notice::before{font-size:24px;padding:8px}
}

/* =========================
   2) Buttons / Media
   ========================= */
.custom-button{
  display:inline-block;
  padding:5px 24px;
  margin:10px 0 -10px;
  background-color:#f29900;
  color:#fff;
  text-decoration:none;
  border-radius:6px;
  font-size:15px;
  font-weight:700;
  text-align:center;
  transition:background-color .5s ease;
}
.custom-button:hover{background-color:#13479b;color:#fff}
@media (max-width:768px){
  .custom-button{display:block;margin:10px auto;width:fit-content}
}

.rounded-video{
  border-radius:25px;
  overflow:hidden;
  max-width:100%!important;
  width:100%!important;
  height:100%!important;
  max-height:100%!important;
  margin:20px 0!important;
  object-fit:cover;
}
.custom-video-radius video,
.custom-video-radius iframe{
  border-radius:15px!important;
  overflow:hidden;
}

/* =========================
   3) Images (general + blocks)
   ========================= */
.wp-block-image img{margin-top:15px;border-radius:15px}

/* (آرشیو ووکامرس) نسخه نهایی—در کد خودت آخرش margin:0 شده بود */
.archive.woocommerce .elementor-widget img{
  border-radius:15px!important;
  display:block!important;
  margin:0!important;
}

/* =========================
   4) Rank Math TOC Block (Table of contents)
   ========================= */
.wp-block-rank-math-toc-block{
  background-color:#fff;
  border:2px solid #000;
  border-radius:10px;
  padding:20px;
  margin:20px 0;
  box-shadow:3px 3px 10px rgba(0,0,0,.2);
}
.wp-block-rank-math-toc-block h2{
  font-size:22px;
  color:#333;
  margin-bottom:15px;
  border-bottom:2px solid #000;
  padding-bottom:10px;
}
.wp-block-rank-math-toc-block ul{list-style:none;padding:0;margin:0}
.wp-block-rank-math-toc-block ul li{margin:10px 0}
.wp-block-rank-math-toc-block ul li a{
  text-decoration:none;
  color:#13479b;
  font-weight:700;
}
.wp-block-rank-math-toc-block ul li a:hover,
.yoast-table-of-contents ul li a:hover{
  text-decoration:underline;
  color:#ff9900;
}

/* =========================
   5) WooCommerce tweaks
   ========================= */
@media (max-width:768px){
  .woocommerce-product-gallery__trigger{display:none!important}
}
.woocommerce div.product div.images .flex-control-thumbs{
  margin-top:15px;
  margin-right:5px;
}
.woocommerce-product-details__short-description,
.woocommerce-p-content{
  text-align:justify;
  direction:rtl;
}

/* تب‌های ووکامرس در موبایل */
@media (max-width:768px){
  .woocommerce div.product .wc-tabs,
  .woocommerce div.product .wc-tabs li{
    display:block!important;
    width:100%!important;
  }
  .woocommerce div.product .wc-tabs li{
    margin-bottom:12px;
    border:1px solid #ddd;
    border-radius:6px;
    overflow:hidden;
    background:#fafafa;
  }
  .woocommerce div.product .wc-tabs li a{
    display:block;
    width:100%;
    text-align:center;
    padding:12px;
    color:#333;
  }
  .woocommerce div.product .wc-tabs li.active a{
    background:#f0f0f0;
    font-weight:700;
  }
}

/* Related Cards (ep-related-cards) */
.ep-related-cards{max-width:1200px;margin:0 auto}
.ep-related-cards h3.woocommerce-loop-title{
  text-align:center;font-weight:800;margin:0 0 18px;letter-spacing:.2px;
  position:relative;color:#111827;
}
.ep-related-cards h3.woocommerce-loop-title:before,
.ep-related-cards h3.woocommerce-loop-title:after{
  content:"";display:inline-block;width:56px;height:2px;background:#1e3a8a;
  vertical-align:middle;margin:0 12px;opacity:.3;
}
.ep-related-cards ul.products{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:22px;
  list-style:none;padding:0;margin:10px 0 0;
}
.ep-related-cards ul.products li.product{
  background:#fff;border-radius:16px;
  box-shadow:0 6px 18px rgba(15,23,42,.08);
  padding:16px;position:relative;overflow:hidden;
  display:flex;flex-direction:column;min-height:280px;
  transition:transform .2s ease,box-shadow .2s ease;
}
.ep-related-cards ul.products li.product:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 22px rgba(15,23,42,.12);
}
.ep-related-cards ul.products li.product a.woocommerce-LoopProduct-link{
  display:flex;flex-direction:column;gap:12px;text-decoration:none;flex:1;
}
.ep-related-cards ul.products li.product a img{
  width:100%;height:170px;object-fit:contain;
  mix-blend-mode:multiply;
  transition:transform .25s ease;
}
.ep-related-cards ul.products li.product:hover a img{transform:scale(1.02)}
.ep-related-cards ul.products li.product .woocommerce-loop-product__title{
  font-size:16px;line-height:1.7;font-weight:700;color:#0f172a;margin:0;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  text-align:right;
}
.ep-related-cards ul.products li.product .price{
  margin-top:auto;font-weight:700;color:#334155;opacity:.85;
}
.ep-related-cards ul.products li.product .star-rating,
.ep-related-cards ul.products li.product .button,
.ep-related-cards ul.products li.product .added_to_cart,
.ep-related-cards ul.products li.product .onsale{display:none!important}
@media (max-width:480px){
  .ep-related-cards ul.products{gap:16px}
  .ep-related-cards ul.products li.product{padding:14px;border-radius:14px}
  .ep-related-cards ul.products li.product a img{height:150px}
}

/* Hide price / sale */
.bcp-card-2-price-regular{display:none!important}
.onsale{display:none!important}

/* =========================
   6) Layout / Overflow fixes
   ========================= */
body:not(.single-post){overflow-x:hidden}
body:not(.single-post) *{box-sizing:border-box}
body:not(.single-post) .container,
body:not(.single-post) .content,
body:not(.single-post) .site,
body:not(.single-post) .entry-content,
body:not(.single-post) .page-content,
body:not(.single-post) .post-content,
body:not(.single-post) .widget{
  max-width:100vw;
  overflow-x:hidden;
}
body:not(.single-post) img,
body:not(.single-post) table{
  max-width:100%;
  height:auto;
}
@media (max-width:768px){
  body:not(.single-post){overflow-x:hidden}
  body:not(.single-post) .container,
  body:not(.single-post) .content,
  body:not(.single-post) .site,
  body:not(.single-post) .entry-content,
  body:not(.single-post) .page-content,
  body:not(.single-post) .post-content,
  body:not(.single-post) .widget{
    max-width:100vw;
    padding-left:0;
    padding-right:0;
  }
}

/* =========================
   7) Swiper / Tabs / Small UI
   ========================= */
.swiper-slide-image{filter:grayscale(100%);transition:filter .3s ease}
.swiper-slide-image:hover{filter:grayscale(0%)}

.bdt-ep-static-grid-tab-thumbnail{border-radius:10px!important}
.submenu{z-index:1000}

/* =========================
   8) Utility Blocks
   ========================= */
.block-with-border{
  border:2px solid #000;
  border-radius:10px;
  padding:15px;
  margin:10px;
  box-shadow:2px 2px 5px rgba(0,0,0,.2);
}

/* Article product card */
.article-product{
  display:flex;
  align-items:center;
  border:2px solid #ddd;
  border-radius:8px;
  padding:15px;
  margin:15px 0;
  background-color:#f9f9f9;
  box-shadow:2px 4px 8px rgba(0,0,0,.1);
  transition:transform .3s,box-shadow .3s;
}
.article-product:hover{
  transform:scale(1.03);
  box-shadow:3px 6px 12px rgba(0,0,0,.2);
}
.article-product img{
  max-width:100px;
  margin-right:15px;
  border-radius:10px!important;
  border:2px solid #ddd;
}
.article-product .product-details{flex:1}
.article-product .product-details h3{
  margin:0 0 10px;
  font-size:1.2em;
  color:#333;
}
.article-product .product-details p{
  margin:0;
  color:#666;
  font-size:.95em;
}
@media (max-width:768px){
  .article-product{flex-direction:column;align-items:flex-start}
  .article-product img{
    margin-right:0;
    margin-bottom:10px;
    max-width:80%;
  }
  .article-product .product-details h3{font-size:1.1em}
  .article-product .product-details p{font-size:.9em}
}

/* Floating button */
.floating-button{
  position:fixed;
  bottom:110px;
  left:40px;
  z-index:1000;
  background-color:#ff9800;
  color:#fff;
  padding:15px 20px;
  border-radius:50px;
  font-size:16px;
  text-decoration:none;
  box-shadow:0 4px 6px rgba(0,0,0,.2);
  transition:background-color .3s ease;
}
.floating-button:hover{background-color:#003366;color:#fff}
@media (max-width:768px){
  .floating-button{
    bottom:100px;
    left:30px;
    padding:10px 15px;
    font-size:14px;
  }
}

/* =========================
   9) Comments UI
   ========================= */
#comments{
  background:#f9f9f9;
  padding:2rem;
  border-radius:12px;
  margin-top:2rem;
  font-family:inherit;
  box-shadow:0 4px 10px rgba(0,0,0,.05);
}
.comments-title{
  font-size:1.4rem;
  font-weight:700;
  color:#333;
  margin-bottom:1rem;
}
.comment-list{list-style:none;padding:0;margin:0 0 2rem}
.comment-list li{border-bottom:1px solid #ddd;padding:1rem 0}
.comment-list li:last-child{border-bottom:none}
.comment-author{font-weight:700;margin-bottom:.5rem;display:block}
.comment-content{font-size:.95rem;color:#444}

.comment-respond{margin-top:2rem}
.comment-respond input,
.comment-respond textarea{
  width:100%;
  padding:.8rem;
  border:1px solid #ccc;
  border-radius:8px;
  margin-bottom:1rem;
  font-size:.95rem;
  transition:border-color .3s;
}
.comment-respond input:focus,
.comment-respond textarea:focus{border-color:#00a878;outline:none}
.comment-respond input[type="submit"]{
  background-color:#00a878;
  color:#fff;
  font-weight:700;
  border:none;
  cursor:pointer;
  transition:background-color .3s;
}
.comment-respond input[type="submit"]:hover{background-color:#007f5f}

/* =========================
   10) CLS / Stability (merged)
   ========================= */
img,svg,video,canvas{
  display:block;
  max-width:100%;
  height:auto;
}
img[width][height]{height:auto}
img.wp-post-image{display:block}
img[loading="lazy"],img[data-lazy-src]{contain:layout paint}

/* logo (اگر alt دقیقاً همین است) */
img[alt="لوگو اصفهان پک"]{
  aspect-ratio:2317/743;
  width:100%;
  height:auto;
  display:block;
}

/* محصول مربع */
.single-product .wp-post-image{
  aspect-ratio:1/1;
  width:100%;
  height:auto;
  display:block;
}

/* سکشن مشکل‌دار */
.elementor-element-416b8fa{
  min-height:clamp(220px,42vw,420px);
  overflow:hidden;
  content-visibility:auto;
  contain-intrinsic-size:480px;
  background-size:cover;
  background-position:center;
}

/* دکمه شناور (اگر استفاده می‌کنی) */
.rahwin-float-btn{
  position:fixed;
  inset-block-end:16px;
  z-index:9999;
  will-change:transform;
}

/* فیلتر WOOF */
.woof_block_html_items{
  content-visibility:auto;
  contain-intrinsic-size:320px;
  min-height:0;
}

/* EAEL Wrapper Link */
[data-eael-wrapper-link]{display:block;min-height:2.5rem}

/* تیترها برای جلوگیری از پرش */
h1,h2,h3,
.elementor-widget-heading .elementor-heading-title{line-height:1.2}

/* جهت */
html{direction:rtl!important}

/* جلوگیری از border shift روی hover */
*:where(img,a,button){border:0 solid transparent}

/* حذف transition روی عناصر حساس CLS */
.elementor-element-416b8fa,
.rank-math-breadcrumb,
.breadcrumb{transition:none!important}

/* =========================
   11) EAEL wrapper-link / toggle z-index fix
   ========================= */
.group__header{position:relative;isolation:isolate}
.group__link{position:relative;z-index:1}
.group__toggle{position:relative;z-index:3;cursor:pointer;pointer-events:auto}
.group__header .--eael-wrapper-link-tag{pointer-events:auto}
.group__toggle:hover{background:#f0f0f0}
.group__toggler{position:absolute;left:-9999px}
.group__toggle *{pointer-events:none}

/* =========================
   12) Subcategory Cards Grid
   ========================= */
.subcat-cards{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:20px;
  margin:16px 0 24px;
}
@media (min-width:1024px){
  .subcat-cards{grid-template-columns:repeat(3,1fr)}
}
.subcat-card{
  background:#fff;
  border:1px solid #eaeaea;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 4px 12px rgba(0,0,0,.05);
  display:flex;
  flex-direction:column;
  transition:transform .2s ease,box-shadow .2s ease;
}
.subcat-card:hover{transform:translateY(-4px);box-shadow:0 8px 20px rgba(0,0,0,.07)}
.subcat-card__image{display:block;aspect-ratio:3/2;background:#f7f7f7}
.subcat-card__image img{width:100%;height:100%;object-fit:cover;display:block}
.subcat-card__placeholder{
  width:100%;
  height:100%;
  background:repeating-linear-gradient(45deg,#f1f1f1,#f1f1f1 10px,#ececec 10px,#ececec 20px)
}
.subcat-card__content{padding:14px 16px 16px;flex:1}
.subcat-card__content h3{font-size:18px;margin:0 0 10px;color:#0d3b66}
.subcat-card__content h3 a{color:inherit;text-decoration:none}
.subcat-card__content h3 a:hover{text-decoration:underline}
.subcat-card .btn{
  display:inline-block;
  padding:8px 14px;
  border-radius:8px;
  background:#0d3b66;
  color:#fff;
  text-decoration:none;
  font-size:14px;
}
.subcat-card .btn:hover{filter:brightness(1.05)}

/* =========================
   13) Scroll table helper
   ========================= */
.scroll-table{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  margin:1.5rem 0;
}
.scroll-table table{
  width:100%;
  border-collapse:collapse;
  min-width:600px;
  border:1px solid #e3e3e3;
  font-size:15px;
  text-align:center;
}
.scroll-table th,
.scroll-table td{
  padding:10px 12px;
  border:1px solid #e3e3e3;
  white-space:nowrap;
}
.scroll-table thead th{background-color:#f7f9fb;font-weight:600}
.scroll-table tbody tr:hover{
  background-color:#f0f8ff;
  transition:background-color .2s ease-in-out;
}

/* =========================
   14) Footer sticky + bottom bar
   ========================= */
#page,.site,.elementor-location-body{min-height:100svh;display:flex;flex-direction:column}
.site-footer,.elementor-location-footer{margin-top:auto}

html,body,#page{padding-bottom:0!important;margin:0;overflow-x:hidden}
.ep-bottom-bar{position:fixed;right:0;left:0;bottom:0;z-index:9999}
:root{--ep-bottom-bar-h:0px}

main>:last-child,
.site-main>:last-child,
.elementor-location-body>:last-child{margin-bottom:0!important}

.whatsapp-float,.call-fab,.chat-fab{
  position:fixed;
  bottom:16px;
  inset-inline-start:16px;
  transform:none!important;
  will-change:auto;
  filter:none;
}

/* overlays click only when open */
.dialog-widget-overlay,
.elementor-lightbox,
.elementor-overlay,
.elementor-motion-effects-layer{pointer-events:none!important}
.dialog-widget-overlay.dialog-open,
.elementor-lightbox--visible{pointer-events:auto!important}

/* menu layers */
.elementor-menu-toggle,
.elementor-nav-menu--dropdown,
.elementor-nav-menu--dropdown .elementor-item{z-index:100000!important}

header,
.elementor-location-header{position:relative;z-index:9999}

/* backgrounds should not steal clicks */
.elementor-section::before,
.elementor-section::after{pointer-events:none}

/* equal height/absolute children issues */
.elementor .elementor-widget,
.elementor .elementor-column{overflow:visible}

/* =========================
   15) RankMath FAQ styling
   ========================= */
.rank-math-list{max-width:820px;margin:24px auto}
.rank-math-list>div{
  border-radius:14px;
  background:#fff;
  box-shadow:0 10px 30px rgba(2,6,23,.08);
  margin:12px 0;
  border:1px solid #eee;
  overflow:hidden;
}
.rank-math-list .rank-math-question{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  text-align:right;
  padding:16px 18px;
  background:#f9f9f9;
  border:0;
  cursor:pointer;
  font-size:16px;
  font-weight:700;
  color:#0f172a;
  position:relative;
}
.rank-math-list .rank-math-question:hover{background:#eef6f0}
.rank-math-list .rank-math-question::after{
  content:"";
  margin-inline-start:auto;
  width:.7rem;height:.7rem;
  border-inline-end:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(-45deg);
  transition:transform .25s ease;
  opacity:.7;
}
.rank-math-list .is-open .rank-math-question{background:#e6fffb}
.rank-math-list .is-open .rank-math-question::after{transform:rotate(135deg);opacity:1}

.rank-math-list .rank-math-answer{
  max-height:0;
  overflow:hidden;
  transition:max-height .35s ease;
  padding:0 18px;
  color:#111827;
  line-height:1.9;
  font-size:14px;
  border-top:1px solid #f3f4f6;
}
.rank-math-list .is-open .rank-math-answer{
  max-height:500px;
  padding-bottom:16px;
}
.rank-math-answer p{margin:.3rem 0}
.rank-math-answer ul,
.rank-math-answer ol{margin:.3rem 1rem}
.rank-math-answer li{margin:.1rem 0}
@media (max-width:600px){
  .rank-math-list{margin:16px 10px}
  .rank-math-list .rank-math-question{font-size:15px;padding:14px}
  .rank-math-list .rank-math-answer{padding:0 14px 14px;font-size:13px}
}
html[dir="rtl"] .rank-math-list .rank-math-question{text-align:start}

/* =========================
   16) Hide elements (as you had)
   ========================= */
@media (max-width:768px){
  .rfb-text,
  .on-hover-text,
  .open-chaty{display:none!important}
  #rahwin-chat-launcher{display:none!important}
  .YN.yn-notification{bottom:8vh!important}
}
#btnBackToTop{display:none!important}
.rahwin-chat-userinfo{display:none!important}