/*
 * Reversible mobile polish for the Building Materials hub.
 * Remove this stylesheet link from building-materials/index.html to restore
 * the previous mobile presentation. Desktop styling is untouched.
 */
@media (max-width:640px){
  :root{--bm-blue:#0038b3;--bm-deep:#061c49;--bm-yellow:#fbbf24;--bm-ink:#0a1628;--bm-muted:#60708a;--bm-line:#dfe7f2}
  body{background:#f5f8fc}
  .site-header{box-shadow:0 8px 24px rgba(4,26,67,.12)!important}
  .cat-hero{
    min-height:0!important;margin-top:64px!important;padding:34px 16px 94px!important;
    background:linear-gradient(145deg,rgba(0,36,118,.97),rgba(0,56,179,.92) 55%,rgba(0,81,201,.78)),
      #0038b3 url('../../building-materials/assets/banners/categories-hero.webp') 68% center/cover no-repeat!important
  }
  .cat-hero::after{content:'';position:absolute;right:-70px;bottom:-125px;width:260px;height:260px;border-radius:50%;background:rgba(251,191,36,.13);box-shadow:0 0 0 34px rgba(251,191,36,.045);pointer-events:none}
  .cat-hero-inner{min-height:0!important;padding:0!important;display:block!important}
  .cat-hero-copy{max-width:100%!important}
  .cat-hero-copy h1{max-width:350px;margin:0 0 14px!important;font-size:clamp(34px,10.2vw,42px)!important;line-height:1.04!important;letter-spacing:-1.1px!important;text-wrap:balance}
  .cat-hero-copy h1 em{margin-top:4px}
  .cat-hero-copy p{max-width:355px!important;margin:0 0 22px!important;font-size:14px!important;line-height:1.58!important;color:rgba(255,255,255,.82)!important}
  .cat-hero-search{display:grid!important;grid-template-columns:minmax(0,1fr) 96px!important;gap:8px!important;width:100%;max-width:100%!important;margin:0 0 14px!important}
  .cat-hero-search-field{width:auto!important;min-width:0!important;min-height:50px;padding:3px 4px 3px 14px!important;border-radius:13px!important;box-shadow:0 10px 28px rgba(0,17,58,.26)!important}
  .cat-hero-search-field img{width:18px!important;height:18px!important}
  .cat-hero-search-field input{width:100%;padding:12px 0!important;font-size:14px!important}
  .cat-hero-search-btn{width:auto!important;min-width:0!important;min-height:50px;padding:12px 13px!important;border-radius:13px!important;font-size:13.5px!important;box-shadow:0 10px 24px rgba(251,191,36,.25)!important}
  .cat-hero-search-btn svg{width:16px;height:16px}
  .cat-hero-location{min-height:38px;margin:0 0 14px!important;padding:8px 13px!important;border-radius:999px!important;background:rgba(255,255,255,.1)!important;font-size:12px!important}
  .cat-hero-location img{width:15px!important;height:15px!important}
  .cat-hero-badges{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important;width:100%!important;padding:9px 6px!important;border-color:rgba(255,255,255,.16)!important;border-radius:15px!important;background:rgba(3,24,72,.62)!important}
  .cat-hero-badge{min-width:0;padding:2px 5px;display:flex!important;flex-direction:column;justify-content:center;gap:5px!important;border-right:1px solid rgba(255,255,255,.13);font-size:9.5px!important;line-height:1.25;text-align:center}
  .cat-hero-badge:last-child{border-right:0}
  .cat-hero-badge img{width:19px!important;height:19px!important}
  .cat-tile-surface{background-color:#f5f8fc!important;background-image:linear-gradient(rgba(0,56,179,.028) 1px,transparent 1px),linear-gradient(90deg,rgba(0,56,179,.028) 1px,transparent 1px)!important;background-size:24px 24px!important}
  .cat-stats-bar{width:calc(100% - 24px)!important;margin:-60px auto 20px!important;padding:8px!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0!important;border:1px solid rgba(0,56,179,.12)!important;border-radius:21px!important;box-shadow:0 18px 42px rgba(7,22,45,.15)!important}
  .cat-stat,.cat-stat:nth-child(-n+2){min-width:0;min-height:72px!important;padding:10px 7px!important;gap:8px!important;justify-content:flex-start!important;border-radius:0!important;border:0!important;border-right:1px solid var(--bm-line)!important;border-bottom:1px solid var(--bm-line)!important;background:transparent!important;box-shadow:none!important}
  .cat-stat:nth-child(2n){border-right:0!important}
  .cat-stat:nth-child(n+3){border-bottom:0!important}
  .cat-stat img{width:31px!important;height:31px!important;flex:0 0 31px}
  .cat-stat>div{min-width:0}
  .cat-stat-num{font-size:19px!important;line-height:1.05!important;letter-spacing:-.4px}
  .cat-stat-label{margin-top:3px;font-size:9.5px!important;line-height:1.25!important}
  .hub-wrap{padding:0 12px 44px!important}
  .hub-container{width:100%!important;max-width:100%!important}
  .category-breadcrumb{width:fit-content;margin:4px 0 14px!important;padding:7px 11px!important;border:1px solid rgba(0,56,179,.11)!important;border-radius:999px!important;background:rgba(255,255,255,.86)!important;box-shadow:0 4px 14px rgba(7,22,45,.05)!important;font-size:11px!important}
  .cat-explore-wrap{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
  .cat-explore-heading{position:relative;overflow:hidden;margin:0 0 14px!important;padding:24px 19px!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:21px!important;background:radial-gradient(circle at 100% 0,rgba(251,191,36,.2),transparent 42%),linear-gradient(145deg,#071d49,#0038b3)!important;box-shadow:0 15px 32px rgba(4,30,86,.2)!important}
  .cat-explore-heading::after{content:'32+';position:absolute;right:12px;bottom:-17px;color:rgba(255,255,255,.055);font-size:76px;line-height:1;font-weight:800;pointer-events:none}
  .cat-explore-heading .sec-label{position:relative;z-index:1;margin-bottom:7px!important;color:var(--bm-yellow)!important;font-size:10px!important;letter-spacing:1.25px!important}
  .cat-explore-heading .sec-title{position:relative;z-index:1;max-width:285px;margin-bottom:8px!important;color:#fff!important;font-size:25px!important;line-height:1.12!important;letter-spacing:-.5px!important}
  .cat-explore-heading .sec-sub{position:relative;z-index:1;max-width:300px;color:rgba(255,255,255,.7)!important;font-size:12.5px!important;line-height:1.5!important}
  .catalog-filter-wrap{width:calc(100% + 24px);margin:0 -12px 14px!important;padding:2px 12px 7px!important;display:flex!important;flex-wrap:nowrap!important;gap:8px!important;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
  .catalog-filter-wrap::-webkit-scrollbar{display:none}
  .cat-tab-btn{flex:0 0 auto;min-height:39px!important;padding:9px 15px!important;border:1px solid #d5dfed!important;border-radius:999px!important;background:rgba(255,255,255,.92)!important;color:#40516d!important;font-size:11.5px!important;font-weight:700!important;box-shadow:0 4px 12px rgba(7,22,45,.05)!important;scroll-snap-align:start}
  .cat-tab-btn.active,.cat-tab-btn:hover{border-color:var(--bm-yellow)!important;background:var(--bm-yellow)!important;color:var(--bm-ink)!important;transform:none!important;box-shadow:0 7px 17px rgba(194,137,0,.2)!important}
  .ss-category-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px!important;margin-top:0!important}
  .ss-category-card{width:100%!important;min-width:0;max-width:100%!important;min-height:0;flex-basis:auto!important;border:1px solid rgba(0,56,179,.1)!important;border-radius:16px!important;background:#fff!important;box-shadow:0 8px 22px rgba(7,22,45,.08)!important}
  .ss-category-card:active{transform:scale(.985)}
  .ss-category-card__media{aspect-ratio:4/3!important;background:#eef3f8!important}
  .ss-category-card__content{min-height:66px;padding:10px 9px 11px!important;gap:5px!important;align-items:center!important}
  .ss-category-card__content>div{min-width:0}
  .ss-category-card__content h3{margin-bottom:3px!important;font-size:12px!important;line-height:1.22!important;letter-spacing:-.12px}
  .ss-category-card__content p{font-size:9.5px!important;line-height:1.3!important;color:#77859b!important}
  .ss-category-card__go{width:24px!important;height:24px!important;flex:0 0 24px!important;border-radius:50%!important;box-shadow:0 4px 10px rgba(206,148,0,.18)}
  .ss-category-card__go img{width:11px!important;height:11px!important}
  .cat-expert-banner{margin:38px 0 26px!important;padding:26px 18px 18px!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:18px!important;border:1px solid rgba(255,255,255,.12)!important;border-radius:22px!important;background:linear-gradient(165deg,rgba(2,29,91,.97),rgba(0,56,179,.91) 66%,rgba(0,75,182,.86)),#0038b3 url('../../building-materials/assets/banners/expert-support.webp') center/cover no-repeat!important;box-shadow:0 18px 38px rgba(5,28,79,.2)!important;text-align:left!important}
  .cat-expert-copy{max-width:100%!important}
  .cat-expert-copy .accent{margin-bottom:7px!important;font-size:11px!important;letter-spacing:.9px;text-transform:uppercase}
  .cat-expert-copy h2{max-width:300px;margin-bottom:9px!important;font-size:25px!important;line-height:1.12!important;letter-spacing:-.4px}
  .cat-expert-copy p{max-width:100%!important;margin-bottom:18px!important;font-size:12.5px!important;line-height:1.55!important;color:rgba(255,255,255,.72)!important}
  .cat-expert-btns{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .cat-expert-btn-primary,.cat-expert-btn-outline{min-width:0;padding:12px 9px!important;display:flex!important;align-items:center;justify-content:center;border-radius:11px!important;font-size:11.5px!important;text-align:center}
  .cat-expert-facts{width:100%!important;max-width:100%!important;margin:0!important;padding:8px!important;display:grid!important;grid-template-columns:1fr!important;gap:6px!important;align-self:stretch!important;border:1px solid rgba(255,255,255,.1);border-radius:15px!important;background:rgba(1,24,74,.5)!important;transform:none!important}
  .cat-expert-fact{min-height:52px;padding:9px 10px;gap:9px!important;align-items:center!important;border-radius:11px;background:rgba(255,255,255,.065)}
  .cat-expert-fact img{width:21px!important;height:21px!important;margin-top:0!important}
  .cat-expert-fact strong{font-size:12px!important}
  .cat-expert-fact span{font-size:10px!important}
  .hub-section{margin:0!important;padding:24px 18px!important;border:1px solid rgba(0,56,179,.09)!important;border-radius:22px!important;background:#fff!important;box-shadow:0 14px 34px rgba(7,22,45,.09)!important}
  .hub-section>h2{margin-bottom:10px!important;font-size:24px!important;line-height:1.18!important;letter-spacing:-.4px}
  .hub-section>p{font-size:12.5px!important;line-height:1.58!important;color:var(--bm-muted)!important}
  .cat-trust-grid{margin-top:18px!important;display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .cat-trust-item{min-height:76px;margin:0!important;padding:12px!important;gap:11px!important;align-items:center!important;border:1px solid #e7edf5;border-radius:14px!important;background:#f8faff!important}
  .cat-trust-item img{width:30px!important;height:30px!important}
  .cat-trust-item h3{margin-bottom:3px!important;font-size:12.5px!important}
  .cat-trust-item p{font-size:10.5px!important;line-height:1.45!important}
}
@media (max-width:350px){
  .cat-hero-search{grid-template-columns:minmax(0,1fr) 82px!important}
  .cat-hero-search-btn{gap:5px!important;padding-inline:8px!important}
  .cat-hero-search-btn svg{display:none}
}