.wrapper {
    margin: 0 auto;
    width: 80%;
    text-align: center;
  }
  
  .image-gallery {
    margin: 0 auto;
    display: table;
  }
  
  .primary,
  .thumbnails {
    display: table-cell;
  }
  
  .thumbnails {
    width: 300px;
  
  }
  
  .primary {
    width: 600px;
    height: 400px;
    background-color: #cccccc;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }
  
  .thumbnail:hover .thumbnail-image, .selected .thumbnail-image {
    border: 4px solid red;
  }
  
  .thumbnail-image {
    width: 100px;
    height: 100px;
    margin: 20px auto;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border: 4px solid transparent;
  }