/* Aftabgardoon v2.4.0 – compact category tiles and universal internal sidebar. */

/* Category landing: the sidebar starts directly below the site header and the
   compact category tiles live in the content column beside it. */
.a-category-landing{padding-top:28px}
.a-category-main{
 display:grid;
 grid-template-columns:260px minmax(0,1fr);
 grid-template-areas:
  "sidebar heading"
  "sidebar cards"
  "sidebar products";
 column-gap:24px;
 row-gap:0;
 align-items:start;
 margin-top:0;
 direction:rtl;
}
.a-category-main.no-sidebar{
 grid-template-columns:minmax(0,1fr);
 grid-template-areas:"heading" "cards" "products";
}
.a-category-heading{grid-area:heading;margin:0 0 18px}
.a-category-card-grid{
 grid-area:cards;
 display:grid;
 grid-template-columns:repeat(var(--a-card-count),minmax(88px,116px));
 justify-content:start;
 gap:12px;
 overflow-x:auto;
 padding:3px 2px 21px;
}
.a-category-card{min-width:88px}
.a-category-card img,.a-category-card-placeholder{border-radius:16px}
.a-category-card b{margin-top:7px;font-size:11px}
.a-category-main>.a-brand-sidebar{grid-area:sidebar;top:18px}
.a-category-main>.a-category-products{grid-area:products}

/* Universal sidebar is emitted for every internal page and mounted beside the
   theme's main wrapper by aftab.js. It stays hidden until mounting completes. */
.a-global-sidebar-source{display:none;min-width:0}
.a-global-sidebar-source.is-mounted{display:block;grid-area:sidebar;align-self:start;position:sticky;top:18px;z-index:3}
.a-global-sidebar-source .elementor,.a-global-sidebar-source .elementor-element,.a-global-sidebar-source .e-con,.a-global-sidebar-source .e-con-inner{max-width:none!important;width:100%!important;margin:0!important;padding:0!important}
.a-global-sidebar-source .elementor-widget-container{width:100%}
.a-global-sidebar-source .a-brand-sidebar{position:static;top:auto;width:100%}
.a-universal-page-shell{
 display:grid;
 grid-template-columns:260px minmax(0,1fr);
 grid-template-areas:"sidebar content";
 align-items:start;
 gap:24px;
 width:min(100% - 32px,1320px);
 max-width:1320px;
 margin:24px auto 60px;
 direction:rtl;
}
.a-universal-page-shell>.main-page-wrapper,.a-universal-page-shell>main,.a-universal-page-shell>.site-content,.a-universal-page-shell>.a-universal-content-target{
 grid-area:content;
 min-width:0!important;
 width:100%!important;
 max-width:100%!important;
 margin:0!important;
}
.a-universal-page-shell .main-page-wrapper>.container,.a-universal-page-shell .site-content>.container{width:100%!important;max-width:none!important;padding-right:0!important;padding-left:0!important}

/* Do not create a second column on category landing pages: their editable
   Elementor widget already contains the page-specific sidebar. */
body.aftab-category-sidebar-present>.a-global-sidebar-source{display:none!important}

@media(max-width:1200px){
 .a-category-main,.a-universal-page-shell{grid-template-columns:225px minmax(0,1fr);gap:18px}
 .a-category-card-grid{grid-template-columns:repeat(var(--a-card-count),106px)}
}

@media(max-width:767px){
 .a-category-main{
  grid-template-columns:minmax(0,1fr);
  grid-template-areas:"heading" "cards" "sidebar" "products";
  gap:0;
 }
 .a-category-main>.a-brand-sidebar{position:static;margin:0 0 18px;width:100%}
 .a-category-card-grid{grid-template-columns:repeat(var(--a-card-count),96px);gap:9px;margin-left:-16px;margin-right:-16px;padding:3px 16px 17px}
 .a-category-card{min-width:96px}
 .a-category-card b{font-size:10px}
 .a-universal-page-shell{display:flex;flex-direction:column;width:min(100% - 24px,1320px);gap:16px;margin-top:16px}
 .a-global-sidebar-source.is-mounted{position:static;order:0;width:100%}
 .a-universal-page-shell>.main-page-wrapper,.a-universal-page-shell>main,.a-universal-page-shell>.site-content,.a-universal-page-shell>.a-universal-content-target{order:1}
 .a-global-sidebar-source .a-brand-list{display:none}
 .a-global-sidebar-source .a-brand-sidebar.is-open .a-brand-list{display:grid}
}
