/* Keep grid contents and off-canvas panels inside the viewport. */
html,body{max-width:100%;overflow-x:hidden;overflow-x:clip;overscroll-behavior-x:none}
body{width:100%;min-width:0}
main,main>section,.header,.header-tools,.hero-copy,.hero-media,.shop-head,.product,.product-info,.gallery,.detail-copy,.filters,.filters label,.form-grid,.form-grid label,footer,footer>div{min-width:0}
img,video{max-width:100%}
.hero{grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr)}
.product-view{grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);min-width:0;max-width:100%;overflow-x:hidden}
.thumbs{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding-bottom:5px}
.thumbs button{flex:0 0 72px;height:72px}
.filters input,.filters select,.form-grid input,.form-grid textarea{min-width:0;max-width:100%}
.product-title,.product-info,.detail-copy,.bag-items article>div,.form-status,footer{overflow-wrap:anywhere}
footer>div:nth-child(2){flex-wrap:wrap;min-width:0}
.drawer,.modal{z-index:300;overflow-x:clip;overscroll-behavior:contain}
.drawer-card{max-width:100%;min-width:0;height:100dvh;grid-template-rows:auto minmax(0,1fr) auto;padding-bottom:calc(28px + env(safe-area-inset-bottom))}
.drawer-card header>div,.modal-card header>div{min-width:0}
.drawer-card header button,.modal-card header button{flex:0 0 44px;min-height:44px}
.drawer-card h2,.modal-card h2{font-size:clamp(1.6rem,6vw,2.5rem)}
.bag-items article{grid-template-columns:72px minmax(0,1fr)}
.bag-items img{width:72px;height:90px}
.modal-card{min-width:0;max-width:100%;max-height:calc(100dvh - 40px);overflow-x:hidden;overscroll-behavior:contain}
.support-dialog{max-height:calc(100dvh - 24px);overscroll-behavior:contain}
@media(max-width:1100px){
 .hero{grid-template-columns:minmax(0,1fr)}
 .filters{grid-template-columns:repeat(4,minmax(0,1fr))}
 .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 footer{grid-template-columns:minmax(0,1fr);gap:24px}
}
@media(max-width:850px){.product-view{grid-template-columns:minmax(0,1fr)}}
@media(max-width:768px){
 .header{padding:12px 16px;gap:12px;grid-template-columns:minmax(0,1fr) auto}
 .header-tools{gap:6px}.header-tools button{min-height:44px;padding:0 10px}
 .hero h1{font-size:clamp(2.5rem,11vw,4rem)}
 .hero-copy{padding:24px 0;min-width:0}.hero-proof{gap:12px}
 .hero-note{flex-wrap:wrap;gap:6px 16px;max-width:calc(100% - 20px)}
 .shop,.grade-guide,.delivery,.reviews{padding:48px 16px}
 .shop-head{align-items:flex-start;flex-direction:column;gap:12px}
 .shop-head h2,.grade-guide h2,.delivery h2,.reviews h2{font-size:clamp(2.2rem,9vw,3.6rem)}
 .filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 .filters label{border-right:1px solid var(--ink)!important}.filters label:nth-child(even){border-right:0!important}
 .filters input,.filters select{font-size:16px;padding:0 10px}
 .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .product-info{padding:12px 10px}.product-title{font-size:1rem;line-height:1.3}
 .price strong{font-size:.95rem}.brand{font-size:.63rem;letter-spacing:.03em}
 .product-size{font-size:.73rem}.card-facts{font-size:.72rem}.card-facts span{grid-template-columns:minmax(0,1fr);gap:3px}
 .product-links{flex-wrap:wrap;gap:6px}.actions{grid-template-columns:minmax(0,1fr);padding:0 10px 12px;gap:6px}
 .actions .primary,.actions .secondary{min-height:44px;padding:8px;font-size:.8rem}
 .grade,.one{top:8px;padding:5px;font-size:.58rem}.grade{left:8px}.wishlist-toggle{top:7px;right:7px;width:40px;height:40px}.one{display:none}
 .product-modal{padding:0}.product-view{width:100%;max-height:100dvh;overscroll-behavior:contain}
 .gallery{padding:12px}.zoom-stage{width:100%;max-height:56svh}.detail-copy{padding:24px 18px}
 .detail-copy h2{font-size:clamp(1.8rem,8vw,3rem);line-height:1.05}
 .detail-grade{align-items:flex-start;flex-wrap:wrap}.detail-actions{grid-template-columns:minmax(0,1fr)}
 .modal{padding:0}.modal-card{width:100%;height:100dvh;max-height:100dvh;padding:20px 16px calc(24px + env(safe-area-inset-bottom))}
 .form-grid{grid-template-columns:minmax(0,1fr)}.form-grid .wide{grid-column:auto}
 .form-grid input,.form-grid textarea,.support-dialog input{font-size:16px;min-height:46px}
 .pay-choice{padding:12px 4px;min-width:0}.pay-choice span{min-width:0}
 .verification-note{overflow-wrap:anywhere}.drawer-card{padding:20px 16px calc(20px + env(safe-area-inset-bottom))}
 footer{padding:32px 16px;gap:20px}footer>div:nth-child(2){gap:16px 20px}
 .support-dialog{width:calc(100% - 24px);padding:18px}
}
@media(max-width:350px){.header{padding:10px 12px;gap:8px}.header-tools button{padding:0 8px;font-size:.78rem}.header-tools span{margin-left:2px}.product-grid{grid-template-columns:minmax(0,1fr)}.filters{grid-template-columns:minmax(0,1fr)}.filters label{border-right:0!important}.hero-actions>*{width:100%}}
