/* Primary sections: square source artwork, compact responsive previews. */
.category-row{grid-template-columns:repeat(13,minmax(0,1fr))}
.category-card>span{height:72px;margin:0;overflow:visible;background:transparent}
.category-card img,.market-icon img{
	display:block!important;width:100%!important;height:100%!important;
	object-fit:contain!important;object-position:center!important;transform:none!important;
	background:transparent!important;
}
.market-icon{width:64px;height:64px;background:transparent;overflow:visible}
.category-hero-image{width:min(290px,100%);height:auto;aspect-ratio:1;overflow:visible;background:transparent}
.category-hero-image img{width:290px;height:290px;max-width:100%;object-fit:contain;object-position:center;transform:none;background:transparent}
.catalog-menu-category img,.catalog-menu-visual>img{aspect-ratio:1;object-fit:contain;background:transparent}
.baazahan-woocommerce .section-image{display:block;width:290px;height:290px;max-width:100%;object-fit:contain;object-position:center;background:transparent;margin-inline:auto}
@media(max-width:1180px){.category-row{grid-template-columns:repeat(7,minmax(0,1fr))}}
@media(max-width:900px){.category-row{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:640px){
	body .site-shell :is(.rebar-family-page,.catalog-family-page) .category-hero h1{white-space:nowrap;font-size:clamp(17px,4.9vw,24px)}
	.category-row{grid-template-columns:repeat(3,minmax(0,1fr))}
	.category-card>span{height:64px}
	.market-icon{width:56px;height:56px}
	.category-hero-image img{height:auto;aspect-ratio:1}
}

/* Future sheet types are selected inside their own group page. */
.sheet-type-picker{margin-block:16px;padding:14px;border:1px solid #e2e7ec;border-radius:7px;background:#fff}
.sheet-type-picker h2{margin:0 0 10px;font-size:15px;font-weight:700}
.sheet-type-picker nav{display:flex;flex-wrap:wrap;gap:8px}
.sheet-type-picker nav a{display:inline-flex;align-items:center;padding:8px 12px;border:1px solid #e2e7ec;border-radius:7px;color:#4e5963;background:#fafbfc;font-size:13px}
.sheet-type-picker nav a:hover,.sheet-type-picker nav a:focus-visible{color:#c91523;border-color:#ed1c2b;background:#fff4f5}
.sheet-type-select{display:none}
@media(max-width:640px){.sheet-type-picker nav{display:none}.sheet-type-select{display:block}.sheet-type-select select{width:100%;min-height:44px}}

/* Expand only the sheet-family rows that have actual product subtypes. */
.catalog-sheet-branch{min-width:0}
.catalog-sheet-heading{display:flex;align-items:center;gap:3px;min-width:0}
.catalog-sheet-heading>:is(a,.category-text-only){flex:1;min-width:0}
.catalog-mega-menu .catalog-sheet-heading>.category-text-only>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.catalog-sheet-heading>button{display:grid;place-items:center;flex:0 0 32px;width:32px;min-height:44px;padding:6px;border:0;border-radius:7px;background:#fff1f2;color:#d21a27;cursor:pointer}
.catalog-sheet-heading>button:hover{background:#ffe0e3}
.catalog-sheet-heading>button svg{width:16px;height:16px;transition:transform .2s}
.catalog-sheet-heading>button[aria-expanded=true] svg{transform:rotate(180deg)}
.catalog-mega-menu .catalog-sheet-type-list{display:block;margin:4px 10px 0 0;padding:0 8px 0 0;border-right:1px solid #e2e7ec;list-style:none}
.catalog-mega-menu .catalog-sheet-type-list[hidden]{display:none!important}
.catalog-mega-menu .catalog-sheet-type-list>li{min-width:0}
body .catalog-mega-menu .catalog-sheet-type-list a{min-height:36px;padding:5px 6px;gap:6px;font-size:12px;font-weight:500;line-height:1.7}
body .catalog-mega-menu .catalog-sheet-type-list a span{min-width:0}
.catalog-mega-menu .catalog-sheet-type-list a img{width:24px;height:24px;object-fit:contain;flex:0 0 24px}
@media(max-width:1024px){.catalog-mega-menu .catalog-sheet-type-list a{min-height:44px}.catalog-sheet-heading>a>span{min-width:0}.catalog-mega-menu.has-active-sheet-types{grid-template-rows:auto minmax(0,1fr)}.catalog-mega-menu.has-active-sheet-types .catalog-menu-panels{min-height:0;overscroll-behavior:contain}}

/* Keep every catalog level on one line within the available link width. */
.catalog-mega-menu .catalog-menu-links>ul>li{min-width:0}
.catalog-mega-menu .catalog-menu-links a{min-width:0;max-width:100%}
.catalog-mega-menu .catalog-menu-links a img{flex-shrink:0}
body .catalog-mega-menu :is(.catalog-menu-category>span,.catalog-menu-links a>span){min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal}
.catalog-mega-menu .catalog-menu-links a>span{flex:1}
.catalog-mega-menu .catalog-menu-links header>div{min-width:0}
.catalog-mega-menu :is(.catalog-menu-links h3,.catalog-menu-visual strong){max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Independent stacks keep neighboring family heights from changing their spacing. */
.catalog-subcategory-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:9px;min-width:0}
.catalog-mega-menu .catalog-subcategory-column{display:flex;flex-direction:column;align-self:start;gap:5px;min-width:0;margin:0;padding:0}
.catalog-mega-menu .catalog-subcategory-column>li{flex:0 0 auto;min-width:0;margin:0}
@media(max-width:640px){.catalog-subcategory-columns{grid-template-columns:minmax(0,1fr);row-gap:5px}}
