/* =========================================================
   VendorHive Stores — Mobile Optimized Layer
   Applies to the main website only. Feed/social pages are not linked to this file.
   ========================================================= */
:root{
  --vh-mobile-bg:#faf8f4;
  --vh-mobile-card:#ffffff;
  --vh-mobile-ink:#090909;
  --vh-mobile-muted:#766d63;
  --vh-mobile-gold:#c09444;
  --vh-mobile-border:rgba(0,0,0,.08);
  --vh-mobile-shadow:0 18px 50px rgba(0,0,0,.08);
}
html,body{max-width:100%;overflow-x:hidden!important;-webkit-text-size-adjust:100%;}
img,video,canvas,iframe,svg{max-width:100%;height:auto;}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent;}

/* Desktop stays untouched as much as possible. */
@media (max-width: 980px){
  body{background:var(--vh-mobile-bg)!important;cursor:auto!important;padding-bottom:calc(76px + env(safe-area-inset-bottom));}
  .cursor,.cursor-dot,.cursor-ring{display:none!important;}

  /* Header */
  .site-header,
  header.site-header{
    position:sticky!important;top:0!important;left:0!important;right:0!important;z-index:1000!important;
    height:62px!important;min-height:62px!important;padding:0 14px!important;
    display:flex!important;align-items:center!important;justify-content:space-between!important;
    gap:8px!important;background:rgba(250,248,244,.96)!important;
    backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;
    border-bottom:1px solid var(--vh-mobile-border)!important;box-shadow:0 8px 28px rgba(0,0,0,.04)!important;
  }
  .site-header .logo,.logo{
    font-size:18px!important;letter-spacing:.01em!important;max-width:54vw!important;
    overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;line-height:1.05!important;
  }
  .site-header .nav,.site-header nav.nav,.site-header .header-nav,.site-header .desktop-nav{display:none!important;}
  .header-actions,.header-right{display:flex!important;align-items:center!important;gap:6px!important;margin-left:auto!important;min-width:0!important;}
  .site-header .btn-wa-header,.site-header .track-header-btn:not(#authHeaderBtn),.site-header .header-btn,.site-header .hdr-btn,.site-header .btn-shop-hdr,.site-header .view-toggle-btn{display:none!important;}
  .site-header .icon-link{width:38px!important;height:38px!important;min-width:38px!important;border-radius:14px!important;background:#fff!important;box-shadow:0 8px 22px rgba(0,0,0,.04)!important;}
  .bliss-auth-btn,#authHeaderBtn{height:38px!important;min-width:38px!important;border-radius:14px!important;padding:0 10px!important;font-size:0!important;background:#111!important;color:#fff!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
  .bliss-auth-btn svg,#authHeaderBtn svg{width:17px!important;height:17px!important;}

  .vh-mobile-menu-btn{
    width:42px;height:42px;min-width:42px;border:0;border-radius:15px;background:#111;color:#fff;
    display:inline-flex!important;align-items:center;justify-content:center;flex-direction:column;gap:4px;
    box-shadow:0 12px 30px rgba(0,0,0,.16);cursor:pointer;z-index:1002;
  }
  .vh-mobile-menu-btn span{width:18px;height:2px;background:currentColor;border-radius:999px;display:block;transition:.2s;}
  .vh-mobile-menu-btn[aria-expanded="true"] span:nth-child(1){transform:translateY(6px) rotate(45deg);}
  .vh-mobile-menu-btn[aria-expanded="true"] span:nth-child(2){opacity:0;}
  .vh-mobile-menu-btn[aria-expanded="true"] span:nth-child(3){transform:translateY(-6px) rotate(-45deg);}

  .vh-mobile-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.34);z-index:1001;opacity:0;pointer-events:none;transition:.22s;}
  .vh-mobile-backdrop.open{opacity:1;pointer-events:auto;}
  .vh-mobile-drawer{
    position:fixed;top:0;right:0;bottom:0;width:min(88vw,380px);z-index:1002;background:#fff;color:#111;
    transform:translateX(105%);transition:transform .25s ease;border-radius:28px 0 0 28px;
    box-shadow:-24px 0 70px rgba(0,0,0,.22);padding:18px 16px calc(24px + env(safe-area-inset-bottom));overflow-y:auto;
  }
  .vh-mobile-drawer.open{transform:translateX(0);}
  .vh-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;}
  .vh-drawer-brand{font-family:Georgia,serif;font-weight:900;font-size:23px;letter-spacing:.01em;}
  .vh-drawer-brand em{color:var(--vh-mobile-gold);font-style:italic;}
  .vh-drawer-close{width:40px;height:40px;border:0;border-radius:14px;background:#f4efe7;color:#111;font-size:24px;line-height:1;}
  .vh-drawer-links{display:grid;gap:8px;margin-top:12px;}
  .vh-drawer-links a{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 15px;border-radius:18px;background:#faf8f4;border:1px solid var(--vh-mobile-border);font-weight:900;text-decoration:none;color:#111;}
  .vh-drawer-links a::after{content:'›';font-size:26px;line-height:1;color:var(--vh-mobile-gold);}
  .vh-drawer-cta{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px;}
  .vh-drawer-cta a{display:flex;align-items:center;justify-content:center;border-radius:999px;padding:13px 10px;font-weight:900;text-decoration:none;}
  .vh-drawer-cta .primary{background:#111;color:#fff;}.vh-drawer-cta .gold{background:var(--vh-mobile-gold);color:#fff;}

  /* General layout */
  main,.main,.wrap,.page-wrap,.container,.section,.page-hero,.stores-hero,.contact,.checkout-wrap,.pd-layout,.account-wrap,.owner-wrap,.dashboard-wrap{
    width:100%!important;max-width:100%!important;padding-left:16px!important;padding-right:16px!important;
  }
  .hero{display:block!important;min-height:auto!important;padding:84px 16px 42px!important;overflow:hidden!important;}
  .hero-left{padding:22px 0!important;max-width:100%!important;}
  .hero-right,.hero-card{height:auto!important;min-height:320px!important;margin-top:20px!important;border-radius:28px!important;overflow:hidden!important;}
  .hero-photo-main{position:absolute!important;inset:0!important;}
  .hero-float{display:none!important;}
  .hero-price-badge{right:16px!important;bottom:18px!important;transform:none!important;}

  h1,.hero h1,.page-hero h1,.stores-hero h1,.left-heading{font-size:clamp(34px,12vw,52px)!important;line-height:.98!important;letter-spacing:-.03em!important;margin-bottom:16px!important;}
  h2,.section-title h2,.section-title,.card-title{font-size:clamp(28px,9vw,42px)!important;line-height:1.05!important;}
  p,.hero-desc,.hero-sub,.page-hero p,.stores-hero p{font-size:15px!important;line-height:1.65!important;max-width:100%!important;}
  .eyebrow,.hero-tag,.stores-eyebrow{font-size:10px!important;letter-spacing:.16em!important;margin-bottom:14px!important;}

  .section{padding-top:48px!important;padding-bottom:48px!important;}
  .section-title{margin-bottom:24px!important;text-align:left!important;}
  .intro{padding:13px 16px!important;white-space:normal!important;}.intro p{font-size:11px!important;line-height:1.5!important;}

  .category-grid,.product-grid,.features,.stores-grid,.store-products-grid,.templates-grid,.trust-grid,.gallery-grid,.nova-tiles,.grid,.form-grid,.quick-grid,.cards-grid,.metrics,.stats,.dashboard-grid,.account-grid,.admin-grid,.form-layout,.pd-layout,.checkout-wrap,.contact{
    display:grid!important;grid-template-columns:1fr!important;gap:16px!important;
  }
  .category-card,.product-card,.features div,.wide-card,.contact-box,.store-card,.template-card,.panel,.checkout-card,.form-card,.terms-card,.auth-gate,.metric-card,.stat,.card{
    border-radius:22px!important;padding:18px!important;box-shadow:var(--vh-mobile-shadow)!important;max-width:100%!important;
  }
  .category-card{min-height:190px!important;grid-column:auto!important;}
  .product-img,.store-card-cover,.store-cover,.cover{height:280px!important;min-height:220px!important;border-radius:18px!important;background-position:center top!important;}
  .wide-card,footer{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:14px!important;}
  footer{padding:24px 16px 96px!important;font-size:13px!important;}

  /* Mobile buttons */
  .hero-actions,.hero-ctas,.page-actions,.store-hero-actions,.gate-actions,.btn-row,.action-row,.form-actions,.pd-btn-row{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important;}
  .btn,.btn-gold,.btn-outline-dark,.header-link,.hdr-btn,.btn-wa-store,.btn-ig-store,button[type="submit"],input[type="submit"]{
    width:100%!important;min-height:46px!important;justify-content:center!important;text-align:center!important;border-radius:999px!important;
  }

  /* Filters and horizontal pills */
  .filter-bar,.store-cat-bar,.checkout-progress,.stores-filter-bar,.tabs,.tabbar,.category-tabs{
    display:flex!important;overflow-x:auto!important;flex-wrap:nowrap!important;justify-content:flex-start!important;gap:8px!important;
    padding-left:16px!important;padding-right:16px!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;
  }
  .filter-bar::-webkit-scrollbar,.store-cat-bar::-webkit-scrollbar,.checkout-progress::-webkit-scrollbar,.tabs::-webkit-scrollbar,.tabbar::-webkit-scrollbar{display:none!important;}
  .filter-pill,.store-cat-tab,.progress-step,.tab,.pill{flex:0 0 auto!important;white-space:nowrap!important;}
  .filter-search,.search-wrap,.store-search,.search-box{width:100%!important;min-width:100%!important;margin-left:0!important;flex:1 0 100%!important;}
  .filter-search input,.search-wrap input,.store-search input,.search-box input{width:100%!important;min-width:0!important;}

  /* Product page and checkout */
  .pd-gallery{position:static!important;height:auto!important;padding:16px!important;grid-template-columns:1fr!important;}
  .pd-thumbs{display:flex!important;flex-direction:row!important;order:2!important;overflow-x:auto!important;gap:10px!important;}
  .pd-thumb{width:64px!important;height:82px!important;flex:0 0 auto!important;}
  .pd-main-img{min-height:350px!important;border-radius:24px!important;}
  .pd-info{padding:20px 16px 96px!important;}
  .pd-btn-row{position:sticky!important;bottom:76px!important;background:#fff!important;padding:10px!important;border-radius:20px!important;z-index:60!important;box-shadow:0 -10px 30px rgba(0,0,0,.08)!important;}
  .summary-card{position:static!important;order:-1!important;}
  .cart-item{grid-template-columns:66px 1fr!important;gap:12px!important;align-items:center!important;}
  .ci-img{width:66px!important;height:66px!important;border-radius:16px!important;}

  /* Forms */
  input,select,textarea{font-size:16px!important;max-width:100%!important;min-height:46px!important;}
  label{font-size:12px!important;}
  .input-group{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
  textarea{min-height:120px!important;}

  /* Tables */
  table,.orders-table,.stock-table{min-width:720px!important;width:720px!important;}
  .table-wrap,.stock-table-wrap,.orders-wrap,.responsive-table{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;max-width:100%!important;}

  /* Floating widgets */
  .vh-notify-fab{right:16px!important;bottom:92px!important;}
  .vh-chat-fab,.store-chat-fab{right:16px!important;bottom:18px!important;}
  .vh-chat-panel,.store-chat-panel,.notify-panel{
    width:calc(100vw - 28px)!important;right:14px!important;left:14px!important;bottom:88px!important;max-height:74vh!important;border-radius:24px!important;
  }

  /* Bottom app navigation */
  .vh-mobile-bottom-nav{
    position:fixed;left:0;right:0;bottom:0;z-index:999;background:rgba(255,255,255,.97);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
    border-top:1px solid var(--vh-mobile-border);display:grid;grid-template-columns:repeat(4,1fr);padding:7px 8px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -12px 38px rgba(0,0,0,.08);
  }
  .vh-mobile-bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:54px;border-radius:16px;color:#756b61;text-decoration:none;font-size:10px;font-weight:900;letter-spacing:.01em;}
  .vh-mobile-bottom-nav a .ico{font-size:21px;line-height:1;}
  .vh-mobile-bottom-nav a.active{background:#111;color:#fff;}
}

@media (max-width: 520px){
  .site-header,header.site-header{height:60px!important;min-height:60px!important;padding-left:12px!important;padding-right:12px!important;}
  .site-header .logo,.logo{font-size:17px!important;max-width:50vw!important;}
  .site-header .icon-link{display:none!important;}
  .hero,.page-hero,.stores-hero{padding-top:78px!important;}
  .hero-right,.hero-card{min-height:290px!important;}
  .product-img,.store-card-cover,.store-cover,.cover{height:255px!important;}
  .pd-main-img{min-height:315px!important;}
  .category-card{min-height:175px!important;}
  .vh-drawer-cta{grid-template-columns:1fr!important;}
}

@media (max-width: 380px){
  h1,.hero h1,.page-hero h1,.stores-hero h1{font-size:34px!important;}
  .product-img,.store-card-cover,.store-cover,.cover{height:230px!important;}
  .pd-main-img{min-height:280px!important;}
}

/* =========================================================
   Desktop header balance fix
   Reduces the VendorHive Stores logo size so Men/Women links
   and header actions fit neatly on one row.
   ========================================================= */
@media (min-width: 981px){
  .site-header,
  header.site-header{
    gap:12px!important;
    padding-left:clamp(18px,3.2vw,58px)!important;
    padding-right:clamp(18px,3.2vw,58px)!important;
  }
  .site-header .logo,
  header.site-header .logo,
  .logo{
    font-size:clamp(20px,1.45vw,24px)!important;
    letter-spacing:.01em!important;
    line-height:1!important;
    min-width:auto!important;
    max-width:280px!important;
  }
  .site-header .nav,
  header.site-header .nav{
    gap:clamp(9px,.85vw,16px)!important;
    justify-content:center!important;
    overflow:visible!important;
  }
  .site-header .nav a,
  header.site-header .nav a{
    font-size:11px!important;
    letter-spacing:.075em!important;
  }
  .site-header .header-actions,
  header.site-header .header-actions{
    gap:7px!important;
    min-width:0!important;
  }
  .site-header .header-actions .track-header-btn,
  .site-header .header-actions .store-owner-header-btn,
  .site-header .header-actions .btn-go-live,
  .site-header .header-actions .btn-wa-header,
  .site-header .header-actions #authHeaderBtn{
    min-height:40px!important;
    padding-left:13px!important;
    padding-right:13px!important;
    font-size:11px!important;
  }
  .site-header .header-actions .icon-link{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
  }
}

@media (min-width: 981px) and (max-width: 1280px){
  .site-header .logo,
  header.site-header .logo,
  .logo{
    font-size:20px!important;
    max-width:230px!important;
  }
  .site-header .nav a,
  header.site-header .nav a{
    font-size:10.5px!important;
    letter-spacing:.065em!important;
  }
  .site-header .header-actions .track-header-btn{
    display:none!important;
  }
}
