/* saMx mobile fixes - loads AFTER style.css and only affects small screens.
   Desktop is untouched. Breakpoints match your existing ones (1000 / 700 / 440). */

/* ---------- stop sideways scrolling ---------- */
@media (max-width:1000px){
  html{overflow-x:hidden}
  body{overflow-x:clip}
  img,svg,video{max-width:100%}
}

@media (max-width:700px){

  html{scroll-padding-top:84px}              /* anchor links no longer hide under the sticky header */
  button,a,.btn{-webkit-tap-highlight-color:transparent}
  button,.btn,select{touch-action:manipulation}

  /* iOS zooms the page when an input is smaller than 16px */
  .search-box input,.shop-tools select,.contact-form input,.contact-form textarea,
  .track-form input,.checkout-form input,.checkout-form textarea,.checkout-form select{font-size:16px}

  /* ---------- navbar ---------- */
  .nav{gap:10px}
  .brand img{width:74px}
  .nav-icon,.mobile-menu{min-height:40px;padding:9px 13px}
  .mobile-nav{padding:0 15px 16px;max-height:calc(100dvh - 110px);overflow-y:auto}
  .mobile-nav a{padding:11px 0;font-size:14px;font-weight:700;border-bottom:1px solid var(--line)}

  /* ---------- hero: the poster stack was 420px wide and pushed the page sideways ---------- */
  .hero{gap:20px}
  .hero h1{font-size:clamp(40px,14.5vw,58px);overflow-wrap:break-word}
  .hero-art{min-height:0;padding:12px 0;overflow:hidden}
  .hero-art:before{width:300px;height:300px}
  .poster-stack{transform:scale(.72);margin:-66px 0}   /* negative margin removes the blank gap left by scaling */

  /* ---------- shop filters ---------- */
  .shop-tools{grid-template-columns:1fr 1fr;gap:8px}
  .search-box{grid-column:1/-1}
  .shop-tools select{min-height:44px}

  /* ---------- product cards ---------- */
  .products,.builder-products{gap:10px}
  .product{padding:7px}
  .product-info{padding:10px 2px 2px}
  .product h3{font-size:14px;margin:5px 0;line-height:1.2}
  .price{font-size:13px}
  .product-poster{padding:10px}
  .product-poster b{font-size:20px}
  .shop-row{flex-direction:column;gap:6px}
  .mini{min-height:36px;font-size:10px}
  .heart{width:34px;height:34px;right:12px;top:12px}

  .featured-banner .featured-cta{white-space:normal;width:100%;justify-content:space-between}

  /* ---------- cart drawer ---------- */
  .drawer{height:100dvh}
  .cart{padding:20px 16px calc(24px + env(safe-area-inset-bottom))}
  .cart-head h2{font-size:26px}
  .cart-head button{width:40px;height:40px}
  .cart-qty button{width:30px;height:30px}
  .remove{padding:10px 0;font-size:10px}
  .cart .btn.full{min-height:48px}

  /* ---------- modals: tall product modal could not be scrolled ---------- */
  .modal{overflow-y:auto;padding:12px}
  .modal-box{padding:18px;gap:18px}
  .modal-poster{width:min(100%,230px);margin:0 auto}
  .modal-box h2{font-size:32px}
  .modal-close{width:38px;height:38px;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.15);z-index:2}
  .checkout-box{max-height:92dvh}
  .size-row{flex-wrap:wrap}
  .size-row button{flex:1;min-height:48px}
  .qty-row button{width:40px;height:40px}

  .search-modal{padding:10px 12px}
  .search-panel{padding:20px}
  .search-panel input{font-size:22px}

  /* ---------- toast: was limited to half the screen width ---------- */
  .toast{width:max-content;max-width:calc(100vw - 32px);text-align:center;font-size:13px;line-height:1.4;
         bottom:calc(18px + env(safe-area-inset-bottom))}
}

@media (max-width:440px){
  .hero-art{padding:8px 0}
  .poster-stack{transform:scale(.6);margin:-94px 0}

  /* keep 2 columns on phones (a single column made the shop very long).
     To go back to 1 column, delete the next 2 lines. */
  .products,.builder-products{grid-template-columns:1fr 1fr}
  .vibe-grid{grid-template-columns:1fr 1fr}

  .vibe{min-height:110px;padding:14px}
  .vibe b{font-size:17px}
  .section-head h2,.tracking-card h2{font-size:36px}
  .about h2{font-size:46px}
}

/* no sticky "hover" effects on touch screens */
@media (hover:none){
  .vibe:hover{transform:none;box-shadow:none}
  .featured-banner .featured-cta:hover{transform:none}
}
