/* ==========================================================================
   FROGA — bộ đếm số lượng "− 1 +" thay cho nút "Thêm vào giỏ" khi món đã ở giỏ
   ========================================================================== */

.froga-mua { position: relative; width: 100%; }
.froga-the-mua .froga-mua { width: auto; flex: 0 0 auto; }

/* đã có trong giỏ: giấu nút, hiện bộ đếm */
.froga-mua--co .froga-nut-mua,
.froga-mua--co .froga-the-nut,
.froga-mua .added_to_cart { display: none !important; }

.froga-dem {
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  background: #FFFFFF;
  border: 1.5px solid #23773C;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(23, 90, 43, .18);
}
.froga-dem[hidden] { display: none; }

.froga-dem-nut {
  flex: 0 0 48px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #23773C;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.froga-dem-nut:hover { background: #E7F2E4; }
.froga-dem-nut:active { background: #D7E6D4; }
.froga-dem-nut:focus-visible { outline: 2px solid #23773C; outline-offset: -2px; }

.froga-dem-so {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  color: #1E3B27;
  border-left: 1.5px solid #D7E6D4;
  border-right: 1.5px solid #D7E6D4;
  font-variant-numeric: tabular-nums;
}

/* đang chờ máy chủ: mờ nhẹ, không nhận bấm chồng */
.froga-mua--ban .froga-dem { opacity: .7; }
.froga-mua--ban .froga-dem-nut { pointer-events: none; }

/* thẻ trang chủ: nút là viên thuốc nhỏ hơn, bộ đếm cũng vậy */
.froga-the-mua .froga-dem { min-height: 42px; width: 140px; border-radius: 999px; }
.froga-the-mua .froga-dem-nut { flex-basis: 42px; font-size: 20px; }
.froga-the-mua--ngang .froga-dem { min-height: 38px; width: 124px; }

/* nút +/− nảy một nhịp khi bấm (dùng keyframe của chuyen-dong.css; không có thì thôi) */
html.froga-dong .froga-dem-nut.froga-nay { animation: froga-nay .35s cubic-bezier(.34, 1.56, .64, 1); }
