/* 5 Star v2.3 two sponsor blocks; eight visible cards each and product content between. */
#fss-layout-v21-prefooter { box-sizing:border-box;width:100%;max-width:100%;background:#f5f7fb;padding:12px clamp(12px,2.5vw,30px) 28px;clear:both; }
#fss-layout-v21-prefooter > * {box-sizing:border-box;max-width:1320px!important;width:100%;margin:18px auto!important;}
#fss-layout-v21-prefooter :is(.fsscj-offers,.fsspf-showcase,.fstar-onstore-section,.fss-fresh){border-radius:12px;overflow:hidden;}
#fss-layout-v21-prefooter :is(.fsscj-offers,.fsspf-showcase){padding:19px!important;background:#fff;border:1px solid #dce3ed;}
/* Keep the approved 25-across-five and 16-across-four composition. */
#fss-layout-v21-prefooter .fstar-products-grid.fstar-products-five{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:12px!important;}
#fss-layout-v21-prefooter .fstar-products-grid.fstar-products-four{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;}
#fss-layout-v21-prefooter .fstar-onstore-card{box-sizing:border-box;min-width:0;max-width:100%;overflow:hidden;}
#fss-layout-v21-prefooter .fstar-onstore-image{display:flex;align-items:center;justify-content:center;height:175px!important;min-height:0!important;max-height:175px!important;overflow:hidden;}
#fss-layout-v21-prefooter .fstar-onstore-image img{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:175px!important;min-height:0!important;object-fit:contain!important;}
#fss-layout-v21-prefooter .fstar-onstore-title{font-size:13px!important;line-height:1.3!important;overflow-wrap:anywhere;}
#fss-layout-v21-prefooter .fstar-onstore-info{min-width:0;}
/* Main homepage six: preserve original column layout; cap runaway images without enlarging parent tiles. */
body.home #fss-featured .fss-products-grid img{max-height:190px!important;max-width:100%!important;width:auto!important;height:auto!important;object-fit:contain!important;}
body.home #fss-featured .fss-products-grid>*{min-width:0;max-width:100%;}
/* Featured Offers: eight visible cards, four by two on desktop. */
#fss-layout-v21-prefooter .fsscj-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;}
#fss-layout-v21-prefooter .fsscj-card{min-width:0;max-width:100%;box-sizing:border-box;background:#fff;}
#fss-layout-v21-prefooter .fsscj-card-media{display:flex!important;align-items:center;justify-content:center;min-height:0!important;height:185px!important;max-height:185px!important;overflow:hidden;}
#fss-layout-v21-prefooter .fsscj-banner{width:100%!important;height:100%!important;max-width:100%!important;max-height:185px!important;object-fit:contain!important;}
/* Eight visible advertiser panels: four across, two rows, only verified CJ creatives. */
#fss-layout-v21-prefooter .fss-layout-v21-extra-ads{background:#fff;border:1px solid #dce3ed;padding:19px!important;}
#fss-layout-v21-prefooter .fss-fresh-ad-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;}
#fss-layout-v21-prefooter .fss-fresh-ad{display:flex;flex-direction:column;align-items:stretch;min-width:0;max-width:100%;padding:10px!important;border:1px solid #dce3ed;border-radius:9px;text-decoration:none;background:#fff;}
#fss-layout-v21-prefooter .fss-fresh-ad img{display:block;width:100%!important;height:165px!important;max-height:165px!important;min-height:0!important;object-fit:contain!important;}
#fss-layout-v21-prefooter .fss-fresh-ad-name{font-size:12px!important;line-height:1.35!important;padding:8px 2px!important;overflow-wrap:anywhere;}
#fss-layout-v21-prefooter .fss-fresh-ad-text{display:flex;min-height:165px;align-items:center;justify-content:center;text-align:center;padding:16px;color:#173769;font-size:14px;font-weight:700;}
/* Eight store discoveries between sponsored blocks. */
#fss-layout-v21-prefooter .fss-fresh{padding:22px 18px!important;}
#fss-layout-v21-prefooter .fss-fresh-product-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;}
#fss-layout-v21-prefooter .fss-fresh-product{min-width:0;max-width:100%;}
#fss-layout-v21-prefooter .fss-fresh-product img{display:block;width:100%!important;height:170px!important;max-height:170px!important;min-height:0!important;object-fit:contain!important;}
#fss-layout-v21-prefooter .fss-fresh-product-name{font-size:13px!important;line-height:1.4!important;overflow-wrap:anywhere;}
#fss-layout-v21-prefooter .fsspf-grid,#fss-layout-v21-prefooter .fssx-v24-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:13px!important;}
#fss-layout-v21-prefooter .fsspf-media img,#fss-layout-v21-prefooter .fssx-v24-photo img{display:block;width:100%!important;height:185px!important;max-height:185px!important;min-height:0!important;object-fit:contain!important;}
@media(max-width:970px){
 #fss-layout-v21-prefooter .fstar-products-grid.fstar-products-five{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
 #fss-layout-v21-prefooter .fstar-products-grid.fstar-products-four,#fss-layout-v21-prefooter .fss-fresh-ad-grid,#fss-layout-v21-prefooter .fss-fresh-product-grid,#fss-layout-v21-prefooter .fsspf-grid,#fss-layout-v21-prefooter .fssx-v24-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 #fss-layout-v21-prefooter .fsscj-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:580px){
 #fss-layout-v21-prefooter{padding:8px 10px 18px;}
 #fss-layout-v21-prefooter .fstar-products-grid.fstar-products-five,#fss-layout-v21-prefooter .fstar-products-grid.fstar-products-four,#fss-layout-v21-prefooter .fss-fresh-ad-grid,#fss-layout-v21-prefooter .fss-fresh-product-grid,#fss-layout-v21-prefooter .fsspf-grid,#fss-layout-v21-prefooter .fssx-v24-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;}
 #fss-layout-v21-prefooter .fsscj-grid{grid-template-columns:1fr!important;}
 #fss-layout-v21-prefooter .fstar-onstore-image{height:140px!important;max-height:140px!important;}
 #fss-layout-v21-prefooter .fstar-onstore-image img,#fss-layout-v21-prefooter .fss-fresh-product img,#fss-layout-v21-prefooter .fss-fresh-ad img{height:140px!important;max-height:140px!important;}
 #fss-layout-v21-prefooter .fss-fresh{padding:14px 10px!important;}
 body.home #fss-featured .fss-products-grid img{max-height:155px!important;}
}

/* Suppress the now-redundant third advertising module; its genuine CJ stock is used in Featured Offers. */
#fss-layout-v21-prefooter #fss-layout-v21-extra-ads,
#fss-layout-v21-prefooter .fss-fresh-ads{display:none!important;}
/* Exactly eight visible Featured Finds, including honest CJ banner fallback offers. */
#fss-layout-v21-prefooter .fsspf-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:13px!important;}
#fss-layout-v21-prefooter .fsspf-card--partner-banner .fsspf-media{display:flex;align-items:center;justify-content:center;min-height:160px;}
#fss-layout-v21-prefooter .fsspf-banner-text{display:flex;align-items:center;justify-content:center;text-align:center;min-height:150px;padding:12px;font-weight:650;}
@media(max-width:970px){#fss-layout-v21-prefooter .fsscj-grid,#fss-layout-v21-prefooter .fsspf-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
@media(max-width:580px){#fss-layout-v21-prefooter .fsscj-grid,#fss-layout-v21-prefooter .fsspf-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
