
/* V154 - Force homepage to use the same semi-full desktop width as product pages */

:root{
  --v154-home-shell:1600px;
}

/* Large desktop */
@media(min-width:1500px){

  /* Core home containers */
  body:not(.admin-layout) .v117-home,
  body:not(.admin-layout) .home-page,
  body:not(.admin-layout) .home-main,
  body:not(.admin-layout) .v117-shell,
  body:not(.admin-layout) .v117-navrow,
  body:not(.admin-layout) .v117-featured > .v117-shell,
  body:not(.admin-layout) .v117-promos > .v117-shell,
  body:not(.admin-layout) .v117-news > .v117-shell,
  body:not(.admin-layout) .v117-categories > .v117-shell,
  body:not(.admin-layout) .v117-services > .v117-shell,
  body:not(.admin-layout) .v117-home section > .v117-shell{
    width:min(var(--v154-home-shell),calc(100% - 48px))!important;
    max-width:var(--v154-home-shell)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    box-sizing:border-box!important;
  }

  /* Header/menu content should visually line up with home sections */
  body:not(.admin-layout) .v117-header .v117-shell,
  body:not(.admin-layout) .v117-nav-wrap .v117-shell,
  body:not(.admin-layout) .site-header .v117-shell{
    width:min(var(--v154-home-shell),calc(100% - 48px))!important;
    max-width:var(--v154-home-shell)!important;
  }

  /* Featured products: force real 5-column grid */
  body:not(.admin-layout) .v117-featured .v117-product-grid,
  body:not(.admin-layout) .v117-home .v117-product-grid,
  body:not(.admin-layout) .home-page .v117-product-grid{
    width:100%!important;
    max-width:none!important;
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:17px!important;
  }

  /* Make category/promo/news grids expand with the new width */
  body:not(.admin-layout) .v117-category-grid,
  body:not(.admin-layout) .v117-promo-grid,
  body:not(.admin-layout) .v117-news-grid,
  body:not(.admin-layout) .v117-service-grid{
    width:100%!important;
    max-width:none!important;
  }

  /* Hero/banner may span naturally; inner content stays aligned */
  body:not(.admin-layout) .v117-hero,
  body:not(.admin-layout) .home-hero{
    width:100%!important;
    max-width:none!important;
  }

  body:not(.admin-layout) .v117-hero .v117-shell,
  body:not(.admin-layout) .home-hero .v117-shell{
    width:min(var(--v154-home-shell),calc(100% - 48px))!important;
    max-width:var(--v154-home-shell)!important;
  }
}

/* Standard desktop: still wider than old 1180 */
@media(min-width:1200px) and (max-width:1499px){
  body:not(.admin-layout) .v117-home,
  body:not(.admin-layout) .home-page,
  body:not(.admin-layout) .home-main,
  body:not(.admin-layout) .v117-shell,
  body:not(.admin-layout) .v117-navrow,
  body:not(.admin-layout) .v117-featured > .v117-shell,
  body:not(.admin-layout) .v117-promos > .v117-shell,
  body:not(.admin-layout) .v117-news > .v117-shell,
  body:not(.admin-layout) .v117-categories > .v117-shell,
  body:not(.admin-layout) .v117-services > .v117-shell{
    width:calc(100% - 40px)!important;
    max-width:1380px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  body:not(.admin-layout) .v117-featured .v117-product-grid,
  body:not(.admin-layout) .v117-home .v117-product-grid,
  body:not(.admin-layout) .home-page .v117-product-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}

/* Tablet */
@media(min-width:768px) and (max-width:1199px){
  body:not(.admin-layout) .v117-featured .v117-product-grid,
  body:not(.admin-layout) .v117-home .v117-product-grid,
  body:not(.admin-layout) .home-page .v117-product-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

/* Mobile */
@media(max-width:767px){
  body:not(.admin-layout) .v117-featured .v117-product-grid,
  body:not(.admin-layout) .v117-home .v117-product-grid,
  body:not(.admin-layout) .home-page .v117-product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
