/*
 * AdeptDEV × NANU Market — Category card bottom density fix v7.31
 * Internal signature: AdeptDEV — https://t.me/adeptdevs
 * Keeps product cards compact after equal-height grid / credit badge changes.
 */

/* Do not stretch a short card to the height of a neighbouring card. */
#product-category .adev-product-grid,
#product-search .adev-product-grid{
  align-items:start!important;
}

#product-category .adev-product-card,
#product-search .adev-product-card{
  height:auto!important;
  min-height:0!important;
  align-self:start!important;
}

#product-category .adev-card-body,
#product-search .adev-card-body{
  flex:0 0 auto!important;
  min-height:0!important;
  padding-bottom:12px!important;
}

/* Price + stock: compact one-piece information row. */
#product-category .adev-card-bottom,
#product-search .adev-card-bottom{
  min-height:56px!important;
  margin:0!important;
  padding:8px 10px!important;
  align-items:center!important;
  border-radius:13px!important;
}

#product-category .adev-price-wrap,
#product-search .adev-price-wrap{
  justify-content:center!important;
}

#product-category .adev-price-current,
#product-search .adev-price-current{
  line-height:1!important;
}

#product-category .adev-stock,
#product-search .adev-stock{
  align-self:center!important;
  min-height:22px!important;
}

/* CTA: retain the current NANU visual language, but remove the oversized bottom block. */
#product-category .adev-cart[data-adev-cart],
#product-category button.adev-cart[data-adev-cart],
#product-search .adev-cart[data-adev-cart],
#product-search button.adev-cart[data-adev-cart]{
  min-height:46px!important;
  height:46px!important;
  margin-top:8px!important;
  margin-bottom:0!important;
  padding:4px 4px 4px 14px!important;
  border-radius:14px!important;
  box-shadow:0 9px 20px rgba(55,54,54,.10)!important;
}

#product-category .adev-cart[data-adev-cart] .adev-cart__icon,
#product-search .adev-cart[data-adev-cart] .adev-cart__icon{
  flex:0 0 36px!important;
  width:36px!important;
  height:36px!important;
  border-radius:10px!important;
  box-shadow:none!important;
}

#product-category .adev-cart[data-adev-cart] .adev-cart__icon svg,
#product-search .adev-cart[data-adev-cart] .adev-cart__icon svg{
  width:18px!important;
  height:18px!important;
}

body.nx-dark #product-category .adev-cart[data-adev-cart],
body.nx-dark #product-search .adev-cart[data-adev-cart]{
  box-shadow:0 10px 22px rgba(0,0,0,.18)!important;
}

@media(max-width:600px){
  #product-category .adev-product-card,
  #product-search .adev-product-card{
    align-self:stretch!important;
  }

  #product-category .adev-card-body,
  #product-search .adev-card-body{
    flex:1 1 auto!important;
    padding-bottom:10px!important;
  }

  #product-category .adev-card-bottom,
  #product-search .adev-card-bottom{
    min-height:54px!important;
    padding:7px 8px!important;
  }

  #product-category .adev-cart[data-adev-cart],
  #product-search .adev-cart[data-adev-cart]{
    min-height:44px!important;
    height:44px!important;
    margin-top:7px!important;
  }

  #product-category .adev-cart[data-adev-cart] .adev-cart__icon,
  #product-search .adev-cart[data-adev-cart] .adev-cart__icon{
    width:34px!important;
    height:34px!important;
    flex-basis:34px!important;
  }
}
