.qem-product-card--approved {
  --color-surface: #ffffff;
  --color-surface-muted: #f1f3f6;
  --color-text: #151922;
  --color-text-muted: #5f6876;
  --color-text-subtle: #7d8694;
  --color-border: #dfe4ea;
  --color-primary: #1f3447;
  --color-primary-hover: #172737;
  --color-accent: #2f5f8f;
  --color-accent-hover: #244b72;
  --color-accent-soft: #eef5fb;
  --color-success: #207856;
  --color-success-soft: #edf7f2;
  --color-warning: #8b5a10;
  --color-warning-soft: #fff7e8;
  --color-danger: #a73545;
  --color-danger-soft: #fff1f3;
  --color-info: #315c91;
  --color-info-soft: #eef5ff;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --radius-4: 4px;

  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-4);
  background: var(--color-surface);
  box-shadow: none;
}

.qem-product-card--approved:hover,
.qem-product-card--approved:focus-within {
  border-color: var(--color-border);
  box-shadow: none;
  transform: none;
}

.qem-product-card--approved .qem-product-card__media {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  min-height: 156px;
  place-items: center;
  overflow: hidden;
  aspect-ratio: auto;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-text-subtle);
  padding: 0;
  text-decoration: none;
}

.qem-product-card--approved .qem-product-card__media img {
  width: 100%;
  height: 196px;
  object-fit: cover;
  transition: transform .18s ease;
}

.qem-product-card--approved:hover .qem-product-card__media img,
.qem-product-card--approved:focus-within .qem-product-card__media img {
  transform: scale(1.015);
}

.qem-product-card--approved .qem-product-card__labels {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  max-width: calc(100% - 1.5rem);
}

.qem-product-card--approved .qem-product-card__timer {
  position: absolute;
  inset: auto auto var(--space-3) var(--space-3);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  max-width: calc(100% - 1.5rem);
  border: 1px solid rgba(180, 83, 9, .2);
  border-radius: 999px;
  background: rgba(255, 251, 235, .95);
  box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
  color: #92400e;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  pointer-events: none;
  white-space: nowrap;
}

.qem-product-card--approved .product-tile__body {
  grid-column: 1 / -1;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}

.qem-product-card--approved .qem-product-card__meta,
.qem-product-card--approved .qem-rating,
.qem-product-card--approved .commerce-status-row,
.qem-product-card--approved .product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.qem-product-card--approved .qem-product-card__meta,
.qem-product-card--approved .qem-rating {
  color: var(--color-text-muted);
  font-size: .875rem;
}

.qem-product-card--approved .qem-product-card__title {
  display: -webkit-box;
  max-height: calc(1.28em * 2);
  min-height: calc(1.28em * 2);
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
  color: var(--color-text);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.28;
}

.qem-product-card--approved .qem-product-card__title a {
  color: inherit;
  text-decoration: none;
}

.qem-product-card--approved .qem-product-card__title a:hover,
.qem-product-card--approved .qem-product-card__title a:focus {
  color: var(--color-accent);
}

.qem-product-card--approved .qem-product-card__text {
  display: block;
  overflow: visible;
  -webkit-line-clamp: initial;
  -webkit-box-orient: initial;
  margin: 0;
  color: var(--color-text-muted);
  font-size: .875rem;
  line-height: 1.45;
}

.qem-product-card--approved .qem-product-card__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: .875rem;
  opacity: 1;
  transform: none;
  transition: opacity 160ms ease;
}

.qem-product-card--approved .qem-price {
  color: var(--color-text);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.2;
}

.qem-product-card--approved .qem-product-card__old-price,
.qem-product-card--approved .qem-product-card__discount {
  color: var(--color-text-muted);
  font-size: .875rem;
}

.qem-product-card--approved .qem-product-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  opacity: 1;
  transform: none;
  transition: opacity 160ms ease;
}

.qem-product-card--approved .qem-product-card__cta {
  color: var(--color-accent);
  font-size: .875rem;
  font-weight: 500;
}

.qem-product-card--approved .qem-badge,
.qem-product-card--approved .badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid currentColor;
  border-radius: var(--radius-4);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  padding: .18rem .48rem;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.qem-product-card--approved .badge-success,
.qem-product-card--approved .qem-badge--success {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.qem-product-card--approved .badge-info,
.qem-product-card--approved .qem-badge--info,
.qem-product-card--approved .qem-badge--exclusive {
  background: var(--color-info-soft);
  color: var(--color-info);
}

.qem-product-card--approved .badge-accent,
.qem-product-card--approved .qem-badge--featured {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.qem-product-card--approved .qem-badge--warning {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.qem-product-card--approved .qem-badge--danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.qem-product-card--approved .product-actions {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.qem-product-card--approved .qem-product-card__actions {
  position: absolute;
  right: var(--space-2);
  bottom: var(--space-4);
  left: var(--space-2);
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
  visibility: visible;
}

.qem-product-card--approved .qem-product-card__actions::before {
  position: absolute;
  inset: -22px calc(var(--space-2) * -1) calc(var(--space-4) * -1);
  z-index: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), #ffffff 32%);
  content: "";
  pointer-events: none;
}

.qem-product-card--approved:hover .qem-product-card__actions,
.qem-product-card--approved:focus-within .qem-product-card__actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.qem-product-card--approved:hover .qem-product-card__price-row,
.qem-product-card--approved:hover .qem-product-card__footer,
.qem-product-card--approved:focus-within .qem-product-card__price-row,
.qem-product-card--approved:focus-within .qem-product-card__footer {
  opacity: 0;
}

.qem-product-card--approved .product-actions__primary-row {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.qem-product-card--approved .qem-product-card__cart-form {
  display: block;
  min-width: 0;
}

.qem-product-card--approved .product-actions__secondary,
.qem-product-card--approved .qem-product-card__action--wide {
  position: relative;
  z-index: 1;
}

.qem-product-card--approved .qem-product-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-4);
  padding: .55rem .75rem;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.qem-product-card--approved .qem-product-card__action--primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.qem-product-card--approved .qem-product-card__action--primary:hover,
.qem-product-card--approved .qem-product-card__action--primary:focus {
  border-color: var(--color-primary-hover);
  background: var(--color-primary-hover);
  color: #fff;
}

.qem-product-card--approved .qem-product-card__action--soft {
  border-color: var(--color-accent);
  background: transparent;
  color: var(--color-accent);
}

.qem-product-card--approved .qem-product-card__action--soft:hover,
.qem-product-card--approved .qem-product-card__action--soft:focus {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.qem-product-card--approved .qem-product-card__action--affiliate {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
}

.qem-product-card--approved .qem-product-card__action--affiliate:hover,
.qem-product-card--approved .qem-product-card__action--affiliate:focus {
  border-color: var(--color-primary);
  background: var(--color-surface);
  color: var(--color-primary);
}

.qem-product-card--approved .qem-product-card__action--wide,
.qem-product-card--approved .product-actions__secondary {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .qem-product-card--approved .qem-product-card__media img {
    height: 172px;
  }

  .qem-product-card--approved .product-actions__primary-row {
    grid-template-columns: 1fr;
  }
}

@media (hover: none), (max-width: 700px) {
  .qem-product-card--approved .qem-product-card__actions {
    position: static;
    inset: auto;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .qem-product-card--approved .qem-product-card__actions::before {
    display: none;
  }

  .qem-product-card--approved:hover .qem-product-card__price-row,
  .qem-product-card--approved:hover .qem-product-card__footer,
  .qem-product-card--approved:focus-within .qem-product-card__price-row,
  .qem-product-card--approved:focus-within .qem-product-card__footer {
    opacity: 1;
  }
}

.qem-public-home .qem-product-card--approved .qem-product-card__media,
.qem-public-home .qem-product-card--approved .qem-product-card__media.commerce-media {
  background: #fff;
}

.qem-public-home .qem-product-card--approved .qem-product-card__title {
  display: -webkit-box;
  font-size: 15px;
  font-weight: 600;
  max-height: calc(1.28em * 2);
  min-height: calc(1.28em * 2);
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.qem-public-home .qem-product-card--approved .product-tile__body {
  gap: .4rem;
  padding: .75rem;
}

.qem-public-home .qem-product-card--approved .qem-product-card__labels {
  top: .55rem;
  left: .55rem;
  gap: .25rem;
  max-width: calc(100% - 1.1rem);
}

.qem-public-home .qem-product-card--approved .qem-badge,
.qem-public-home .qem-product-card--approved .badge {
  min-height: 18px;
  padding: .1rem .38rem;
  font-size: .6875rem;
  font-weight: 500;
  line-height: 1.1;
}

.qem-public-home .qem-product-card--approved .qem-product-card__meta,
.qem-public-home .qem-product-card--approved .qem-rating,
.qem-public-home .qem-product-card--approved .commerce-status-row {
  gap: .35rem;
}

.qem-public-home .qem-product-card--approved .qem-product-card__meta,
.qem-public-home .qem-product-card--approved .qem-rating {
  font-size: .75rem;
}

.qem-public-home .qem-product-card--approved .qem-product-card__text {
  font-size: .8125rem;
  line-height: 1.35;
}

.qem-public-home .qem-product-card--approved .qem-product-card__price-row {
  gap: .35rem;
}

.qem-public-home .qem-product-card--approved .qem-price {
  font-size: 1.0625rem;
}

.qem-public-home .qem-product-card--approved .qem-product-card__old-price,
.qem-public-home .qem-product-card--approved .qem-product-card__discount {
  font-size: .75rem;
}

.qem-public-home .qem-product-card--approved .qem-product-card__footer {
  min-height: 22px;
  gap: .35rem;
}

.qem-product-card--approved .qem-product-card__title {
  display: -webkit-box;
  max-height: calc(1.28em * 2);
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
/* Approved balanced card presentation: scoped to the shared product-card template. */
.qem-product-card.qem-product-card--balanced {
  display: flex;
  flex-direction: column;
}
.qem-product-card--balanced .qem-product-card__main {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.qem-product-card.qem-product-card--balanced .qem-product-card__media {
  display: block;
  position: relative;
  flex: none;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  background: #fff;
}
.qem-product-card.qem-product-card--balanced .qem-product-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  padding: 16px;
}
.qem-product-card.qem-product-card--balanced .qem-product-card__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  gap: .6rem;
}
.qem-product-card.qem-product-card--balanced .qem-product-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  height: 2.56em;
  min-height: 2.56em;
  max-height: 2.56em;
  line-height: 1.28;
  overflow: hidden;
  margin: 0;
  order: 0;
}
.qem-product-card--balanced .qem-product-card__price-row { order: 1; }
.qem-product-card--balanced .qem-rating { order: 2; }
.qem-product-card--balanced .qem-product-card__footer { order: 3; }
.qem-product-card--balanced .qem-product-card__actions { order: 4; }
.qem-product-card.qem-product-card--balanced .qem-product-card__discount {
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 0;
  color: #5f6876;
  font-weight: 400;
}
.qem-product-card.qem-product-card--balanced .qem-product-card__footer {
  align-items: flex-start;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  gap: .3rem;
}
.qem-product-card--balanced .qem-product-card__availability,
.qem-product-card--balanced .qem-product-card__options,
.qem-product-card--balanced .qem-product-card__purchase-notices {
  font-size: .8125rem;
  line-height: 1.4;
  color: #5f6876;
}
.qem-product-card--balanced .qem-product-card__purchase-notices {
  position: relative;
  z-index: 1;
  display: grid;
  grid-column: 1 / -1;
  gap: .2rem;
}
.qem-product-card--balanced .qem-product-card__labels:empty,
.qem-product-card--balanced .qem-rating:empty,
.qem-product-card--balanced .qem-product-card__footer:empty,
.qem-product-card--balanced .qem-product-card__purchase-notices:empty { display: none; }
.qem-product-card.qem-product-card--balanced .qem-rating[hidden],
.qem-product-card--balanced .qem-product-card__footer:not(:has(*)),
.qem-product-card--balanced .qem-product-card__purchase-notices:not(:has(*)),
.qem-product-card--balanced .qem-product-card__labels:not(:has(*)) { display: none; }
.qem-product-card.qem-product-card--balanced .qem-product-card__labels {
  position: absolute;
  top: .65rem;
  left: .65rem;
  z-index: 2;
}
/* Override the legacy card layout's !important grid declaration. */
.qem-product-card.qem-product-card--balanced.commerce-card.product-tile,
.qem-product-card--balanced .qem-product-card__main.product-tile__link {
  display: flex !important;
  flex-direction: column;
}
@media (hover: none), (max-width: 700px) {
  .qem-product-card--balanced.qem-product-card--approved .qem-product-card__actions {
    box-sizing: border-box;
    width: 100%;
    margin: .25rem 0 0;
    padding: 0;
  }
}
