/* ✦ NEW — product card for the dx-* sections. Scoped under .dx-card; the old card is untouched. */

.dx-card {
  --dx-card-accent: var(--dx-accent, #bb9e7b);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--dx-text, #fff);
}

/* Media */
.dx-card__media {
  position: relative;
  aspect-ratio: var(--dx-card-ratio, 4 / 5);
  overflow: hidden;
  border-radius: 16px;
  background: var(--dx-card-surface, #161616);
}

.dx-card__imgs {
  position: absolute;
  inset: 0;
  display: block;
}

.dx-card__img,
.dx-card__img2 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--dx-card-fit, contain);
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform 1.1s cubic-bezier(.22, 1, .36, 1);
}

.dx-card__img--empty {
  object-fit: contain;
  padding: 22%;
  opacity: .35;
}

.dx-card__img2 {
  opacity: 0;
}

@media (hover: hover) {
  .dx-card:hover .dx-card__img {
    transform: scale(1.05);
  }

  .dx-card:hover .dx-card__img2 {
    opacity: 1;
    transform: scale(1.05);
  }
}

.dx-card.is-out .dx-card__img {
  filter: grayscale(.6);
  opacity: .6;
}

/* Badges */
.dx-card__badges {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.dx-card__badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.dx-card__badge--sale {
  background: #e5484d;
  color: #fff;
}

.dx-card__badge--out {
  background: rgba(0, 0, 0, .72);
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Wishlist: reuses the theme's .add-to-wishlist logic, restyled */
.dx-card .dx-card__wish {
  top: 10px;
  right: auto;
  left: auto;
  inset-inline-end: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dx-card .dx-card__wish button,
.dx-card .dx-card__wish a {
  padding: 0;
  border: 0;
}

.dx-card .dx-card__wish .icon-heart-mask {
  width: 18px;
  height: 16px;
  background-color: #fff;
}

.dx-card .dx-card__wish .icon-heart-mask.filled {
  background-color: #e5484d;
}

/* Body */
.dx-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
}

.dx-card .dx-card__name {
  display: -webkit-box;
  min-height: 2.9em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--dx-text, #fff);
  text-decoration: none;
  transition: color .3s;
}

.dx-card .dx-card__name:hover {
  color: var(--dx-card-accent);
}

.dx-card__rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--dx-text, #fff);
}

.dx-card__rating i {
  font-size: 12px;
  color: #f5b941;
}

.dx-card__rating small {
  color: var(--dx-muted, rgba(255, 255, 255, .6));
}

.dx-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.dx-card__price strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--dx-card-accent);
}

.dx-card__price del {
  font-size: 13px;
  color: var(--dx-muted, rgba(255, 255, 255, .5));
}

/* Action — pinned to the bottom so every card in a row lines up */
.dx-card__action {
  margin-top: auto;
  padding-top: 6px;
}

.dx-card .dx-card__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--dx-text, #fff) 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--dx-text, #fff) 4%, transparent);
  color: var(--dx-text, #fff);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .35s, border-color .35s, color .35s;
}

.dx-card .dx-card__btn:hover {
  border-color: var(--dx-card-accent);
  background: var(--dx-card-accent);
  color: #0b0b0b;
}

.dx-card .dx-card__btn--ghost {
  border-style: dashed;
  color: var(--dx-muted, rgba(255, 255, 255, .7));
}

.dx-card .dx-card__btn i {
  font-size: 14px;
}

.dx-card .dx-card__btn.is-loading {
  pointer-events: none;
  color: transparent;
}

.dx-card .dx-card__btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dxCardSpin .7s linear infinite;
}

.dx-card .dx-card__btn.is-added {
  border-color: #3fb37f;
  background: #3fb37f;
  color: #fff;
}

@keyframes dxCardSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 575.98px) {
  .dx-card__media {
    border-radius: 12px;
  }

  .dx-card .dx-card__name {
    font-size: 14px;
  }

  .dx-card__price strong {
    font-size: 15px;
  }

  .dx-card .dx-card__btn {
    min-height: 40px;
    font-size: 13px;
  }

  .dx-card .dx-card__btn i {
    display: none;
  }
}

/* A mouse click or tap leaves no browser focus box; keyboard users still get the focus-visible outline */
:where(.dx-card) :is(a, button, summary, input, select, textarea, video, [tabindex]):focus:not(:focus-visible) {
  outline: none;
}
