.product-card {
  min-height: 420px;
}

.category-filters .availability-filter {
  border-color: var(--aqua);
  color: var(--navy);
  background: var(--aqua-soft);
  font-weight: 900;
}

.category-filters .availability-filter.active {
  border-color: var(--success);
  color: #fff;
  background: var(--success);
}

.product-card-media {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.product-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

@media (max-width: 1150px) {
  .product-card {
    min-height: 390px;
  }
}

@media (max-width: 600px) {
  .product-card {
    min-height: 330px;
  }
}

.product-card-media small {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.product-card-media.missing {
  border-style: dashed;
  background: #f5f8f8;
}

.product-card-media.loading {
  background: linear-gradient(110deg, #eef4f5 25%, #fff 42%, #eef4f5 60%);
  background-size: 220% 100%;
  animation: pos-card-image-loading 1.1s linear infinite;
}

.product-card.backorder {
  border-color: #e2b1b1;
  background: #fffafa;
}

.product-card.backorder em {
  color: var(--danger);
  font-weight: 900;
}

.cart-line.backorder {
  border-color: #e2b1b1;
  background: #fffafa;
}

.cart-line .backorder-note {
  display: block;
  margin-top: 4px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.cart-product-info {
  min-width: 0;
}

.cart-line {
  padding: 15px 16px;
  gap: 16px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.cart-line .cart-product-info > strong {
  font-size: 15px;
  line-height: 1.35;
}

.cart-line .cart-product-info > small {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
}

.cart-line.selected {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(130, 192, 199, .2);
}

.cart-line.selected.backorder {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(170, 53, 53, .12);
}

.price-modified {
  margin-left: 4px;
  color: var(--success);
  font-weight: 900;
  text-decoration: line-through;
}

.line-price-editor {
  margin-top: 12px;
  padding: 12px;
  display: flex;
  align-items: end;
  gap: 10px;
  border-radius: 10px;
  background: var(--aqua-soft);
}

.line-price-editor label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 900;
}

.line-price-editor input {
  width: 150px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--aqua);
  border-radius: 9px;
  color: var(--navy);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.line-price-editor button {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--navy);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.serials {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.add-serial {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px dashed var(--aqua);
  border-radius: 7px;
  color: var(--navy);
  background: var(--aqua-soft);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.add-serial:disabled {
  display: none;
}

.serial-chip {
  max-width: 100%;
  padding: 4px 5px 4px 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  border-radius: 99px;
  color: #fff;
  background: var(--navy);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
}

.cart-line .qty {
  gap: 10px;
}

.cart-line .qty button {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  font-size: 20px;
  font-weight: 900;
}

.cart-line .qty b {
  min-width: 20px;
  font-size: 18px;
  text-align: center;
}

.serial-chip button {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--navy);
  background: var(--aqua);
  line-height: 1;
  cursor: pointer;
}

.serial-entry {
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
}

.serial-entry input {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--aqua);
  border-radius: 7px;
  outline: none;
  font-size: 9px;
}

.serial-entry button {
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--navy);
  font-size: 9px;
  font-weight: 900;
}

.availability-tooltip {
  position: fixed;
  z-index: 1200;
  width: 300px;
  padding: 13px;
  border: 1px solid #b9cdd1;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 16px 40px #00384f33;
  pointer-events: none;
}

.availability-tooltip[hidden] {
  display: none;
}

.availability-tooltip-heading {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.availability-tooltip-heading strong,
.availability-tooltip-heading small,
.availability-location b,
.availability-location small {
  display: block;
}

.availability-tooltip-heading strong {
  color: var(--navy);
  font-size: 12px;
}

.availability-tooltip-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.availability-purchase-price {
  margin-top: 9px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  color: var(--success);
  background: #e7f6ef;
}

.availability-purchase-price small {
  margin: 0;
  color: inherit;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.availability-purchase-price b {
  color: inherit;
  font-size: 11px;
  white-space: nowrap;
}

.availability-location {
  min-height: 38px;
  padding: 7px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
}

.availability-location.current {
  background: var(--aqua-soft);
}

.availability-location b {
  color: var(--navy);
  font-size: 11px;
}

.availability-location small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.availability-location > strong {
  min-width: 34px;
  padding: 5px 7px;
  border-radius: 99px;
  color: var(--danger);
  background: #fff0f0;
  text-align: center;
  font-size: 11px;
}

.availability-location.in-stock > strong {
  color: var(--success);
  background: #e7f6ef;
}

.product-card > strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@keyframes pos-card-image-loading {
  to { background-position: -220% 0; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .product-card {
    min-height: 420px;
  }

  .product-card-media {
    height: auto;
    margin-bottom: 14px;
  }
}
