/* Shared product-card layout. Applies to both the theme and the older homepage shortcode. */
.product-showcase{--alhabib-photo-height:220px}
.product-showcase .product-track{align-items:stretch}
.product-showcase .product-track .product-card{border-radius:8px;align-self:stretch;height:auto!important}
.product-showcase .product-track .product-card[hidden]{display:none!important}
.product-showcase .product-track .product-card>a{display:flex!important;flex-direction:column!important;height:100%!important;min-width:0;gap:0;padding:18px!important}
.product-showcase .product-track .product-card>a>img{display:block!important;width:100%!important;height:var(--alhabib-photo-height)!important;min-height:var(--alhabib-photo-height)!important;max-height:var(--alhabib-photo-height)!important;object-fit:contain!important;object-position:center!important;aspect-ratio:auto!important;background:#f7f3e9;margin:0 0 16px!important;border-radius:5px}
.product-showcase .product-track .product-card .product-group{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13px!important;line-height:1.4!important;height:2.8em!important;min-height:2.8em!important;margin:0 0 10px!important}
.product-showcase .product-track .product-card h3{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;overflow-wrap:anywhere;font-size:16px!important;line-height:1.5!important;height:6em!important;min-height:6em!important;max-height:6em!important;margin:0 0 18px!important;font-weight:400}
.product-showcase .product-track .product-card .product-view{display:block!important;margin:0!important;padding:0!important;line-height:1.6!important;min-height:1.6em}
/* Native shop, categories and related products use the same card structure. */
.woocommerce-shell{--alhabib-photo-height:220px}
body.alhabib-emerald .woocommerce-shell ul.products{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px!important;padding:0!important;clear:both}
body.alhabib-emerald .woocommerce-shell ul.products::before,body.alhabib-emerald .woocommerce-shell ul.products::after{display:none!important}
body.alhabib-emerald .woocommerce-shell ul.products li.product{display:flex!important;flex-direction:column!important;float:none!important;width:auto!important;min-width:0;margin:0!important;padding:18px!important;background:#00472b;border:1px solid #50735b;border-radius:8px;position:relative}
body.alhabib-emerald .woocommerce-shell ul.products li.product>a.woocommerce-LoopProduct-link{display:flex!important;flex-direction:column!important;min-width:0}
body.alhabib-emerald .woocommerce-shell ul.products li.product>a.woocommerce-LoopProduct-link>img{display:block!important;object-fit:contain!important;object-position:center!important;width:100%!important;height:var(--alhabib-photo-height)!important;min-height:var(--alhabib-photo-height)!important;max-height:var(--alhabib-photo-height)!important;aspect-ratio:auto!important;background:#f7f3e9;border-radius:5px;margin:0 0 16px!important}
body.alhabib-emerald .woocommerce-shell ul.products li.product .woocommerce-loop-product__title{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;overflow-wrap:anywhere;line-height:1.5!important;font-size:16px!important;height:6em!important;min-height:6em!important;max-height:6em!important;margin:0 0 12px!important;padding:0!important}
body.alhabib-emerald .woocommerce-shell ul.products li.product .price{display:block!important;font-size:15px;line-height:1.5;min-height:3em;margin:0 0 12px!important}
body.alhabib-emerald .woocommerce-shell ul.products li.product>a.button{align-self:flex-start;margin:14px 0 0!important}
body.alhabib-emerald .woocommerce-shell ul.products li.product>.woosc-btn{align-self:flex-start;margin:14px 0 0!important}
body.alhabib-emerald .woocommerce-shell ul.products li.product>.tinv-wraper{margin-top:16px!important}
body.alhabib-emerald .woocommerce-shell ul.products li.product .onsale{top:8px!important;right:8px!important;left:auto!important;margin:0!important;z-index:1}
@media(max-width:1050px){body.alhabib-emerald .woocommerce-shell ul.products{grid-template-columns:repeat(3,minmax(0,1fr))}.product-showcase,.woocommerce-shell{--alhabib-photo-height:200px}}
@media(max-width:768px){body.alhabib-emerald .woocommerce-shell ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px!important}.product-showcase,.woocommerce-shell{--alhabib-photo-height:180px}body.alhabib-emerald .woocommerce-shell ul.products li.product{padding:14px!important}}
@media(max-width:380px){body.alhabib-emerald .woocommerce-shell ul.products{grid-template-columns:1fr}.woocommerce-shell{--alhabib-photo-height:220px}}

/* Reserve a rating row even when a product has no reviews, keeping prices aligned. */
body.alhabib-emerald .woocommerce-shell ul.products li.product>a.woocommerce-LoopProduct-link{display:grid!important;grid-template-rows:var(--alhabib-photo-height) 6em 1.4em 3em;row-gap:12px}
body.alhabib-emerald .woocommerce-shell ul.products li.product>a.woocommerce-LoopProduct-link>img{grid-row:1;margin:0!important}
body.alhabib-emerald .woocommerce-shell ul.products li.product .woocommerce-loop-product__title{grid-row:2;margin:0!important}
body.alhabib-emerald .woocommerce-shell ul.products li.product .star-rating{grid-row:3;margin:0!important;align-self:center}
body.alhabib-emerald .woocommerce-shell ul.products li.product .price{grid-row:4;margin:0!important;align-self:start}
