/* BCSPL Website V2.1 — responsive fixes (14 Jul 2026) */
*,*::before,*::after{box-sizing:border-box}
html,body{max-width:100%}
body{overflow-x:clip}
img,svg,video,canvas{max-width:100%}

/* Hero trust strip and search panel share the same visual width on foldables/tablets. */
@media (min-width:701px) and (max-width:1100px){
  .hero-v11-copy .hero-search-inline,
  .hero-v11-copy .hero-trust-strip,
  .hero-v11-copy .hero-actions-left{
    width:calc(100% - 48px)!important;
    max-width:calc(100% - 48px)!important;
    margin-left:24px!important;
    margin-right:24px!important;
    box-sizing:border-box!important;
  }
}

/* Product segment carousel: 6 desktop, 3 tablet/open-fold, 2-column vertical phone grid. */
#featuredProducts.segment-carousel{align-items:stretch!important}
#featuredProducts .home-cat-card{min-width:0!important;height:auto!important}
#featuredProducts .home-cat-visual img{width:100%!important;height:100%!important;object-fit:cover!important}
#featuredProducts .home-icon{
  display:flex!important;align-items:center!important;justify-content:center!important;
  overflow:hidden!important;padding:5px!important;box-sizing:border-box!important
}
#featuredProducts .home-icon img{
  display:block!important;width:100%!important;height:100%!important;
  max-width:100%!important;max-height:100%!important;object-fit:contain!important;
  object-position:center!important;transform:none!important
}
#featuredProducts .home-cat-body{position:relative!important;padding-top:42px!important}
#featuredProducts .home-cat-body h3{position:relative!important;z-index:1!important;overflow-wrap:anywhere!important}

@media (min-width:1101px){
  #featuredProducts.segment-carousel{display:flex!important;gap:14px!important;overflow-x:auto!important;overflow-y:hidden!important}
  #featuredProducts .home-cat-card{flex:0 0 calc((100% - 70px)/6)!important;scroll-snap-align:start!important}
}
@media (min-width:701px) and (max-width:1100px){
  .home-segments-v11 .container{width:min(100% - 32px,1100px)!important}
  .segment-carousel-shell{padding-left:42px!important;padding-right:42px!important}
  #featuredProducts.segment-carousel{display:flex!important;gap:14px!important;overflow-x:auto!important;overflow-y:hidden!important;padding-bottom:10px!important}
  #featuredProducts .home-cat-card{flex:0 0 calc((100% - 28px)/3)!important;scroll-snap-align:start!important}
  #featuredProducts .home-icon{width:58px!important;height:58px!important;top:calc(var(--segment-image-height,112px) - 29px)!important;border-width:4px!important}
  #featuredProducts .home-cat-body{padding:39px 10px 14px!important}
  #featuredProducts .home-cat-body h3{font-size:16px!important;line-height:1.12!important;min-height:36px!important}
  #featuredProducts .home-cat-body p{font-size:11.5px!important;line-height:1.35!important}
}
@media (max-width:700px){
  #featuredProducts.segment-carousel{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-flow:row!important;overflow:visible!important;gap:10px!important}
  #featuredProducts .home-cat-card{width:100%!important;max-width:100%!important;flex:none!important}
  #featuredProducts .home-icon{width:52px!important;height:52px!important;border-width:4px!important}
  #featuredProducts .home-cat-body{padding:36px 8px 12px!important}
  #featuredProducts .home-cat-body h3{font-size:14px!important;line-height:1.15!important;min-height:33px!important}
  #featuredProducts .home-cat-body p{font-size:11px!important;line-height:1.35!important}
  #featuredProducts.mobile-odd-segment-count .home-cat-card:last-child{display:flex!important}
}

/* iOS prevents focus zoom when controls render at 16px or more. */
@media (max-width:700px){
  input,select,textarea,.hero-search-row input,.hero-search-row input::placeholder{font-size:16px!important}
  .hero-search-row input{line-height:normal!important}
  .hero-search-inline,.hero-search-results{width:100%!important;max-width:100%!important;transform:none!important;zoom:1!important}
}

/* Pricing cards and rate tables: never allow rate text to escape. */
.approved-rate-card,.approved-rate-head,.approved-rate-body,.compact-enquiry-table-wrap{min-width:0!important;max-width:100%!important}
.compact-enquiry-table-wrap{overflow:hidden!important}
.compact-enquiry-rates{width:100%!important;max-width:100%!important;table-layout:fixed!important;border-collapse:collapse!important}
.compact-enquiry-rates th,.compact-enquiry-rates td{
  min-width:0!important;max-width:100%!important;white-space:normal!important;
  overflow-wrap:anywhere!important;word-break:normal!important;vertical-align:top!important
}
.compact-enquiry-rates th:first-child,.compact-enquiry-rates td:first-child{width:23%!important}
.compact-enquiry-rates th:nth-child(2),.compact-enquiry-rates td:nth-child(2){width:45%!important}
.compact-enquiry-rates th:nth-child(3),.compact-enquiry-rates td:nth-child(3){width:32%!important}
.rate-display-cell,.rate-display-cell b,.preview-cell-clamp{display:block!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important}
.rate-table-footer{min-width:0!important;flex-wrap:wrap!important}
.rate-table-footer .approved-view-rates,.rate-table-footer .approved-view-less{white-space:normal!important;text-align:right!important}

@media (min-width:701px) and (max-width:1100px){
  .enquiry-products-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .compact-enquiry-rates{font-size:10px!important}
  .compact-enquiry-rates th,.compact-enquiry-rates td{padding:8px 6px!important}
  .approved-rate-title h3{font-size:clamp(20px,2.7vw,28px)!important}
}
@media (max-width:700px){
  .enquiry-products-grid{grid-template-columns:1fr!important}
  .compact-enquiry-rates{font-size:10px!important}
  .compact-enquiry-rates th,.compact-enquiry-rates td{padding:8px 5px!important}
}

/* Home search uses the current pricing-card language, compacted for the hero. */
.hero-search-results.active{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
.home-search-rate-card{
  display:grid!important;grid-template-columns:112px minmax(0,1fr)!important;
  border:1px solid #e6c173!important;border-radius:13px!important;overflow:hidden!important;
  background:linear-gradient(180deg,#fff,#fff8ea)!important;color:#111!important;
  box-shadow:0 10px 22px rgba(55,35,0,.10)!important;text-decoration:none!important;min-width:0!important
}
.home-search-rate-image{background:#0c1113!important;min-height:128px!important;overflow:hidden!important}
.home-search-rate-image img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
.home-search-rate-content{padding:11px!important;min-width:0!important;display:flex!important;flex-direction:column!important;gap:4px!important}
.home-search-rate-content>small{color:#a86e00!important;font-weight:900!important;text-transform:uppercase!important;font-size:10px!important}
.home-search-rate-content h4{margin:0!important;font-size:17px!important;line-height:1.08!important;color:#111!important;overflow-wrap:anywhere!important}
.home-search-rate-content>span{font-size:11px!important;font-weight:800!important;color:#a86e00!important}
.home-search-rate-row{display:grid!important;grid-template-columns:23% 45% 32%!important;margin-top:7px!important;border:1px solid #ead9b8!important;border-radius:8px!important;overflow:hidden!important;font-size:9.5px!important}
.home-search-rate-row>*{padding:7px 5px!important;min-width:0!important;overflow-wrap:anywhere!important;background:#fff!important}
.home-search-rate-row b{color:#a86e00!important}
.home-search-rate-cta{margin-top:auto!important;padding-top:7px!important;color:#a86e00!important;font-size:11px!important;font-weight:950!important}
@media (max-width:700px){
  .hero-search-results.active{grid-template-columns:1fr!important}
  .home-search-rate-card{grid-template-columns:112px minmax(0,1fr)!important}
}

/* V2.1.1 mobile corrections — pagination selector and even segment rows. */
@media (max-width:700px){
  .enquiry-filter-summary{width:100%!important;max-width:100%!important}
  .enquiry-filter-summary label{
    width:100%!important;display:flex!important;align-items:center!important;
    justify-content:flex-start!important;gap:10px!important;white-space:normal!important
  }
  #enquiryProductsPerPage{
    width:88px!important;min-width:88px!important;max-width:88px!important;
    height:38px!important;min-height:38px!important;
    padding:7px 30px 7px 12px!important;
    font-size:16px!important;line-height:1.2!important;
    text-align:left!important;text-align-last:left!important;
    background-position:right 10px center!important;
  }

  /* Phones use two cards per row; suppress an unmatched final card. */
  #featuredProducts.mobile-odd-segment-count .home-cat-card:last-child{
    display:none!important;
  }
}
