/* VendorHIVE Global Mobile Optimization
   Keeps the desktop design, but makes every page fit phones cleanly. */
:root{
  --vh-mobile-gold:#c09444;
  --vh-mobile-brown:#5a421f;
  --vh-mobile-cream:#fffaf0;
  --vh-mobile-line:#eadfca;
  --vh-mobile-text:#201407;
}
*{box-sizing:border-box;}
html{width:100%;max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;scroll-behavior:smooth;}
body{width:100%;max-width:100%;overflow-x:hidden;}
img,video,iframe,canvas,svg{max-width:100%;height:auto;}
input,select,textarea,button{font:inherit;max-width:100%;}
a,button{-webkit-tap-highlight-color:rgba(192,148,68,.18);}

/* Better phone touch targets */
@media(max-width:760px){
  button,a,input,select,textarea{touch-action:manipulation;}
  a,button,.btn,.button,[role="button"],input[type="submit"]{min-height:42px;}
}

/* Global layout safety */
@media(max-width:900px){
  .container,.wrap,.wrapper,.section,.content,.page,.main,.main-content,.shell,.vh-shell,.tpl-shell,
  .home-shell,.product-shell,.checkout-shell,.stores-shell,.policy-wrap,.admin-shell{
    width:100%!important;
    max-width:100%!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
  .row,.grid,.cards,.product-grid,.store-grid,.collection-grid,.template-grid,.category-grid,.vendor-grid,
  .admin-grid,.dashboard-grid,.checkout-grid,.footer-grid,.features-grid,.metric-grid{
    max-width:100%!important;
  }
}

/* Header refinement on phones */
@media(max-width:760px){
  .site-header.vh-fn-header{z-index:8000!important;}
  .vh-fn-header .vh-main-row{padding:10px 12px!important;gap:8px!important;}
  .vh-fn-header .logo.vh-logo{font-size:21px!important;letter-spacing:-.08em!important;max-width:46vw!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  .vh-fn-header .header-actions.vh-header-actions{gap:5px!important;}
  .vh-fn-header .vh-action-icon,.vh-fn-header .icon-link,.vh-fn-header .cart-icon-btn,.vh-fn-header .bliss-signin-btn,.vh-fn-header .bliss-auth-btn{width:30px!important;min-width:30px!important;height:34px!important;}
  .vh-fn-header .vh-search-form{height:42px!important;border-radius:14px!important;padding:0 10px!important;margin-top:2px!important;}
  .vh-fn-header .vh-search-form input{font-size:14px!important;}
  .vh-fn-header .vh-category-row{display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;padding:0 8px!important;scroll-snap-type:x proximity!important;-webkit-overflow-scrolling:touch!important;}
  .vh-fn-header .vh-category-row::-webkit-scrollbar{display:none!important;}
  .vh-fn-header .vh-category-row a{flex:0 0 auto!important;scroll-snap-align:start!important;font-size:11px!important;padding:0 10px!important;min-width:max-content!important;}
  .vh-fn-header .vh-sale-strip{min-height:38px!important;padding:0 10px!important;}
  .vh-fn-header .vh-sale-text{font-size:12px!important;}
  .vh-fn-header .vh-sale-link{font-size:10px!important;}
}

/* Home/category/product cards */
@media(max-width:760px){
  .hero,.banner,.hero-section,.main-hero,.tpl-hero{border-radius:16px!important;overflow:hidden!important;}
  .hero h1,.banner h1,.tpl-hero h1,.section-title,h1{font-size:clamp(28px,8vw,40px)!important;line-height:1.05!important;}
  h2,.section-head h2{font-size:clamp(22px,6vw,30px)!important;line-height:1.1!important;}
  .product-grid,.store-grid,.category-grid,.cards-grid,.vh-products,.products-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  .product-card,.store-card,.card{border-radius:14px!important;min-width:0!important;}
  .product-img,.product-image,.card-img,.product-card img{height:170px!important;min-height:0!important;object-fit:cover!important;}
  .product-info,.card-body{padding:10px!important;}
  .product-title,.store-title,.card-title{font-size:13px!important;line-height:1.25!important;}
  .price,.price-row,.product-price{font-size:14px!important;}
  .action-row{gap:6px!important;}
  .card-btn,.product-card button,.add-to-cart,.btn{font-size:12px!important;padding:9px 10px!important;border-radius:10px!important;}
}
@media(max-width:380px){
  .product-grid,.store-grid,.category-grid,.cards-grid,.vh-products,.products-grid{grid-template-columns:1fr!important;}
  .product-img,.product-image,.card-img,.product-card img{height:210px!important;}
}

/* Store pages */
@media(max-width:900px){
  .vh-store-page .tpl-main,.tpl-main{display:block!important;grid-template-columns:1fr!important;}
  .vh-store-page .store-side,.store-side{margin-top:16px!important;position:static!important;width:100%!important;}
  .vh-store-page .tpl-hero,.tpl-hero{display:grid!important;grid-template-columns:1fr!important;gap:0!important;}
  .vh-store-page .tpl-hero-media,.tpl-hero-media{order:-1!important;min-height:190px!important;border-radius:18px 18px 0 0!important;}
  .vh-store-page .tpl-hero-text,.tpl-hero-text{padding:22px 18px!important;}
  .vh-store-page .tpl-features,.tpl-features{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  .vh-store-page .quick-cats,.quick-cats{display:flex!important;overflow-x:auto!important;gap:9px!important;padding-bottom:6px!important;-webkit-overflow-scrolling:touch!important;}
  .vh-store-page .quick-cats::-webkit-scrollbar,.quick-cats::-webkit-scrollbar{display:none!important;}
  .vh-store-page .quick-cat,.quick-cat{flex:0 0 auto!important;white-space:nowrap!important;}
  .vh-store-page .tpl-mainhead,.tpl-mainhead{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;height:auto!important;}
  .vh-store-page .tpl-logo,.tpl-logo{font-size:22px!important;}
  .vh-store-page .tpl-search,.tpl-search{width:100%!important;max-width:100%!important;grid-template-columns:1fr 46px!important;}
  .vh-store-page .tpl-search select,.tpl-search select{display:none!important;}
  .vh-store-page .tpl-icons,.tpl-icons{display:flex!important;overflow-x:auto!important;justify-content:flex-start!important;gap:10px!important;}
  .vh-store-page .tpl-navrow,.tpl-navrow{display:flex!important;overflow-x:auto!important;gap:10px!important;padding-bottom:8px!important;}
  .vh-store-page .tpl-navrow::-webkit-scrollbar,.tpl-navrow::-webkit-scrollbar{display:none!important;}
  .vh-store-page .tpl-navitem,.tpl-navitem,.vh-store-page .tpl-shopbtn,.tpl-shopbtn{flex:0 0 auto!important;white-space:nowrap!important;}
  .vh-store-page .section-head,.section-head{display:flex!important;gap:8px!important;align-items:flex-start!important;}
}
@media(max-width:520px){
  .vh-store-page .product-grid,.tpl-main .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;}
  .vh-store-page .product-img{height:145px!important;}
  .vh-store-page .product-meta{font-size:11px!important;min-height:28px!important;}
  .vh-store-page .action-row{display:grid!important;grid-template-columns:1fr!important;}
  .vh-store-page .store-search-grid{grid-template-columns:1fr!important;}
  .vh-store-page .footer-grid{grid-template-columns:1fr!important;gap:18px!important;}
}

/* Product details and checkout */
@media(max-width:900px){
  .product-detail,.product-details,.pd-wrap,.pd-grid,.details-grid,.checkout-grid,.checkout-layout,.cart-layout{display:grid!important;grid-template-columns:1fr!important;gap:16px!important;}
  .product-gallery,.product-summary,.checkout-card,.cart-summary,.order-summary{width:100%!important;max-width:100%!important;}
  .product-gallery img,.main-product-image{width:100%!important;max-height:430px!important;object-fit:cover!important;border-radius:18px!important;}
  .size-pills,.sizes,.option-pills{display:flex!important;flex-wrap:wrap!important;gap:8px!important;}
  .size-pills button,.sizes button,.option-pills button{min-width:44px!important;min-height:40px!important;}
  .checkout-steps,.steps{display:flex!important;overflow-x:auto!important;gap:8px!important;white-space:nowrap!important;}
  .checkout-steps::-webkit-scrollbar,.steps::-webkit-scrollbar{display:none!important;}
}

/* Forms/login/admin/dashboard */
@media(max-width:760px){
  form,.form-card,.auth-card,.login-card,.signup-card,.dashboard-card,.admin-card{width:100%!important;max-width:100%!important;border-radius:16px!important;}
  input,select,textarea{font-size:16px!important;min-height:44px!important;}
  textarea{min-height:100px!important;}
  table{display:block!important;width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
  th,td{white-space:nowrap;}
  .modal,.modal-card,.popup,.drawer,.sheet{width:min(94vw,520px)!important;max-width:94vw!important;max-height:88vh!important;overflow:auto!important;border-radius:18px!important;}
}

/* Feed/live/movie hub mobile safety */
@media(max-width:760px){
  .social-app,.feed-app,.live-app,.movie-hub,.vh-social,.social-layout,.feed-layout{width:100%!important;max-width:100%!important;overflow-x:hidden!important;}
  .social-layout,.feed-layout,.live-layout{display:block!important;grid-template-columns:1fr!important;}
  .left-sidebar,.right-sidebar,.sidebar,.contacts-panel{position:static!important;width:100%!important;max-width:100%!important;max-height:none!important;overflow:visible!important;}
  .post-card,.feed-card,.story-card,.movie-card,.live-card{border-radius:16px!important;max-width:100%!important;}
  .movie-player iframe,.movie-player video,.movie-hub iframe,.movie-hub video{width:100%!important;aspect-ratio:16/9!important;height:auto!important;border-radius:14px!important;}
}

/* Floating buttons should not cover checkout/footer on mobile */
@media(max-width:760px){
  .floating-chat,.vh-floating-chat,.messenger-float,.request-history-float,.chat-widget{bottom:12px!important;right:12px!important;transform:scale(.92)!important;transform-origin:right bottom!important;}
  body{padding-bottom:env(safe-area-inset-bottom);}
}
