/* Phase 2: storefront UI refinements for homepage, shop and mobile browsing. */

/* Homepage category cards: clearer hierarchy and balanced spacing. */
body.home .tool-category-grid a{border-color:#dce8dc;background:#fff;box-shadow:0 4px 16px rgb(3 47 32 / .05)}
body.home .tool-category-grid a:hover{border-color:#9fbe80;box-shadow:0 12px 30px rgb(3 47 32 / .10)}
body.home .tool-category-grid strong{color:#173329}

/* Product cards: align titles/prices/buttons more consistently without adding excess height. */
body ul.products>li.product{border:1px solid #e1eadf;background:#fff}
body ul.products>li.product .woocommerce-LoopProduct-link{display:flex!important;flex-direction:column;flex:1}
body ul.products>li.product .woocommerce-loop-product__title{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
body ul.products>li.product>.button{margin-top:auto!important}

/* Archive/shop header: compact and action-led. */
@media(max-width:782px){
 body.post-type-archive-product .commerce-hero,
 body.tax-product_cat .commerce-hero,
 body.search-results .commerce-hero{padding:18px 0 20px!important}
 body.post-type-archive-product .commerce-breadcrumb,
 body.tax-product_cat .commerce-breadcrumb,
 body.search-results .commerce-breadcrumb{margin-bottom:12px!important;font-size:11px}
 body.post-type-archive-product .commerce-hero .eyebrow,
 body.tax-product_cat .commerce-hero .eyebrow,
 body.search-results .commerce-hero .eyebrow{margin:0 0 6px;font-size:10px;letter-spacing:.12em}
 body.post-type-archive-product .commerce-hero h1,
 body.tax-product_cat .commerce-hero h1,
 body.search-results .commerce-hero h1{font-size:30px!important;line-height:1.12!important;letter-spacing:-.035em!important}
 body.post-type-archive-product .commerce-hero-copy>p:last-child,
 body.tax-product_cat .commerce-hero-copy>p:last-child,
 body.search-results .commerce-hero-copy>p:last-child{display:none}
 body.post-type-archive-product .commerce-trust,
 body.tax-product_cat .commerce-trust,
 body.search-results .commerce-trust{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:14px}
 body.post-type-archive-product .commerce-trust span,
 body.tax-product_cat .commerce-trust span,
 body.search-results .commerce-trust span{width:auto!important;min-width:0;padding:7px 5px;border-radius:7px;text-align:center;font-size:10px;line-height:1.3}
 .fn-category-title-row{align-items:center;gap:10px}
 .fn-category-title-row h1{flex:1;min-width:0}
 .fn-filter-toggle{min-height:42px;padding:8px 12px;border-color:#d4e2d7;background:#fff;color:#07582f;font-size:12px;white-space:nowrap;box-shadow:0 2px 8px rgb(3 47 32 / .05)}
 .commerce-shell{padding-top:22px!important;padding-bottom:48px!important}
 .woocommerce .woocommerce-result-count{float:none!important;margin:0 0 8px!important;font-size:12px;line-height:1.4;color:#51645a}
 .woocommerce .woocommerce-ordering{float:none!important;width:100%;margin:0 0 16px!important}
 .woocommerce .woocommerce-ordering select{width:100%;min-height:44px;font-size:13px;background-color:#fff}
 .woocommerce ul.products li.product{padding:10px!important;border-radius:12px!important}
 .woocommerce ul.products li.product a img{margin-bottom:9px!important;border-radius:8px!important}
 .woocommerce ul.products li.product .woocommerce-loop-product__title{font-size:14px!important;line-height:1.35!important;-webkit-line-clamp:3}
 .woocommerce ul.products li.product .price{font-size:16px!important;margin:5px 0 9px!important}
 .woocommerce ul.products li.product .button{min-height:44px!important;padding:9px 6px!important;font-size:12px!important;line-height:1.2!important}
 .woocommerce span.onsale{top:7px!important;left:7px!important;padding:5px 7px!important;font-size:10px!important;border-radius:5px!important}
 .woocommerce nav.woocommerce-pagination{margin-top:24px}
 .woocommerce nav.woocommerce-pagination ul li a,
 .woocommerce nav.woocommerce-pagination ul li span{min-width:44px;min-height:44px;display:grid;place-items:center;padding:0!important}
 .fn-filter-dialog{padding-top:16px}
 .fn-filter-heading{position:sticky;top:-16px;z-index:2;margin:0 -18px;padding:16px 18px 12px;background:#fff;border-bottom:1px solid #e6eee8}
 .fn-filter-dialog .fn-filter-actions{position:sticky;bottom:calc(-24px - env(safe-area-inset-bottom));z-index:2;margin:6px -18px 0;padding:12px 18px calc(18px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e6eee8}
 .fn-filter-dialog .fn-filter-actions button{min-height:46px;border:0;border-radius:8px;background:#07582f;color:#fff;font-weight:800}
 .fn-filter-dialog .fn-filter-actions a{display:flex;align-items:center;justify-content:center;min-height:44px;color:#07582f;font-weight:700;text-decoration:none}
}

/* Larger category imagery with compact three-card mobile layout. */
body.home .tool-category-grid .fn-category-photo{width:190px!important;height:150px!important;margin-bottom:12px!important}
@media(max-width:600px){
 body.home .tool-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
 body.home .tool-category-grid a{min-height:164px!important;padding:10px 6px!important;border-radius:10px!important}
 body.home .tool-category-grid .fn-category-photo{width:110px!important;height:86px!important;margin-bottom:8px!important}
 body.home .tool-category-grid strong{font-size:11px!important;line-height:1.25!important}
 body.home .tool-category-grid small{display:none}
 body.home .home-title>p:last-child{font-size:13px}
 body.home .product-rail .products li.product{padding:9px!important}
 body.home .product-rail .woocommerce-loop-product__title{-webkit-line-clamp:3;font-size:13px!important}
 body.home .product-rail .products li.product .price{font-size:15px!important}
}

@media(prefers-reduced-motion:reduce){body ul.products>li.product{transition:none!important;transform:none!important}}
