/* NayabBazar storefront repair layer — 2026-08-30
   Purpose: restore the proven storefront layout after the experimental UI pass,
   keep one consistent global header, prevent horizontal overflow, and retain
   the SEO/performance changes without redesigning established sections. */

:root{
  --nb-repair-green:var(--theme-primary,#168247);
  --nb-repair-ink:#1f2822;
  --nb-repair-muted:#68736b;
  --nb-repair-line:#e2e9e4;
}

/* ----- One header everywhere ----- */
body.nb-has-global-mobile-header .nb-global-store-header{display:block!important}
body.nb-has-global-mobile-header .wrapper>header,
body.nb-has-global-mobile-header .wrapper>.mn-sidebar,
body.nb-has-global-mobile-header .wrapper>.mn-sidebar-overlay,
body.nb-has-global-mobile-header .mn-footer-nav{display:none!important}

@media(min-width:992px){
  body.nb-has-global-mobile-header{padding-top:0!important}
  .nb-global-desktop-header{position:sticky!important;top:0!important;z-index:2147482000!important}
}

/* ----- Keep every storefront page inside the viewport ----- */
html,body{max-width:100%;overflow-x:clip}
.wrapper,.mn-main-content,.premium-home-content,.nb-storefront-shell,
.nb-global-store-header,.mn-shop,.mn-single-product,.nb-mobile-product,
.mobile-home-sections,.mobile-shop-categories,.premium-home-sections{
  max-width:100%!important;box-sizing:border-box!important
}
.row{max-width:100%}
img,svg,video,canvas{max-width:100%}
.mn-main-content *,.premium-home-content *,.nb-mobile-product *{box-sizing:border-box}

/* Long imported product/category/brand names must wrap rather than widen the page. */
.mn-main-content :is(h1,h2,h3,h4,h5,h6,p,span,strong,small,a,button,label),
.premium-home-content :is(h1,h2,h3,h4,h5,h6,p,span,strong,small,a,button,label),
.nb-global-drawer :is(a,span,strong,summary){min-width:0;overflow-wrap:anywhere}

/* ----- Restore normal black storefront links ----- */
.mn-main-content a:not(.mn-btn-1):not(.mn-btn-2):not(.btn):not(.nb-main-buy-button),
.premium-home-content a:not(.mn-btn-1):not(.mn-btn-2):not(.btn),
.catalog-product-card a,
.mn-product-card a,
.nb-mobile-product a,
.nb-global-drawer a,
.nb-global-desktop-nav a{
  color:var(--nb-repair-ink)!important;
  text-decoration:none
}
.mn-main-content a:hover,.premium-home-content a:hover,.catalog-product-card a:hover,
.mn-product-card a:hover,.nb-mobile-product a:hover,.nb-global-drawer a:hover,
.nb-global-desktop-nav a:hover{color:var(--nb-repair-green)!important}

/* Preserve white text inside green/orange action buttons. */
.mn-btn-1,.mn-btn-1 span,.mn-btn-2,.mn-btn-2 span,.btn-primary,.btn-primary span,
.nb-main-buy-button,.nb-main-buy-button span,.nb-mobile-purchase-button,.nb-mobile-purchase-button span,
.catalog-cart-button,.catalog-cart-button span{color:#fff!important}

/* ----- Homepage: restore safe widths and the full banner image ----- */
body.is-premium-home .premium-home-content{
  width:min(1380px,calc(100% - 24px))!important;
  margin-inline:auto!important;
  box-sizing:border-box!important
}
.premium-home-hero,.premium-home-hero .mn-hero-slider,.premium-home-hero .owl-stage-outer,
.premium-home-hero .owl-stage,.premium-home-hero .owl-item,.premium-home-hero .mn-hero-slide,
.premium-home-hero .nb-hero-picture{width:100%!important;max-width:100%!important}
.premium-home-hero .nb-hero-picture{position:absolute!important;inset:0!important;display:block!important;height:100%!important}
.premium-home-hero .mn-hero-slide{background-color:#eef3ef!important;background-image:var(--nb-hero-desktop,none)!important;background-repeat:no-repeat!important;background-position:center!important;background-size:contain!important}
.premium-home-hero .mobile-hero-image{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  max-width:none!important;object-fit:contain!important;object-position:center!important;background:#eef3ef!important
}
.home-category-grid,.home-brands-grid,.mobile-category-grid,.mobile-brands-grid{width:100%!important;max-width:100%!important;min-width:0!important}
.home-category-card,.mobile-category-card,.home-brand-card,.mobile-brand-card{min-width:0!important;max-width:100%!important}

@media(max-width:767.98px){
  body.is-premium-home .premium-home-content{width:100%!important;max-width:100%!important;padding-left:8px!important;padding-right:8px!important}
  .premium-home-hero{width:100%!important;margin-left:0!important;margin-right:0!important}
  .home-category-grid,.mobile-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .home-brands-grid,.mobile-brands-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

/* ----- Product page ----- */
body.nb-product-page .nb-mobile-product{width:100%!important;max-width:100%!important;overflow:visible!important}
body.nb-product-page .nb-mobile-purchase-bar{
  background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;
  padding:0!important
}
body.nb-product-page .nb-mobile-purchase-action{background:transparent!important}
body.nb-product-page .nb-mobile-advance-text,
body.nb-product-page .nb-import-advance-text{
  background:transparent!important;border:0!important;box-shadow:none!important;color:#365545!important
}

/* Gallery must always show the selected slide and never collapse to a blank white panel. */
.nb-mobile-gallery,.nb-mobile-gallery-track,.nb-mobile-gallery-slide{max-width:100%!important}
.nb-mobile-gallery-track{width:100%!important}
.nb-mobile-gallery-slide{min-width:100%!important;width:100%!important}
.nb-mobile-gallery-slide img,.nb-mobile-gallery-picture{visibility:visible!important;opacity:1!important}
.nb-mobile-gallery-thumbs{max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none}
.nb-mobile-gallery-thumbs::-webkit-scrollbar{display:none}

/* Compact brand strip requested on product pages. */
.nb-mobile-product .nb-mobile-brand-card{min-height:0!important}
.nb-mobile-product .nb-mobile-brand-main>small{display:none!important}

/* ----- Brand/listing sections: restore clean, uncropped cards ----- */
.mn-shop,.mn-shop .row,.mn-product-row,.catalog-grid,.brands-grid,.brand-grid{min-width:0!important;max-width:100%!important}
.mn-product-card,.catalog-product-card,.brand-card,.home-brand-card{min-width:0!important;overflow:hidden}
.catalog-card-title,.catalog-card-title a,.mn-product-name,.mn-product-name a{color:var(--nb-repair-ink)!important}

/* ----- Mobile menu: clean light drawer, no old dark sidebar ----- */
@media(max-width:991.98px){
  .nb-global-drawer{background:#fff!important;color:var(--nb-repair-ink)!important}
  .nb-global-drawer-head{background:linear-gradient(135deg,#f1f8ee 0%,#fff8ed 100%)!important}
  .nb-global-drawer-links>a,.nb-global-category-group summary,.nb-global-category-group div>a{
    color:var(--nb-repair-ink)!important;border-radius:10px!important
  }
  .nb-global-drawer-links>a:hover,.nb-global-category-group summary:hover,.nb-global-category-group div>a:hover{
    background:#f3f8f3!important;color:var(--nb-repair-green)!important
  }
  .nb-global-category-group>div{border-left-color:#e2eee4!important}
}

/* Never let fixed support/chat controls widen the viewport. */
.nb-ai-contact,.vp-whatsapp-swipe-widget{max-width:calc(100vw - 12px)!important}


/* 2026-08-31 hard repair: the product gallery uses transform navigation, never a nested horizontal scroller. */
@media(max-width:991.98px){
  body.nb-product-page .nb-mobile-gallery{width:calc(100% - 12px)!important;margin-left:6px!important;margin-right:6px!important;touch-action:pan-y pinch-zoom!important}
  body.nb-product-page .nb-mobile-gallery-track{overflow:visible!important;scroll-snap-type:none!important;scroll-behavior:auto!important;overscroll-behavior:auto!important;touch-action:pan-y pinch-zoom!important}
  body.nb-product-page .nb-mobile-gallery-slide,body.nb-product-page .nb-mobile-gallery-slide img{touch-action:pan-y pinch-zoom!important}
}
/* Preserve the complete banner artwork instead of cropping it. */
@media(min-width:768px){
  body.is-premium-home .premium-home-hero{height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:1530/400!important}
}
@media(max-width:767.98px){
  body.is-premium-home .premium-home-hero{height:auto!important;min-height:185px!important;max-height:none!important;aspect-ratio:1.45/1!important}
  body.is-premium-home .premium-home-hero .mn-hero-slide{background-image:var(--nb-hero-mobile,var(--nb-hero-desktop,none))!important}
  body.is-premium-home .premium-home-hero .mobile-hero-image{object-fit:contain!important}
}
