@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");

:root {
  --color1: #414141;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  width: 100%;
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 15px;
  font-weight: 500;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.app {
  max-width: 1300px;
  width: 100%;
  
  display: flex;
  flex-direction: column;
  background-color: var(--color1);
  gap: 3px;

  border-top: 3px solid var(--color1);
  border-bottom: 3px solid var(--color1);
  border-left: none;
  border-right: none;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.category {
  flex: 1 1 0;
  min-width: 160px;
  height: 35px;
  background-color: white;

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

.category:last-child {
  /* chrome subpixel rendering bug at some specific screen width or at some specific zoom level - fix */
  margin-right: -1px;
}

.arts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 250px;
  gap: 3px;
}

@media screen and (max-width: 1350px) {
  .arts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media screen and (max-width: 900px) {
  .arts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 680px) {
  .arts {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.art {
  background-color: white;

  display: grid;
  grid-template-columns: repeat(2, 50%);
  grid-template-rows: 35px 1fr 35px;

  padding: 0 15px;
}

.art > * {
  min-width: 0;
  min-height: 0;

  display: flex;
  align-items: center;
}

.art > span:nth-child(1) {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

.art > span:nth-child(2) {
  grid-column: -2 / -1;
  grid-row: 1 / 2;
}

.art > span:nth-child(4) {
  grid-column: 1 / 2;
  grid-row: -2 / -1;
}

.art > span:nth-child(5) {
  grid-column: -2 / -1;
  grid-row: -2 / -1;

  text-decoration: underline;
}

.art > span:nth-child(1),
.art > span:nth-child(4) {
  justify-content: flex-start;
}

.art > span:nth-child(2),
.art > span:nth-child(5) {
  justify-content: flex-end;
}

.art__image {
  grid-column : 1 / -1;
  grid-row: 2 / 3;

  display: flex;
  justify-content: center;
  align-items: center;
}

.art__image > img {
  width: 80%;
  height: 90%;
  object-fit: cover;
  object-position: left center;
}
