/* Sepahan v2.66 final cleanup: mobile products, cart hover, video, shop cards */

/* Header/menu cart: remove hover layer only; keep icon color stable */
#topHeader .sepahan-header-cart-hover,
#topHeader .sepahan-header-cart-hover:hover,
#topHeader .sepahan-header-cart-hover:focus,
#topHeader .sepahan-header-cart-hover:active{
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  border-color:transparent!important;
  color:var(--sepahan-primary,#2563eb)!important;
  -webkit-text-fill-color:var(--sepahan-primary,#2563eb)!important;
}
html.dark #topHeader .sepahan-header-cart-hover,
body.dark #topHeader .sepahan-header-cart-hover,
html.dark #topHeader .sepahan-header-cart-hover:hover,
body.dark #topHeader .sepahan-header-cart-hover:hover{
  color:var(--sepahan-primary,#60a5fa)!important;
  -webkit-text-fill-color:var(--sepahan-primary,#60a5fa)!important;
}
#topHeader .sepahan-header-cart-hover svg,
#topHeader .sepahan-header-cart-hover:hover svg,
#topHeader .sepahan-header-cart-hover:focus svg{
  color:inherit!important;
  stroke:currentColor!important;
  fill:none!important;
  background:transparent!important;
  box-shadow:none!important;
}
#topHeader .sepahan-header-cart-hover .sepahan-cart-count,
#topHeader .sepahan-header-cart-hover:hover .sepahan-cart-count{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
#topHeader .sepahan-header-cart-hover:before,
#topHeader .sepahan-header-cart-hover:after,
#topHeader .sepahan-header-cart-hover:hover:before,
#topHeader .sepahan-header-cart-hover:hover:after{content:none!important;display:none!important}
#topHeader .sepahan-desktop-menu a.sepahan-no-cart-hover,
#topHeader .sepahan-desktop-menu a.sepahan-no-cart-hover:hover,
#topHeader .sepahan-desktop-menu a[href*="cart"],
#topHeader .sepahan-desktop-menu a[href*="cart"]:hover,
#topHeader .sepahan-desktop-menu a[href*="سبد"],
#topHeader .sepahan-desktop-menu a[href*="سبد"]:hover{
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
}

/* Video widget: Elementor front must obey cover width/height controls */
.elementor-widget-sepahan_video_player .sepahan-video-box{max-width:100%!important;box-sizing:border-box!important}
.elementor-widget-sepahan_video_player .sepahan-video-open,
.elementor-widget-sepahan_video_player .sepahan-video-media{background:transparent!important;background-color:transparent!important;box-shadow:none!important}
.elementor-widget-sepahan_video_player .sepahan-video-poster{background:transparent!important;max-width:100%!important}
.sepahan-video-modal{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.sepahan-video-modal-panel{box-shadow:none!important}

/* Elementor product strip: mobile horizontal card, not squeezed two-column */
@media(max-width:767px){
  html body .sepahan-products-strip-section .container{padding-left:10px!important;padding-right:10px!important;max-width:100%!important;overflow:hidden!important}
  html body .sepahan-products-strip-wrap{padding:10px!important;border-radius:16px!important;overflow:hidden!important}
  html body .sepahan-products-strip-box{overflow:hidden!important;border-radius:14px!important}
  html body .sepahan-products-strip-scroll{width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-x pan-y!important;direction:rtl!important;scrollbar-width:none!important}
  html body .sepahan-products-strip-scroll::-webkit-scrollbar{display:none!important}
  html body .sepahan-products-strip-list{display:flex!important;flex-wrap:nowrap!important;width:max-content!important;min-width:100%!important;max-width:none!important;gap:10px!important;padding:0!important;direction:rtl!important;align-items:stretch!important}
  html body .sepahan-products-strip-card{
    flex:0 0 min(72vw,238px)!important;
    width:min(72vw,238px)!important;
    min-width:min(72vw,238px)!important;
    max-width:min(72vw,238px)!important;
    min-height:255px!important;
    height:auto!important;
    padding:10px!important;
    border:1px solid rgba(226,232,240,.9)!important;
    border-radius:15px!important;
    box-shadow:none!important;
    transform:none!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }
  html body .sepahan-products-strip-card:hover{transform:none!important}
  html body .sepahan-products-strip-image{height:126px!important;min-height:126px!important;max-height:126px!important;margin:6px 0 9px!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
  html body .sepahan-products-strip-image img{width:100%!important;height:100%!important;max-height:126px!important;object-fit:contain!important;transform:none!important}
  html body .sepahan-products-strip-name{font-size:12px!important;line-height:1.75!important;min-height:42px!important;max-height:42px!important;margin:0 0 8px!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;text-align:right!important}
  html body .sepahan-products-strip-bottom{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-end!important;gap:5px!important;min-height:58px!important;margin-top:auto!important;overflow:hidden!important}
  html body .sepahan-products-strip-rating{font-size:11px!important;line-height:1.2!important;align-self:flex-start!important;white-space:nowrap!important}
  html body .sepahan-products-strip-price{display:flex!important;flex-direction:column!important;align-items:flex-end!important;justify-content:flex-end!important;width:100%!important;max-width:100%!important;min-width:0!important;gap:2px!important;text-align:left!important;line-height:1.45!important;overflow:hidden!important;white-space:normal!important}
  html body .sepahan-products-strip-price del,
  html body .sepahan-products-strip-price ins,
  html body .sepahan-products-strip-price .amount,
  html body .sepahan-products-strip-price bdi{max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;line-height:1.45!important}
  html body .sepahan-products-strip-price del{font-size:10px!important;opacity:.66!important;font-weight:650!important}
  html body .sepahan-products-strip-price ins{text-decoration:none!important;font-size:12px!important;font-weight:950!important}
  html body .sepahan-products-strip-price .woocommerce-Price-currencySymbol{font-size:.75em!important;margin-inline-start:2px!important}
  html body .sepahan-products-strip-discount{top:8px!important;left:8px!important;min-width:30px!important;height:22px!important;font-size:10px!important;padding:0 6px!important}
  html body .sepahan-products-strip-dots{top:8px!important;right:8px!important;gap:3px!important}
  html body .sepahan-products-strip-dots span{width:7px!important;height:7px!important}
}

/* Shop archive: safe two-column cards on mobile */
@media(max-width:767px){
  body.woocommerce-shop .sepahan-products-grid ul.products,
  body.tax-product_cat .sepahan-products-grid ul.products,
  body.tax-product_tag .sepahan-products-grid ul.products,
  body.post-type-archive-product .sepahan-products-grid ul.products{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    align-items:stretch!important;
  }
  body .sepahan-products-grid ul.products li.product.sepahan-product-card,
  body .sepahan-products-grid .sepahan-product-card{width:auto!important;max-width:100%!important;margin:0!important;float:none!important;min-width:0!important;height:100%!important;overflow:hidden!important}
  body .sepahan-products-grid .sepahan-product-inner{height:100%!important;min-height:270px!important;padding:8px!important;border-radius:15px!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;box-sizing:border-box!important}
  body .sepahan-products-grid .sepahan-product-image-link{display:block!important;flex:0 0 auto!important;min-width:0!important;overflow:hidden!important}
  body .sepahan-products-grid .sepahan-product-img{height:100px!important;min-height:100px!important;max-height:100px!important;padding:2px!important;margin:0 0 7px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
  body .sepahan-products-grid .sepahan-product-img img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;margin:0 auto!important;display:block!important}
  body .sepahan-products-grid .sepahan-product-body{display:flex!important;flex-direction:column!important;gap:6px!important;min-height:0!important;flex:1 1 auto!important;padding:0!important;overflow:hidden!important}
  body .sepahan-products-grid .sepahan-product-title{font-size:11.5px!important;line-height:1.75!important;min-height:40px!important;max-height:40px!important;margin:0!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;text-align:right!important}
  body .sepahan-products-grid .sepahan-product-meta-row{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-end!important;gap:4px!important;min-height:58px!important;margin-top:auto!important;overflow:hidden!important}
  body .sepahan-products-grid .sepahan-product-price{display:flex!important;flex-direction:column!important;align-items:flex-end!important;width:100%!important;max-width:100%!important;min-width:0!important;text-align:left!important;line-height:1.45!important;overflow:hidden!important;gap:2px!important;color:var(--sepahan-product-price,#2563eb)!important}
  body .sepahan-products-grid .sepahan-product-price del,
  body .sepahan-products-grid .sepahan-product-price ins,
  body .sepahan-products-grid .sepahan-product-price .amount,
  body .sepahan-products-grid .sepahan-product-price bdi{max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;line-height:1.45!important}
  body .sepahan-products-grid .sepahan-product-price del{font-size:10px!important;opacity:.65!important;font-weight:650!important;color:#94a3b8!important}
  body .sepahan-products-grid .sepahan-product-price ins{text-decoration:none!important;font-size:12px!important;font-weight:950!important;color:var(--sepahan-product-price,#2563eb)!important}
  body .sepahan-products-grid .sepahan-product-price .woocommerce-Price-currencySymbol{font-size:.72em!important;margin-inline-start:2px!important}
  body .sepahan-products-grid .sepahan-product-rating{font-size:10px!important;line-height:1!important;align-self:flex-start!important;white-space:nowrap!important;display:inline-flex!important;align-items:center!important;gap:2px!important}
  body .sepahan-products-grid .sepahan-card-actions{display:grid!important;grid-template-columns:minmax(0,1fr) 34px!important;gap:6px!important;margin-top:8px!important;flex:0 0 auto!important;min-width:0!important}
  body .sepahan-products-grid .sepahan-card-btn{height:30px!important;min-height:30px!important;border-radius:10px!important;font-size:10px!important;padding:0 7px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:flex!important;align-items:center!important;justify-content:center!important}
  body .sepahan-products-grid .sepahan-card-btn-icon{width:34px!important;padding:0!important}
  body .sepahan-products-grid .sepahan-card-btn-icon svg{width:16px!important;height:16px!important}
}

#topHeader .sepahan-header-cart-hover .sepahan-cart-count,
#topHeader .sepahan-header-cart-hover:hover .sepahan-cart-count{
  background:var(--sepahan-secondary,var(--sepahan-primary,#2563eb))!important;
  background-color:var(--sepahan-secondary,var(--sepahan-primary,#2563eb))!important;
  box-shadow:0 1px 4px rgba(0,0,0,.14)!important;
}
html.dark #topHeader .sepahan-header-cart-hover .sepahan-cart-count,
body.dark #topHeader .sepahan-header-cart-hover .sepahan-cart-count{
  background:var(--sepahan-primary,#60a5fa)!important;
  background-color:var(--sepahan-primary,#60a5fa)!important;
}


/* v2.66.1 extra fixes */
#topHeader .sepahan-desktop-menu a[href*="cart"],
#topHeader .sepahan-desktop-menu a[href*="cart"]:hover,
#topHeader .sepahan-desktop-menu a[href*="سبد"],
#topHeader .sepahan-desktop-menu a[href*="سبد"]:hover,
#topHeader nav a[href*="cart"],
#topHeader nav a[href*="cart"]:hover,
#topHeader nav a[href*="سبد"],
#topHeader nav a[href*="سبد"]:hover{
  background:transparent!important;
  background-color:transparent!important;
  box-shadow:none!important;
  border-radius:0!important;
}
#topHeader .sepahan-header-cart-hover,
#topHeader .sepahan-header-cart-hover:hover,
#topHeader .sepahan-header-cart-hover svg,
#topHeader .sepahan-header-cart-hover:hover svg{
  color:var(--sepahan-primary,#2563eb)!important;
  stroke:currentColor!important;
}
html.dark #topHeader .sepahan-header-cart-hover,
body.dark #topHeader .sepahan-header-cart-hover,
html.dark #topHeader .sepahan-header-cart-hover svg,
body.dark #topHeader .sepahan-header-cart-hover svg{
  color:var(--sepahan-primary,#60a5fa)!important;
}

.elementor-widget-sepahan_video_player .sepahan-video-box{
  display:block!important;
  width:var(--sepahan-video-width,100%);
  margin-inline:auto;
}
.elementor-widget-sepahan_video_player .sepahan-video-media{
  width:100%!important;
}

.sepahan-mobile-bottom-nav .sepahan-mobile-nav-custom-icon,
.sepahan-mobile-nav-custom-icon{
  width:22px!important;
  height:22px!important;
  object-fit:contain!important;
  display:block!important;
}

.sepahan-shop-cats{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:12px!important;
}
.sepahan-shop-cat{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:120px!important;
  max-width:180px!important;
  padding:12px 10px!important;
}
@media(max-width:767px){
  .sepahan-shop-cats{
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    scrollbar-width:none!important;
  }
  .sepahan-shop-cats::-webkit-scrollbar{display:none!important}
  .sepahan-shop-cat{min-width:102px!important;max-width:140px!important}
}

@media(max-width:767px){
  body .sepahan-products-grid .sepahan-product-inner{min-height:292px!important}
  body .sepahan-products-grid .sepahan-product-meta-row{min-height:68px!important}
  body .sepahan-products-grid .sepahan-product-price{font-size:11px!important}
  body .sepahan-products-grid .sepahan-product-price del{font-size:9px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.35!important}
  body .sepahan-products-grid .sepahan-product-price ins,
  body .sepahan-products-grid .sepahan-product-price > .amount,
  body .sepahan-products-grid .sepahan-product-price .woocommerce-Price-amount{font-size:11.5px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.4!important}
  body .sepahan-products-grid .sepahan-card-actions{grid-template-columns:minmax(0,1fr) 36px!important}
  html body .sepahan-products-strip-card{flex-basis:min(68vw,222px)!important;width:min(68vw,222px)!important;min-width:min(68vw,222px)!important;max-width:min(68vw,222px)!important;min-height:265px!important}
}

@media(max-width:767px){.elementor-widget-sepahan_video_player .sepahan-video-box{margin-inline:auto!important;max-width:calc(100% - 24px)!important}.elementor-widget-sepahan_video_player .sepahan-video-media{max-width:100%!important}}


/* v2.68: Shop category display mode from theme settings */
body .sepahan-shop-cats.sepahan-shop-cats-wrap{
  display:flex!important;
  flex-wrap:wrap!important;
  overflow:visible!important;
  gap:12px!important;
}
body .sepahan-shop-cats.sepahan-shop-cats-scroll{
  display:flex!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  gap:12px!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-inline:contain!important;
  scrollbar-width:none!important;
}
body .sepahan-shop-cats.sepahan-shop-cats-scroll::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
body .sepahan-shop-cats.sepahan-shop-cats-scroll .sepahan-shop-cat,
body .sepahan-shop-cats.sepahan-shop-cats-wrap .sepahan-shop-cat{
  flex:0 0 auto!important;
  min-width:120px!important;
  max-width:180px!important;
}
@media(max-width:767px){
  body .sepahan-shop-cats.sepahan-shop-cats-wrap{
    flex-wrap:wrap!important;
    overflow:visible!important;
    justify-content:flex-start!important;
  }
  body .sepahan-shop-cats.sepahan-shop-cats-scroll{
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  body .sepahan-shop-cats .sepahan-shop-cat{
    min-width:102px!important;
    max-width:145px!important;
  }
}


/* v2.69 final shop category horizontal mode */
html body .sepahan-shop-cats.sepahan-shop-cats-scroll{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:12px!important;
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-inline:contain!important;
  touch-action:pan-x pan-y!important;
  scrollbar-width:none!important;
  cursor:grab!important;
}
html body .sepahan-shop-cats.sepahan-shop-cats-scroll:active{cursor:grabbing!important}
html body .sepahan-shop-cats.sepahan-shop-cats-scroll::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
html body .sepahan-shop-cats.sepahan-shop-cats-scroll > .sepahan-shop-cat{
  flex:0 0 128px!important;
  width:128px!important;
  min-width:128px!important;
  max-width:128px!important;
}
html body .sepahan-shop-cats.sepahan-shop-cats-wrap{
  display:flex!important;
  flex-wrap:wrap!important;
  overflow:visible!important;
}
@media(max-width:767px){html body .sepahan-shop-cats.sepahan-shop-cats-scroll > .sepahan-shop-cat{flex-basis:110px!important;width:110px!important;min-width:110px!important;max-width:110px!important}}


/* v2.70: final mega menu top gap + LTR horizontal shop categories */
#mega-menu-fire-target,
#mega-menu-fire-target.sepahan-shop-mega-panel{
  background:transparent!important;
  background-color:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding-top:8px!important;
  margin-top:0!important;
}
#mega-menu-fire-target > .sepahan-mega-box{margin-top:0!important}
#mega-menu-fire-target .sepahan-mega-tabs,
#mega-menu-fire-target .sepahan-mega-contents{padding-top:0!important}
body.woocommerce-shop .sepahan-shop-cats.sepahan-shop-cats-scroll,
body.post-type-archive-product .sepahan-shop-cats.sepahan-shop-cats-scroll,
body.tax-product_cat .sepahan-shop-cats.sepahan-shop-cats-scroll,
body.tax-product_tag .sepahan-shop-cats.sepahan-shop-cats-scroll,
html body .sepahan-shop-cats.sepahan-shop-cats-scroll{
  display:flex!important;
  grid-template-columns:none!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  justify-content:flex-start!important;
  align-items:stretch!important;
  direction:ltr!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  width:100%!important;
  max-width:100%!important;
  cursor:grab!important;
  scrollbar-width:none!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-x pan-y!important;
}
html body .sepahan-shop-cats.sepahan-shop-cats-scroll > .sepahan-shop-cat{
  direction:rtl!important;
  flex:0 0 128px!important;
  width:128px!important;
  min-width:128px!important;
  max-width:128px!important;
}
@media(max-width:767px){html body .sepahan-shop-cats.sepahan-shop-cats-scroll > .sepahan-shop-cat{flex-basis:110px!important;width:110px!important;min-width:110px!important;max-width:110px!important}}


/* v2.70: RTL shop category scroll final override */
html body .sepahan-shop-cats.sepahan-shop-cats-scroll{direction:rtl!important;display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-x pan-y!important;cursor:grab!important;}
html body .sepahan-shop-cats.sepahan-shop-cats-scroll>.sepahan-shop-cat{direction:rtl!important;flex:0 0 128px!important;width:128px!important;min-width:128px!important;max-width:128px!important;}
@media(max-width:767px){html body .sepahan-shop-cats.sepahan-shop-cats-scroll>.sepahan-shop-cat{flex-basis:110px!important;width:110px!important;min-width:110px!important;max-width:110px!important;}}


/* v2.2.3: keep the Products Strip viewport and track in the same RTL
   coordinate system. A mixed LTR viewport / RTL track hides most of the
   overflowing cards from scrollWidth and prevents autoplay from advancing. */
html body .sepahan-products-strip-scroll{direction:rtl!important;}
html body .sepahan-products-strip-list{direction:rtl!important;}
html body .sepahan-products-strip-card{direction:rtl;}
