/* GAINVO Storefront v0.10.6 — Step 3 Search & Discovery native refinement.
   Additive only: preserves catalogue/search business logic while normalising
   readability, touch targets, reflow and native-feeling discovery behaviour. */

body:has(.screen[data-screen="search"].active){
  background:var(--gv-canvas,#f7f9fb);
}

.search-screen-v4{
  width:min(100%,1080px)!important;
  max-width:1080px!important;
  margin-inline:auto!important;
}

.search-screen-v4 .search-topline{
  margin:0 0 14px!important;
}
.search-screen-v4 .search-topline h1{
  margin-top:4px!important;
  font-size:clamp(1.55rem,4.8vw,2.15rem)!important;
  line-height:1.08!important;
  letter-spacing:-.035em!important;
}
.search-screen-v4 .search-topline .micro,
.search-screen-v4 .search-group-head .micro{
  font-size:.75rem!important;
  letter-spacing:.14em!important;
}

/* Search field: iOS-safe 16px input + Android/iOS-sized controls. */
.search-screen-v4 .search-primary-v4{
  grid-template-columns:28px minmax(0,1fr) 44px!important;
  min-height:58px!important;
  padding:0 7px 0 15px!important;
  gap:9px!important;
  border-radius:18px!important;
}
.search-screen-v4 .search-primary-v4>span,
.search-screen-v4 .search-primary-v4>svg{
  width:22px!important;
  height:22px!important;
  font-size:22px!important;
}
.search-screen-v4 .search-primary-v4 input{
  min-height:44px!important;
  font-size:1rem!important;
  line-height:1.3!important;
  font-weight:600!important;
}
.search-screen-v4 .clear-search{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  border-radius:13px!important;
  font-size:1.55rem!important;
}
.search-screen-v4 .clear-search[hidden]{display:none!important}

/* Native segmented-type rail: never shrink labels below readable size. */
.search-screen-v4 .search-kind-row{
  display:flex!important;
  gap:8px!important;
  padding:11px 0 8px!important;
  overflow-x:auto!important;
  overscroll-behavior-inline:contain;
  scroll-snap-type:x proximity;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.search-screen-v4 .search-kind-row::-webkit-scrollbar{display:none!important}
.search-screen-v4 .search-kind{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:88px!important;
  min-height:44px!important;
  padding:0 13px!important;
  border-radius:14px!important;
  gap:7px!important;
  font-size:.875rem!important;
  font-weight:780!important;
  scroll-snap-align:start;
}
.search-screen-v4 .search-kind span,
.search-screen-v4 .search-kind-count{
  min-width:24px!important;
  height:24px!important;
  padding:0 6px!important;
  font-size:.75rem!important;
}

/* Tool/filter rail. Horizontal scrolling is preferable to compressed micro-text. */
.search-screen-v4 .search-category-row{
  display:flex!important;
  gap:8px!important;
  padding:0 0 10px!important;
  overflow-x:auto!important;
  overscroll-behavior-inline:contain;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.search-screen-v4 .search-category-row::-webkit-scrollbar{display:none!important}
.search-screen-v4 .search-category-row .filter-pill,
.search-screen-v4 .search-tool-pill{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  min-height:44px!important;
  padding:0 14px!important;
  border-radius:14px!important;
  gap:7px!important;
  font-size:.8125rem!important;
  line-height:1.15!important;
  font-weight:760!important;
}
.search-screen-v4 .search-filter-icon{
  width:28px!important;
  height:28px!important;
  flex-basis:28px!important;
  font-size:1rem!important;
}
.search-screen-v4 .search-summary-v4{
  margin:4px 2px 0!important;
  font-size:.8125rem!important;
  line-height:1.45!important;
}

/* Discovery / empty-query browsing. */
.search-screen-v4 .search-browse-section{margin-top:20px!important}
.search-screen-v4 .search-browse-head{margin-bottom:10px!important}
.search-screen-v4 .search-browse-head h2,
.search-screen-v4 .search-group-head h2{
  font-size:clamp(1.15rem,3.9vw,1.45rem)!important;
  line-height:1.15!important;
  letter-spacing:-.025em!important;
}
.search-screen-v4 .search-browse-head button{
  min-height:44px!important;
  padding-inline:10px!important;
  font-size:.875rem!important;
}
.search-screen-v4 .search-place-rail{
  gap:12px!important;
  scroll-snap-type:x proximity!important;
}
.search-screen-v4 .search-place-card{
  flex:0 0 118px!important;
  width:118px!important;
  min-width:118px!important;
  min-height:44px!important;
  scroll-snap-align:start;
}
.search-screen-v4 .search-place-media{
  width:118px!important;
  height:78px!important;
  border-radius:15px!important;
}
.search-screen-v4 .search-place-card>strong{
  margin-top:7px!important;
  font-size:.875rem!important;
  line-height:1.2!important;
  font-weight:800!important;
}
.search-screen-v4 .search-place-card>small{
  margin-top:3px!important;
  font-size:.75rem!important;
  line-height:1.25!important;
}
.search-screen-v4 .search-place-media b{
  min-height:22px!important;
  padding:0 7px!important;
  font-size:.6875rem!important;
}

.search-screen-v4 .search-inspiration-list{
  border-radius:16px!important;
  overflow:hidden;
}
.search-screen-v4 .search-inspiration-row{
  min-height:58px!important;
  padding:8px 12px!important;
  gap:11px!important;
}
.search-screen-v4 .search-inspiration-icon{
  width:38px!important;
  height:38px!important;
  flex:0 0 38px!important;
  font-size:1.25rem!important;
}
.search-screen-v4 .search-inspiration-copy strong{
  font-size:.875rem!important;
  line-height:1.25!important;
}
.search-screen-v4 .search-inspiration-copy small{
  font-size:.75rem!important;
  line-height:1.25!important;
}
.search-screen-v4 .search-inspiration-arrow{font-size:1.25rem!important}

/* Search-result cards: preserve the Home visual language without tiny text. */
.search-screen-v4 .search-product-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
.search-screen-v4 .search-product-grid .product-card-v7{border-radius:17px!important}
.search-screen-v4 .search-product-grid .product-badge{
  min-height:24px!important;
  padding:0 8px!important;
  font-size:.6875rem!important;
}
.search-screen-v4 .search-product-grid .product-save-card{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  border-radius:13px!important;
}
.search-screen-v4 .search-product-grid .product-save-card svg{
  width:19px!important;
  height:19px!important;
}
.search-screen-v4 .search-product-grid .product-body{
  min-height:136px!important;
  padding:11px!important;
}
.search-screen-v4 .search-product-grid .product-title{
  min-height:34px!important;
  max-height:38px!important;
  font-size:.875rem!important;
  line-height:1.22!important;
}
.search-screen-v4 .search-product-grid .product-shop-row{
  min-height:18px!important;
  margin-top:5px!important;
  font-size:.75rem!important;
  line-height:1.2!important;
}
.search-screen-v4 .search-product-grid .product-meta-line{
  min-height:18px!important;
  margin-top:4px!important;
  font-size:.75rem!important;
  line-height:1.2!important;
}
.search-screen-v4 .search-product-grid .product-price-row{margin-top:8px!important;gap:8px!important}
.search-screen-v4 .search-product-grid .product-price{
  font-size:clamp(.98rem,4vw,1.12rem)!important;
  line-height:1.05!important;
}
.search-screen-v4 .search-product-grid .product-price small,
.search-screen-v4 .search-product-grid .product-price-sale del{
  font-size:.6875rem!important;
}
.search-screen-v4 .search-product-grid .mini-add{
  flex-basis:44px!important;
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  border-radius:13px!important;
}
.search-screen-v4 .search-product-grid .mini-add .mini-cart-svg,
.search-screen-v4 .search-product-grid .mini-cart-svg{
  width:20px!important;height:20px!important;
}

/* Shop results. */
.search-screen-v4 .result-card{
  min-height:82px!important;
  border-radius:17px!important;
}
.search-screen-v4 .result-copy h3{font-size:.9375rem!important;line-height:1.2!important}
.search-screen-v4 .result-copy p,
.search-screen-v4 .result-copy small{font-size:.75rem!important;line-height:1.35!important}
.search-screen-v4 .result-action{
  min-height:44px!important;
  min-width:72px!important;
  font-size:.8125rem!important;
}
.search-screen-v4 .search-group-head>span{
  min-width:36px!important;
  height:36px!important;
  font-size:.8125rem!important;
}

.search-screen-v4 .search-empty-v4{
  margin-top:20px!important;
  padding:26px 20px!important;
}
.search-screen-v4 .search-empty-v4 h2{font-size:1.2rem!important}
.search-screen-v4 .search-empty-v4 p{font-size:.875rem!important;line-height:1.5!important}
.search-screen-v4 .search-empty-v4 .secondary-action{min-height:44px!important;font-size:.875rem!important}

/* Recent-search native block injected by search-native-v0106.js. */
.search-native-recent{
  margin:18px 0 4px;
  padding:0;
}
.search-native-recent-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 1px 8px;
}
.search-native-recent-head h2{
  margin:0;
  color:#0d2b51;
  font-size:1rem;
  line-height:1.25;
  letter-spacing:-.015em;
}
.search-native-clear-all{
  min-height:44px;
  padding:0 8px;
  border:0;
  background:transparent;
  color:#52718e;
  font-size:.8125rem;
  font-weight:700;
}
.search-native-recent-list{
  display:flex;
  gap:8px;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x proximity;
}
.search-native-recent-list::-webkit-scrollbar{display:none}
.search-native-recent-chip{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  min-height:44px;
  padding:0 13px;
  gap:8px;
  border:1px solid #dce5eb;
  border-radius:999px;
  background:#fff;
  color:#173b60;
  font-size:.8125rem;
  font-weight:720;
  scroll-snap-align:start;
}
.search-native-recent-chip svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}

/* Desktop navbar search also uses normal, non-micro typography. */
.desktop-navbar-search-field input{font-size:.9375rem!important}
.desktop-search-result{min-height:58px!important}
.desktop-search-result-copy strong{font-size:.875rem!important;line-height:1.25!important}
.desktop-search-result-copy small{font-size:.75rem!important;line-height:1.3!important}
.desktop-search-result-price{font-size:.875rem!important}
.desktop-search-group-title{font-size:.75rem!important}
.desktop-search-empty strong{font-size:.9375rem!important}
.desktop-search-empty span{font-size:.8125rem!important}

@media(max-width:339px){
  .search-screen-v4 .search-product-grid{grid-template-columns:1fr!important}
  .search-screen-v4 .search-place-card{flex-basis:106px!important;width:106px!important;min-width:106px!important}
  .search-screen-v4 .search-place-media{width:106px!important;height:70px!important}
}

@media(min-width:700px){
  .search-screen-v4 .search-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
  .search-screen-v4 .search-kind-row,
  .search-screen-v4 .search-category-row{max-width:none!important}
  .search-screen-v4 .search-kind{min-width:112px!important}
}
@media(min-width:1100px){
  .search-screen-v4 .search-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

/* Dark theme support for the new injected recent-search block. */
html[data-theme="dark"] .search-native-recent-head h2{color:#f1f6f8}
html[data-theme="dark"] .search-native-recent-chip{
  background:#101c26;
  border-color:#293945;
  color:#edf4f7;
}
html[data-theme="dark"] .search-native-clear-all{color:#9cb0bd}

@media(prefers-reduced-motion:reduce){
  .search-screen-v4 .search-kind-row,
  .search-screen-v4 .search-category-row,
  .search-native-recent-list{scroll-behavior:auto!important}
}
