/*
 * Legacy baseline for Home new arrivals and Shop all products.
 * marketplace-product-cards.css loads after this sheet and owns the fixed card layout.
 */
html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card {
  width: 100%;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__media {
  aspect-ratio: 1 / 1 !important;
  max-height: none !important;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__media {
  isolation: auto !important;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__media::before,
html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__media::after {
  display: none !important;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__image-link {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__media img {
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  mix-blend-mode: multiply;
}

html[data-site-theme=dark] body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__media,
html[data-site-theme=dark] body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__media:not(.is-immersive-active) img {
  background: transparent;
  mix-blend-mode: normal;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card:hover,
html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card:hover .mkt-card__media img {
  box-shadow: none;
  transform: none;
}

/* Compact, aligned grid with equal-height cards. */
html:root body:is(.page-home, .page-shop) :is(#featured .mkt-products, #shop-product-grid) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)) !important;
  gap: 22px 14px !important;
  align-items: stretch;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__media {
  flex: 0 0 auto;
  width: 100%;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 8px 2px 0;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__cat {
  display: block;
  overflow: hidden;
  margin: 0;
  color: #a07a2c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.3;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__title {
  min-height: 2.6em;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  min-height: 2.5em;
  margin: 2px 0 0;
  color: #641522;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__price s {
  color: #8d8386;
  font-size: 10px;
  font-weight: 400;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__availability {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
}

html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  height: auto;
  margin-top: auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

html[data-site-theme=dark] body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__price {
  color: #f3e8ea;
}

html[data-site-theme=dark] body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__cat {
  color: #d9b66c;
}

@media (hover: hover) {
  html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__media img {
    transition: transform .25s ease;
  }
  html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card:hover .mkt-card__media img {
    transform: scale(1.05);
  }
}

/* Laptops and larger: smaller cards, more per row */
@media (min-width: 992px) {
  html:root body:is(.page-home, .page-shop) :is(#featured .mkt-products, #shop-product-grid) {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important;
    gap: 24px 16px !important;
  }
  html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__title { font-size: 11.5px; }
  html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__price { font-size: 12px; }
  html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__action { min-height: 28px; padding: 5px 8px; font-size: 10.5px; }
}

/* Product card CTA */
html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__action {
  border: 0;
  background: linear-gradient(135deg, #7a1a2b, #4d0f1b);
  box-shadow: 0 6px 14px rgba(77, 15, 27, .22);
  color: #fff;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
html body:is(.page-home, .page-shop) :is(#featured, #shop-product-grid) .mkt-card__action:hover {
  box-shadow: 0 10px 20px rgba(77, 15, 27, .3);
  filter: brightness(1.08);
  transform: translateY(-1px);
}