/*
 * GAINVO Storefront v0.10.5 — Step 2 Home Native Refinement
 * Home-only refinements built on the v0.10.4 native application foundation.
 * Goals: readable type, natural thumb targets, adaptive merchandising,
 * predictable horizontal rails and iOS/Android-style interaction feedback.
 */

/* Home hierarchy: readable without turning the marketplace into oversized UI. */
.home-v0911{
  --gv-home-gap: clamp(.75rem, 2.8vw, 1.125rem);
  --gv-home-card-radius: clamp(15px, 4vw, 19px);
  padding-top:0;
}
.home-v0911 .section-head{margin-bottom:10px;gap:12px}
.home-v0911 .section-head h2{
  font-size:clamp(1.15rem,1.05rem + .6vw,1.45rem)!important;
  line-height:1.15!important;
  letter-spacing:-.025em!important;
}
.home-v0911 .micro{
  margin-bottom:4px!important;
  font-size:clamp(.72rem,.69rem + .12vw,.8rem)!important;
  line-height:1.15!important;
  letter-spacing:.1em!important;
}
.home-v0911 .text-button,.home-v0911 .home-see-all{
  min-height:40px;
  padding:0 2px!important;
  font-size:clamp(.82rem,.79rem + .12vw,.9rem)!important;
  line-height:1.2;
}

/* Home header keeps the approved composition, but the location control has a
   larger invisible hit region and readable label. */
body:has(.home-v0911.active) .home-brand-location{
  position:relative;
  gap:5px!important;
  min-height:30px!important;
  margin-top:-2px!important;
  padding:2px 3px!important;
}
body:has(.home-v0911.active) .home-brand-location::after{
  content:"";
  position:absolute;
  inset:-7px -8px;
  border-radius:12px;
}
body:has(.home-v0911.active) .home-brand-location strong{
  font-size:clamp(.78rem,.74rem + .2vw,.88rem)!important;
  line-height:1.15!important;
}
body:has(.home-v0911.active) .top-actions .icon-button{
  width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
}

/* Promotion behaves like a native feature card: clear copy, generous action,
   finger swipe support (JS), and page dots with larger invisible hit targets. */
.home-v0911 .spotlight-home-approved{margin:4px 0 12px!important;touch-action:pan-y}
.home-v0911 .spotlight-home-approved .spotlight-card-approved{
  aspect-ratio:2.02/1!important;
  border-radius:var(--gv-home-card-radius)!important;
  box-shadow:0 8px 24px rgba(8,35,63,.11)!important;
  transform:translateZ(0);
}
.home-v0911 .spotlight-home-approved .spotlight-copy{
  width:min(64%,310px)!important;
  padding:clamp(14px,4vw,22px)!important;
}
.home-v0911 .spotlight-home-approved .spotlight-badge,
.home-v0911 .spotlight-home-approved .spotlight-open{
  min-height:25px!important;
  padding:0 9px!important;
  font-size:clamp(.7rem,.67rem + .1vw,.76rem)!important;
}
.home-v0911 .spotlight-home-approved .spotlight-copy h3{
  margin:9px 0 5px!important;
  font-size:clamp(1.38rem,1.12rem + 1.6vw,2rem)!important;
  line-height:1.02!important;
  letter-spacing:-.035em!important;
}
.home-v0911 .spotlight-home-approved .spotlight-copy p{
  max-width:26ch!important;
  font-size:clamp(.78rem,.73rem + .18vw,.9rem)!important;
  line-height:1.35!important;
}
.home-v0911 .spotlight-home-approved .spotlight-foot .spotlight-visit{
  min-height:40px!important;
  padding:0 14px!important;
  border-radius:12px!important;
  font-size:clamp(.78rem,.75rem + .1vw,.85rem)!important;
}
.home-v0911 .spotlight-controls-approved{bottom:9px!important}
.home-v0911 .spotlight-controls-approved .spotlight-dots{gap:7px!important}
.home-v0911 .spotlight-controls-approved .spotlight-dots button{
  position:relative;
  width:6px!important;height:6px!important;min-width:6px!important;min-height:6px!important;
}
.home-v0911 .spotlight-controls-approved .spotlight-dots button::after{
  content:"";position:absolute;inset:-9px -6px;border-radius:999px;
}
.home-v0911 .spotlight-controls-approved .spotlight-dots button.active{width:18px!important}

/* Marketplace summary: secondary, but no microtype. */
.home-v0911 .home-market-summary{
  min-height:48px!important;
  margin-bottom:12px!important;
  padding:0 13px!important;
  border-radius:15px!important;
}
.home-v0911 .home-market-summary .summary-unit{
  gap:6px!important;
  font-size:clamp(.75rem,.72rem + .1vw,.82rem)!important;
}
.home-v0911 .home-market-summary .summary-unit svg{width:17px!important;height:17px!important}
.home-v0911 .home-market-summary .summary-unit b{font-size:inherit!important}
.home-v0911 .home-summary-more{
  min-height:40px;
  font-size:clamp(.78rem,.75rem + .12vw,.86rem)!important;
}

/* Categories: swipe rail on phones instead of six compressed columns. Partial
   next tile intentionally remains visible so horizontal scrolling is obvious. */
.home-v0911 .home-category-approved{margin:0 0 18px!important}
.home-v0911 .home-category-rail-approved{
  display:grid!important;
  grid-auto-flow:column!important;
  grid-auto-columns:clamp(78px,22vw,96px)!important;
  grid-template-columns:none!important;
  gap:9px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  margin:0 -12px!important;
  padding:2px 12px 9px!important;
  scroll-snap-type:x proximity;
  scroll-padding-inline:12px;
  overscroll-behavior-inline:contain;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.home-v0911 .home-category-rail-approved::-webkit-scrollbar{display:none}
.home-v0911 .home-category-rail-approved .category-tile{
  width:100%!important;
  height:auto!important;
  min-height:86px!important;
  padding:8px 5px!important;
  border-radius:16px!important;
  scroll-snap-align:start;
  transition:transform .12s ease,background .12s ease,border-color .12s ease;
}
.home-v0911 .home-category-rail-approved .category-icon{
  width:42px!important;height:42px!important;
  font-size:20px!important;
}
.home-v0911 .home-category-rail-approved .category-tile strong{
  display:block!important;
  max-width:100%!important;
  color:#173754!important;
  font-size:clamp(.74rem,.70rem + .1vw,.8rem)!important;
  line-height:1.15!important;
  font-weight:800!important;
  text-wrap:balance;
}

/* Product cards: two readable columns on phones. Never solve density by
   shrinking text. Larger windows gain columns progressively. */
.home-v0911 .home-merch-section{margin-top:24px!important}
.home-v0911 .home-primary-approved{margin-top:0!important}
.home-v0911 .home-product-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:11px!important;
}
.home-v0911 .home-product-grid .product-card-v7{
  border-radius:var(--gv-home-card-radius)!important;
  box-shadow:0 4px 14px rgba(15,49,88,.045)!important;
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.home-v0911 .home-product-grid .product-image{aspect-ratio:1.05/1!important}
.home-v0911 .home-product-grid .product-badge{
  top:8px!important;left:8px!important;
  min-height:24px!important;
  max-width:calc(100% - 58px)!important;
  padding:0 8px!important;
  font-size:clamp(.68rem,.65rem + .1vw,.75rem)!important;
}
.home-v0911 .home-product-grid .product-save-card{
  top:7px!important;right:7px!important;
  width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
  border-radius:12px!important;
}
.home-v0911 .home-product-grid .product-save-card svg{width:18px!important;height:18px!important}
.home-v0911 .home-product-grid .product-body{
  display:flex!important;
  flex-direction:column!important;
  min-height:148px!important;
  padding:11px 11px 12px!important;
}
.home-v0911 .home-product-grid .product-title{
  display:-webkit-box!important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  min-height:39px!important;
  max-height:none!important;
  margin:0 0 6px!important;
  color:#0d2b51!important;
  font-size:clamp(.88rem,.84rem + .14vw,.98rem)!important;
  line-height:1.28!important;
  font-weight:820!important;
}
.home-v0911 .home-product-grid .product-shop-row{
  display:flex!important;
  min-height:18px!important;
  margin:0 0 7px!important;
  font-size:clamp(.74rem,.71rem + .1vw,.8rem)!important;
  line-height:1.25!important;
}
.home-v0911 .home-product-grid .product-shop-row small{font-size:inherit!important}
.home-v0911 .home-product-grid .product-meta-line{
  display:flex!important;
  align-items:center;
  gap:5px;
  min-height:18px;
  margin:0 0 9px!important;
  color:#7a8b9b!important;
  font-size:clamp(.7rem,.68rem + .08vw,.77rem)!important;
  line-height:1.25!important;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.home-v0911 .home-product-grid .product-price-row{margin-top:auto!important;gap:8px!important}
.home-v0911 .home-product-grid .product-price{
  font-size:clamp(1rem,.96rem + .18vw,1.12rem)!important;
  line-height:1.08!important;
}
.home-v0911 .home-product-grid .product-price small{
  margin-bottom:3px!important;
  font-size:.72rem!important;
}
.home-v0911 .home-product-grid .product-price-sale del{font-size:.75rem!important}
.home-v0911 .home-product-grid .mini-add{
  flex:0 0 44px!important;
  width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;
  border-radius:13px!important;
}
.home-v0911 .home-product-grid .mini-add .mini-cart-svg,
.home-v0911 .home-product-grid .mini-cart-svg{width:20px!important;height:20px!important}

/* Shops: horizontal native rail on touch devices, with a partial next card. */
.home-v0911 .home-shop-section{margin-top:24px!important}
.home-v0911 .shop-rail{
  gap:12px!important;
  scroll-snap-type:x proximity;
  scroll-padding-inline:1px;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}
.home-v0911 .shop-rail>.shop-card{scroll-snap-align:start}
.home-v0911 .shop-card-v2 .shop-meta h3{font-size:clamp(.92rem,.88rem + .12vw,1rem)!important}
.home-v0911 .shop-card-v2 .shop-card-foot{font-size:clamp(.74rem,.71rem + .1vw,.8rem)!important}

.home-v0911 .home-trust-line-v097{
  min-height:46px;
  margin-top:24px!important;
  padding:10px 12px!important;
  gap:10px!important;
  font-size:clamp(.72rem,.69rem + .1vw,.8rem)!important;
}

/* On touch hardware arrows are redundant; natural swipe is the primary model. */
@media (hover:none),(pointer:coarse){
  .home-v0911 .rail-controls{display:none!important}
  .home-v0911 button:active,
  .home-v0911 [role="button"]:active,
  body:has(.home-v0911.active) .top-actions .icon-button:active{
    transform:scale(.975);
  }
  .home-v0911 .product-card-v7:active{transform:scale(.992)}
  .home-v0911 .home-category-rail-approved .category-tile:active{transform:scale(.965)}
}

/* Very small phones still keep two columns at readable type; if the viewport is
   extremely constrained by zoom, Step 1's <=320px single-column guardrail wins. */
@media (max-width:390px){
  .home-v0911 .home-product-grid{gap:9px!important}
  .home-v0911 .home-product-grid .product-body{padding:10px!important;min-height:146px!important}
  .home-v0911 .spotlight-home-approved .spotlight-card-approved{aspect-ratio:1.82/1!important}
  .home-v0911 .spotlight-home-approved .spotlight-copy{width:68%!important;padding:13px!important}
  .home-v0911 .home-market-summary{padding:0 10px!important}
}

@media (min-width:600px){
  .home-v0911 .home-category-rail-approved{
    grid-auto-flow:unset!important;
    grid-auto-columns:unset!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    overflow:visible!important;
    margin:0!important;
    padding:2px 0 6px!important;
  }
  .home-v0911 .home-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:13px!important}
}
@media (min-width:900px){
  .home-v0911 .home-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important}
  .home-v0911 .spotlight-home-approved .spotlight-card-approved{aspect-ratio:3.25/1!important}
  .home-v0911 .spotlight-home-approved .spotlight-copy{width:46%!important}
  .home-v0911 .spotlight-home-approved .spotlight-copy h3{font-size:clamp(1.65rem,1.2rem + 1.4vw,2.45rem)!important}
}
@media (min-width:1220px){
  .home-v0911 .home-product-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:15px!important}
}

/* Respect platform motion preferences. */
@media (prefers-reduced-motion:reduce){
  .home-v0911 .product-card-v7,.home-v0911 .category-tile,.home-v0911 button{transition:none!important}
}
