/* === Mosaic container === */
.mg-masonry--menu {
  --gap: var(--mg-gap, 16px);
  --row: auto;
  --divider: #0f0f0f;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  grid-auto-rows: var(--row);
  background: var(--divider);
  padding: 7px;
  align-items: start;
}

/* Each tile */
.mg-masonry--menu .mg-card {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: #111;
}

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

/* Image natural-ratio behavior */
.mg-masonry--menu .mg-card__media img {
  width: 100%;
  height: auto !important;
  display: block;
}

.mg-card img {
    cursor: pointer;
    transition: all 1200ms linear;
    -webkit-transition: all 1200ms linear;
    -moz-transition: all 1200ms linear;
    -ms-transition: all 1200ms linear;
    -o-transition: all 1200ms linear;
}

.mg-card:hover img {
    transform: scale(1.1);
    -webkit-transform: scale(1.1);
    -moz-transform: scale(1.1);
    -ms-transform: scale(1.1);
    -o-transform: scale(1.1);
}

/* Place items into the layout */
.mg-card.mg-col-span-1 { grid-column: span 1; }
.mg-card.mg-col-span-2 { grid-column: span 2; }

/* Caption overlay */
.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 0.25s ease, transform 0.25s ease;
  -webkit-transition: opacity 0.25s ease, transform 0.25s ease;
  -moz-transition: opacity 0.25s ease, transform 0.25s ease;
  -ms-transition: opacity 0.25s ease, transform 0.25s ease;
  -o-transition: opacity 0.25s ease, transform 0.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: 500;
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.35;
}

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

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

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

/* Responsive */
@media (max-width: 575.98px) {
  .mg-card__caption {
    flex-direction: column;
    align-items: start;
    justify-content: end;
    gap: 10px;
  }

  .mg-card__price {
    font-size: 12px;
  }
}

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