.mg-masonry {
  column-count: var(--mg-cols, 3);
  column-gap: var(--mg-gap, 16px);
}

@media (max-width: 1024px) {
  .mg-masonry { column-count: 2; }
}
@media (max-width: 600px) {
  .mg-masonry { column-count: 1; }
}

.mg-card {
  position: relative;
  break-inside: avoid;
  margin: 0 0 var(--mg-gap, 16px) !important;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}

.mg-card:focus {
  outline: 2px solid #ff013d;
  outline-offset: 2px;
}

.mg-card__media img {
  width: 100%;
  height: auto !important;
  display: block;
}

.mg-card__caption {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  height: 100%;
  padding: 1rem;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.4) 80%,
    rgba(0,0,0,0.9) 100%
  );
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}

.mg-card__title {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: #FF013D;
}

.mg-card__desc {
  margin-top: 6px;
  font-weight: 400;
  font-size: 12px;
  opacity: .85;
  line-height: 1.35;
}

.mg-card__price {
  margin-top: 10px;
  font-weight: 700;
  font-size: 14px;
}

.mg-card:hover .mg-card__caption {
  opacity: 1;
  transform: translateY(0);
}

.mg-card:focus-within .mg-card__caption {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mg-card:focus .mg-card__caption {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none), (pointer: coarse) {
  .mg-card__caption {
    opacity: 1;
    transform: translateY(0);
  }
}
