/*
 * GAINVO Storefront v0.10.32 — Mobile Scale Foundation (Phase 1)
 * Establishes a balanced, accessible mobile scale across the storefront.
 * Page-specific redesigns follow in later phases.
 */

@media (max-width:759px){
  :root{
    --gv-mobile-gutter:16px;
    --gv-mobile-body:1rem;       /* 16px */
    --gv-mobile-secondary:.875rem; /* 14px */
    --gv-mobile-caption:.75rem;  /* 12px */
    --gv-mobile-label:.8125rem;  /* 13px */
    --gv-mobile-title:1.375rem;  /* 22px */
    --gv-mobile-section:1.5rem;  /* 24px */
    --gv-mobile-touch:44px;
    --gv-mobile-radius:17px;
    --gv-mobile-nav-h:72px;
  }

  html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body{font-size:var(--gv-mobile-body)!important;line-height:1.45!important}
  .main{
    padding-left:max(var(--gv-mobile-gutter),var(--gv-safe-left))!important;
    padding-right:max(var(--gv-mobile-gutter),var(--gv-safe-right))!important;
    padding-bottom:calc(var(--gv-mobile-nav-h) + var(--gv-safe-bottom) + 18px)!important;
  }

  /* Header: compact, stable and finger-friendly. */
  .topbar{
    min-height:68px!important;
    padding:10px max(var(--gv-mobile-gutter),var(--gv-safe-right)) 10px max(var(--gv-mobile-gutter),var(--gv-safe-left))!important;
  }
  .home-brand-location strong,
  .location-pill strong,
  .location-pill span{font-size:.9375rem!important;line-height:1.2!important}
  .top-actions{gap:8px!important}
  .top-actions .icon-button,
  .icon-button{
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
    border-radius:14px!important;
  }
  .top-actions .icon-button svg,.icon-button svg{width:22px!important;height:22px!important}

  /* Global hierarchy. Prevent both microtype and oversized labels. */
  p,.hero-copy p,.page-title-row p,.commerce-intro p,.empty-state p,
  .shop-list-body p,.account-hero p,.modal-content p{
    font-size:var(--gv-mobile-secondary)!important;
    line-height:1.48!important;
  }
  .micro,.eyebrow,.home-eyebrow,.hero-kicker,.promo-badge,
  .product-shop,.product-meta-line,.service-tag,.status,.stock-chip,
  .page-title-badge,.customer-order-subtitle,.customer-order-status,
  .merchant-eyebrow,.merchant-trust-strip small{
    font-size:var(--gv-mobile-caption)!important;
    line-height:1.3!important;
  }
  .section-head h2,.search-group-head h2,.shop-list-body h2,.sheet-head h2{
    font-size:var(--gv-mobile-section)!important;
    line-height:1.15!important;
    letter-spacing:-.025em!important;
  }
  .page-title-row h1,.page-title-v3 h1,.account-hero h1{
    font-size:var(--gv-mobile-title)!important;
    line-height:1.15!important;
  }

  /* Controls. Inputs remain 16px to avoid Safari focus zoom. */
  input,select,textarea{font-size:1rem!important;min-height:44px}
  button,[role="button"],a.primary-cta,a.secondary-cta{min-height:var(--gv-mobile-touch)}
  .filter-pill,.text-button,.result-action,.shop-visit-cta,
  .choice-button,.fulfilment-option strong{font-size:var(--gv-mobile-secondary)!important}

  /* Home marketplace summary: normal rather than tiny. */
  .home-v0911 .home-market-summary{
    min-height:54px!important;
    padding:0 14px!important;
    border-radius:16px!important;
  }
  .home-v0911 .home-market-summary .summary-unit{
    gap:7px!important;
    font-size:.875rem!important;
  }
  .home-v0911 .home-market-summary .summary-unit svg{width:19px!important;height:19px!important}
  .home-v0911 .home-summary-more{font-size:.875rem!important;min-height:44px!important}

  /* Category rail: readable without giant tiles. */
  .home-v0911 .home-category-rail-approved{
    grid-auto-columns:86px!important;
    gap:10px!important;
    margin-inline:calc(var(--gv-mobile-gutter) * -1)!important;
    padding-inline:var(--gv-mobile-gutter)!important;
  }
  .home-v0911 .home-category-rail-approved .category-tile{
    min-height:94px!important;
    padding:9px 6px!important;
    border-radius:16px!important;
  }
  .home-v0911 .home-category-rail-approved .category-icon{
    width:48px!important;height:48px!important;font-size:22px!important;
  }
  .home-v0911 .home-category-rail-approved .category-tile strong{
    font-size:.8125rem!important;
    line-height:1.15!important;
    min-height:auto!important;
  }

  /* Home product cards: two compact readable columns. */
  .home-v0911 .home-product-grid{gap:12px!important}
  .home-v0911 .home-product-grid .product-card-v7{border-radius:17px!important}
  .home-v0911 .home-product-grid .product-body{min-height:136px!important;padding:10px!important}
  .home-v0911 .home-product-grid .product-title{
    min-height:38px!important;
    font-size:.9375rem!important;
    line-height:1.25!important;
  }
  .home-v0911 .home-product-grid .product-shop-row{font-size:.8125rem!important}
  .home-v0911 .home-product-grid .product-meta-line{font-size:.75rem!important}
  .home-v0911 .home-product-grid .product-price{font-size:1.0625rem!important}
  .home-v0911 .home-product-grid .product-badge{font-size:.75rem!important;min-height:26px!important}
  .home-v0911 .home-product-grid .product-save-card,
  .home-v0911 .home-product-grid .mini-add{
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
  }

  /* Merchant/shop profile: bring oversized mobile profile back to normal app scale. */
  body[data-active-screen="shop"] .merchant-cover{height:180px!important;min-height:180px!important}
  body[data-active-screen="shop"] .merchant-summary-v8{
    margin:-22px 10px 0!important;
    padding:0 14px 15px!important;
    border-radius:20px!important;
  }
  body[data-active-screen="shop"] .merchant-identity{
    grid-template-columns:60px minmax(0,1fr)!important;
    gap:11px!important;
    margin-top:-27px!important;
  }
  body[data-active-screen="shop"] .merchant-avatar{width:60px!important;height:60px!important;border-radius:17px!important}
  body[data-active-screen="shop"] .merchant-title-copy{padding-top:34px!important}
  body[data-active-screen="shop"] .merchant-name-row h1{
    font-size:1.375rem!important;
    line-height:1.12!important;
    letter-spacing:-.025em!important;
  }
  body[data-active-screen="shop"] .merchant-verified{
    min-height:28px!important;padding:0 9px!important;font-size:.75rem!important;
  }
  body[data-active-screen="shop"] .merchant-title-copy>p{
    font-size:.875rem!important;line-height:1.45!important;-webkit-line-clamp:3!important;
  }
  body[data-active-screen="shop"] .merchant-status-row-v8{gap:7px!important;margin-top:12px!important}
  body[data-active-screen="shop"] .merchant-status-row-v8>span,
  body[data-active-screen="shop"] .merchant-status-row-v8>button{
    min-height:38px!important;padding:0 11px!important;font-size:.8125rem!important;
  }
  body[data-active-screen="shop"] .merchant-commerce-summary strong{font-size:.9375rem!important}
  body[data-active-screen="shop"] .merchant-commerce-summary small{font-size:.75rem!important}

  /* Bottom navigation: normal mobile-app proportions. */
  .bottom-nav{
    min-height:calc(var(--gv-mobile-nav-h) + var(--gv-safe-bottom))!important;
    padding:6px 8px calc(6px + var(--gv-safe-bottom))!important;
    border-radius:20px 20px 0 0!important;
  }
  .nav-item{min-height:58px!important;padding:5px 2px!important;gap:3px!important;border-radius:14px!important}
  .nav-item .nav-icon{width:24px!important;height:24px!important}
  .nav-item .nav-icon svg{width:23px!important;height:23px!important}
  .nav-item small{font-size:.75rem!important;line-height:1.05!important;font-weight:750!important}
}

/* Small phones: retain two product columns, reduce chrome rather than text. */
@media (max-width:359px){
  :root{--gv-mobile-gutter:12px}
  .home-v0911 .home-category-rail-approved{grid-auto-columns:80px!important;gap:8px!important}
  .home-v0911 .home-category-rail-approved .category-tile{min-height:90px!important}
  .home-v0911 .home-product-grid{gap:9px!important}
  .home-v0911 .home-product-grid .product-body{padding:9px!important}
  .nav-item small{font-size:.6875rem!important}
}

/* Large phones: slightly more breathing room without scaling controls up dramatically. */
@media (min-width:430px) and (max-width:759px){
  :root{--gv-mobile-gutter:18px}
  .home-v0911 .home-category-rail-approved{grid-auto-columns:92px!important}
  .home-v0911 .home-product-grid{gap:14px!important}
  body[data-active-screen="shop"] .merchant-cover{height:200px!important;min-height:200px!important}
}
