.mf-story-grid,
.mf-search-results,
.mf-home ul.products,
.mf-home .products,
.mf-archive-content ul.products {
  display: grid;
  gap: 18px;
}

.mf-story-grid,
.mf-home ul.products,
.mf-home .products,
.mf-archive-content ul.products {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mf-home ul.products,
.mf-home .products,
.mf-archive-content ul.products {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mf-home ul.products::before,
.mf-home ul.products::after,
.mf-home .products::before,
.mf-home .products::after,
.mf-archive-content ul.products::before,
.mf-archive-content ul.products::after {
  display: none;
}

.mf-story-card,
.mf-product-card,
.mf-search-result-card {
  border: 1px solid var(--mf-color-border);
  border-radius: var(--mf-radius-lg);
  background: #fff;
  box-shadow: var(--mf-shadow-card);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.mf-home ul.products li.product,
.mf-home .products li.product,
.mf-archive-content ul.products li.product,
.mf-b2b .related.products ul.products li.product {
  list-style: none;
  width: 100% !important;
  min-width: 0;
  margin: 0 !important;
  float: none !important;
  display: flex !important;
  flex-direction: column;
  align-self: stretch;
}

.mf-story-card:hover,
.mf-product-card:hover,
.mf-search-result-card:hover,
.mf-home ul.products li.product:hover,
.mf-archive-content ul.products li.product:hover {
  transform: translateY(-3px);
  box-shadow: var(--mf-shadow-elevated);
  border-color: rgba(161, 23, 41, 0.18);
}

.mf-story-card__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  background: var(--mf-color-offwhite);
}

.mf-story-card__media img,
.mf-b2b .related.products ul.products li.product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.mf-story-card__body,
.mf-product-card__body,
.mf-search-result-card {
  padding: 1.05rem;
}

.mf-story-card__eyebrow,
.mf-product-card__eyebrow {
  display: inline-block;
  color: var(--mf-color-muted-soft);
  font-family: var(--mf-font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mf-story-card h3,
.mf-product-card h2,
.mf-search-result-card h2 {
  margin: 0.7rem 0 0;
  font-size: clamp(1.32rem, 1.7vw, 1.75rem);
  line-height: 1.05;
}

.mf-story-card p,
.mf-product-card__description,
.mf-search-result-card p {
  margin: 0.75rem 0 0;
  color: var(--mf-color-muted);
  line-height: 1.75;
}

.mf-product-card {
  overflow: hidden;
}

.mf-product-card:hover .mf-product-card__media img,
.mf-b2b .related.products ul.products li.product:hover img {
  transform: scale(1.03);
}

.mf-product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 5.4;
  overflow: hidden;
  box-sizing: border-box;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  background: var(--mf-color-offwhite);
  position: relative;
  padding: 30px 18px 18px;
}

.mf-product-card__media img {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  transition: transform 320ms ease;
}

.mf-product-card__body {
  min-width: 0;
  flex: 1;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 0.2rem;
}

.mf-product-card .woocommerce-loop-product__title {
  margin: 0.75rem 0 0;
}

.mf-product-card .woocommerce-loop-product__title a {
  color: var(--mf-color-charcoal);
  text-decoration: none;
}

.mf-product-card__meta,
.mf-product-card__footer,
.mf-product-card__availability {
  margin-top: 0.75rem;
}

.mf-product-card[hidden] {
  display: none !important;
}

.mf-home ul.products li.product[hidden],
.mf-home .products li.product[hidden],
.mf-archive-content ul.products li.product[hidden],
.mf-home ul.products li.product.is-search-hidden,
.mf-home .products li.product.is-search-hidden,
.mf-archive-content ul.products li.product.is-search-hidden {
  display: none !important;
}

.mf-product-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--mf-color-muted);
  font-size: 0.86rem;
}

.mf-product-card__meta .price {
  color: var(--mf-color-charcoal);
  font-family: var(--mf-font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.05;
}

.mf-product-card__meta .price small {
  color: var(--mf-color-muted-soft);
  font-family: var(--mf-font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mf-product-card__pack-price {
  display: block;
  color: var(--mf-color-muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mf-product-card__availability {
  color: var(--mf-color-muted-soft);
  font-size: 9px;
  font-weight: 700;
  font-family: var(--mf-font-mono);
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.mf-product-card__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.9rem;
}

.mf-product-card__swatch {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(4, 28, 44, 0.16);
  background: var(--mf-swatch-color, #ddd);
}

.mf-product-card__footer {
  margin-top: auto;
}

.mf-product-card__footer .button,
.mf-b2b .related.products ul.products li.product .button {
  width: 100%;
  min-height: 44px;
}

.mf-search-results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .mf-story-grid,
  .mf-home ul.products,
  .mf-home .products,
  .mf-archive-content ul.products,
  .mf-b2b .related.products ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .mf-story-grid,
  .mf-search-results,
  .mf-home ul.products,
  .mf-home .products,
  .mf-archive-content ul.products,
  .mf-b2b .related.products ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .mf-story-card__body,
  .mf-product-card__body,
  .mf-search-result-card {
    padding: 0.9rem;
  }

  .mf-story-card h3,
  .mf-product-card h2,
  .mf-search-result-card h2 {
    font-size: clamp(1.05rem, 4.2vw, 1.3rem);
  }

  .mf-story-card p,
  .mf-search-result-card p {
    font-size: 0.84rem;
    line-height: 1.6;
  }

  .mf-product-card__meta {
    display: grid;
    gap: 4px;
  }

  .mf-product-card__swatches {
    gap: 6px;
  }

  .mf-product-card__swatch {
    width: 10px;
    height: 10px;
    flex-basis: 10px;
  }

  .mf-product-card__footer .button,
  .mf-b2b .related.products ul.products li.product .button {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 9px;
    letter-spacing: 0.11em;
  }
}

@media (max-width: 360px) {
  .mf-story-grid,
  .mf-search-results,
  .mf-home ul.products,
  .mf-home .products,
  .mf-archive-content ul.products,
  .mf-b2b .related.products ul.products {
    grid-template-columns: 1fr;
  }
}
