/* Shared purchase product-card component.
   Used by Admin purchase and customer main product lists. */
.purchase-product-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 10px;
  border-top: 0 !important;
}

.purchase-product-list .purchase-empty-state,
.purchase-product-list .admin-empty-state {
  grid-column: 1 / -1;
}

.purchase-product-item {
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #fff !important;
}

.purchase-product-thumb {
  position: relative;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 195 / 158;
  flex: 0 0 auto !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #f2f4f7 !important;
  overflow: hidden;
}

.purchase-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.purchase-stock-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: #ff6969;
  color: #fff;
  padding: 0 4px;
  font-size: 11px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: -0.0455em;
  white-space: nowrap;
}

.purchase-product-item.is-soldout .purchase-stock-badge {
  background: #8d96a3;
}

.purchase-product-main {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.purchase-product-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.purchase-product-category {
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  color: #4279ff !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  letter-spacing: -0.04em !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-product-main strong {
  width: 100%;
  min-height: 32px;
  color: #636363 !important;
  font-size: 13px !important;
  line-height: 16px !important;
  font-weight: 600 !important;
  letter-spacing: -0.0385em !important;
  word-break: keep-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.purchase-product-box-unit {
  flex: 0 0 auto;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 6px;
  border: 1px solid #e4ecf6;
  border-radius: 999px;
  background: #f8fbff;
  color: #667085 !important;
  box-sizing: border-box;
  font-size: 11px !important;
  line-height: 18px !important;
  font-weight: 500 !important;
  letter-spacing: -0.04em !important;
  white-space: nowrap;
}

.purchase-product-box-unit::before {
  content: "\f5b0";
  flex: 0 0 auto;
  color: #667085;
  font-family: bootstrap-icons !important;
  font-size: 10px;
  font-style: normal;
  font-weight: 400 !important;
  line-height: 1;
}

.purchase-product-purchase-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.purchase-product-price-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.purchase-product-price-meta {
  min-height: 16px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.purchase-product-price-meta em {
  color: #ff2f4a;
  font-style: normal;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.0615em;
}

.purchase-product-price-meta del {
  color: #bebebe;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: -0.0615em;
}

.purchase-product-price-current {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.purchase-product-discount-rate {
  color: #ff0000;
  font-style: normal;
  font-size: 13px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.0615em;
}

.purchase-product-price-stack b {
  color: #2d2d2d;
  font-size: 16px;
  line-height: 19px;
  font-weight: 700;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.purchase-card-qty-control {
  width: 78px;
  height: 28px;
  flex: 0 0 78px;
  display: grid;
  grid-template-columns: 24px 30px 24px;
  align-items: center;
  border: 1px solid #eaeaea;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.purchase-card-qty-control button {
  width: 100%;
  height: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #6c6c6c !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  padding: 0 !important;
}

.purchase-card-qty-control button:disabled {
  color: #c6cbd3 !important;
  cursor: not-allowed;
}

.purchase-card-qty-value {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 14px;
  line-height: 17px;
  font-weight: 400;
  letter-spacing: -0.0357em;
}

@media (max-width: 360px) {
  .purchase-product-list {
    gap: 14px 8px;
  }

  .purchase-card-qty-control {
    width: 72px;
    flex-basis: 72px;
    grid-template-columns: 22px 28px 22px;
  }

  .purchase-product-price-stack b {
    font-size: 15px;
  }
}
