/* v3.7.22 — reference price rules, configurable mobile grids and polished mobile controls. */
.home-product-grid .product-purchase{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto 46px;
  align-items:center;
  column-gap:12px;
  row-gap:5px;
}
.home-product-grid .product-purchase>div:first-child{display:contents}
.home-product-grid .product-price-line{
  display:flex;
  min-width:0;
  align-items:baseline;
  gap:7px;
  grid-column:1/-1;
  grid-row:1;
  white-space:nowrap;
}
.home-product-grid .product-price-line del{
  flex:0 0 auto;
  color:#252b35;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}
.home-product-grid .price{
  flex:0 0 auto;
  color:#20252d;
  font-weight:800;
  white-space:nowrap;
}
.home-product-grid .price.discounted-price{color:#36a548}
.home-product-grid .price.free-price{color:#20252d}
.home-product-grid .product-purchase small{
  display:block;
  width:auto;
  min-width:0;
  grid-column:1;
  grid-row:2;
  align-self:center;
  color:#737d8d;
  white-space:nowrap;
}
.home-product-grid .card-buttons{
  grid-column:2;
  grid-row:2;
  align-self:center;
  justify-self:end;
}

@media(max-width:700px){
  .home-product-grid{
    grid-template-columns:repeat(var(--home-mobile-cols,1),minmax(0,1fr))!important;
  }
  .home-product-grid .product-purchase{grid-template-rows:auto 40px;column-gap:8px;row-gap:4px}
  .home-product-grid .product-price-line{gap:5px}
  .home-product-grid .product-price-line del{font-size:11px}
  .home-product-grid .price{font-size:16px}
}
@media(max-width:420px){
  .home-product-grid{
    grid-template-columns:repeat(var(--home-mobile-cols,1),minmax(0,1fr))!important;
  }
  .home-product-grid[style*="--home-mobile-cols:2"] .product-body{padding:10px}
  .home-product-grid[style*="--home-mobile-cols:2"] .product-title{font-size:12px}
  .home-product-grid[style*="--home-mobile-cols:2"] .product-meta{font-size:10px}
  .home-product-grid[style*="--home-mobile-cols:2"] .product-purchase{grid-template-rows:auto 36px;column-gap:5px;row-gap:3px}
  .home-product-grid[style*="--home-mobile-cols:2"] .product-price-line del{font-size:9px}
  .home-product-grid[style*="--home-mobile-cols:2"] .price{font-size:15px}
  .home-product-grid[style*="--home-mobile-cols:2"] .product-purchase small{font-size:9px}
  .home-product-grid[style*="--home-mobile-cols:2"] .card-buttons{gap:4px}
  .home-product-grid[style*="--home-mobile-cols:2"] .square-btn{width:32px;height:36px;font-size:12px}
}

/* Product header favourite-style action remains compact on every phone. */
@media(max-width:620px){
  .market-title-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 46px!important;
    gap:9px!important;
  }
  .market-title-actions .item-share-button{
    width:46px!important;
    min-width:46px!important;
    max-width:46px!important;
    height:46px!important;
    min-height:46px!important;
    padding:0!important;
    border-radius:12px!important;
    background:#fff!important;
    color:#4b5563!important;
    box-shadow:0 7px 18px rgba(20,32,44,.08)!important;
  }
  .market-title-actions .item-share-button i{font-size:16px!important;line-height:1!important}
  .market-title-actions .item-share-button:hover,
  .market-title-actions .item-share-button:focus-visible,
  .market-title-actions .item-share-button.copied{
    border-color:#55b962!important;
    background:#edf9ef!important;
    color:#329342!important;
  }
}

/* Premium mobile navigation: safe-area aware, balanced and usable on narrow screens. */
@media(max-width:850px){
  .mobile-bottom-nav{
    left:50%!important;
    right:auto!important;
    bottom:calc(10px + env(safe-area-inset-bottom))!important;
    width:min(500px,calc(100vw - 20px))!important;
    height:72px!important;
    padding:7px 6px!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:center!important;
    overflow:visible!important;
    border:1px solid rgba(135,168,151,.22)!important;
    border-radius:23px!important;
    background:linear-gradient(145deg,rgba(14,23,24,.985),rgba(25,35,38,.985))!important;
    box-shadow:0 20px 50px rgba(3,10,12,.42),inset 0 1px 0 rgba(255,255,255,.06)!important;
    transform:translateX(-50%)!important;
    backdrop-filter:blur(20px)!important;
  }
  .mobile-bottom-nav>a,
  .mobile-bottom-nav>button{
    width:100%!important;
    min-width:0!important;
    height:56px!important;
    margin:0!important;
    padding:5px 2px!important;
    gap:5px!important;
    border-radius:15px!important;
    color:#97a3a5!important;
    font:700 8.5px/1 Montserrat,Arial,sans-serif!important;
    transform:none!important;
  }
  .mobile-bottom-nav>a>i,
  .mobile-bottom-nav>button>i{font-size:17px!important;line-height:1!important}
  .mobile-bottom-nav>a>span,
  .mobile-bottom-nav>button>span{
    display:block!important;
    width:100%!important;
    overflow:hidden!important;
    text-align:center!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  .mobile-bottom-nav .active:not(.mobile-cart-dock){
    background:linear-gradient(145deg,rgba(80,190,93,.16),rgba(66,164,79,.08))!important;
    color:#77dc83!important;
  }
  .mobile-bottom-nav .active:after{display:none!important;content:none!important}
  .mobile-bottom-nav .mobile-cart-dock{
    height:62px!important;
    min-height:62px!important;
    margin:0!important;
    padding:0!important;
    transform:translateY(-12px)!important;
  }
  .mobile-cart-dock>i{
    flex:0 0 52px!important;
    width:52px!important;
    height:52px!important;
    border:4px solid #182324!important;
    border-radius:17px!important;
    background:linear-gradient(145deg,#67cf70,#36a849)!important;
    box-shadow:0 11px 25px rgba(65,185,79,.36)!important;
    color:#fff!important;
    font-size:18px!important;
    transform:rotate(-2deg)!important;
  }
  .mobile-cart-dock>b{
    top:-3px!important;
    right:calc(50% - 31px)!important;
    border-color:#182324!important;
  }
  .mobile-cart-dock>span{display:none!important}
  .site-footer{padding-bottom:calc(110px + env(safe-area-inset-bottom))!important}
}
@media(max-width:370px){
  .mobile-bottom-nav{width:calc(100vw - 12px)!important;padding-inline:4px!important}
  .mobile-bottom-nav>a,.mobile-bottom-nav>button{font-size:7.5px!important}
  .mobile-bottom-nav>a>i,.mobile-bottom-nav>button>i{font-size:15px!important}
  .mobile-cart-dock>i{width:48px!important;height:48px!important;flex-basis:48px!important}
}
@media(prefers-reduced-motion:reduce){
  .mobile-cart-dock>i{animation:none!important}
}
