/* Sepahan v2.21 focused requested fixes */

/* Story modal must stay above header, announcement bar, bot and contact buttons. */
html body .nikan-story-modal{
  z-index:2147483646!important;
}
html body .nikan-story-modal.is-open{
  display:flex!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
}
html body .nikan-story-modal .nikan-story-backdrop{z-index:0!important;}
html body .nikan-story-modal .nikan-story-modal-inner{z-index:1!important;}
html body .nikan-story-modal .nikan-story-stage{z-index:1!important;}
html body .nikan-story-modal .nikan-story-nav{z-index:2!important;}
html body .nikan-story-modal .nikan-story-progress,
html body .nikan-story-modal .nikan-story-cta-wrap{z-index:5!important;}
html body .nikan-story-modal .nikan-story-close{
  z-index:10!important;
  pointer-events:auto!important;
}
body.nikan-story-lock #sepahan-ai-bot-root,
body.nikan-story-lock .sepahan-ai-bot-root,
body.nikan-story-lock .sepbot-fab,
body.nikan-story-lock .sepbot-window,
body.nikan-story-lock .nikan-contact-fab,
body.sepahan-product-lightbox-lock #sepahan-ai-bot-root,
body.sepahan-product-lightbox-lock .sepahan-ai-bot-root,
body.sepahan-product-lightbox-lock .sepbot-fab,
body.sepahan-product-lightbox-lock .sepbot-window,
body.sepahan-product-lightbox-lock .nikan-contact-fab{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* Elementor products 15 widget: easier horizontal scroll with 12-15 items. */
body .sepahan-products-15-viewport{
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-inline:contain!important;
  scroll-snap-type:x mandatory!important;
  scroll-behavior:smooth!important;
  touch-action:pan-x pan-y!important;
  cursor:grab!important;
}
body .sepahan-products-15-viewport.sepahan-is-dragging{
  cursor:grabbing!important;
}
body .sepahan-products-15-track{
  display:flex!important;
  flex-wrap:nowrap!important;
  transform:none!important;
  transition:none!important;
  will-change:scroll-position!important;
}
body .sepahan-products-15-slide{
  flex:0 0 100%!important;
  min-width:100%!important;
  scroll-snap-align:start!important;
}

/* Single product zoom trigger and lightbox. */
@media (min-width:769px){
  html body .sepahan-nikan-main-image{
    position:relative!important;
  }
  html body .sepahan-nikan-main-image img,
  html body .sepahan-nikan-thumb{
    cursor:zoom-in!important;
  }
  html body .sepahan-product-zoom-trigger{
    position:absolute!important;
    left:14px!important;
    bottom:14px!important;
    width:38px!important;
    height:38px!important;
    border:1px solid rgba(226,232,240,.95)!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.94)!important;
    color:#111827!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:0!important;
    box-shadow:0 10px 28px rgba(15,23,42,.14)!important;
    z-index:8!important;
    cursor:zoom-in!important;
  }
  html body .sepahan-product-zoom-trigger svg{
    width:19px!important;
    height:19px!important;
    display:block!important;
  }
  html body .sepahan-product-zoom-trigger:hover{
    background:#f8fafc!important;
    color:var(--sepahan-primary,#2563eb)!important;
    transform:translateY(-1px);
  }
}
@media (max-width:768px){
  html body .sepahan-product-zoom-trigger{display:none!important;}
}
html body .sepahan-product-lightbox{
  position:fixed!important;
  inset:0!important;
  z-index:2147483646!important;
  background:rgba(15,23,42,.88)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:30px 92px!important;
  opacity:0;
  pointer-events:none;
  visibility:hidden;
  transition:opacity .18s ease,visibility .18s ease!important;
  box-sizing:border-box!important;
}
html body .sepahan-product-lightbox.is-open{
  opacity:1!important;
  pointer-events:auto!important;
  visibility:visible!important;
}
html body .sepahan-product-lightbox[hidden]{display:none!important;}
html body .sepahan-product-lightbox-frame{
  width:min(92vw,980px)!important;
  height:min(82vh,760px)!important;
  max-width:980px!important;
  max-height:760px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#fff!important;
  border-radius:22px!important;
  padding:18px!important;
  box-shadow:0 28px 90px rgba(0,0,0,.42)!important;
  box-sizing:border-box!important;
}
html body .sepahan-product-lightbox-img,
html body .sepahan-product-lightbox img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:none!important;
  opacity:1;
  transition:opacity .16s ease!important;
}
html body .sepahan-product-lightbox-img.is-switching{
  opacity:.18!important;
}
html body .sepahan-product-lightbox-close,
html body .sepahan-product-lightbox-arrow{
  position:fixed!important;
  z-index:2147483647!important;
  border:0!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#111827!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  cursor:pointer!important;
  box-shadow:0 14px 34px rgba(0,0,0,.28)!important;
  padding:0!important;
  transition:background-color .16s ease,color .16s ease,transform .16s ease!important;
}
html body .sepahan-product-lightbox-close{
  top:24px!important;
  left:24px!important;
  width:46px!important;
  height:46px!important;
}
html body .sepahan-product-lightbox-arrow{
  top:50%!important;
  width:52px!important;
  height:52px!important;
  transform:translateY(-50%)!important;
}
html body .sepahan-product-lightbox-prev{right:24px!important;left:auto!important;}
html body .sepahan-product-lightbox-next{left:24px!important;right:auto!important;}
html body .sepahan-product-lightbox-close:hover,
html body .sepahan-product-lightbox-arrow:hover{
  background:var(--sepahan-primary,#2563eb)!important;
  color:#fff!important;
}
html body .sepahan-product-lightbox-arrow:hover{transform:translateY(-50%) scale(1.04)!important;}
html body .sepahan-product-lightbox-close svg,
html body .sepahan-product-lightbox-arrow svg{
  width:23px!important;
  height:23px!important;
  display:block!important;
}
html body .sepahan-product-lightbox.sepahan-lightbox-single .sepahan-product-lightbox-arrow{
  display:none!important;
}

/* Shop archive search icon should not overlap RTL placeholder/text. */
html body.post-type-archive-product .sepahan-filter-search,
html body.woocommerce-shop .sepahan-filter-search{
  position:relative!important;
}
html body.post-type-archive-product .sepahan-filter-search input[type="search"],
html body.post-type-archive-product .sepahan-filter-search input[type="text"],
html body.woocommerce-shop .sepahan-filter-search input[type="search"],
html body.woocommerce-shop .sepahan-filter-search input[type="text"]{
  padding-right:16px!important;
  padding-left:58px!important;
  text-align:right!important;
  direction:rtl!important;
  box-sizing:border-box!important;
}
html body.post-type-archive-product .sepahan-filter-search button,
html body.woocommerce-shop .sepahan-filter-search button{
  left:10px!important;
  right:auto!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  z-index:3!important;
}

/* Remove cart-icon hover text/tooltip and keep a subtle hover color change. */
html body .sepahan-card-actions .sepahan-card-btn-icon:hover::before,
html body .sepahan-card-actions .sepahan-card-btn-icon:hover::after,
html body.post-type-archive-product .sepahan-card-actions .sepahan-card-btn-icon:hover::before,
html body.post-type-archive-product .sepahan-card-actions .sepahan-card-btn-icon:hover::after{
  content:none!important;
  display:none!important;
}
html body .sepahan-card-actions .sepahan-card-btn-icon:hover{
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  color:#fff!important;
}


/* Top notice timer: keep the timer on the right and show Day > Hour > Minute > Second in RTL order. */
html body .sepahan-top-notice .sepahan-top-notice-inner,
html body #sepahan-top-notice .sepahan-top-notice-inner{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  direction:rtl!important;
}
html body .sepahan-top-notice .sepahan-top-notice-timer,
html body #sepahan-top-notice .sepahan-top-notice-timer{
  order:1!important;
  margin-left:auto!important;
  margin-right:0!important;
  justify-self:start!important;
  align-self:center!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  direction:rtl!important;
  text-align:right!important;
  unicode-bidi:isolate!important;
}
html body .sepahan-top-notice .sepahan-top-notice-text,
html body #sepahan-top-notice .sepahan-top-notice-text{
  order:2!important;
  flex:1 1 auto!important;
  text-align:center!important;
}
html body .sepahan-top-notice .sepahan-top-notice-btn,
html body #sepahan-top-notice .sepahan-top-notice-btn{
  order:3!important;
  margin-right:auto!important;
  margin-left:0!important;
}
html body .sepahan-top-notice .sepahan-top-notice-timer [data-timer-day]{order:1!important;}
html body .sepahan-top-notice .sepahan-top-notice-timer [data-timer-hour]{order:2!important;}
html body .sepahan-top-notice .sepahan-top-notice-timer [data-timer-min]{order:3!important;}
html body .sepahan-top-notice .sepahan-top-notice-timer [data-timer-sec]{order:4!important;}

/* Shop archive product layout options from Settings > Shop. Default 4 desktop / 2 mobile remains the original layout. */
@media (min-width:768px){
  body.sepahan-shop-layout-2-1.post-type-archive-product div.grid:has(> .sepahan-product-card){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:1.5rem!important;}
  body.sepahan-shop-layout-3-1.post-type-archive-product div.grid:has(> .sepahan-product-card),
  body.sepahan-shop-layout-3-2.post-type-archive-product div.grid:has(> .sepahan-product-card){grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1.25rem!important;}

  body.sepahan-shop-layout-2-1.post-type-archive-product .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-2-1.post-type-archive-product ul.products,
  body.sepahan-shop-layout-2-1.woocommerce-shop .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-2-1.woocommerce-shop ul.products{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:1.5rem!important;}

  body.sepahan-shop-layout-3-1.post-type-archive-product .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-3-1.post-type-archive-product ul.products,
  body.sepahan-shop-layout-3-1.woocommerce-shop .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-3-1.woocommerce-shop ul.products,
  body.sepahan-shop-layout-3-2.post-type-archive-product .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-3-2.post-type-archive-product ul.products,
  body.sepahan-shop-layout-3-2.woocommerce-shop .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-3-2.woocommerce-shop ul.products{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1.25rem!important;}

  body.sepahan-shop-layout-2-1.post-type-archive-product .sepahan-product-card .sepahan-product-img,
  body.sepahan-shop-layout-2-1.woocommerce-shop .sepahan-product-card .sepahan-product-img{height:auto!important;min-height:260px!important;max-height:none!important;padding:1rem!important;}
  body.sepahan-shop-layout-2-1.post-type-archive-product .sepahan-product-card .sepahan-product-img img,
  body.sepahan-shop-layout-2-1.woocommerce-shop .sepahan-product-card .sepahan-product-img img{max-height:260px!important;width:100%!important;height:auto!important;object-fit:contain!important;}

  body.sepahan-shop-layout-3-1.post-type-archive-product .sepahan-product-card .sepahan-product-img,
  body.sepahan-shop-layout-3-2.post-type-archive-product .sepahan-product-card .sepahan-product-img,
  body.sepahan-shop-layout-3-1.woocommerce-shop .sepahan-product-card .sepahan-product-img,
  body.sepahan-shop-layout-3-2.woocommerce-shop .sepahan-product-card .sepahan-product-img{height:auto!important;min-height:210px!important;max-height:none!important;padding:.95rem!important;}
  body.sepahan-shop-layout-3-1.post-type-archive-product .sepahan-product-card .sepahan-product-img img,
  body.sepahan-shop-layout-3-2.post-type-archive-product .sepahan-product-card .sepahan-product-img img,
  body.sepahan-shop-layout-3-1.woocommerce-shop .sepahan-product-card .sepahan-product-img img,
  body.sepahan-shop-layout-3-2.woocommerce-shop .sepahan-product-card .sepahan-product-img img{max-height:210px!important;width:100%!important;height:auto!important;object-fit:contain!important;}
}
@media (max-width:767px){
  body.sepahan-shop-layout-2-1.post-type-archive-product div.grid:has(> .sepahan-product-card),
  body.sepahan-shop-layout-3-1.post-type-archive-product div.grid:has(> .sepahan-product-card){grid-template-columns:repeat(1,minmax(0,1fr))!important;gap:1rem!important;}
  body.sepahan-shop-layout-3-2.post-type-archive-product div.grid:has(> .sepahan-product-card){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}

  body.sepahan-shop-layout-2-1.post-type-archive-product .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-2-1.post-type-archive-product ul.products,
  body.sepahan-shop-layout-2-1.woocommerce-shop .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-2-1.woocommerce-shop ul.products,
  body.sepahan-shop-layout-3-1.post-type-archive-product .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-3-1.post-type-archive-product ul.products,
  body.sepahan-shop-layout-3-1.woocommerce-shop .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-3-1.woocommerce-shop ul.products{display:grid!important;grid-template-columns:repeat(1,minmax(0,1fr))!important;gap:1rem!important;}

  body.sepahan-shop-layout-3-2.post-type-archive-product .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-3-2.post-type-archive-product ul.products,
  body.sepahan-shop-layout-3-2.woocommerce-shop .sepahan-products-grid ul.products,
  body.sepahan-shop-layout-3-2.woocommerce-shop ul.products{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}

  body.sepahan-shop-layout-2-1.post-type-archive-product .sepahan-product-card .sepahan-product-img,
  body.sepahan-shop-layout-3-1.post-type-archive-product .sepahan-product-card .sepahan-product-img,
  body.sepahan-shop-layout-2-1.woocommerce-shop .sepahan-product-card .sepahan-product-img,
  body.sepahan-shop-layout-3-1.woocommerce-shop .sepahan-product-card .sepahan-product-img{height:auto!important;min-height:260px!important;max-height:none!important;padding:.8rem!important;}
  body.sepahan-shop-layout-2-1.post-type-archive-product .sepahan-product-card .sepahan-product-img img,
  body.sepahan-shop-layout-3-1.post-type-archive-product .sepahan-product-card .sepahan-product-img img,
  body.sepahan-shop-layout-2-1.woocommerce-shop .sepahan-product-card .sepahan-product-img img,
  body.sepahan-shop-layout-3-1.woocommerce-shop .sepahan-product-card .sepahan-product-img img{max-height:300px!important;width:100%!important;height:auto!important;object-fit:contain!important;}

  body.sepahan-shop-layout-3-2.post-type-archive-product .sepahan-product-card .sepahan-product-img,
  body.sepahan-shop-layout-3-2.woocommerce-shop .sepahan-product-card .sepahan-product-img{height:auto!important;min-height:150px!important;max-height:none!important;padding:.65rem!important;}
  body.sepahan-shop-layout-3-2.post-type-archive-product .sepahan-product-card .sepahan-product-img img,
  body.sepahan-shop-layout-3-2.woocommerce-shop .sepahan-product-card .sepahan-product-img img{max-height:150px!important;width:100%!important;height:auto!important;object-fit:contain!important;}
}
body.sepahan-shop-layout-2-1.post-type-archive-product .sepahan-product-card,
body.sepahan-shop-layout-3-1.post-type-archive-product .sepahan-product-card,
body.sepahan-shop-layout-3-2.post-type-archive-product .sepahan-product-card,
body.sepahan-shop-layout-2-1.woocommerce-shop .sepahan-product-card,
body.sepahan-shop-layout-3-1.woocommerce-shop .sepahan-product-card,
body.sepahan-shop-layout-3-2.woocommerce-shop .sepahan-product-card{width:auto!important;float:none!important;margin:0!important;min-height:0!important;max-height:none!important;}
body.sepahan-shop-layout-2-1.post-type-archive-product .sepahan-product-card .sepahan-product-inner,
body.sepahan-shop-layout-3-1.post-type-archive-product .sepahan-product-card .sepahan-product-inner,
body.sepahan-shop-layout-3-2.post-type-archive-product .sepahan-product-card .sepahan-product-inner,
body.sepahan-shop-layout-2-1.woocommerce-shop .sepahan-product-card .sepahan-product-inner,
body.sepahan-shop-layout-3-1.woocommerce-shop .sepahan-product-card .sepahan-product-inner,
body.sepahan-shop-layout-3-2.woocommerce-shop .sepahan-product-card .sepahan-product-inner{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;max-height:none!important;}
body.sepahan-shop-layout-2-1.post-type-archive-product .sepahan-product-card .sepahan-product-body,
body.sepahan-shop-layout-3-1.post-type-archive-product .sepahan-product-card .sepahan-product-body,
body.sepahan-shop-layout-3-2.post-type-archive-product .sepahan-product-card .sepahan-product-body,
body.sepahan-shop-layout-2-1.woocommerce-shop .sepahan-product-card .sepahan-product-body,
body.sepahan-shop-layout-3-1.woocommerce-shop .sepahan-product-card .sepahan-product-body,
body.sepahan-shop-layout-3-2.woocommerce-shop .sepahan-product-card .sepahan-product-body{flex-grow:1!important;}
