.container {
  text-align: center;
}

.switcher {
  margin-bottom: 40px;
}

/* Hide radios */
input[type="radio"] {
  display: none;
}

.image-box1 {
  width: 450px;
  margin: 0 auto 10px;
}

.image-box2 {
  width: 450px;
  margin: 0 auto 10px;
}

.image {
  width: 100%;
  display: none;
}

/* FIRST SET */
#img1a:checked ~ .image-box1 .image1a { display: block; }
#img2a:checked ~ .image-box1 .image2a { display: block; }
#img3a:checked ~ .image-box1 .image3a { display: block; }

/* SECOND SET */
#img1b:checked ~ .image-box2 .image1b { display: block; }
#img2b:checked ~ .image-box2 .image2b { display: block; }
#img3b:checked ~ .image-box2 .image3b { display: block; }

/* Buttons */
.buttons label {
  display: inline-block;
  padding: 3px 6px;
  margin: 5px;
  background-color: lightgray;
  border: 1px solid #888;
  cursor: pointer;
}

/* Active states – FIRST SET */
#img1a:checked ~ .buttons label[for="img1a"],
#img2a:checked ~ .buttons label[for="img2a"],
#img3a:checked ~ .buttons label[for="img3a"] {
  background-color: blue;
  color: white;
}

/* Active states – SECOND SET */
#img1b:checked ~ .buttons label[for="img1b"],
#img2b:checked ~ .buttons label[for="img2b"],
#img3b:checked ~ .buttons label[for="img3b"] {
  background-color: darkgreen;
  color: white;
}