/* TradesFolks 18.4.99 — Product Section Compact Footer + Mobile QA
   Applies to Featured marketplace opportunities and Trending products. */

/* ---------- shared section rhythm ---------- */
.tf-homepage .marketplace-products,
.tf-homepage .trending-products{
  padding-top:8px!important;
  padding-bottom:10px!important;
  margin-top:0!important;
  margin-bottom:0!important;
}
.tf-homepage .marketplace-products>.shell,
.tf-homepage .trending-products>.shell{
  width:calc(100% - 20px)!important;
  max-width:none!important;
  margin-inline:auto!important;
  padding-top:0!important;
  padding-bottom:0!important;
}
.tf-homepage .marketplace-products .curated-products-head,
.tf-homepage .trending-products .trending-products-head{
  margin-top:0!important;
  margin-bottom:7px!important;
  padding-top:0!important;
  padding-bottom:0!important;
}

/* ---------- desktop: shorter yellow name band ---------- */
.tf-homepage .marketplace-products .tf-featured-opportunity-body,
.tf-homepage .trending-products .tf-featured-opportunity-body{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  flex-basis:50px!important;
  min-height:50px!important;
  height:50px!important;
  max-height:50px!important;
  padding:6px 9px 7px!important;
  box-sizing:border-box!important;
}
.tf-homepage .marketplace-products .tf-featured-opportunity-body h3,
.tf-homepage .trending-products .tf-featured-opportunity-body h3{
  display:block!important;
  width:100%!important;
  min-height:15px!important;
  max-height:18px!important;
  margin:0!important;
  overflow:hidden!important;
  color:#0b2343!important;
  font-size:9.5px!important;
  font-weight:900!important;
  line-height:1.1!important;
  text-align:center!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}
.tf-homepage .marketplace-products .tf-featured-opportunity-body:after,
.tf-homepage .trending-products .tf-featured-opportunity-body:after{
  width:24px!important;
  height:3px!important;
  margin-top:5px!important;
  border-radius:999px!important;
}

/* tighter grid spacing */
.tf-homepage .marketplace-products .featured-twelve-grid,
.tf-homepage .trending-products .trending-twelve-grid{
  gap:8px!important;
  margin-top:0!important;
  margin-bottom:0!important;
}

/* image/card balance */
.tf-homepage .marketplace-products .tf-featured-opportunity-card,
.tf-homepage .trending-products .tf-featured-opportunity-card{
  min-height:0!important;
}
.tf-homepage .marketplace-products .tf-featured-opportunity-media,
.tf-homepage .trending-products .tf-featured-opportunity-media{
  background:#fff!important;
}

/* large desktop */
@media(min-width:1536px){
  .tf-homepage .marketplace-products,
  .tf-homepage .trending-products{
    padding-top:8px!important;
    padding-bottom:11px!important;
  }
  .tf-homepage .marketplace-products .tf-featured-opportunity-body,
  .tf-homepage .trending-products .tf-featured-opportunity-body{
    flex-basis:52px!important;
    min-height:52px!important;
    height:52px!important;
    max-height:52px!important;
  }
}

/* laptop */
@media(min-width:1024px) and (max-width:1535px){
  .tf-homepage .marketplace-products .tf-featured-opportunity-body,
  .tf-homepage .trending-products .tf-featured-opportunity-body{
    flex-basis:46px!important;
    min-height:46px!important;
    height:46px!important;
    max-height:46px!important;
    padding:5px 7px 6px!important;
  }
  .tf-homepage .marketplace-products .tf-featured-opportunity-body h3,
  .tf-homepage .trending-products .tf-featured-opportunity-body h3{
    font-size:8.5px!important;
  }
}

/* ---------- mobile QA ---------- */
@media(max-width:699px){
  .tf-homepage .marketplace-products,
  .tf-homepage .trending-products{
    padding:7px 0 9px!important;
    overflow:hidden!important;
  }
  .tf-homepage .marketplace-products>.shell,
  .tf-homepage .trending-products>.shell{
    width:100%!important;
    max-width:none!important;
    padding:0 8px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  /* heading: no oversized blank area, CTA stays within viewport */
  .tf-homepage .marketplace-products .curated-products-head,
  .tf-homepage .trending-products .trending-products-head{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:end!important;
    gap:4px 7px!important;
    margin:0 0 7px!important;
  }
  .tf-homepage .marketplace-products .curated-products-head>div,
  .tf-homepage .trending-products .trending-products-head>div{
    min-width:0!important;
  }
  .tf-homepage .marketplace-products .curated-products-head .eyebrow,
  .tf-homepage .trending-products .trending-products-head .eyebrow{
    font-size:6.5px!important;
    line-height:1!important;
  }
  .tf-homepage .marketplace-products .curated-products-head h2,
  .tf-homepage .trending-products .trending-products-head h2{
    margin-top:3px!important;
    font-size:17px!important;
    line-height:1.02!important;
    letter-spacing:-.035em!important;
  }
  .tf-homepage .marketplace-products .curated-products-head .section-copy,
  .tf-homepage .trending-products .trending-products-head .section-copy{
    margin-top:3px!important;
    font-size:6.8px!important;
    line-height:1.25!important;
  }
  .tf-homepage .marketplace-products .curated-products-head>a,
  .tf-homepage .trending-products .trending-products-head>a{
    align-self:center!important;
    min-height:28px!important;
    height:28px!important;
    max-width:112px!important;
    padding:0 8px!important;
    overflow:hidden!important;
    border-radius:9px!important;
    font-size:6.2px!important;
    white-space:nowrap!important;
  }

  /* true responsive 2-column grid; remove horizontal/partial-card behavior */
  .tf-homepage .marketplace-products .featured-twelve-grid,
  .tf-homepage .trending-products .trending-twelve-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    gap:7px!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    transform:none!important;
  }
  .tf-homepage .marketplace-products .tf-featured-opportunity-card,
  .tf-homepage .trending-products .tf-featured-opportunity-card{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    border-radius:12px!important;
    overflow:hidden!important;
  }

  .tf-homepage .marketplace-products .tf-featured-opportunity-media,
  .tf-homepage .trending-products .tf-featured-opportunity-media{
    flex-basis:132px!important;
    height:132px!important;
    min-height:132px!important;
    max-height:132px!important;
    padding:3px!important;
  }
  .tf-homepage .marketplace-products .tf-featured-opportunity-media img,
  .tf-homepage .trending-products .tf-featured-opportunity-media img{
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
  }

  /* much shorter yellow footer on mobile */
  .tf-homepage .marketplace-products .tf-featured-opportunity-body,
  .tf-homepage .trending-products .tf-featured-opportunity-body{
    flex-basis:42px!important;
    min-height:42px!important;
    height:42px!important;
    max-height:42px!important;
    padding:5px 6px!important;
  }
  .tf-homepage .marketplace-products .tf-featured-opportunity-body h3,
  .tf-homepage .trending-products .tf-featured-opportunity-body h3{
    min-height:13px!important;
    max-height:14px!important;
    font-size:7.4px!important;
    line-height:1.05!important;
  }
  .tf-homepage .marketplace-products .tf-featured-opportunity-body:after,
  .tf-homepage .trending-products .tf-featured-opportunity-body:after{
    width:20px!important;
    height:2.5px!important;
    margin-top:4px!important;
  }

  /* controls scaled down to avoid crowding */
  .tf-homepage .marketplace-products .tf-featured-opportunity-media>.tf-featured-card-tools,
  .tf-homepage .trending-products .tf-featured-opportunity-media>.tf-featured-card-tools{
    top:5px!important;
    right:5px!important;
    gap:4px!important;
  }
  .tf-homepage .marketplace-products .tf-featured-tool,
  .tf-homepage .marketplace-products .tf-featured-card-tools>*,
  .tf-homepage .trending-products .tf-featured-tool,
  .tf-homepage .trending-products .tf-featured-card-tools>*{
    width:22px!important;
    height:22px!important;
    min-width:22px!important;
    min-height:22px!important;
    max-width:22px!important;
    max-height:22px!important;
    flex-basis:22px!important;
  }
  .tf-homepage .marketplace-products .tf-featured-tool svg,
  .tf-homepage .marketplace-products .tf-featured-card-tools>* svg,
  .tf-homepage .trending-products .tf-featured-tool svg,
  .tf-homepage .trending-products .tf-featured-card-tools>* svg{
    width:10px!important;
    height:10px!important;
  }
}

/* very small phones: still 2 compact columns rather than one oversized card */
@media(max-width:380px){
  .tf-homepage .marketplace-products>.shell,
  .tf-homepage .trending-products>.shell{
    padding-inline:6px!important;
  }
  .tf-homepage .marketplace-products .featured-twelve-grid,
  .tf-homepage .trending-products .trending-twelve-grid{
    gap:6px!important;
  }
  .tf-homepage .marketplace-products .tf-featured-opportunity-media,
  .tf-homepage .trending-products .tf-featured-opportunity-media{
    flex-basis:116px!important;
    height:116px!important;
    min-height:116px!important;
    max-height:116px!important;
  }
  .tf-homepage .marketplace-products .curated-products-head h2,
  .tf-homepage .trending-products .trending-products-head h2{
    font-size:15.5px!important;
  }
}
