/* BulkYartsCanada responsive visual repair — mobile and tablet only.
   Added after existing styles so desktop theme and checkout logic stay unchanged. */
@media (max-width: 900px) {
  .product-detail-grid {grid-template-columns:minmax(0,1fr)!important;gap:1.5rem;max-width:100%;}
  .product-detail-grid > * {min-width:0;max-width:100%;}
  .product-slideshow,.product-thumbs,.product-slideshow .swiper-wrapper,.product-slideshow .swiper-slide {max-width:100%;min-width:0;}
  .product-slideshow {width:100%;aspect-ratio:1/1;max-height:min(92vw,560px);}
  .product-slideshow .swiper-slide {height:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;background:var(--surface-warm,#f4eee4);}
  .product-slideshow .swiper-slide img {width:100%!important;height:100%!important;object-fit:contain!important;object-position:center;box-sizing:border-box;padding:0.5rem;}
  .product-thumbs .swiper-slide img {object-fit:contain!important;background:var(--surface-warm,#f4eee4);}
  .product-detail-grid .overflow-x-auto {max-width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;}
}
@media (max-width: 767px) {
  :root {-webkit-text-size-adjust:100%;text-size-adjust:100%;}
  html,body {max-width:100%;overflow-x:clip;}
  main,main > section,.section-shell {min-width:0;max-width:100%;}
  .section-shell {width:calc(100% - 2rem);}
  main img {max-width:100%;}
  main [class*="grid-cols-"] > *, main .grid > *, main .flex > * {min-width:0;}
  /* Header: preserve brand, cart, currency and menu on 320-430px screens. */
  header > nav.section-shell {min-height:64px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;column-gap:0.35rem;row-gap:0.4rem;padding-block:0.7rem;}
  header > nav > a:first-child {flex:1 1 108px;min-width:0;}
  header .brand-mark {font-size:clamp(0.98rem,4.5vw,1.22rem)!important;line-height:1.12;white-space:nowrap;letter-spacing:-.045em;}
  header > nav > div:last-child {display:flex;align-items:center;flex:0 0 auto;gap:0.1rem;min-width:0;max-width:100%;}
  header .byc-currency-control select {min-width:62px;max-width:68px;padding:7px 4px;font-size:12px;min-height:40px;}
  header > nav > div:last-child > a[aria-label="Open cart"] {min-width:38px;min-height:40px;padding-inline:0.52rem!important;}
  header details.dropdown {position:relative;overflow:visible!important;}
  header details.dropdown > summary {min-width:38px;min-height:40px;padding-inline:0.52rem!important;}
  header details.dropdown > ul {right:0!important;left:auto!important;top:100%;width:min(18rem,calc(100vw - 1.5rem));max-height:min(72vh,34rem);overflow-y:auto;overflow-x:hidden;z-index:110;}
  header [data-lang-switcher] {flex:0 0 auto;}
  /* Headings and copy that previously consumed or escaped the phone viewport. */
  main h1 {font-size:clamp(1.95rem,8.2vw,2.65rem)!important;line-height:1.12!important;overflow-wrap:break-word;}
  main h2 {font-size:clamp(1.38rem,6.2vw,1.9rem);line-height:1.2;overflow-wrap:break-word;}
  main h3 {font-size:clamp(1.12rem,5vw,1.4rem);line-height:1.28;overflow-wrap:break-word;}
  main p, main li {overflow-wrap:break-word;}
  .hero-height {min-height:auto;padding-block:0 2.5rem;}
  .hero-height > .section-shell {padding-block:1.65rem 2.5rem;gap:2.1rem;}
  .hero-height .media-frame {width:100%;aspect-ratio:4/3;}
  .hero-height .media-frame img {width:100%;height:100%;object-fit:cover;object-position:center;}
  .hero-height .card-bulk.absolute {bottom:-1.1rem;left:0.6rem;right:0.6rem;padding:0.8rem 1rem;border-radius:1rem;}
  .hero-height .card-bulk.absolute p {font-size:0.78rem;line-height:1.5;}
  .hero-height .grid-cols-3 {grid-template-columns:repeat(3,minmax(0,1fr));gap:0.65rem;margin-top:1.55rem;}
  .hero-height .grid-cols-3 p:first-child {font-size:1.65rem;line-height:1.2;}
  .hero-height .grid-cols-3 p:nth-child(2) {font-size:0.6rem;line-height:1.45;letter-spacing:.04em;}
  main > section.section-shell {padding-bottom:clamp(2rem,8vw,3.5rem);}
  /* Catalog image proportions: show the entire box/product, never crop the edges. */
  .collection-grid {grid-template-columns:minmax(0,1fr);gap:1rem;}
  .product-card {width:100%;min-width:0;max-width:100%;border-radius:1.3rem!important;flex-direction:column!important;}
  .product-card > a:has(>img) {display:flex!important;align-items:center;justify-content:center;width:100%!important;aspect-ratio:4/3!important;min-height:0;overflow:hidden;background:var(--surface-warm,#f4eee4);}
  .product-card > a > img {display:block;width:100%!important;height:100%!important;max-width:100%;object-fit:contain!important;object-position:center!important;padding:.65rem;box-sizing:border-box;}
  .product-card > div:has(>img) > img,.product-card > a > div > img {width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;}
  .product-card .flex.grow {min-width:0;}
  .product-card > .p-5,.product-card > .p-6,.product-card > div.flex {padding:1rem!important;}
  .product-card .btn-bulk {display:flex;align-items:center;justify-content:center;text-align:center;min-height:44px;white-space:normal;line-height:1.35;}
  .product-card h2,.product-card h3,.product-card h2 a,.product-card h3 a {overflow-wrap:anywhere;}
  .product-card p {max-width:100%;}
  /* Any pictorial banners, background cards or inline images remain inside viewport. */
  .media-frame,.media-frame img {max-width:100%;}
  main > section .grid {min-width:0;}
  .byc-delivery-card {display:flex;flex-direction:column;align-items:stretch;gap:1.1rem;padding:1.2rem;border-radius:1.2rem;}
  .byc-delivery-card h2 {font-size:1.5rem;line-height:1.2;}
  .byc-delivery-call {width:100%;text-align:center;}
  .byc-owner-card {display:flex;align-items:flex-start;padding:1rem;border-radius:1.1rem;gap:.8rem;}
  .byc-owner-copy {min-width:0;}
  .byc-owner-avatar {width:60px;height:60px;}
  .byc-owner-copy h2 {font-size:1.3rem;}
  /* Forms and long addresses must not exceed the available width. */
  form,form input,form select,form textarea,.input,.select,.textarea {max-width:100%;min-width:0;box-sizing:border-box;}
  input,select,textarea {font-size:16px;}
  .btn-bulk,.btn-line,.btn-champagne {max-width:100%;white-space:normal;text-align:center;overflow-wrap:break-word;}
  [class*="overflow-x-auto"] {max-width:100%;-webkit-overflow-scrolling:touch;}
  .product-detail-grid table {min-width:0!important;table-layout:fixed;width:100%;}
  .product-detail-grid table th,.product-detail-grid table td {padding:0.55rem 0.25rem!important;font-size:clamp(0.67rem,2.8vw,.84rem)!important;white-space:normal;word-break:normal;overflow-wrap:break-word;}
  .pack-option {min-width:0;gap:0.45rem;padding:.65rem .75rem;flex-wrap:wrap;}
  .pack-option > * {min-width:0;}
  .footer-float-stack {right:max(.7rem,env(safe-area-inset-right));bottom:max(.7rem,env(safe-area-inset-bottom));}
  .human-help-panel {max-width:calc(100vw - 1.4rem);}
  footer .section-shell {gap:1.5rem;}
  footer a {overflow-wrap:anywhere;}
}
@media (max-width: 360px) {
  .section-shell {width:calc(100% - 1.5rem);}
  header .brand-mark {font-size:0.98rem!important;}
  header > nav > a:first-child {flex-basis:100px;}
  header .byc-currency-control select {min-width:58px;max-width:61px;font-size:11px;}
  main h1 {font-size:1.9rem!important;}
  .hero-height .grid-cols-3 {gap:.35rem;}
  .hero-height .grid-cols-3 p:first-child {font-size:1.4rem;}
}

@media (min-width: 600px) and (max-width: 767px) {
  .collection-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
}
