/* GAINVO Storefront v0.10.34 — Phase 3: Shops directory mobile refinement.
   Scope: Shops directory only. Individual merchant page is intentionally untouched. */

@media (max-width: 759px){
  body:has(.screen[data-screen="shops"].active) .main{
    padding-left:16px!important;
    padding-right:16px!important;
    padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))!important;
  }

  .shops-screen-v985{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }

  /* Page introduction: short and calm. */
  .shops-screen-v985 .shops-directory-head{
    padding:8px 0 12px!important;
    align-items:flex-start!important;
  }
  .shops-screen-v985 .shops-directory-head .micro{
    font-size:12px!important;
    line-height:1.2!important;
    letter-spacing:.11em!important;
  }
  .shops-screen-v985 .shops-directory-head h1{
    margin:4px 0 4px!important;
    font-size:24px!important;
    line-height:1.15!important;
    letter-spacing:-.025em!important;
  }
  .shops-screen-v985 .shops-directory-head p{
    margin:0!important;
    max-width:34rem!important;
    font-size:14px!important;
    line-height:1.45!important;
  }

  /* Search: one clear 48px control. */
  .shops-screen-v985 .shops-search-box{
    grid-template-columns:20px minmax(0,1fr) 40px!important;
    min-height:50px!important;
    margin:0 0 18px!important;
    padding:0 5px 0 13px!important;
    gap:8px!important;
    border-radius:15px!important;
  }
  .shops-screen-v985 .shops-search-box>svg{width:19px!important;height:19px!important}
  .shops-screen-v985 .shops-search-box input{
    min-width:0!important;
    height:48px!important;
    font-size:16px!important;
    font-weight:600!important;
  }
  .shops-screen-v985 .shops-search-box button{
    width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
    border-radius:12px!important;font-size:20px!important;
  }

  /* Section headings. */
  .shops-screen-v985 .shops-section-head{
    margin:0 0 9px!important;
    gap:10px!important;
    align-items:flex-end!important;
  }
  .shops-screen-v985 .shops-section-head h2{
    margin:0!important;
    font-size:19px!important;
    line-height:1.2!important;
    letter-spacing:-.015em!important;
  }
  .shops-screen-v985 .shops-section-head p{
    margin:3px 0 0!important;
    font-size:13px!important;
    line-height:1.4!important;
  }
  .shops-screen-v985 .shops-section-head .micro{
    font-size:11px!important;
    letter-spacing:.1em!important;
  }
  .shops-screen-v985 .shops-section-head .text-button{
    min-height:44px!important;
    padding:0 5px!important;
    font-size:14px!important;
  }

  /* Category rail: smaller cards, still comfortably tappable. */
  .shops-screen-v985 .shops-category-block{margin-bottom:11px!important}
  .shops-screen-v985 .shops-category-rail{
    gap:8px!important;
    margin:0 -16px!important;
    padding:0 16px 9px!important;
    scroll-padding-inline:16px!important;
  }
  .shops-screen-v985 .shop-category-tile{
    flex:0 0 78px!important;
    width:78px!important;
    min-height:82px!important;
    padding:8px 6px!important;
    gap:5px!important;
    border-radius:15px!important;
  }
  .shops-screen-v985 .shop-category-tile>span:first-child{
    width:36px!important;height:36px!important;border-radius:11px!important;font-size:18px!important;
  }
  .shops-screen-v985 .shop-category-tile strong{
    min-height:28px!important;
    font-size:12px!important;
    line-height:1.15!important;
  }
  .shops-screen-v985 .shop-category-tile small{
    top:5px!important;right:5px!important;min-width:20px!important;height:20px!important;font-size:10px!important;
  }

  /* Filters: single swipe row, never crushed into a grid. */
  .shops-screen-v985 .shops-directory-filters{
    display:flex!important;
    grid-template-columns:none!important;
    gap:7px!important;
    margin:0 -16px 20px!important;
    padding:0 16px 4px!important;
    overflow-x:auto!important;
    scrollbar-width:none!important;
    scroll-padding-inline:16px!important;
  }
  .shops-screen-v985 .shops-directory-filters::-webkit-scrollbar{display:none!important}
  .shops-screen-v985 .shop-dir-filter{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:max-content!important;
    min-height:44px!important;
    padding:0 14px!important;
    border-radius:13px!important;
    font-size:13px!important;
    font-weight:800!important;
  }

  /* Open-now rail: compact preview cards. */
  .shops-screen-v985 .shops-featured-section{margin:0 0 22px!important}
  .shops-screen-v985 .shops-featured-rail{
    gap:10px!important;
    margin:0 -16px!important;
    padding:0 16px 7px!important;
    scroll-padding-inline:16px!important;
  }
  .shops-screen-v985 .shop-discovery-card{
    flex:0 0 min(72vw,250px)!important;
    width:min(72vw,250px)!important;
    border-radius:16px!important;
  }
  .shops-screen-v985 .shop-discovery-media{height:112px!important}
  .shops-screen-v985 .shop-directory-status{
    min-height:26px!important;
    padding:0 8px!important;
    font-size:11px!important;
  }
  .shops-screen-v985 .shop-discovery-copy{padding:9px 10px 10px!important}
  .shops-screen-v985 .shop-discovery-copy strong{font-size:15px!important;line-height:1.2!important}
  .shops-screen-v985 .shop-discovery-copy small{font-size:12px!important;line-height:1.3!important}
  .shops-screen-v985 .shop-discovery-copy>span{font-size:11px!important;line-height:1.3!important}

  /* All shops: horizontal identity card, one merchant per row. */
  .shops-screen-v985 .shops-all-section{padding-bottom:4px!important}
  .shops-screen-v985 .shops-all-head{align-items:center!important}
  .shops-screen-v985 .shops-directory-summary{
    gap:6px!important;
    padding:0!important;
  }
  .shops-screen-v985 .shops-directory-summary strong{font-size:13px!important}
  .shops-screen-v985 .shops-directory-summary small{font-size:11px!important}

  .shops-screen-v985 .shop-list-v91{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  .shops-screen-v985 .shop-list-card-v91{
    grid-template-columns:104px minmax(0,1fr)!important;
    min-height:150px!important;
    border-radius:16px!important;
    overflow:hidden!important;
    box-shadow:0 3px 12px rgba(15,49,88,.035)!important;
  }
  .shops-screen-v985 .shop-list-card-v986 .shop-directory-media,
  .shops-screen-v985 .shop-directory-media{
    min-height:150px!important;
    width:104px!important;
  }
  .shops-screen-v985 .shop-directory-media .shop-logo-image{
    left:8px!important;bottom:8px!important;width:38px!important;height:38px!important;border-radius:11px!important;
  }
  .shops-screen-v985 .shop-directory-status{
    top:8px!important;left:8px!important;
  }
  .shops-screen-v985 .shop-list-body-v91{
    padding:11px 11px 10px!important;
  }
  .shops-screen-v985 .shop-directory-name-line{gap:5px!important}
  .shops-screen-v985 .shop-directory-name-line h2{
    font-size:16px!important;
    line-height:1.18!important;
    letter-spacing:-.012em!important;
  }
  .shops-screen-v985 .verified-copy{
    min-width:23px!important;height:23px!important;padding:0 6px!important;font-size:10px!important;
  }
  .shops-screen-v985 .shop-category-copy{
    margin-top:3px!important;
    font-size:12px!important;
    line-height:1.3!important;
  }
  .shops-screen-v985 .shop-directory-offer{
    margin-top:7px!important;
    font-size:13px!important;
    line-height:1.35!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
  }
  .shops-screen-v985 .shop-directory-meta-line{
    margin-top:7px!important;
    gap:6px!important;
    align-items:flex-start!important;
  }
  .shops-screen-v985 .shop-directory-chips{gap:4px!important}
  .shops-screen-v985 .shop-directory-chips span{
    min-height:26px!important;
    padding:0 7px!important;
    border-radius:9px!important;
    font-size:11px!important;
  }
  .shops-screen-v985 .shop-live-copy{
    font-size:11px!important;
    line-height:1.25!important;
  }
  .shops-screen-v985 .shop-directory-actions{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:7px!important;
    margin-top:auto!important;
    padding-top:8px!important;
  }
  .shops-screen-v985 .shop-list-card-v91 .shop-visit-cta{
    min-width:0!important;
    min-height:40px!important;
    padding:0 12px!important;
    border-radius:11px!important;
    font-size:12px!important;
  }
  .shops-screen-v985 .shop-row-arrow{
    width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;border-radius:11px!important;font-size:20px!important;
  }
}

@media (max-width:359px){
  .shops-screen-v985 .shop-list-card-v91{grid-template-columns:92px minmax(0,1fr)!important;min-height:146px!important}
  .shops-screen-v985 .shop-list-card-v986 .shop-directory-media,
  .shops-screen-v985 .shop-directory-media{width:92px!important;min-height:146px!important}
  .shops-screen-v985 .shop-directory-name-line h2{font-size:15px!important}
  .shops-screen-v985 .shop-directory-offer{font-size:12px!important}
  .shops-screen-v985 .shop-live-copy{display:none!important}
  .shops-screen-v985 .shop-discovery-card{flex-basis:76vw!important;width:76vw!important}
}

@media (min-width:430px) and (max-width:759px){
  .shops-screen-v985 .shop-list-card-v91{grid-template-columns:118px minmax(0,1fr)!important;min-height:158px!important}
  .shops-screen-v985 .shop-list-card-v986 .shop-directory-media,
  .shops-screen-v985 .shop-directory-media{width:118px!important;min-height:158px!important}
  .shops-screen-v985 .shop-discovery-card{flex-basis:240px!important;width:240px!important}
}

/* Tablet directory: two balanced columns without desktop density. */
@media (min-width:760px) and (max-width:1099px){
  .shops-screen-v985{max-width:920px!important}
  .shops-screen-v985 .shop-list-v91{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .shops-screen-v985 .shop-list-card-v91{grid-template-columns:112px minmax(0,1fr)!important;min-height:158px!important}
  .shops-screen-v985 .shop-list-card-v986 .shop-directory-media,
  .shops-screen-v985 .shop-directory-media{width:112px!important;min-height:158px!important}
  .shops-screen-v985 .shops-directory-filters{display:flex!important;gap:8px!important}
  .shops-screen-v985 .shop-dir-filter{width:auto!important;min-width:max-content!important;padding-inline:15px!important}
}

/* Dark theme parity. */
html[data-theme="dark"] .shops-screen-v985 .shops-search-box,
html[data-theme="dark"] .shops-screen-v985 .shop-category-tile,
html[data-theme="dark"] .shops-screen-v985 .shop-dir-filter,
html[data-theme="dark"] .shops-screen-v985 .shop-list-card-v91,
html[data-theme="dark"] .shops-screen-v985 .shop-discovery-card{
  box-shadow:none!important;
}
