/* NGKSHOP v1.9.53 - fix product button overflow, keep cards horizontal */
.woocommerce ul.products,
.woocommerce-page ul.products,
.woocommerce .products.columns-3,
.woocommerce .products.columns-4,
.products{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:24px!important;
  margin:0!important;
  padding:0!important;
  align-items:stretch!important;
}

.woocommerce ul.products li.product.ngk-product-loop-card,
.woocommerce-page ul.products li.product.ngk-product-loop-card{
  float:none!important;
  clear:none!important;
  width:auto!important;
  min-width:0!important;
  min-height:248px!important;
  margin:0!important;
  padding:18px!important;
  display:grid!important;
  grid-template-columns:126px minmax(0,1fr)!important;
  gap:14px!important;
  align-items:stretch!important;
  list-style:none!important;
  overflow:hidden!important;
  border:1px solid rgba(191,219,254,.95)!important;
  border-radius:22px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
  box-shadow:0 16px 38px rgba(15,23,42,.07)!important;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important;
}

.woocommerce ul.products li.product.ngk-product-loop-card:hover,
.woocommerce-page ul.products li.product.ngk-product-loop-card:hover{
  transform:translateY(-3px)!important;
  border-color:rgba(59,130,246,.45)!important;
  box-shadow:0 24px 56px rgba(15,23,42,.12)!important;
}

.ngk-product-loop-card__media{
  min-width:0!important;
  height:100%!important;
  display:block!important;
  text-decoration:none!important;
}

.ngk-product-loop-card__image{
  width:100%!important;
  height:100%!important;
  min-height:126px!important;
  aspect-ratio:1/1!important;
  margin:0!important;
  padding:10px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  border:1px solid #dbe7f5!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#f8fbff 0%,#edf5ff 100%)!important;
}

.woocommerce ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__image img,
.woocommerce-page ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__image img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  margin:0 auto!important;
  display:block!important;
  object-fit:contain!important;
  object-position:center!important;
  border-radius:14px!important;
  background:transparent!important;
  box-shadow:none!important;
}

.ngk-product-loop-card__placeholder{
  width:100%!important;
  height:100%!important;
  min-height:110px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:14px!important;
  color:#2563eb!important;
  font-size:24px!important;
  font-weight:1000!important;
  letter-spacing:.04em!important;
  background:linear-gradient(135deg,#eff6ff,#ecfdf5)!important;
}

.ngk-product-loop-card__info{
  min-width:0!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  gap:8px!important;
}

.ngk-product-loop-card__title{
  min-width:0!important;
  margin:0!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  gap:8px!important;
  align-items:flex-start!important;
  color:#07132b!important;
  font-size:clamp(17px,1vw,20px)!important;
  line-height:1.12!important;
  font-weight:1000!important;
  letter-spacing:-.02em!important;
  text-decoration:none!important;
}

.ngk-product-loop-card__title-text{
  min-width:0!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
}

.ngk-product-loop-card__spark{
  width:24px!important;
  height:24px!important;
  display:inline-grid!important;
  place-items:center!important;
  flex:0 0 24px!important;
  border-radius:9px!important;
  color:#fff!important;
  font-size:12px!important;
  line-height:1!important;
  background:linear-gradient(135deg,#2563eb,#14b8a6)!important;
  box-shadow:0 8px 18px rgba(37,99,235,.2)!important;
}

.ngk-product-loop-card__price,
.woocommerce ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__price,
.woocommerce-page ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__price{
  margin:0!important;
  color:#a16207!important;
  font-size:18px!important;
  line-height:1.12!important;
  font-weight:1000!important;
}

.ngk-product-loop-card__price del,
.woocommerce ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__price del,
.woocommerce-page ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__price del{
  opacity:.7!important;
  color:#64748b!important;
  font-size:12px!important;
  margin-right:6px!important;
}

.ngk-product-loop-card__price ins,
.woocommerce ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__price ins,
.woocommerce-page ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__price ins{
  text-decoration:none!important;
}

.ngk-product-loop-card__line{
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:5px!important;
  color:#475569!important;
  font-size:13px!important;
  line-height:1.3!important;
  font-weight:850!important;
}

.ngk-product-loop-card__label{
  flex:0 0 auto!important;
  color:#0f172a!important;
  font-weight:1000!important;
  white-space:nowrap!important;
}

.ngk-product-loop-card__value{
  min-width:0!important;
  color:#2563eb!important;
  font-weight:950!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
}

.ngk-product-loop-card__stock-badge{
  min-width:0!important;
  max-width:100%!important;
  min-height:25px!important;
  padding:3px 9px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  font-size:11.5px!important;
  font-weight:1000!important;
  white-space:nowrap!important;
}

.ngk-product-loop-card__stock--in .ngk-product-loop-card__stock-badge{
  color:#a16207!important;
  border:1px solid #fde68a!important;
  background:#fffbeb!important;
}

.ngk-product-loop-card__stock--out .ngk-product-loop-card__stock-badge{
  color:#b91c1c!important;
  border:1px solid #fecaca!important;
  background:#fef2f2!important;
}

.ngk-product-loop-card__actions{
  min-width:0!important;
  margin-top:auto!important;
  padding-top:6px!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:stretch!important;
}

.ngk-product-loop-card__button,
.ngk-product-loop-card__disabled,
.woocommerce ul.products li.product.ngk-product-loop-card .gamehub-add-cart-link,
.woocommerce ul.products li.product.ngk-product-loop-card .gamehub-buy-now-link,
.woocommerce-page ul.products li.product.ngk-product-loop-card .gamehub-add-cart-link,
.woocommerce-page ul.products li.product.ngk-product-loop-card .gamehub-buy-now-link{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:42px!important;
  padding:8px 8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:0!important;
  border-radius:14px!important;
  text-align:center!important;
  text-decoration:none!important;
  font-size:11.5px!important;
  line-height:1.15!important;
  font-weight:1000!important;
  white-space:normal!important;
  word-break:keep-all!important;
  overflow-wrap:break-word!important;
  overflow:hidden!important;
  box-shadow:0 12px 22px rgba(15,23,42,.09)!important;
}

.ngk-product-loop-card__button--cart,
.woocommerce ul.products li.product.ngk-product-loop-card .gamehub-add-cart-link,
.woocommerce-page ul.products li.product.ngk-product-loop-card .gamehub-add-cart-link{
  color:#fff!important;
  background:linear-gradient(180deg,#3b82f6 0%,#2563eb 100%)!important;
  border:1px solid #2563eb!important;
}

.ngk-product-loop-card__button--cart:hover,
.woocommerce ul.products li.product.ngk-product-loop-card .gamehub-add-cart-link:hover,
.woocommerce-page ul.products li.product.ngk-product-loop-card .gamehub-add-cart-link:hover{
  color:#fff!important;
  background:linear-gradient(180deg,#2563eb 0%,#1d4ed8 100%)!important;
  transform:translateY(-1px)!important;
}

.ngk-product-loop-card__button--buy,
.woocommerce ul.products li.product.ngk-product-loop-card .gamehub-buy-now-link,
.woocommerce-page ul.products li.product.ngk-product-loop-card .gamehub-buy-now-link{
  color:#fff!important;
  background:linear-gradient(180deg,#22c55e 0%,#16a34a 100%)!important;
  border:1px solid #16a34a!important;
}

.ngk-product-loop-card__button--buy:hover,
.woocommerce ul.products li.product.ngk-product-loop-card .gamehub-buy-now-link:hover,
.woocommerce-page ul.products li.product.ngk-product-loop-card .gamehub-buy-now-link:hover{
  color:#fff!important;
  background:linear-gradient(180deg,#16a34a 0%,#15803d 100%)!important;
  transform:translateY(-1px)!important;
}

.ngk-product-loop-card__actions--disabled{
  grid-template-columns:1fr!important;
}

.ngk-product-loop-card__disabled{
  color:#64748b!important;
  border:1px solid #e2e8f0!important;
  background:#f1f5f9!important;
  box-shadow:none!important;
}

@media (max-width:1500px){
  .woocommerce ul.products,
  .woocommerce-page ul.products,
  .woocommerce .products.columns-3,
  .woocommerce .products.columns-4,
  .products{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:900px){
  .woocommerce ul.products,
  .woocommerce-page ul.products,
  .woocommerce .products.columns-3,
  .woocommerce .products.columns-4,
  .products{
    grid-template-columns:1fr!important;
  }

  .woocommerce ul.products li.product.ngk-product-loop-card,
  .woocommerce-page ul.products li.product.ngk-product-loop-card{
    grid-template-columns:142px minmax(0,1fr)!important;
    min-height:232px!important;
  }
}

@media (max-width:520px){
  .woocommerce ul.products li.product.ngk-product-loop-card,
  .woocommerce-page ul.products li.product.ngk-product-loop-card{
    grid-template-columns:120px minmax(0,1fr)!important;
    min-height:206px!important;
    padding:12px!important;
    gap:12px!important;
    border-radius:16px!important;
  }

  .ngk-product-loop-card__image{
    min-height:120px!important;
    padding:8px!important;
    border-radius:14px!important;
  }

  .ngk-product-loop-card__title{
    font-size:15px!important;
  }

  .ngk-product-loop-card__price,
  .woocommerce ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__price,
  .woocommerce-page ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__price{
    font-size:17px!important;
  }

  .ngk-product-loop-card__line{
    font-size:12px!important;
  }

  .ngk-product-loop-card__button,
  .ngk-product-loop-card__disabled,
  .woocommerce ul.products li.product.ngk-product-loop-card .gamehub-add-cart-link,
  .woocommerce ul.products li.product.ngk-product-loop-card .gamehub-buy-now-link,
  .woocommerce-page ul.products li.product.ngk-product-loop-card .gamehub-add-cart-link,
  .woocommerce-page ul.products li.product.ngk-product-loop-card .gamehub-buy-now-link{
    min-height:40px!important;
    font-size:11px!important;
    padding:7px 6px!important;
  }
}

/* NGKSHOP v1.9.81 - chỉ chỉnh riêng trang danh mục gamepass-gift: ảnh gọn, vừa khung hơn */
body.tax-product_cat.term-gamepass-gift .woocommerce ul.products li.product.ngk-product-loop-card,
body.tax-product_cat.term-gamepass-gift .woocommerce-page ul.products li.product.ngk-product-loop-card,
body.term-gamepass-gift .woocommerce ul.products li.product.ngk-product-loop-card,
body.term-gamepass-gift .woocommerce-page ul.products li.product.ngk-product-loop-card{
  grid-template-columns:118px minmax(0,1fr)!important;
  min-height:218px!important;
  align-items:center!important;
}

body.tax-product_cat.term-gamepass-gift .ngk-product-loop-card__media,
body.term-gamepass-gift .ngk-product-loop-card__media{
  width:118px!important;
  height:auto!important;
  align-self:center!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

body.tax-product_cat.term-gamepass-gift .ngk-product-loop-card__image,
body.term-gamepass-gift .ngk-product-loop-card__image{
  width:118px!important;
  height:118px!important;
  min-height:118px!important;
  max-height:118px!important;
  aspect-ratio:1/1!important;
  padding:5px!important;
  border-radius:18px!important;
}

body.tax-product_cat.term-gamepass-gift .woocommerce ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__image img,
body.tax-product_cat.term-gamepass-gift .woocommerce-page ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__image img,
body.term-gamepass-gift .woocommerce ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__image img,
body.term-gamepass-gift .woocommerce-page ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__image img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
}

@media (max-width:900px){
  body.tax-product_cat.term-gamepass-gift .woocommerce ul.products li.product.ngk-product-loop-card,
  body.tax-product_cat.term-gamepass-gift .woocommerce-page ul.products li.product.ngk-product-loop-card,
  body.term-gamepass-gift .woocommerce ul.products li.product.ngk-product-loop-card,
  body.term-gamepass-gift .woocommerce-page ul.products li.product.ngk-product-loop-card{
    grid-template-columns:112px minmax(0,1fr)!important;
    min-height:206px!important;
  }

  body.tax-product_cat.term-gamepass-gift .ngk-product-loop-card__media,
  body.term-gamepass-gift .ngk-product-loop-card__media,
  body.tax-product_cat.term-gamepass-gift .ngk-product-loop-card__image,
  body.term-gamepass-gift .ngk-product-loop-card__image{
    width:112px!important;
    height:112px!important;
    min-height:112px!important;
    max-height:112px!important;
  }
}

@media (max-width:520px){
  body.tax-product_cat.term-gamepass-gift .woocommerce ul.products li.product.ngk-product-loop-card,
  body.tax-product_cat.term-gamepass-gift .woocommerce-page ul.products li.product.ngk-product-loop-card,
  body.term-gamepass-gift .woocommerce ul.products li.product.ngk-product-loop-card,
  body.term-gamepass-gift .woocommerce-page ul.products li.product.ngk-product-loop-card{
    grid-template-columns:98px minmax(0,1fr)!important;
    min-height:188px!important;
  }

  body.tax-product_cat.term-gamepass-gift .ngk-product-loop-card__media,
  body.term-gamepass-gift .ngk-product-loop-card__media,
  body.tax-product_cat.term-gamepass-gift .ngk-product-loop-card__image,
  body.term-gamepass-gift .ngk-product-loop-card__image{
    width:98px!important;
    height:98px!important;
    min-height:98px!important;
    max-height:98px!important;
    padding:4px!important;
    border-radius:15px!important;
  }
}


/* NGKSHOP v1.9.84 - áp dụng kiểu ảnh gọn giống gamepass-gift cho trang perm-fruit-gift */
body.tax-product_cat.term-perm-fruit-gift .woocommerce ul.products li.product.ngk-product-loop-card,
body.tax-product_cat.term-perm-fruit-gift .woocommerce-page ul.products li.product.ngk-product-loop-card,
body.term-perm-fruit-gift .woocommerce ul.products li.product.ngk-product-loop-card,
body.term-perm-fruit-gift .woocommerce-page ul.products li.product.ngk-product-loop-card{
  grid-template-columns:118px minmax(0,1fr)!important;
  min-height:218px!important;
  align-items:center!important;
}

body.tax-product_cat.term-perm-fruit-gift .ngk-product-loop-card__media,
body.term-perm-fruit-gift .ngk-product-loop-card__media{
  width:118px!important;
  height:auto!important;
  align-self:center!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

body.tax-product_cat.term-perm-fruit-gift .ngk-product-loop-card__image,
body.term-perm-fruit-gift .ngk-product-loop-card__image{
  width:118px!important;
  height:118px!important;
  min-height:118px!important;
  max-height:118px!important;
  aspect-ratio:1/1!important;
  padding:5px!important;
  border-radius:18px!important;
}

body.tax-product_cat.term-perm-fruit-gift .woocommerce ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__image img,
body.tax-product_cat.term-perm-fruit-gift .woocommerce-page ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__image img,
body.term-perm-fruit-gift .woocommerce ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__image img,
body.term-perm-fruit-gift .woocommerce-page ul.products li.product.ngk-product-loop-card .ngk-product-loop-card__image img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
}

@media (max-width:900px){
  body.tax-product_cat.term-perm-fruit-gift .woocommerce ul.products li.product.ngk-product-loop-card,
  body.tax-product_cat.term-perm-fruit-gift .woocommerce-page ul.products li.product.ngk-product-loop-card,
  body.term-perm-fruit-gift .woocommerce ul.products li.product.ngk-product-loop-card,
  body.term-perm-fruit-gift .woocommerce-page ul.products li.product.ngk-product-loop-card{
    grid-template-columns:112px minmax(0,1fr)!important;
    min-height:206px!important;
  }

  body.tax-product_cat.term-perm-fruit-gift .ngk-product-loop-card__media,
  body.term-perm-fruit-gift .ngk-product-loop-card__media,
  body.tax-product_cat.term-perm-fruit-gift .ngk-product-loop-card__image,
  body.term-perm-fruit-gift .ngk-product-loop-card__image{
    width:112px!important;
    height:112px!important;
    min-height:112px!important;
    max-height:112px!important;
  }
}

@media (max-width:520px){
  body.tax-product_cat.term-perm-fruit-gift .woocommerce ul.products li.product.ngk-product-loop-card,
  body.tax-product_cat.term-perm-fruit-gift .woocommerce-page ul.products li.product.ngk-product-loop-card,
  body.term-perm-fruit-gift .woocommerce ul.products li.product.ngk-product-loop-card,
  body.term-perm-fruit-gift .woocommerce-page ul.products li.product.ngk-product-loop-card{
    grid-template-columns:98px minmax(0,1fr)!important;
    min-height:188px!important;
  }

  body.tax-product_cat.term-perm-fruit-gift .ngk-product-loop-card__media,
  body.term-perm-fruit-gift .ngk-product-loop-card__media,
  body.tax-product_cat.term-perm-fruit-gift .ngk-product-loop-card__image,
  body.term-perm-fruit-gift .ngk-product-loop-card__image{
    width:98px!important;
    height:98px!important;
    min-height:98px!important;
    max-height:98px!important;
    padding:4px!important;
    border-radius:15px!important;
  }
}

/* NGKSHOP v2.0.07 - premium quick quantity picker on product cards */
.ngk-product-loop-card__qty{
  width:100%!important;
  min-width:0!important;
  margin:2px 0 0!important;
  padding:8px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:8px!important;
  border-radius:16px!important;
  border:1px solid rgba(191,219,254,.92)!important;
  background:linear-gradient(135deg,#eff6ff 0%,#ffffff 100%)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 8px 18px rgba(37,99,235,.07)!important;
  overflow:hidden!important;
}

.ngk-product-loop-card__qty-copy{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
}

.ngk-product-loop-card__qty-label{
  display:block!important;
  color:#0f172a!important;
  font-size:12px!important;
  line-height:1.15!important;
  font-weight:1000!important;
  white-space:nowrap!important;
}

.ngk-product-loop-card__qty-max{
  display:block!important;
  color:#64748b!important;
  font-size:10.5px!important;
  line-height:1.15!important;
  font-weight:850!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.ngk-product-loop-card__qty-box{
  width:112px!important;
  min-width:112px!important;
  height:36px!important;
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr) 34px!important;
  align-items:center!important;
  overflow:hidden!important;
  border-radius:13px!important;
  border:1px solid rgba(37,99,235,.18)!important;
  background:#fff!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06)!important;
}

.ngk-product-loop-card__qty-btn{
  width:34px!important;
  height:36px!important;
  min-width:34px!important;
  min-height:36px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  display:grid!important;
  place-items:center!important;
  cursor:pointer!important;
  color:#1d4ed8!important;
  background:#f8fbff!important;
  font-size:18px!important;
  line-height:1!important;
  font-weight:1000!important;
  box-shadow:none!important;
  transition:background .15s ease,color .15s ease,opacity .15s ease!important;
}

.ngk-product-loop-card__qty-btn:hover:not(:disabled){
  color:#fff!important;
  background:linear-gradient(135deg,#2563eb,#1d4ed8)!important;
}

.ngk-product-loop-card__qty-btn:disabled{
  cursor:not-allowed!important;
  opacity:.42!important;
  color:#94a3b8!important;
  background:#f1f5f9!important;
}

.ngk-product-loop-card__qty-input{
  width:100%!important;
  min-width:0!important;
  height:36px!important;
  padding:0 3px!important;
  margin:0!important;
  border:0!important;
  outline:0!important;
  border-left:1px solid rgba(37,99,235,.13)!important;
  border-right:1px solid rgba(37,99,235,.13)!important;
  border-radius:0!important;
  background:#fff!important;
  color:#07132b!important;
  text-align:center!important;
  font-size:14px!important;
  line-height:36px!important;
  font-weight:1000!important;
  box-shadow:none!important;
  -moz-appearance:textfield!important;
}

.ngk-product-loop-card__qty-input::-webkit-outer-spin-button,
.ngk-product-loop-card__qty-input::-webkit-inner-spin-button{
  -webkit-appearance:none!important;
  margin:0!important;
}

@media(max-width:520px){
  .ngk-product-loop-card__qty{grid-template-columns:1fr!important;gap:7px!important;padding:8px!important}
  .ngk-product-loop-card__qty-copy{flex-direction:row!important;justify-content:space-between!important;align-items:center!important;gap:8px!important}
  .ngk-product-loop-card__qty-box{width:100%!important;min-width:0!important;grid-template-columns:40px minmax(0,1fr) 40px!important}
  .ngk-product-loop-card__qty-btn{width:40px!important;min-width:40px!important}
}
