/* MJT 2026 — Product Cards */

.mjt-product-card {
  list-style: none; margin: 0; padding: 0;
}
.mjt-product-card__inner, .mjt-product-card--demo {
  display: flex; flex-direction: column; height: 100%;
  background: var(--mjt-color-surface); border-radius: var(--mjt-radius-lg);
  overflow: hidden; box-shadow: none;
  border: 1px solid color-mix(in srgb, var(--mjt-color-border) 82%, #fff);
  transition: transform var(--mjt-transition), box-shadow var(--mjt-transition);
}
.mjt-shop-content ul.products.mjt-view-list .mjt-product-card__inner {
  display: grid !important;
  flex-direction: unset;
  height: auto;
}
.mjt-product-card:hover .mjt-product-card__inner,
.mjt-product-card--demo:hover {
  transform: translateY(var(--mjt-lift-hover));
  box-shadow: 0 12px 24px rgba(17,17,17,0.08);
}

.mjt-product-card__media {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  aspect-ratio: 4/5;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 70% at 18% 12%, rgba(198, 161, 91, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 70% 60% at 88% 88%, rgba(231, 226, 215, 0.9) 0%, transparent 55%),
    linear-gradient(155deg, #f8f5f0 0%, #efe9df 48%, #e8e2d8 100%);
}
.mjt-product-card__media-blob {
  position: absolute;
  display: block;
  border-radius: 46% 54% 58% 42% / 42% 38% 62% 58%;
  pointer-events: none;
  z-index: 0;
}
.mjt-product-card__media-blob--a {
  width: 52%;
  height: 44%;
  top: -6%;
  right: -10%;
  background: color-mix(in srgb, var(--mjt-color-gold) 18%, #fff);
  opacity: 0.55;
}
.mjt-product-card__media-blob--b {
  width: 42%;
  height: 36%;
  bottom: -8%;
  left: -8%;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0.8;
}
.mjt-product-card__media-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #f3eee6;
}
.mjt-product-card--dual-image .mjt-product-card__media-frame {
  display: block;
}
.mjt-product-card__media::after {
  content: '';
  position: absolute;
  inset: auto 10% 8%;
  height: 18%;
  background: radial-gradient(ellipse at center, rgba(17, 17, 17, 0.08) 0%, transparent 72%);
  pointer-events: none;
  z-index: 1;
}
.mjt-product-card__quick {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17,17,17,0.35);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 3;
}
.mjt-product-card:hover .mjt-product-card__quick { opacity: 1; }
.mjt-product-card__quick-btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mjt-color-bg-dark);
  background: #fff;
  border-radius: var(--mjt-radius-full);
  box-shadow: var(--mjt-shadow-md);
}
.mjt-product-card__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  filter: none;
  transition: opacity 0.45s ease, transform 0.55s ease;
}
.mjt-product-card:not(.mjt-product-card--dual-image) .mjt-product-card__image {
  position: absolute;
  inset: 0;
}
.mjt-product-card--dual-image .mjt-product-card__image--primary,
.mjt-product-card--dual-image .mjt-product-card__image--hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
}
.mjt-product-card__media img[src*="woocommerce-placeholder"] {
  object-fit: contain;
  padding: 18%;
  opacity: 0.75;
  filter: none;
  position: relative;
  inset: auto;
}
.mjt-product-card__image--hover {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.mjt-product-badges {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  max-width: calc(100% - 1.3rem);
  pointer-events: none;
}
.mjt-product-badges .mjt-badge {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.12);
}
.mjt-product-badges .mjt-badge--new {
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  max-width: 2.75rem;
  padding: 0;
  border-radius: 50%;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}
.mjt-product-badges .mjt-badge--points-multiplier {
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.mjt-product-card--dual-image .mjt-product-card__image--primary {
  opacity: 1;
  transform: none;
}
.mjt-product-card--dual-image .mjt-product-card__image--hover {
  opacity: 0;
  transform: none;
}
.mjt-product-card--dual-image:hover .mjt-product-card__image--primary {
  opacity: 0;
  transform: none;
}
.mjt-product-card--dual-image:hover .mjt-product-card__image--hover {
  opacity: 1;
  transform: none;
}
.mjt-product-card--dual-image .mjt-product-card__media-frame {
  transition: none;
}
.mjt-product-card--dual-image:hover .mjt-product-card__media-frame {
  transform: none;
}
.mjt-product-card:hover .mjt-product-card__image:only-child { transform: scale(1.03); opacity: 1; }
.mjt-product-card--dual-image:hover .mjt-product-card__image--hover { transform: scale(1.03); }

.mjt-product-card__body { padding: 0.85rem 1rem 0.35rem; display: flex; flex-direction: column; flex: 1; gap: 0.35rem; }
.mjt-product-card__rating { font-size: 0.85rem; }
.mjt-product-card__title { font-family: var(--mjt-font-body); font-size: 0.9rem; font-weight: 600; margin: 0; line-height: 1.35; min-height: calc(1.35em * 2); }
.mjt-product-card__title a { color: inherit; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mjt-product-card__title a:hover { color: var(--mjt-color-accent); }
.mjt-product-card__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--mjt-color-accent);
  line-height: 1.2;
}
.mjt-product-card__price .woocommerce-Price-amount { font-weight: 700; }
.mjt-product-card__price del { opacity: 0.45; font-weight: 400; font-size: 0.9rem; margin-right: 0.35rem; color: var(--mjt-color-text-muted); }
.mjt-product-card__price ins { text-decoration: none; }
.mjt-product-card__price ins .woocommerce-Price-amount { color: var(--mjt-color-accent); }
.mjt-product-card.is-on-sale .mjt-product-card__price {
  color: var(--mjt-color-accent);
}
.mjt-product-card__price .from { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mjt-color-text-muted); margin-right: 0.25rem; }
.mjt-price-contact { font-size: 0.85rem; font-weight: 600; color: var(--mjt-color-text-muted); }

.mjt-product-card__meta-label { display: none; }
.mjt-product-card__swatches,
.mjt-product-card__sizes { display: none; }
.mjt-product-card__variants { display: none; }
.mjt-product-card__footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-top: 0.2rem;
  min-height: 1.75rem;
}
.mjt-product-card__footer.is-empty {
  visibility: hidden;
}
.mjt-product-card__swatch-list,
.mjt-product-card__size-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.mjt-product-card__swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--mjt-color-border);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
  flex-shrink: 0;
}
.mjt-product-card__swatch-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 0.2rem;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--mjt-color-text-muted);
  border-radius: 999px;
  background: var(--mjt-color-bg-alt);
}
.mjt-product-card__size-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mjt-color-text-muted);
  border: 1px solid var(--mjt-color-border);
  border-radius: 3px;
  background: var(--mjt-color-bg-alt);
}
.mjt-product-card__size-dot { display: none; }
.mjt-product-card__size-more { display: none; }
.mjt-product-card__options { display: none; }
.mjt-product-card__points {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.15rem 0 0;
  min-height: 1.55rem;
  font-size: 0.74rem;
  color: var(--mjt-color-text-muted);
}
.mjt-product-card__points--empty {
  margin: 0.15rem 0 0;
}
.mjt-product-card__points-mult {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mjt-color-accent) 14%, var(--mjt-color-surface));
  color: var(--mjt-color-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.mjt-product-card__points-value {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mjt-color-gold) 28%, var(--mjt-color-surface));
  color: var(--mjt-color-text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.mjt-product-card__points-icon {
  color: var(--mjt-color-accent);
  font-size: 0.7rem;
  line-height: 1;
}
.mjt-product-card__points strong {
  display: none;
}
.mjt-product-card__media-wrap { position: relative; }
.mjt-product-card__toolbar {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.mjt-product-card__tool {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--mjt-color-surface);
  color: var(--mjt-color-text);
  box-shadow: var(--mjt-shadow-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.mjt-product-card__tool:hover {
  background: var(--mjt-color-accent);
  color: var(--mjt-color-text-inverse);
  transform: translateY(var(--mjt-lift-hover));
  box-shadow: var(--mjt-shadow-button-hover);
}
.mjt-wishlist-toggle.is-active {
  background: var(--mjt-color-accent);
  color: var(--mjt-color-text-inverse);
}
.mjt-wishlist-toggle.is-active .mjt-icon {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}
.mjt-product-card__tool-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.mjt-product-card__meta-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.1rem;
  min-height: 2.35rem;
}
.mjt-product-card__category {
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  margin: 0 0 0.1rem;
  padding: 0.22rem 0.6rem;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--mjt-color-text);
  line-height: 1.3;
  background: color-mix(in srgb, var(--mjt-color-accent) 9%, var(--mjt-color-bg-alt));
  border: 1px solid color-mix(in srgb, var(--mjt-color-accent) 20%, var(--mjt-color-border));
  border-radius: 999px;
}
.mjt-product-card__rating .star-rating {
  float: none;
  margin: 0;
  font-size: 0.78rem;
}
.mjt-product-card__rating .count {
  margin-left: 0.25rem;
  font-size: 0.72rem;
  color: var(--mjt-color-text-muted);
}
.mjt-product-card__inner > .mjt-product-card__body {
  flex: 1 1 auto;
  min-height: 0;
}
.mjt-product-card__inner > .mjt-product-card__actions {
  margin-top: auto;
  padding: 0.5rem 1rem 1rem;
}
.mjt-product-card__actions .button,
.mjt-product-card__actions .add_to_cart_button {
  width: 100%;
  text-align: center;
  border-radius: var(--mjt-radius-full) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.56rem 0.85rem !important;
  background: var(--mjt-color-accent) !important;
  color: #fff !important;
  border: none !important;
  transition: transform var(--mjt-transition), box-shadow var(--mjt-transition), background var(--mjt-transition-fast) !important;
}
.mjt-product-card__actions .button:hover,
.mjt-product-card__actions .add_to_cart_button:hover {
  background: var(--mjt-color-accent-hover) !important;
  color: #fff !important;
  transform: translateY(var(--mjt-lift-hover));
  box-shadow: var(--mjt-shadow-button-hover);
}

/* Hide wishlist / compare / quick-view on hover-capable pointers; show on card hover. */
@media (hover: hover) and (pointer: fine) {
  .mjt-product-card__toolbar {
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    pointer-events: none;
  }
  .mjt-product-card:hover .mjt-product-card__toolbar,
  .mjt-product-card:focus-within .mjt-product-card__toolbar {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
  }
}

/* Woodmart-inspired interaction pattern — shop archive only (desktop). */
@media (min-width: 1025px) {
  .mjt-shop-content .mjt-product-card {
    --mjt-card-hover-offset: 46px;
  }
  .mjt-shop-content .mjt-product-card__inner {
    position: relative;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    will-change: transform;
  }
  .mjt-shop-content .mjt-product-card__body {
    position: relative;
    padding-bottom: calc(0.5rem + var(--mjt-card-hover-offset));
  }
  .mjt-shop-content .mjt-product-card__inner > .mjt-product-card__actions {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 0;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .mjt-shop-content .mjt-product-card:hover .mjt-product-card__inner > .mjt-product-card__actions,
  .mjt-shop-content .mjt-product-card:focus-within .mjt-product-card__inner > .mjt-product-card__actions {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}
@media (max-width: 1099px) {
  .mjt-shop-content .mjt-product-card__inner > .mjt-product-card__actions,
  .mjt-product-card__inner > .mjt-product-card__actions {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

/* List view — home/search grids only (shop archive uses shop.css) */
.mjt-products__grid.mjt-view-list,
.mjt-search-page__grid.mjt-view-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mjt-products__grid.mjt-view-list .mjt-product-card__inner,
.mjt-search-page__grid.mjt-view-list .mjt-product-card__inner {
  flex-direction: row;
  max-height: 200px;
}
.mjt-products__grid.mjt-view-list .mjt-product-card__media,
.mjt-search-page__grid.mjt-view-list .mjt-product-card__media {
  width: 200px;
  flex-shrink: 0;
  aspect-ratio: auto;
}

@media (max-width: 767px) {
  .mjt-products__grid.mjt-view-list .mjt-product-card__inner,
  .mjt-search-page__grid.mjt-view-list .mjt-product-card__inner {
    flex-direction: column;
    max-height: none;
  }
  .mjt-products__grid.mjt-view-list .mjt-product-card__media,
  .mjt-search-page__grid.mjt-view-list .mjt-product-card__media {
    width: 100%;
    aspect-ratio: 4/3;
  }
}
