/* EMKAN v109 — final interaction/stability refinements */
/* Desktop context/breadcrumb links must sit above decorative overlays. */
.emkan-context-bar,.podcast-context-bar,.store-context-bar,.product-toolbar{position:relative!important;isolation:isolate!important;z-index:10021!important;pointer-events:auto!important}
.emkan-context-path,.product-context-path,#podcastPath,#storeCategoryPath,#productPath,.v49-kicker{position:relative!important;z-index:10022!important;pointer-events:auto!important}
.emkan-context-path a.emkan-crumb,.product-context-path a.emkan-crumb,#podcastPath a.emkan-crumb,#storeCategoryPath a.emkan-crumb,#productPath a.emkan-crumb,.v49-kicker a.emkan-crumb{position:relative!important;z-index:10023!important;pointer-events:auto!important;cursor:pointer!important}
.emkan-context-path::before,.emkan-context-path::after,.product-context-path::before,.product-context-path::after{pointer-events:none!important}

/* Welcome: only mobile gets a slightly stronger, tighter EMKAN line drawing. */
@media(max-width:700px){.welcome{--line-width:1.46!important;--letter-gap:clamp(.7px,.24vw,1.7px)!important;--tight-factor:.40!important}}
@media(max-width:380px){.welcome{--line-width:1.42!important;--letter-gap:.65px!important;--tight-factor:.39!important}}

/* Course gallery = store-cover scale on desktop; mobile layout from v108 stays untouched. */
@media(min-width:621px){
  body.v90-education-item-page #contentApp .v106-course-gallery{width:min(100%,520px)!important;aspect-ratio:auto!important;grid-template-columns:calc(75% - 2px) calc(25% - 6px)!important;gap:8px!important;margin:18px auto 28px!important;align-items:stretch!important}
  body.v90-education-item-page #contentApp .v106-course-gallery-main{width:100%!important;height:auto!important;aspect-ratio:1!important;min-height:0!important}
  body.v90-education-item-page #contentApp .v106-course-gallery-thumbs{width:100%!important;height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:8px!important;align-content:stretch!important}
  body.v90-education-item-page #contentApp .v106-course-thumb{width:100%!important;height:100%!important;min-height:0!important;aspect-ratio:1!important;overflow:hidden!important}
  body.v90-education-item-page #contentApp .v106-course-thumb img{width:100%!important;height:100%!important;object-fit:cover!important}
  body.v90-education-item-page #contentApp .v106-course-actions{width:min(100%,520px)!important;margin-inline:auto!important;text-align:center!important;justify-content:center!important}
}

/* R&D covers: image stays clean; title exists only below. */
.research-page .category-glass,.research-page .category-overlay,.research-page .category-name,.research-page .category-overlay-line{display:none!important}
.research-page .category-media::after{display:none!important;content:none!important}
.research-page .category-caption{position:static!important;padding:9px 0 0!important;color:var(--fg)!important;text-shadow:none!important;pointer-events:none!important}
.research-page .category-caption-text{color:var(--fg)!important;text-shadow:none!important}

/* Store category mobile: two columns + explicit direction/alignment. */
@media(max-width:760px){.store-category-main .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:22px 12px!important}.store-category-nav{scrollbar-width:none}.store-category-nav::-webkit-scrollbar{display:none}}
@media(max-width:430px){.store-category-main .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
html[lang="fa"] .store-category-nav,html[lang="ar"] .store-category-nav{direction:rtl!important;text-align:right!important}html[lang="fa"] .store-category-nav a,html[lang="ar"] .store-category-nav a{justify-content:flex-start!important;text-align:right!important}html[lang="en"] .store-category-nav{direction:ltr!important;text-align:left!important}html[lang="en"] .store-category-nav a{justify-content:flex-start!important;text-align:left!important}
html[lang="fa"] .store-category-title-row,html[lang="fa"] .product-card-caption,html[lang="ar"] .store-category-title-row,html[lang="ar"] .product-card-caption{text-align:right!important;direction:rtl!important}html[lang="en"] .store-category-title-row,html[lang="en"] .product-card-caption{text-align:left!important;direction:ltr!important}
@media(hover:none),(pointer:coarse){.store-category-main .product-card-media img{filter:grayscale(0)!important;opacity:1!important}}

/* Keep related products dimensionally stable while a main product image swaps. */
.related,.related-products,#relatedProducts{min-height:150px;contain:layout}.related-item .related-media{aspect-ratio:1;overflow:hidden}.related-item .related-media img{width:100%;height:100%;object-fit:cover;display:block}
.product-main-image .product-main-swap{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}

/* Fullscreen/admin helpers. */
.production-users-link--floating{position:fixed;z-index:9998;inset-inline-end:14px;bottom:14px;padding:8px 10px;border:1px solid currentColor;background:var(--bg,#f7f8fa);color:var(--fg,#111);font:500 9px/1.2 Arial,sans-serif;text-decoration:none;opacity:.78}.production-users-link--floating:hover{opacity:1;color:var(--hover-accent,#2c5282)}
