/* Rich shared compact layout. Preserve touch targets, content, images and forms. */
html body[class][class]:not(.common-home) .content-top-breadcum{padding-top:4px!important;padding-bottom:4px!important;margin:0!important;min-height:0!important;height:auto!important;}
html body[class][class]:not(.common-home) .content-top-breadcum #title-content{min-height:26px!important;gap:8px!important;}
/* Legacy information/account templates reserve42–45px above the content. */
html body[class]:not(.common-home):not(.rich-pdp-active):has(.content-top-breadcum #title-content>*) #content#content{padding-top:6px!important;}
html body[class]:not(.common-home):not(.rich-pdp-active):has(.content-top-breadcum #title-content>*) #content>:first-child{margin-top:0!important;}
html body[class]:not(.common-home):has(.content-top-breadcum #title-content>*) #content>p:first-of-type{margin-bottom:12px!important;}
html body[class] :is(#account-register,#account-forgotten,#account-return,#information-contact) #content form .form-group{margin-bottom:16px!important;}
html body[class] :is(#account-register,#account-forgotten,#account-return) #content legend{margin-bottom:12px!important;padding-bottom:6px!important;}
html body[class] form [role=status]:empty,html body[class] form [role=alert]:empty{margin:0!important;padding:0!important;min-height:0!important;}
/* Category/special/manufacturer product grids start directly after their toolbar. */
html body[class] :is(#product-category,#product-special,#product-manufacturer):is(#product-category,#product-special,#product-manufacturer) .category_filter{padding-top:4px!important;padding-bottom:4px!important;margin-top:0!important;margin-bottom:4px!important;gap:4px 8px!important;min-height:0!important;}
html body[class] :is(#product-category,#product-special,#product-manufacturer):is(#product-category,#product-special,#product-manufacturer) #content>.row-block{margin-top:0!important;padding-top:0!important;}
html body[class] :is(#product-category,#product-special,#product-manufacturer):is(#product-category,#product-special,#product-manufacturer) #content>.row-block>.row{margin-top:0!important;padding-top:0!important;}
/* Tile navigation: no separate empty heading row on phones. */
html body[class] .rich-category-landing .rich-parent-toolbar{min-height:0!important;padding:4px 0!important;margin:0 0 6px!important;gap:8px!important;flex-wrap:nowrap!important;}
html body[class] .rich-category-landing .rich-parent-toolbar .rich-listing-title{width:auto!important;min-width:0!important;flex:1 1 auto!important;}
html body[class] .rich-category-landing .rich-parent-toolbar .rich-view-all{margin:0!important;padding:7px 10px!important;min-height:36px!important;width:auto!important;flex:0 0 auto!important;font-size:12px!important;}
html body[class] .rich-category-landing .rich-parent-toolbar h1{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
html body.product-catalog .rich-directory-toolbar{min-height:0!important;padding:4px 0!important;margin:0 0 6px!important;}
/* Product breadcrumb and purchase/gallery start together, closer to header. */
html body.rich-pdp-active #product-product.rich-pdp{padding-top:8px!important;padding-bottom:32px!important;}
html body.rich-pdp-active #product-product.rich-pdp .rich-pdp-breadcrumb{margin-bottom:8px!important;}
/* Standalone login and contact wrappers use content spacing rather than banners. */
html body[class] #account-login.rich-login-page{padding-top:8px!important;padding-bottom:24px!important;min-height:0!important;}
html body[class] #account-login .rich-login-card{padding:18px 20px!important;}
html body[class] #account-login .rich-login-card h1{margin-bottom:16px!important;}
html body[class] #rich-contact-page{padding-top:8px!important;padding-bottom:32px!important;}
html body[class] #rich-contact-page .rct-heading{margin-bottom:16px!important;}
html body[class] #rich-contact-page h1{margin-bottom:8px!important;}
html body[class] #rich-contact-page .rct-info,html body[class] #rich-contact-page .rct-form{padding:20px!important;}
/* Account pages share this rule even when reached after signing in. */
html body[class] .rich-account-dashboard{padding-top:8px!important;padding-bottom:28px!important;}
html body[class] .rich-account-dashboard .rich-account-welcome{padding:20px!important;margin-bottom:16px!important;gap:16px!important;}
html body.account-wishlist #content#content{min-height:0!important;}
html body.account-wishlist .rich-wishlist-empty{padding:24px 16px!important;}
/* Cart totals follow actual items; no full-viewport blank spacer. */
html body[class] #checkout-cart.rich-basket-page{margin-top:8px!important;margin-bottom:24px!important;}
html body[class] #checkout-cart .rich-basket{height:auto!important;min-height:0!important;max-height:none!important;}
html body[class] #checkout-cart #rich-basket-items{height:auto!important;min-height:0!important;max-height:none!important;flex:none!important;overflow:visible!important;}
html body[class] #checkout-cart .rich-basket-empty{height:auto!important;min-height:0!important;padding:24px 8px!important;gap:12px!important;}
html body[class] #checkout-cart .rich-basket-heading{padding-top:12px!important;padding-bottom:12px!important;}
html body[class] #checkout-cart .rich-basket-bottom{padding-top:12px!important;padding-bottom:16px!important;}
html.rich-basket-embedded #checkout-cart.rich-basket-page{min-height:0!important;}
/* Checkout cards/heading remain separate with smaller useful gaps. */
html body.checkout-checkout #checkout-checkout.rich-checkout-v4{padding-top:8px!important;padding-bottom:28px!important;}
html body.checkout-checkout #checkout-checkout.rich-checkout-v4>h1{margin-bottom:12px!important;}
html body.checkout-checkout #checkout-checkout.rich-checkout-v4 .rich-v4-layout{gap:16px!important;}
html body.checkout-checkout #checkout-checkout.rich-checkout-v4 #accordion.rich-v4-main{gap:14px!important;}
html body.checkout-checkout #checkout-checkout.rich-checkout-v4 .rich-v4-card{padding:18px!important;}
html body.checkout-checkout #checkout-checkout.rich-checkout-v4 .rich-v4-order .rich-order-summary{padding:18px!important;}
html body.checkout-checkout #checkout-checkout.rich-checkout-v4 .rich-v4-offer{padding:16px!important;}
/* Popovers/dialogs keep close controls and comfortable inputs. */
html body[class] header .rich-search-popover{padding:8px 12px 12px!important;}
html body[class] header .rich-search-popover-heading{margin-bottom:4px!important;}
html body[class] .rich-notify-dialog{padding:20px!important;}
html body[class] .rich-notify-dialog h2{margin:0 34px 10px 0!important;}
html body[class] .rich-notify-dialog p{margin:10px 0!important;}
@media(max-width:767px){
 html body[class][class]:not(.common-home) .content-top-breadcum{padding-inline:16px!important;}
 html body[class] .rich-category-landing .rich-parent-toolbar .rich-view-all{padding:7px 8px!important;font-size:11px!important;}
 html body.rich-pdp-active #product-product.rich-pdp{padding-top:6px!important;}
 html body[class] #rich-contact-page .rct-info,html body[class] #rich-contact-page .rct-form{padding:16px!important;}
 html body[class] .rich-notify-dialog{padding:18px!important;}
}

/* On narrow cards, price must never run behind package or favorite controls. */
@media(max-width:767px){
 html body[class] #content#content .product-thumb.rich-card-v2 .rich-v2-meta:has(>.rich-v2-size){display:grid!important;grid-template-columns:minmax(0,1fr) 34px!important;gap:4px 6px!important;}
 html body[class] #content#content .product-thumb.rich-card-v2 .rich-v2-meta:has(>.rich-v2-size)>.price{grid-column:1/-1!important;grid-row:1!important;min-width:max-content!important;}
 html body[class] #content#content .product-thumb.rich-card-v2 .rich-v2-meta:has(>.rich-v2-size)>.rich-v2-size{grid-column:1!important;grid-row:2!important;}
 html body[class] #content#content .product-thumb.rich-card-v2 .rich-v2-meta:has(>.rich-v2-size)>.wishlist{grid-column:2!important;grid-row:2!important;}
}
