/* ==========================================================
   Store.Toolsheep V40 — Layout Balance
   Goal: marketplace-density Featured shelf + balanced 4+2 Solution composition
   ========================================================== */

/* DESKTOP -------------------------------------------------- */
@media (min-width:1025px){
  /* FEATURED PRODUCTS = 6-up, exactly one row.
     12-column logic: each card spans 2 columns. */
  .stsh-v2-root .stsh-v27-panel ul.products{
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:16px!important;
  }
  .stsh-v2-root .stsh-v27-panel ul.products li.product{
    min-width:0!important;
    width:auto!important;
  }
  .stsh-v2-root .stsh-v27-panel ul.products li.product img{
    height:160px!important;
    padding:8px!important;
    margin-bottom:8px!important;
    object-fit:contain!important;
  }
  .stsh-v2-root .stsh-v27-panel .woocommerce-loop-product__title{
    min-height:38px!important;
    height:38px!important;
    margin:0 10px 8px!important;
    font-size:11px!important;
    line-height:1.45!important;
  }
  .stsh-v2-root .stsh-v27-panel .price{
    margin:0 10px 10px!important;
    font-size:12.5px!important;
  }
  .stsh-v2-root .stsh-v27-panel li.product>.button,
  .stsh-v2-root .stsh-v27-panel li.product>a.button{
    height:36px!important;
    min-height:36px!important;
    margin-left:10px!important;
    margin-right:10px!important;
    font-size:10px!important;
  }

  /* SOLUTION = 4 cards in row 1 + 2 cards centered in row 2.
     All cards retain identical width: 3/12 columns each. */
  .stsh-v2-root .stsh-v26-solution-grid{
    display:grid!important;
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    gap:16px!important;
  }
  .stsh-v2-root .stsh-v26-solution-card{
    grid-column:span 3!important;
    min-width:0!important;
    min-height:120px!important;
    padding:20px!important;
  }
  .stsh-v2-root .stsh-v26-solution-card:nth-child(5){
    grid-column:4 / span 3!important;
  }
  .stsh-v2-root .stsh-v26-solution-card:nth-child(6){
    grid-column:7 / span 3!important;
  }
}

/* TABLET --------------------------------------------------- */
@media (min-width:768px) and (max-width:1024px){
  /* 8-column tablet rhythm: 4-up product cards */
  .stsh-v2-root .stsh-v27-panel ul.products{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:16px!important;
  }

  /* Solution becomes 2-up for legibility */
  .stsh-v2-root .stsh-v26-solution-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:16px!important;
  }
  .stsh-v2-root .stsh-v26-solution-card,
  .stsh-v2-root .stsh-v26-solution-card:nth-child(5),
  .stsh-v2-root .stsh-v26-solution-card:nth-child(6){
    grid-column:auto!important;
  }
}

/* MOBILE --------------------------------------------------- */
@media (max-width:767px){
  /* Keep proven 2-up product grid on mobile */
  .stsh-v2-root .stsh-v27-panel ul.products{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }

  /* Keep Solution as the compact swipe rail already established in V35/V39. */
  .stsh-v2-root .stsh-v26-solution-card:nth-child(5),
  .stsh-v2-root .stsh-v26-solution-card:nth-child(6){
    grid-column:auto!important;
  }
}
